« Back to channel list

#RubyOnRails - 09 November 2015

« Back 1 day Forward 1 day »
[00:00:49] hardtail: has joined #RubyOnRails
[00:01:39] n00bDev: Lets say i put in 1231231241231 as my date. If i dont put a validtes or validtes_format_of, it will continue to the next page
[00:01:48] bitwise_: i am having trouble with this wikicat example in the Restful Rails Development book, seems like this responders gem is necessary to use now for respond_to
[00:02:30] bitwise_: the project is rails-api so the app controller inherits from ActionController::API, but using `include ActionController::RespondWith` seems to break it
[00:02:31] aadam21: has joined #RubyOnRails
[00:02:49] bitwise_: ActionController::RoutingError (uninitialized constant ActionController::RespondWith):
[00:02:53] n00bDev: I'm trying to catch bad input user error before advancing to the next page, but sadly validates and validates_format_of will throw my error message even with good input
[00:03:30] bitwise_: also this fails rails g responders:install
[00:03:42] nogic: has joined #RubyOnRails
[00:04:31] Radar: n00bdev: But it's a date field! It should be showing year/month/day! Is not doing that?
[00:05:06] bitwise_: like that "Adding new behavior" section seems like it would work http://edgeapi.rubyonrails.org/classes/ActionController/API.html but its not
[00:05:20] Radar: bitwise_: Do you have an app which reproduces this issue that we could look at?
[00:05:41] Radar: My guess is that rails-api isn't requiring action_controller/respond_with on purpose
[00:05:46] threeminutemonta: has joined #RubyOnRails
[00:05:55] axsuul_: has joined #RubyOnRails
[00:06:11] owenjones: has joined #RubyOnRails
[00:06:34] n00bDev: oh maybe its because i
[00:06:46] n00bDev: i'm using f.input, not f.date_field
[00:07:06] n00bDev: or i could use f.input as: :date ?
[00:07:08] bitwise_: Radar: I got it working, was missing 'responders' in my Gemfile
[00:07:16] Radar: bitwise_: that'll do it.
[00:07:25] Radar: bitwise_: I thought you had that already on account of "seems like this responders gem is necessary to use now for respond_to"
[00:07:31] Radar: bitwise_: Maybe you just hadn't restarted your server?
[00:07:33] Radar: n00bdev: !try
[00:07:33] helpa: n00bdev: Why don't you try it and find out for yourself?
[00:07:51] Radar: n00bdev: what will your nick be when you stop being a "n00b"?
[00:09:09] paradisaeidae: has joined #RubyOnRails
[00:09:40] mices: when i run rails generate devise Model it's gonna pull all the info from my model.rb file so it knows what to generate?
[00:09:42] bitwise_: Radar: although when I inherit from ::API it doesn't get loaded apparently
[00:10:03] Radar: bitwise_: try putting require 'action_controller/respond_with' at the top of that
[00:10:15] bitwise_: seems people are abandoning rails-api but i dunno
[00:10:23] fgo: has joined #RubyOnRails
[00:12:03] FailBit: TIL nil can be a hash key
[00:12:37] bitwise_: hrm, maybe AC::ImplicitRender is the way to go?
[00:12:48] sevenseacat: has joined #RubyOnRails
[00:14:15] banister: has joined #RubyOnRails
[00:14:29] bitwise_: well whoever recommende that book its already kind of broken
[00:14:37] shock_one: has joined #RubyOnRails
[00:16:23] pydave6367: has joined #RubyOnRails
[00:17:13] fre: has joined #RubyOnRails
[00:19:00] Axsuul: has joined #RubyOnRails
[00:20:09] aadam21: has joined #RubyOnRails
[00:24:23] sevenseacat: I ask because it's something I might be able to help with :)
[00:24:46] hardtail: has joined #RubyOnRails
[00:25:12] rgrmatt: has joined #RubyOnRails
[00:25:48] Radar: bitwise_: did you try what I suggested?
[00:25:54] mices: when i run rails generate devise Model it's gonna pull all the info from my model.rb file so it knows what to generate?
[00:26:47] mices: in terms of creating the right migration
[00:27:17] sevenseacat: its going to generate what you tell it to generate in that command.
[00:27:36] mices: can you give me the link
[00:27:44] Yomero3: has joined #RubyOnRails
[00:27:58] mices: using the command with arguments beyond Model
[00:28:35] moeabdol1: has joined #RubyOnRails
[00:28:49] sevenseacat: I never said that
[00:29:00] Radar: mices: Just run rails g devise user and then modify the migration that it creates to add new columns
[00:29:04] Axsuul: has joined #RubyOnRails
[00:29:11] mices: never mind i see it
[00:29:33] mices: that's what i was looking at
[00:30:45] Radar: It'll probably create a new migration to add new fields to the users table already
[00:30:49] Radar: If your User model already exists.
[00:36:20] jas02: has joined #RubyOnRails
[00:36:53] nogic: has joined #RubyOnRails
[00:36:57] aadam21: has joined #RubyOnRails
[00:40:15] bob104: has joined #RubyOnRails
[00:40:17] EminenceHC: has joined #RubyOnRails
[00:41:11] annlewis: has joined #RubyOnRails
[00:42:37] bruno-: has joined #RubyOnRails
[00:43:20] shibabu: has joined #RubyOnRails
[00:43:47] nya: has joined #RubyOnRails
[00:44:34] bvbrandon: has joined #RubyOnRails
[00:47:03] dtordable: has joined #RubyOnRails
[00:50:09] Rinzlit1: has joined #RubyOnRails
[00:54:30] aadam21: has joined #RubyOnRails
[00:55:11] rgrmatt: has joined #RubyOnRails
[00:55:28] ss_much: has joined #RubyOnRails
[00:56:22] TheNet: has joined #RubyOnRails
[00:58:42] aadam21_: has joined #RubyOnRails
[00:58:46] bob104: has left #RubyOnRails: ()
[01:00:34] rgtk: has joined #RubyOnRails
[01:02:41] rgtk: has joined #RubyOnRails
[01:03:47] bvbrandon: has joined #RubyOnRails
[01:04:29] rgtk: has joined #RubyOnRails
[01:05:23] aadam21: has joined #RubyOnRails
[01:06:20] rgtk: has joined #RubyOnRails
[01:08:13] rgtk: has joined #RubyOnRails
[01:09:16] aadam21_: has joined #RubyOnRails
[01:10:07] rgtk: has joined #RubyOnRails
[01:11:35] fgo: has joined #RubyOnRails
[01:12:01] d34th4ck3r: has joined #RubyOnRails
[01:12:02] rgtk: has joined #RubyOnRails
[01:12:30] rubyonrailed: has joined #RubyOnRails
[01:13:32] aadam21: has joined #RubyOnRails
[01:13:55] rgtk: has joined #RubyOnRails
[01:14:36] rgrmatt: has joined #RubyOnRails
[01:16:06] rgtk: has joined #RubyOnRails
[01:16:58] th0m_: has joined #RubyOnRails
[01:17:43] aadam21_: has joined #RubyOnRails
[01:17:50] rgtk: has joined #RubyOnRails
[01:19:38] rgtk: has joined #RubyOnRails
[01:21:30] rgtk: has joined #RubyOnRails
[01:21:38] aadam21: has joined #RubyOnRails
[01:23:28] rgtk: has joined #RubyOnRails
[01:25:20] rgtk_: has joined #RubyOnRails
[01:26:10] aadam21_: has joined #RubyOnRails
[01:27:13] rgtk: has joined #RubyOnRails
[01:29:10] rgtk: has joined #RubyOnRails
[01:30:03] mices: well it looks like i got everything working
[01:30:08] aadam21: has joined #RubyOnRails
[01:30:34] jas02: has joined #RubyOnRails
[01:31:05] rgtk: has joined #RubyOnRails
[01:31:55] Pupeno: has joined #RubyOnRails
[01:33:02] sevenseacat: good stuff :)
[01:33:03] rgtk: has joined #RubyOnRails
[01:34:33] mices: ha ha thanks
[01:34:41] mices: that's enough deving for tonight
[01:34:52] rgtk: has joined #RubyOnRails
[01:36:43] rgtk: has joined #RubyOnRails
[01:38:37] rgtk: has joined #RubyOnRails
[01:40:32] rgtk: has joined #RubyOnRails
[01:40:44] annlewis: has joined #RubyOnRails
[01:42:23] rgtk: has joined #RubyOnRails
[01:43:15] rclanan: has joined #RubyOnRails
[01:43:55] bruno-: has joined #RubyOnRails
[01:44:21] rgtk: has joined #RubyOnRails
[01:44:38] aadam21: has joined #RubyOnRails
[01:45:01] SteenJobs: has joined #RubyOnRails
[01:45:13] FailBit: :$- is a valid symbol literal
[01:45:42] Aeyrix: Ox0dea in #ruby would love you.
[01:46:17] rgtk: has joined #RubyOnRails
[01:46:20] FailBit: because I'm incredibly vulgar and random?
[01:46:50] Aeyrix: He likes code golf and obfuscation.
[01:46:55] ja: what do you see when you look at :$-, FailBit?
[01:47:01] pydave6367: has joined #RubyOnRails
[01:47:14] FailBit: I don't like code golf and obfuscation
[01:47:17] shock_one: has joined #RubyOnRails
[01:47:21] FailBit: I like to make code as concise as possible
[01:47:37] FailBit: however, that usually means "as short as is comfortably readable" as well
[01:47:49] rickmasta: has joined #RubyOnRails
[01:48:09] rgtk: has joined #RubyOnRails
[01:48:33] VeryBewitching: Ox0dea also likes words
[01:48:44] johnflux: has joined #RubyOnRails
[01:48:46] VeryBewitching: And context. He's fun to talk to.
[01:49:09] owenjones: has joined #RubyOnRails
[01:49:53] tvon: has joined #RubyOnRails
[01:50:02] rgtk: has joined #RubyOnRails
[01:51:01] sevenseacat: he's an interesting character.
[01:51:53] rgtk: has joined #RubyOnRails
[01:52:47] RegulationD: has joined #RubyOnRails
[01:52:48] tvon: has joined #RubyOnRails
[01:53:08] SteenJobs: has joined #RubyOnRails
[01:53:30] Aeyrix: Shame he's not into Rails tbh.
[01:53:49] rgtk: has joined #RubyOnRails
[01:53:51] CodingWolf: has joined #RubyOnRails
[01:54:15] tvon: has joined #RubyOnRails
[01:54:24] FailBit: rails is a bit of a mess
[01:55:37] xcm: has joined #RubyOnRails
[01:55:38] rgtk: has joined #RubyOnRails
[01:55:43] FailBit: i said it's a mess
[01:57:34] rgtk: has joined #RubyOnRails
[01:57:47] FailBit: https://i.imgur.com/3bIEmWC.png
[01:58:46] n00bDev: has joined #RubyOnRails
[01:59:28] rgtk: has joined #RubyOnRails
[01:59:42] one_zero: has joined #RubyOnRails
[01:59:55] cswelin: has joined #RubyOnRails
[02:00:51] build22_: has joined #RubyOnRails
[02:01:32] pontiki: this means nothing to me
[02:01:38] rgtk: has joined #RubyOnRails
[02:02:10] alb12_: has joined #RubyOnRails
[02:03:31] Aeyrix: Guy swaps PS4 HD for a garbage one
[02:03:35] Aeyrix: convinces friend it's now in 4k
[02:03:36] Aeyrix: it wasn't
[02:03:51] pontiki: yes, i read it
[02:03:56] fre: has joined #RubyOnRails
[02:04:00] pontiki: it still means nothing, just someone being a big dick
[02:04:07] codeurge: has joined #RubyOnRails
[02:05:07] Ropeney: pontiki, who is; the guy who calls pc gamers pc mustard race?
[02:05:08] rgtk: has joined #RubyOnRails
[02:05:29] Aeyrix: Mustard race
[02:05:34] Aeyrix: because console gamers need to ketchup
[02:05:50] pontiki: i don't know what that means
[02:06:02] pontiki: what's a mustard race? who is fastest to empty the jar?
[02:06:43] Aeyrix: >d34thh4ck3r
[02:06:46] Aeyrix: >deathhacker
[02:06:48] Aeyrix: please no
[02:07:17] rgtk: has joined #RubyOnRails
[02:07:30] annlewis: has joined #RubyOnRails
[02:08:46] bvbrandon: has joined #RubyOnRails
[02:08:59] rgtk: has joined #RubyOnRails
[02:10:51] rgtk: has joined #RubyOnRails
[02:11:20] bvbrandon: has joined #RubyOnRails
[02:12:37] fgo: has joined #RubyOnRails
[02:12:47] rgtk: has joined #RubyOnRails
[02:14:38] rgtk: has joined #RubyOnRails
[02:16:39] rgtk: has joined #RubyOnRails
[02:16:39] moeabdol1: has joined #RubyOnRails
[02:16:53] owenjones: has joined #RubyOnRails
[02:17:33] bvbrandon: has left #RubyOnRails: ()
[02:18:32] Rinzlit: has joined #RubyOnRails
[02:18:35] rgtk: has joined #RubyOnRails
[02:18:41] rickmasta: has joined #RubyOnRails
[02:19:12] fre: has joined #RubyOnRails
[02:20:18] rgtk: has joined #RubyOnRails
[02:22:14] rgtk: has joined #RubyOnRails
[02:22:33] sarink: has joined #RubyOnRails
[02:23:41] Rodya_: has joined #RubyOnRails
[02:24:09] rgtk: has joined #RubyOnRails
[02:24:57] jas02: has joined #RubyOnRails
[02:26:02] rgtk: has joined #RubyOnRails
[02:26:59] owenjones: has joined #RubyOnRails
[02:27:58] rgtk: has joined #RubyOnRails
[02:28:10] d34th4ck3r: has joined #RubyOnRails
[02:29:35] rgrmatt: has joined #RubyOnRails
[02:29:47] rgtk: has joined #RubyOnRails
[02:31:58] rgtk: has joined #RubyOnRails
[02:32:28] wwalker: has joined #RubyOnRails
[02:33:45] rgtk: has joined #RubyOnRails
[02:34:12] wwalker: EVERY action on my development rails server happens twice, on average the start 35 Micro seconds apart. I don't have any public/assets, and I've uninstalled turbolinks. at only 35 Microseconds separation it seems like the split has to be happening local to the server in rack ?
[02:34:50] wwalker: even a call to read /favicon.ico....
[02:35:30] rgtk: has joined #RubyOnRails
[02:37:23] rgtk: has joined #RubyOnRails
[02:39:51] kp666_: has joined #RubyOnRails
[02:40:42] kp666_: has joined #RubyOnRails
[02:41:30] kp666_: has joined #RubyOnRails
[02:42:08] maxz: has joined #RubyOnRails
[02:42:17] kp666_: has joined #RubyOnRails
[02:44:25] bruno-: has joined #RubyOnRails
[02:45:44] shibabu: has joined #RubyOnRails
[02:47:34] tuelz1: has joined #RubyOnRails
[02:47:36] dnewkerk: has joined #RubyOnRails
[02:47:40] jscheel: has joined #RubyOnRails
[02:48:18] rgtk: has joined #RubyOnRails
[02:49:55] annlewis: has joined #RubyOnRails
[02:50:40] DanielN: has joined #RubyOnRails
[02:51:02] rhizome: weird. could it just be logging one action twice?
[02:52:37] rgtk: has joined #RubyOnRails
[02:53:29] koprom: has joined #RubyOnRails
[02:53:42] wcalderipe: has joined #RubyOnRails
[02:59:11] jtthedev: has joined #RubyOnRails
[03:00:16] d34th4ck3r: has joined #RubyOnRails
[03:00:59] smathy: has joined #RubyOnRails
[03:01:14] rubyonrailed: has joined #RubyOnRails
[03:01:15] rgtk: has joined #RubyOnRails
[03:01:35] build22_: has joined #RubyOnRails
[03:02:00] pydave6367: has joined #RubyOnRails
[03:04:23] fedexo: has joined #RubyOnRails
[03:05:15] A124: has joined #RubyOnRails
[03:05:31] rgtk_: has joined #RubyOnRails
[03:09:38] rgtk: has joined #RubyOnRails
[03:13:45] fgo: has joined #RubyOnRails
[03:13:52] owenjones: has joined #RubyOnRails
[03:18:18] rgtk: has joined #RubyOnRails
[03:18:31] goodcodeguy: has joined #RubyOnRails
[03:19:07] jas02: has joined #RubyOnRails
[03:19:49] smathy: has joined #RubyOnRails
[03:19:59] mghaig: has joined #RubyOnRails
[03:20:01] mghaig: has left #RubyOnRails: ()
[03:20:03] Rinzlit1: has joined #RubyOnRails
[03:20:07] mghaig: has joined #RubyOnRails
[03:20:08] vigintas: has joined #RubyOnRails
[03:20:59] mmb: has joined #RubyOnRails
[03:22:35] rgtk: has joined #RubyOnRails
[03:23:00] infamos: has joined #RubyOnRails
[03:26:41] rgtk_: has joined #RubyOnRails
[03:29:54] sarink: has joined #RubyOnRails
[03:31:12] rgrmatt: has joined #RubyOnRails
[03:31:47] rubyonrailed: has joined #RubyOnRails
[03:32:41] aadam21: has joined #RubyOnRails
[03:33:42] rickmasta: has joined #RubyOnRails
[03:34:45] shock_one: has joined #RubyOnRails
[03:35:26] TheNet: has joined #RubyOnRails
[03:37:13] sevenseacat: is there a way to lock the version of phantomjs required by poltergeist, in a rails app? phantomjs is installed externally (eg. by brew) so i'm not sure if there is, but the latest version of phantomjs has a bug I'd like to avoid
[03:38:27] mghaig: has joined #RubyOnRails
[03:40:12] Radar: sevenseacat: which version are you using?
[03:40:30] sevenseacat: 2.0.0 has the bug, so I want to use any other version
[03:40:43] sevenseacat: (and 2.0.0 is the latest version)
[03:41:08] Radar: https://gist.github.com/radar/83ec6dfdfc8c9409d5a9
[03:41:14] roxtrongo: has joined #RubyOnRails
[03:41:16] Radar: This is the version that we use at Marketplacer.
[03:41:27] Radar: All developers are required to run this version or else MP makes frowny face
[03:41:40] sevenseacat: funny, that is marked as fixing the same bug that I'm trying to fix :P
[03:41:55] sevenseacat: yeah looking for a way to enforce it
[03:42:10] Radar: sevenseacat: may I recommend dictatorship?
[03:42:25] alb12_: has joined #RubyOnRails
[03:42:41] Radar: I'd chuck it in the README as part of the process of setting up the project.
[03:42:47] Radar: and then let fate sort them out
[03:43:05] sevenseacat: yeah going to do that, and also posting on SO to see if its available somehow from poltergeist's config
[03:43:19] krz: has joined #RubyOnRails
[03:45:02] Radar: If it is I would like to know :)
[03:45:35] bruno-: has joined #RubyOnRails
[03:46:57] chipotle: has joined #RubyOnRails
[03:47:11] sevenseacat: http://stackoverflow.com/q/33602220/560215 well watch this space
[03:49:13] mghaig: has joined #RubyOnRails
[03:49:20] hardtail: I am...just about FREE of Bootstrap! wahhaha
[03:51:08] darrencauthon: has joined #RubyOnRails
[03:51:29] hardtail: I can feel the weight of the chains lifting off me, gg.
[03:51:40] hardtail: haha how are you sevenseacat?
[03:52:02] sevenseacat: not bad given it's Monday :) and yourself?
[03:54:43] mghaig: has joined #RubyOnRails
[03:55:06] hardtail: good to hear :D not bad thanks!
[03:55:50] ebbflowgo: has joined #RubyOnRails
[03:55:56] pontiki: stick with writing APIs, Hardtail
[03:58:43] hardtail: that sounds interesting pontiki
[03:59:11] Axy: has joined #RubyOnRails
[03:59:26] pontiki: i'm having a whole lot of fun concentrating on models, logic, and stuff like that, and never having to worry about formmatting pages
[03:59:54] sevenseacat: playing around with modelling can be fun. i'm going to be doing that later
[03:59:56] pontiki: and concentrating all my current learning about front end design on jekyll and static stuff
[04:00:01] sevenseacat: in my World-Beating Tenpin Bowling App
[04:00:15] pontiki: just separate the two domains completely, to concentrate better
[04:00:44] pontiki: keeping it fun, anyway
[04:02:46] build22_: has joined #RubyOnRails
[04:03:01] hardtail: yeah, I have never used jekyll before pontiki.
[04:03:22] pontiki: jekyll 3 just dropped and it's a huge win
[04:04:45] moeabdol1: has joined #RubyOnRails
[04:05:17] sevenseacat: I might look at upgrading my blog to it
[04:05:32] paradisaeidae: has joined #RubyOnRails
[04:06:07] pontiki: i'm cranking it through all my sites, and upgrading the toolchain as well
[04:06:12] sevenseacat: atm it uses jekyll 2.4
[04:07:00] pontiki: do you use any plugins?
[04:07:10] ja: jekyll 3, zomg!
[04:07:13] hardtail: ah so you can write MD or plain text and it enters it into a theme?
[04:07:22] sevenseacat: only ones that github supports, as my blog is on github pages
[04:07:23] Axsuul: has joined #RubyOnRails
[04:07:42] pontiki: you shouldn't have to do anything except upgrade to 3.0 then
[04:07:43] sevenseacat: Hardtail: yeah I write my blog posts in markdown
[04:08:12] sevenseacat: pontiki: cool :) will look at that this afternoon
[04:08:22] hardtail: okay, cool stuff. but then there is a layer of html/css ontop of that then right?
[04:08:23] kp666: has joined #RubyOnRails
[04:08:25] pontiki: nearly all my writing of > 140 letters is markdown these days :)
[04:08:59] sevenseacat: Hardtail: yeah, they get converted to HTML, and wrapped in layouts
[04:09:07] pontiki: it constructs a static site of all that, converting your md into html mixing it into a full page, etc
[04:09:28] sevenseacat: my blog isnt open source but Radar's is and also uses Jekyll - check it out https://github.com/radar/ryanbigg.com
[04:09:41] pontiki: kinda like if you used markdown for your rails page views
[04:09:45] hardtail: right ok, so you still need to create the markup obviously if making your own theme
[04:09:53] framling: has joined #RubyOnRails
[04:09:54] sevenseacat: the layout, yes
[04:10:05] pontiki: layouts tend to be really simple
[04:10:22] hardtail: flex box is a breeze and extremely powerful
[04:10:31] hardtail: you can reposition content anywhere without changing the html
[04:10:39] sevenseacat: http://sevenseacat.net/ super complicated layout there
[04:11:09] pontiki: one of my jekyll sites (but it is in bootstrap) : https://github.com/tamouse/swaac
[04:11:46] pontiki: this is the jekyllrb site site:https://github.com/jekyll/jekyll/tree/master/site
[04:12:01] sevenseacat: I keep forgetting i linked my bowling scores in my about me pages. makes me chuckle every time.
[04:12:34] pontiki: this is the site template, what you get when you run `jekyll new site` : https://github.com/jekyll/jekyll/tree/master/lib/site_template
[04:12:39] pontiki: *really* simple
[04:13:16] pontiki: anyway, i'll shuttup about jekyll now
[04:13:40] Radar: Hardtail: The CSS for my blog is really complicated https://github.com/radar/ryanbigg.com/blob/master/css/style.css
[04:13:48] Radar: And by "really complicated" I mean "not really complicated"
[04:14:12] Radar: Twist's is just as easy too: https://github.com/radar/twist/tree/master/app/assets/stylesheets
[04:14:48] fgo: has joined #RubyOnRails
[04:14:59] owenjones: has joined #RubyOnRails
[04:15:09] Radar: Although there I split that up into different files as different styles apply to wildly different parts of the application
[04:15:35] sevenseacat: i'd make my blog open but I have a whole bunch of random shit in drafts that probably shouldnt be public >_>
[04:15:35] Radar: Makes it easier for me to think "I'm on chapters/show.html.erb, so the CSS I want is going to be in chapters.scss.css"
[04:17:10] braincras: has joined #RubyOnRails
[04:17:48] hardtail: Radar, looks good! I just rewrote my final project mobile first, responsive with flex box...no SCSS though, I am told this is something I must start using right away, eh.
[04:19:09] hardtail: I should probably split it into the different .scss files though once I attach it to the Rails app
[04:20:38] pontiki: not using scss is like not using variables, requires, methods, etc
[04:24:06] fifi-v: has joined #RubyOnRails
[04:24:39] hardtail: ok, good to know
[04:24:44] hardtail: a lot has changed..
[04:25:00] paradisaeidae: has joined #RubyOnRails
[04:26:52] Oog: has joined #RubyOnRails
[04:28:05] fifi-v: Hi all, in my Rails 3 app, there is a model "Role", it "has_one" quotas. I'd like to run some logic after "Role.quotas.update_attributes!". Is after_save the right option? How can I tell whether Role.quotas has been changed (the logic shouldn't be run if quotas is not changed) ?
[04:30:52] darrencauthon: has joined #RubyOnRails
[04:33:57] Aeyrix: http://apidock.com/rails/v2.3.8/ActiveRecord/Callbacks/after_update
[04:34:18] smathy: has joined #RubyOnRails
[04:36:00] fifi-v: Aeyrix: thanks, but http://apidock.com/rails/ActiveRecord/Callbacks/after_update shows "this method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here."
[04:36:03] sevenseacat: Aeyrix: 2.3.8?
[04:36:20] Aeyrix: idk why it defaulted to 2.3.8
[04:36:51] hardtail: goodnight everyone, take care.
[04:38:23] pydave6367: has joined #RubyOnRails
[04:38:39] Radar: People still use apidock.com instead of devdocs.io?
[04:39:10] Aeyrix: Radar: http://devdocs.io/rails/activesupport/callbacks/filters/after
[04:40:16] fre: has joined #RubyOnRails
[04:41:29] pontiki: i use api.rubyonrails.org alla time
[04:42:09] Aeyrix: Yeah same.
[04:42:20] Radar: api.rubyonrails.org is a ghetto
[04:42:28] Aeyrix: Thanks, Zed Shaw.
[04:42:30] Radar: sifn't use a bootstrap react design
[04:43:37] VeryBewitching: Radar: You're on Mac aren't you? Don't use Dash?
[04:43:57] sarink: has joined #RubyOnRails
[04:44:37] Radar: VeryBewitching: yes and yes.
[04:44:38] xcm: has joined #RubyOnRails
[04:45:19] Radar: I'm not a savage.
[04:45:23] Radar: I'm not a savage.
[04:45:56] VeryBewitching: That was the *least* likely thing I expected someone to say next lol
[04:46:12] bruno-: has joined #RubyOnRails
[04:46:58] Radar: If I made you laugh then I have done my job.
[04:47:23] pontiki: what does "ghetto" mean in the context of web sites?
[04:47:30] VeryBewitching: I admit, there was a chuckle there; perhaps even a giggle ;)
[04:47:37] Radar: pontiki: imo: hard to use
[04:47:40] VeryBewitching: pontiki: GeoCities circa 1998
[04:47:54] Radar: pontiki: I can't go to api.rubyonrails.org and look something up and link someone to it.
[04:48:02] Radar: But I guess it's only designed for individual uses.
[04:48:06] pontiki: i do that quite a bit
[04:48:15] Radar: Contrast with http://elixir-lang.org/docs/stable/elixir/Kernel.html
[04:48:16] iateadonut: has joined #RubyOnRails
[04:48:16] shibabu: has joined #RubyOnRails
[04:48:22] tuelz1: has joined #RubyOnRails
[04:48:32] Aeyrix: Radar: Elixir has a profile to build so it has to look like a startup website
[04:48:34] Radar: Lookup split there
[04:48:37] Radar: Aeyrix: :burn:
[04:48:39] Aeyrix: Rails is already established so they don't give a rats
[04:49:45] VeryBewitching: I think some people like to write documentation and some people don't.
[04:50:04] pontiki: that's always the case, VB
[04:50:17] Radar: ACTION is one of those people who LOVES writing documentation
[04:50:19] sevenseacat: wait, why cant you go to api.rubyonrails.org and look something up and link people to it?'
[04:50:24] Radar: It might be obvious.
[04:50:29] Radar: sevenseacat: because it uses frames
[04:50:33] pontiki: i'm still trying to figure out why radar can't link someone to something from api
[04:51:09] Radar: http://i.imgur.com/uQIvim8.png
[04:51:10] roxtrongo: has joined #RubyOnRails
[04:51:16] Radar: Show me where the link is that I can copy+paste to link someone to the hm docs
[04:51:26] VeryBewitching: zomg it's xhtml
[04:51:35] sevenseacat: Radar: look to your right
[04:51:41] Radar: Yes, there is a tiny "Link" there, but it does not update the URL bar.
[04:51:59] Radar: UX LESSON TIME
[04:52:07] Aeyrix: Radar: api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many
[04:52:08] pontiki: no, right-click, copy url
[04:52:14] Radar: pontiki: boo
[04:52:19] sevenseacat: not saying it cant be improved, but its perfectly possible to link people to stuff there.
[04:52:23] duncannz: has joined #RubyOnRails
[04:52:51] pontiki: you say "can't" i say "i'm doing it all the time"
[04:53:20] fifi-v: Any idea on my question? How to I detect if Role.quotas (Role "has_one" Quotas) is updated?
[04:53:29] Radar: https://monosnap.com/file/DmnW09Il0l4Ec458B9ZPkCFk4uyIP3
[04:53:31] Radar: ACTION has opinions
[04:53:32] pontiki: but i'm hearing now it's "i don't like the experience of doing it"
[04:53:33] sevenseacat: fifi-v: that doesnt make much sense
[04:53:43] pontiki: and that makes total sense to me
[04:53:45] sevenseacat: Role.quotas doesnt exist
[04:54:09] Radar: Sorry, "direction people read" should be "direction people scan looking for things"
[04:54:38] Aeyrix: Incorrect tbh
[04:54:47] pontiki: well, maybe it's different for mice
[04:55:04] Aeyrix: iirc a psychology institute's research showed people scan in a Z pattern
[04:55:08] Aeyrix: TL TR BL BR
[04:55:13] pontiki: it was nearly the first thing i notice when i started looking at it
[04:55:20] Aeyrix: Hence why you have things like a logo on the left, and a navigation on the right
[04:55:26] Radar: Maybe I am too hard on api.rubyonrails.org :P
[04:55:29] Aeyrix: then legal on the bottom left, and misc. links on the bottom right
[04:55:37] Radar: I pitched updating the design to it about 4 years ago and they didn't change it at all.
[04:55:50] Radar: So naturally, some 37 signals kid will do it this year or next and get all the priase.
[04:56:00] Aeyrix: They're Basecamp now.
[04:56:08] Radar: fifi-v: "updated"?
[04:56:10] Aeyrix: >Keeping up with hip tech
[04:56:13] Aeyrix: >Not keeping up with startups
[04:56:38] sevenseacat: I thought the current design was more recent than 4 years, I remember when it came out
[04:56:50] sevenseacat: and ahem its Basecamp now, not 37 signals, duh
[04:56:52] Radar: sevenseacat: Ok, maybe I am being hyperbolic.
[04:56:59] Radar: Which is so unlike me.
[04:57:29] Aeyrix: You *never* use hyperbole right? :D
[04:57:48] fifi-v: which part doesn't make sense? what information should I give?
[04:57:58] Aeyrix: I remember getting an English teacher pretty irate by repeatedly pronouncing that word as "hyper bowl" for about three weeks.
[04:58:33] pontiki: that's what comes after the super bowl, right?
[04:58:35] oded: has joined #RubyOnRails
[04:58:37] Radar: fifi-v: !xy
[04:58:37] helpa: fifi-v: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[04:58:48] Radar: fifi-v: Please explain why you want to do this and we'll give you an answer.
[04:58:57] Aeyrix: pontiki: The winners of the superbowl go to the hyperbowl yeah
[04:59:22] pontiki: the cereal bowl is my favourite
[04:59:30] Aeyrix: soup bowl
[05:00:15] fifi-v: Radar: I'd like to run some code when Role.quotas is changed. I might was on the wrong track, maybe this should be a hook in Quotas rather than role.
[05:00:25] TheNet: is it ok to ask for opinions?
[05:00:31] Radar: TheNet: !8ball
[05:00:40] TheNet: I'll take it
[05:00:42] sevenseacat: again, Role.quotas does not exist
[05:00:51] Radar: fifi-v: what does this code do?
[05:00:52] sevenseacat: it will give you an error if you call it
[05:00:56] TheNet: what do people think about slim's syntax versus haml's?
[05:01:03] sevenseacat: slim drives me batty.
[05:01:04] Radar: TheNet: ERB 4 lyfe
[05:01:05] Aeyrix: Both are haram.
[05:01:19] sevenseacat: I'd use ERB over slim.
[05:01:36] infamos: has joined #RubyOnRails
[05:01:48] chipotle: has joined #RubyOnRails
[05:01:52] Radar: In order: ERB > haml > Slim
[05:01:53] fifi-v: Radar: it triggers a worker which recalculates quotas for every user in that role
[05:02:20] fifi-v: as long as the new quotas are larger than their old quotas
[05:02:21] Radar: fifi-v: Can I recommend that you put this code in the controller action, rather than in an after_save callback?
[05:02:35] Radar: fifi-v: Being explicit about it in the controller actions leads to easier future debuggability when somethinggoes wrong.
[05:02:41] TheNet: why do you guys think haml is better than slim?
[05:02:52] Radar: Slim is TOO minimal imo
[05:03:12] sevenseacat: its very easy to misread slim, even with syntax highlighting
[05:03:19] sevenseacat: and very easy to just get it wrong
[05:03:31] build22_: has joined #RubyOnRails
[05:03:31] sevenseacat: its all bare words! except when it isnt
[05:03:53] acti0nman: has joined #RubyOnRails
[05:03:57] Aeyrix: I like Erb because it's closest to the markup it generates.
[05:04:07] TheNet: do you think slim's the direction alternative templating is going in? I see a lot of support for it
[05:04:28] fifi-v: Radar: in the controller's save method?
[05:04:29] sevenseacat: i think haml offers some benefits, like making it virtually impossible to write invalid html
[05:04:43] sevenseacat: TheNet: I've only ever seen one project in the wild that uses slim.
[05:04:44] Radar: fifi-v: The create and update actions.
[05:04:51] pontiki: interesting; i'd not heard that complaint about slim before
[05:05:03] sevenseacat: I don't think its the future, I avoid it at all costs.
[05:05:10] krz: has joined #RubyOnRails
[05:05:31] moeabdol1: has joined #RubyOnRails
[05:05:33] pontiki: i always thought haml and slim were conceptually the same
[05:05:50] sevenseacat: they look somewhat similar
[05:05:56] TheNet: pontiki: slim is like haml with less symbols as I understand it
[05:06:12] sevenseacat: slim takes the 'we want it to look as little like actual html as possible' to the extreme
[05:06:12] pontiki: i do think that direction the way things should go, tho. same with sass/scss
[05:06:19] agoldboi: has joined #RubyOnRails
[05:06:26] sevenseacat: and I agree with Radar in that it goes too far and gets too minimal
[05:06:48] pontiki: i don't have any experience with slim itself
[05:07:23] pontiki: haml made me realize how much i hated writing html, even with snippets and smart templates
[05:07:45] Trynemjoel: has joined #RubyOnRails
[05:08:00] sevenseacat: if i was writing views for my own projects, i would drop in haml in a heartbeat. if i was writing views to share with others, i would use erb.
[05:08:04] TheNet: slim is supposedly faster than haml in production
[05:08:10] TheNet: a lot faster
[05:08:13] vigintas: has joined #RubyOnRails
[05:08:27] sevenseacat: php is a lot faster than ruby, too
[05:08:30] pontiki: benchmarks, plx
[05:08:41] TheNet: pontiki: every haml vs slim post ever
[05:08:42] Radar: Views have very rarely been the benchmark in any Rails app that I've been a part of developing.
[05:08:49] czerasz: has joined #RubyOnRails
[05:08:53] Radar: Typically it's something dumb that I'm doing with the models. That's what leads to the bottlenecks.
[05:09:05] Radar: So for views I optimise for developer happiness.
[05:09:17] Radar: !subjective
[05:09:17] helpa: What you just asked could be classed as subjective. Subjective questions often start flamewars, which are tedious and boring. Try all the available options and see which one suits you the best.
[05:09:36] pontiki: i have no wish or care to change to slim
[05:09:44] pontiki: you'll have to do better than that
[05:09:51] TheNet: hey! I got permission from the 8 ball >:L
[05:10:01] Radar: TheNet: I know ;)
[05:10:08] pontiki: permission for *what*
[05:10:10] Radar: I am just in a troll-y mood today
[05:10:15] Aeyrix: A rarity.
[05:10:24] Radar: pontiki: http://logs.ryanbigg.com/RubyOnRails#4515419
[05:10:42] pontiki: ask for them, not change them
[05:10:51] kp666: has joined #RubyOnRails
[05:10:58] Radar: Ah it seems it's a communication issue
[05:11:09] Radar: I don't think TheNet is trying to convince us to use something other than what we're already using
[05:11:13] Radar: I think TheNet is just asking what we use and why we use it
[05:11:26] sevenseacat: thats not the impression i get
[05:11:31] pontiki: then why all the pressure about using slim?
[05:11:32] sevenseacat: they seem hell-bent on slim
[05:12:03] pontiki: does your security in your choice of using slim depend on anyone agreeing with you?
[05:12:06] Radar: Nothing is stronger than one's opinion in one's own beliefs.
[05:12:08] sevenseacat: 'we dont use it' 'but its faster! its the future!'
[05:12:22] Radar: Except love, of course.
[05:12:33] TheNet: pontiki: I'm just saying what I've read. I don't really buy the "see which one suits you best" argument, there will always be edge cases that other's have encountered that you haven't. Other opinions are valuable.
[05:12:59] pontiki: that's not what you're presenting
[05:13:04] TheNet: I haven't made a choice yet
[05:13:16] pontiki: i mean, shall i now talk about everything i've read today?
[05:13:22] TheNet: sevenseacat: some issue with the syntax which makes it annoying to accomplish a certain thing
[05:13:38] sevenseacat: you'll find that with both slim and haml - they suck for marking up content.
[05:13:49] sevenseacat: http://chriseppstein.github.io/blog/2010/02/08/haml-sucks-for-content/
[05:13:51] pontiki: that's why with haml i use :markdown :D
[05:14:40] TheNet: markdown and haml serve different purposes
[05:14:53] pontiki: but you can write markdown in your haml file just like that
[05:15:00] sevenseacat: some of that has changed, but most of it is still the same.
[05:15:28] VeryBewitching: HAML is about structure more than content, imo
[05:15:44] pontiki: http://haml.info/docs/yardoc/file.REFERENCE.html#markdown-filter
[05:15:50] fifi-v: Radar: will do more experiments with it, thanks for your guidance
[05:15:51] fgo: has joined #RubyOnRails
[05:16:21] pontiki: VB: indeed, just as HTML is
[05:16:32] pontiki: HTML really sucks for marking up content, too
[05:17:12] Radar: that is the best pun of 2015
[05:17:31] VeryBewitching: ACTION gives pontiki a cookie.
[05:17:42] pontiki: srsly? you are quite pun-starved if that's the case
[05:18:11] VeryBewitching: "It was back to the daily grind at the sausage factory." "I never heard sausage bad joke"
[05:18:17] kp666_: has joined #RubyOnRails
[05:18:21] VeryBewitching: ACTION stops with the puns now
[05:21:07] pontiki: here's the crux, for me: asking for opinions and decrying them as soon as they're said isn't "listening to others's opinions"
[05:21:08] threeminutemonta: has joined #RubyOnRails
[05:21:14] aadam21: has joined #RubyOnRails
[05:21:51] recurrence: has joined #RubyOnRails
[05:22:28] TheNet: pontiki: I never decried anyone's opinion.
[05:23:08] Radar: I can see how it could be interpreted as that.
[05:23:28] pontiki: indeed, every negative opinion offered about slim was responded to with a positive opinion about it
[05:25:13] TheNet: pontiki: I only offered one positive opinion on slim, which was the main subject in most haml vs slim posts I've read. Is it a surprise I'd be curious to know if people thought that was important?
[05:25:14] pontiki: you like it, super, you use it, great, you have reasons for doing so, excellent.
[05:25:32] TheNet: pontiki: I don't use it, I've used haml for all my rails projects.
[05:26:32] pontiki: okay, you want to use it, great
[05:26:55] TheNet: I want to use what's best, which is why I asked here.
[05:26:59] helpa: "Best" and "better" are subjective. Try to use a different term.
[05:27:01] pontiki: THERE IS NO BEST
[05:28:05] pontiki: there is better or worse for a given situation, at a given point in time
[05:28:11] sevenseacat: the easy thing about templating languages is that you can use multiple, and its easy to swtich between them
[05:28:13] trosborn: has joined #RubyOnRails
[05:28:20] sevenseacat: so you're not locked in to anything
[05:28:45] sevenseacat: meaning its all good to have opinions about them, but the decision paralysis just isnt there
[05:28:46] pontiki: getting locked in is actually worse than anything if you plan on maintaining a project
[05:29:20] sevenseacat: its more important to have consensus with anyone else on the project, than it is to pick the 'right' one
[05:29:37] TheNet: and if you're the only one?
[05:29:43] sevenseacat: then pick whatever one you like best
[05:29:48] sevenseacat: until you have a reason not to
[05:29:54] pontiki: then use them all, switch off every other project
[05:31:09] TheNet: alright, I think I'm going to try slim just so I know what it's like
[05:31:32] TheNet: thanks for the subjective opinions
[05:31:46] acti0nman: has joined #RubyOnRails
[05:31:54] sevenseacat: good-o, have fun :)
[05:32:46] Tref: has joined #RubyOnRails
[05:32:57] pontiki: i do have a very personal opinion about personal projects; as i'm the only one benefiting from the effort, i'm going to make an investment in myself to learn and hone my skills
[05:33:22] pontiki: obviously, not everyone else will have that opinion
[05:33:27] pontiki: nor should they
[05:33:50] Radar: personal projects is where i try out the new shiny
[05:33:52] rgrmatt: has joined #RubyOnRails
[05:34:33] TheNet: I agree that slim is over minimalistic (to the point at which just plain text has to be marked with a |), but I've seen a lot of posts in favor of slim so I can't help but be curious
[05:34:38] pontiki: sometimes i'll take problems i've had during work and build a personal project out of it to learn as much as i can about it
[05:35:20] sevenseacat: same, but sometimes you just want to get shit done even in personal projects so you reach for what is familiar
[05:35:41] pontiki: or if the same questions about something crop up here, i'll write up a project to understand the questions better
[05:35:48] pontiki: sure, absolutely
[05:35:55] pontiki: that's what generators are for, too :)
[05:36:28] TheNet: yeah, but I also want what's familiar to be the best
[05:36:33] TheNet: DON'T YOU DARE DO THE THING
[05:36:48] pontiki: i don't understand the obsession with "the best", really
[05:36:53] pontiki: it changes every week
[05:36:55] sevenseacat: yeah not interested in this conversation anymore.
[05:36:56] Radar: "Detritus! Don't salute!"
[05:37:21] ja: hi. any of you guys know the feeling of wanting to alias `has_many` to `has_a_lot_of`? ???????
[05:37:47] ja: Radar: `has_many :usage` looks so wrong :<
[05:37:55] sevenseacat: because it is
[05:37:56] pontiki: maybe "have_me_a_whack_load_uv"
[05:37:57] Radar: ja: rename your model
[05:38:01] sevenseacat: has_many :usages
[05:38:04] ja: sevenseacat: it's not
[05:38:08] helpa: http://i.imgur.com/tyViD.gif
[05:38:12] ja: it's not usages, it's usage; another meaning
[05:38:16] ja: Radar: UsageRecord sucks
[05:38:27] ja: it's already a record :B
[05:38:30] andrew9184: has joined #RubyOnRails
[05:38:31] Radar: Hey who wants to be the first to let me test out helpa's new mute feature? I've been itching to use it for a whole.
[05:38:48] annlewis: has joined #RubyOnRails
[05:38:51] pontiki: usage is a measure
[05:38:55] sevenseacat: oh wait, the question was only directed to guys anyway
[05:38:57] pontiki: there'd only be one of such
[05:39:09] ja: pontiki: I like `have_me_a_whack_load_uv`
[05:39:09] pontiki: uses would be multiple events
[05:39:14] gambl0re: whats up all my aussie friends....hows life down under?
[05:39:23] RegulationD: has joined #RubyOnRails
[05:39:29] Radar: Great, tahnks :)
[05:39:34] arBmind: has joined #RubyOnRails
[05:39:55] ja: sevenseacat: New Oxcord American Dictionary defines ???guys??? informally as ???people of either sex???, y'know
[05:40:03] ChanServ: +q *!*@unaffiliated/nej
[05:40:05] Radar: Thanks ja :)
[05:40:10] pontiki: dictionaries are notoriously ancient
[05:40:13] Radar: I ran 5.12km in 26 minutes this morning and I blame that for my cheeriness. Tomorrow I won't be going to the gym and so I'll return to normal Radar.
[05:40:24] Radar: ACTION is going to put "guys" as one of the rules.
[05:40:26] pontiki: and language has long been oppressive
[05:40:27] sevenseacat: also, I don't give a shit what's in an American dictionary. we're not all American here.
[05:40:29] Radar: It's Time(tm)
[05:40:51] sevenseacat: Radar: impressive.
[05:40:56] pontiki: sevenseacat: it's also in the OED as such, which is as much if not more of a problem
[05:41:02] sevenseacat: next year is going to be my fit year.
[05:41:08] sevenseacat: will lose all the weight I stacked on this year. *nods
[05:41:19] pontiki: excellent. i needs do the same
[05:42:10] pontiki: every damn meetup serves pizza and nothing else
[05:42:12] TheNet: https://en.wiktionary.org/wiki/guys
[05:42:16] ChanServ: -q *!*@unaffiliated/nej
[05:42:25] pontiki: every class i teach, gets catered with pizza
[05:42:36] sevenseacat: pontiki: your meetups get catered! lucky you
[05:42:50] pontiki: yeah, we have some great sponsors
[05:43:05] sevenseacat: the rails meetup here usually has chips and beer and thats it
[05:43:08] Radar: ja: should be fine to talk now.
[05:43:32] ja: Thanks, people. <3
[05:43:55] pontiki: the companies here are really enthusiastic about sponsoring tech stuff, especially the stuff focused at women and other marginalized groups
[05:45:07] sevenseacat: we have multiple sponsors. we get chips, beer, and a place to host the meetup that sometimes gets interrupted by cleaners.
[05:45:22] sevenseacat: welcome to Perth.
[05:45:43] pontiki: sorry. the downside here is that it's minnesota
[05:45:58] pontiki: fucking winter winter winter
[05:46:43] Radar: ja: I really don't have any suggestion with your model other than renaming it, sorry.
[05:46:45] darrencauthon: has joined #RubyOnRails
[05:47:09] sevenseacat: then again, our rails meetup has little structure and is generally 'turn up and chat about stuff'
[05:47:11] bruno-: has joined #RubyOnRails
[05:47:14] yogeshrt: has joined #RubyOnRails
[05:47:16] sevenseacat: ACTION is a little grumpy about that
[05:47:44] EminenceHC: has joined #RubyOnRails
[05:48:05] pontiki: ah, i'm leading the one here, which is geared towards beginners. i do a talk/presentation about a topic, then it's hack and Q&A, a few of us wandering about helping
[05:48:23] gambl0re: maybe you guys should have a rails meetup in glendalough station...
[05:49:19] sevenseacat: lol why glendalough?
[05:49:23] ja: Radar: The only problem is that the code reads awkwardly, so it doesn't really matter. (It works with the singular relationship name because I already had to use `class_name:`.)
[05:49:27] sevenseacat: that was random
[05:50:02] gambl0re: i dont know...its a nice station.
[05:50:38] gambl0re: my bike got stolen twice from there..
[05:50:58] d34th4ck3r: has joined #RubyOnRails
[05:51:11] sevenseacat: gambl0re: http://www.meetup.com/roro-perth you're welcome to come along to our meetup this Wednesday in Leederville.
[05:51:16] pontiki: kinda weird to have a group meetup at a rail station, isn't it?
[05:51:37] Radar: ja: What usage is it tracking?
[05:51:45] Radar: ja: maybe has_many usage_reports?
[05:53:04] ja: Radar: Telephony usage. That _is_ an correct uncountable form of ???usage???, right?
[05:53:26] gambl0re: leederville?
[05:53:27] dopie: What is a good ruby on rails supported hosting company, I'm using backspace and they don't really give Technical Support to RoR ...
[05:53:28] ja: As in records of every call or text message.
[05:53:46] SteenJobs: has joined #RubyOnRails
[05:53:48] shortCircuit__1: has joined #RubyOnRails
[05:53:49] krz: has joined #RubyOnRails
[05:53:49] ja: Radar: Well, I already use UsageRecord, so I guess I should just stop being such a sucker for short model names. ^_^
[05:53:54] gambl0re: ok theres a skatepark near there i used to go
[05:53:58] TheNet: dopie: I like digital ocean
[05:54:13] shortCircuit__1: has left #RubyOnRails: ()
[05:54:29] Radar: ja: do you have an example of what that record tracks?
[05:54:31] TheNet: no idea what level of technical support they have though
[05:54:39] Trynemjoel: has joined #RubyOnRails
[05:54:41] Radar: TheNet: they won't tell you what you broke with your Rails app.
[05:54:44] dopie: TheNet, they have 0
[05:54:50] Radar: Which is the kind of tech support I think dopie wants.
[05:55:22] dopie: I'm using cloud66 for deployment and their service is breaking on me...
[05:57:09] pontiki: dopie: maybe engine yard? i've no experience with them. i don't really think any hosting company is going to offer much help with anything specific to an app though
[05:57:48] Ropeney: doesn't reinteractive do that kind of hosting/devops?
[05:58:00] Radar: Ropeney: I don't think dopie has the thousands of dollars required for that
[05:58:05] ja: Radar: It's for a telephony network operator, tracking all calls, texts and data made by every subscriber. The caller, destination, call duration / data amount, etc. I guess I'll just `has_many :usage_records` as I was already doing??? `subscription.usage.current_month.data` just read so nicely though! :D
[05:58:15] dopie: pontiki, i agree... I don't need technical support as in with happened I can read logs, I just want something for edge cases and be like with happened
[05:58:31] Radar: ja: yup! You could always alias in your model
[05:58:37] Radar: def usage; usage_records; end
[05:58:49] dopie: Radar, are you a VIM user?
[05:59:09] Radar: dopie: Sublime Text 3.
[05:59:12] s2013: has joined #RubyOnRails
[05:59:19] s2013: hello beautiful people
[05:59:24] TheNet: I've been trying RubyMine and it's not that bad
[05:59:29] sevenseacat: reinteractive ping!
[05:59:38] sevenseacat: I need to put an alert on that
[05:59:50] s2013: rubymine is nice
[05:59:58] pontiki: i do like RubyMine (just installed 8.0) but i always end up back in emacs for everything
[06:00:03] s2013: but i honestly havent found anything better than sublime
[06:00:17] ja: Radar: Done. Thanks for sanifying me.
[06:00:20] s2013: dont have the patience for vim.. but iknow enough to do basic stuff over ssh if i need to
[06:00:25] s2013: sup Radar
[06:00:31] TheNet: pontiki: I think you can get emacs keybindings in rubymine
[06:00:43] pontiki: i do have them, but they also don't map 100%
[06:00:52] s2013: i remember using borland and notepad
[06:01:01] Ropeney: s2013, i dont have patience for sublime :P
[06:01:24] s2013: ive heard that if you can get over the learning curve of vim then you dont wanan switch and im sure thats true
[06:01:28] pontiki: also , as most any emacs user you'll encounter, my emacs is customised and configured out the whazoo
[06:01:54] s2013: anyone remembers borland?
[06:02:09] pontiki: i used turbo C++ to learn that language
[06:02:11] TheNet: I also jumped from sublime to atom when 1.0 was released and I'm enjoying more frequent updates
[06:02:15] s2013: i think turbo c++
[06:02:28] s2013: ive used that too
[06:02:34] pontiki: i have a friend who is still using turbo pascal
[06:02:40] pontiki: i don't quite know how
[06:02:44] sevenseacat: sublime and atom are much of a muchness.
[06:02:54] TheNet: tf is a muchness
[06:02:55] s2013: i like bracket tho for frontend stuff
[06:03:13] pontiki: i've been using webstorm for a lot of frontend stuff
[06:03:15] s2013: but i do very little frontend
[06:03:27] s2013: anyone here uses ipython?
[06:03:41] pontiki: i'm not too happy with the emacs javascript modes available, which is surprising
[06:03:49] s2013: its really cool
[06:04:01] pontiki: isn't ipython like irb for ruby?
[06:04:02] shibabu: has joined #RubyOnRails
[06:04:12] pontiki: (or maybe closer to pry)
[06:04:13] s2013: kinda but its on the web
[06:04:16] ur5us: has joined #RubyOnRails
[06:04:16] build22_: has joined #RubyOnRails
[06:04:27] pontiki: i thought it was a local program
[06:04:36] dionysus69: has joined #RubyOnRails
[06:05:00] s2013: it is. i meant you can runc ommands from a web page
[06:05:26] s2013: https://en.wikipedia.org/wiki/IPython#/media/File:IPython-notebook.png looks like that
[06:05:31] pontiki: where is ipython running in that case? on the server?
[06:05:40] s2013: there are server ones but its local
[06:05:47] s2013: generally local*
[06:05:57] s2013: used mostly for data analysis
[06:06:15] Joufflu: has joined #RubyOnRails
[06:06:41] shinenelson: has joined #RubyOnRails
[06:07:48] s2013: yeah and it can be nicely formatted and stuff. its pretty cool
[06:09:08] s2013: actualy i am talking about ipython notebook mostly.. sorry for the confusion
[06:09:22] s2013: for me i (wrongly perhaps) interchange ipython and ipython notebook
[06:10:21] s2013: pontiki do you work at a company?
[06:10:44] pontiki: it sounds like it would be useful ; as i'm not a python coder i can't really make enough of it
[06:10:53] pontiki: i'm a freelancer / contractor
[06:11:03] s2013: yeah i dont do much python either except for data mining/analysis
[06:11:08] s2013: are most of your clients in MN?
[06:11:10] pontiki: most of my work the past couple years has been for this one agency though
[06:11:16] kp666: has joined #RubyOnRails
[06:11:30] pontiki: well, no; i've had a lot of work from a company in SoCal
[06:11:50] pontiki: current project is totally MN based, though
[06:12:12] s2013: gotcha... how is the rails community in MN?
[06:12:23] pontiki: pretty good, actually
[06:12:34] pontiki: better than silicon valley
[06:12:45] s2013: heh.. rails isnt that cool anymore for those SV kids
[06:12:56] pontiki: i don't think it ever was, really
[06:12:59] s2013: im not a big fan of the tech culture of SV
[06:13:00] dhjondoh: has joined #RubyOnRails
[06:13:10] s2013: its almost toxic
[06:13:12] pontiki: no, but i still want/need to be back there
[06:13:26] s2013: oh why? you can easily get a great job there
[06:13:31] s2013: sure youll have to live in a shoebox
[06:13:34] pontiki: not for tech; my kids live there, my friends are all there
[06:13:34] hemu: has joined #RubyOnRails
[06:13:35] s2013: but hey you are in the valley
[06:13:41] s2013: so why not go back?
[06:13:45] pontiki: i live entirely in a bedroom now, what would be the diff?
[06:13:53] pontiki: i'm taking care of my parents
[06:13:59] ivanyk_: has joined #RubyOnRails
[06:14:00] s2013: ah gotcha
[06:14:07] s2013: same here.. i fly back and forth often
[06:14:15] s2013: am home this weekend but flying out tomorrow
[06:14:28] pontiki: my dad is now in a nursing home, my mom *should* be
[06:14:59] s2013: thats rough. well hopefuly everything works out.
[06:15:15] pontiki: yesterday, forex, she fell off her bed. i was home, but i'm not most weekdays. she couldn't get herself back up in bed and i had to call 911.
[06:15:26] mcfads1: has joined #RubyOnRails
[06:15:31] s2013: does she have that device?
[06:15:42] s2013: where its always with her and it calls emergency for her
[06:15:56] pontiki: oh, an emergency button thingie
[06:16:15] alb12_: has joined #RubyOnRails
[06:16:19] s2013: http://lifecall.com/
[06:16:27] pontiki: this is a sore point between us
[06:16:57] fgo: has joined #RubyOnRails
[06:17:37] s2013: you have any siblings or any one else that can help out as well?
[06:18:36] raunicolae: has joined #RubyOnRails
[06:19:21] pontiki: my sister and her wife are in san jose, too :(
[06:19:33] pontiki: my brother lives in rochester, hour and a half away
[06:19:43] chrissonar: has joined #RubyOnRails
[06:19:54] s2013: well good on you
[06:20:03] pontiki: and his whole family lives down there, kids, grandkids, etc., etc. so he's busy a lot
[06:20:12] pontiki: i hate when people say that about me
[06:20:15] mcfads1: Hi everyone! Noobie here
[06:20:16] arup_r: has joined #RubyOnRails
[06:20:20] pontiki: i absolytely loathe doing this
[06:20:31] mcfads1: I had a quick question for whoever is kind enough to answer
[06:20:36] s2013: cant your parents live iwht you in the bay area
[06:20:38] s2013: mcfads1just ask
[06:20:52] raunicolae: has left #RubyOnRails: ()
[06:20:58] pontiki: s2013: i can't stand living with them
[06:21:14] pontiki: idk, i'm not sure i should talk about this
[06:21:17] mcfads1: im trying to run a rails server, i just started, and im getting this error when im running
[06:21:24] arup_r: If I want to use Elasticsearch, I should use this Gem https://github.com/elastic/elasticsearch-rails#installation ? Or there are other ways to implement it ?
[06:21:25] mcfads1: raise Gem::LoadError, "Specified '#{spec[:adapter]}' for database adapter, but the gem is not loaded. Add `gem '#{e.name}'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord)."
[06:21:29] s2013: whats the error
[06:21:44] s2013: pontiki yeah understand
[06:21:52] pontiki: is that the *exact* and *actual* error you're getting??
[06:21:54] Radar: mcfads1: is that the real error message or one that you copied from a source somewhere?
[06:22:02] mcfads1: I copied that from localhost 3000
[06:22:14] mcfads1: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
[06:22:16] pontiki: something is way wrong
[06:22:22] Radar: mcfads1: Show us your Gemfile please.
[06:22:22] s2013: so follow that mcfads1
[06:22:23] Radar: mcfads1: !gist
[06:22:23] helpa: mcfads1: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:22:31] s2013: add gem 'mysql2' to your Gemfile
[06:22:32] mcfads1: !gist test test
[06:22:35] pontiki: did you install mysql?
[06:22:44] mcfads1: i just don't know where the gemfile is
[06:22:49] s2013: its in the root
[06:22:49] sevenseacat: in the root of your project
[06:22:53] s2013: there is a file called Gemfile
[06:22:54] Radar: what they said
[06:22:55] s2013: no extension
[06:22:59] Oog: on my Order model I have belongs_to :user, -> { unscope(:where => :deleted) } however Order.joins(:user).count results in SELECT COUNT(*) FROM "orders" INNER JOIN "users" ON "users"."id" = "orders"."user_id" AND "users"."deleted" = $1 [["deleted", "f"]]
[06:23:00] mcfads1: its right there
[06:23:13] liquid-silence: has joined #RubyOnRails
[06:23:13] liquid-silence: has joined #RubyOnRails
[06:23:21] Radar: Oog: what are you expecting that to do?
[06:23:36] fgo: has joined #RubyOnRails
[06:23:46] Oog: the deleted=$1 shouldnt be there because it is unscoped. this post http://featurebranch.com/the-two-biggest-bugs-fixed-in-rails-4-1/ seems to say it was fixed in rails 4.1 ?
[06:23:48] Radar: actually this looks like a problem that is potentially my fautl
[06:23:54] Radar: mcfads1: https://gist.github.com
[06:23:58] Radar: mcfads1: Go there, put your Gemfile
[06:24:05] Radar: mcfads1: give us the HTTP URL
[06:24:41] Oog: basically how can i do a joins that is unscoped?
[06:24:56] krz: has joined #RubyOnRails
[06:25:01] mcfads1: that's really cool
[06:25:02] mcfads1: https://gist.github.com/anonymous/93ec08cd15293e24c570
[06:25:25] Radar: mcfads1: did you restart "rails s" after changing your Gemfile?
[06:25:39] mcfads1: i haven't changed it yet I was just posting my gemfile
[06:25:40] Radar: And did you run bundle install?
[06:26:12] mcfads1: i didn't bundle install
[06:27:00] tubbo: you should probably do that
[06:27:10] Oog: Radar I can get it with Order.joins('INNER JOIN "users" ON "users"."id" = "orders"."user_id"').count but it seems there is a bug not using the unscoped user right?
[06:27:13] mcfads1: hahaaha I should
[06:27:20] Radar: Oog: I don't know. It's pretty late in my day.
[06:27:24] Radar: I'm about to head off actually.
[06:27:33] mcfads1: I did but I got the same error. the first google answer says I should put " gem 'mysql2', '~> 0.3.18' " into the gemfile
[06:27:35] mcfads1: so i'm gonna try that
[06:27:42] mcfads1: thanks for the hospitality guys
[06:27:43] Oog: ok ill file bug see what people say
[06:27:56] pontiki: mcfads1: what OS are you running this on?
[06:28:01] mcfads1: ubuntu 14.04
[06:28:09] Radar: mcfads1: !rule14
[06:28:09] helpa: mcfads1: Please don't use "guys" to refer to people in the channel. Use "everyone" instead.
[06:28:21] Radar: gnight people
[06:28:26] pontiki: nini radar
[06:28:29] Oog: oh wait there is a bug https://github.com/rails/rails/issues/13775 i think
[06:28:36] mcfads1: okay. wasn't trying to be misogynistic or anything
[06:29:07] lxsameer: has joined #RubyOnRails
[06:30:50] mcfads1: Access denied for user 'root'@'localhost' (using password: NO)
[06:31:23] mcfads1: i've been learning django for the past couple of months. I wanted to try a new web framework
[06:31:49] arup_r: Did my question reach to the channel ? :)
[06:32:19] tagrudev: has joined #RubyOnRails
[06:32:36] ja: arup_r: Why would you want to use anything else than elasticsearch-rails?
[06:33:16] ja: I don't know of any alternatives to it, though, sorry.
[06:33:38] arup_r: ok. ja you used it ?
[06:33:53] crystalmaiden: has joined #RubyOnRails
[06:33:54] tubbo: arup_r: we use it at my job every day
[06:34:11] arup_r: tubbo: you still awake.. wow :)
[06:34:18] tubbo: i think it's the only supported way of using elasticsearch afaik...
[06:34:32] tubbo: yeah, gotta deploy a project in a couple days
[06:34:33] arup_r: tubbo: you also use the Gem. cool people
[06:34:37] tubbo: last minute shit
[06:34:43] arup_r: I am going to use the gem.
[06:35:20] tubbo: elasticsearch is lovely
[06:35:26] arup_r: I saw one codebase where they are hitting the ES Api with typehouse gem .. dunno why they didn't use the gem
[06:36:07] tubbo: arup_r: typehouse?
[06:36:17] aadam21: has joined #RubyOnRails
[06:36:17] moeabdol1: has joined #RubyOnRails
[06:36:28] tubbo: you mean typhous?
[06:36:28] owenjones: has joined #RubyOnRails
[06:36:40] tubbo: err, typhoeus
[06:36:45] tubbo: see we both fucked it up
[06:36:53] mcfads1: w00t w00t the server is running
[06:36:53] tubbo: but i'm drunk, so you have no excuse
[06:36:57] pontiki: easy to see why
[06:37:03] mcfads1: gn y'all. have a blessed night
[06:37:08] mcfads1: gn everyone*
[06:37:27] arup_r: pontiki: yes, my point why they didn't use the Gem. There I was bit scary
[06:37:42] tubbo: arup_r: anyway, elasticsearch is actually accessed by a REST API. so actually you can do all of your communication with ES through an HTTP client. Typhoeus is an HTTP client gem
[06:38:01] pontiki: i was only talking how one might not remember how to spell "typhoeus". i'm forgetting already
[06:38:21] tubbo: pontiki: googled it, copy-pasted, can't be bothered ;)
[06:38:40] pontiki: tubbo: only second time ? :)
[06:39:14] tubbo: i highly recommend using the elasticsearch gems though, they're pretty well made and they basically turn a lot of the raw HTTP API calls into objects
[06:39:35] annlewis: has joined #RubyOnRails
[06:41:50] xcm: has joined #RubyOnRails
[06:42:49] pawnbox_: has joined #RubyOnRails
[06:43:35] arup_r: tubbo: sure.. thanks for making me bold.
[06:44:02] arup_r: how about this https://github.com/sunspot/sunspot ?
[06:44:11] arup_r: I am just making decision..
[06:44:43] tubbo: arup_r: about what? sunspot is a gem for interfacing with solr. are you trying to decide on a search engine or a gem to support it?
[06:45:15] arup_r: tubbo: I would like to implement a search in project
[06:45:41] arup_r: that search can be on a single table, or via its association tables.. etc
[06:45:44] rvanlieshout: has joined #RubyOnRails
[06:45:56] tubbo: arup_r: well there are a few options. elasticsearch is one of them, solr is another. postgres has its own fulltext search capabilities.
[06:46:49] arup_r: tubbo: sunspot and SOLR are same ?
[06:47:05] tubbo: arup_r: sunspot is a gem for interfacing with solr.
[06:47:51] linocisco: has joined #RubyOnRails
[06:47:53] darrencauthon: has joined #RubyOnRails
[06:48:06] shock_one: has joined #RubyOnRails
[06:48:41] madebymarkca: has joined #RubyOnRails
[06:48:46] shock_one: has joined #RubyOnRails
[06:48:47] bePolite: has joined #RubyOnRails
[06:48:59] linocisco: http://www.code42.com/ is written on RUby on Rails, I think 99% so. agree?
[06:49:14] tuelz1: has joined #RubyOnRails
[06:50:19] yardenbar: has joined #RubyOnRails
[06:50:32] liquid-silence: has joined #RubyOnRails
[06:50:32] liquid-silence: has joined #RubyOnRails
[06:51:14] kimegede: has joined #RubyOnRails
[06:52:44] jim1138: has joined #RubyOnRails
[06:53:17] Trynemjoel: has joined #RubyOnRails
[06:53:26] sarink: has joined #RubyOnRails
[06:56:22] vigintas: has joined #RubyOnRails
[06:57:24] pontiki: they do use rails, but theyve been moving away from it
[06:58:03] User458764: has joined #RubyOnRails
[06:58:11] pontiki: apparently it's getting too difficult to find good rails devs even here
[06:58:44] yashinbasement: has joined #RubyOnRails
[06:59:29] h7br1x: has joined #RubyOnRails
[06:59:40] chipotle: has joined #RubyOnRails
[07:00:54] pontiki: or at least find front end devs that can work well within the rails environment, but this is just what i heard at the last ruby meetup
[07:01:36] tubbo: it always has been difficult to find good rails developers
[07:01:43] tubbo: it's not an easy framework imho
[07:02:02] tubbo: you can't just write a bunch of shit code and expect it to fly like you can at other places
[07:02:05] pontiki: the folks i'm working with now are having trouble find all sorts of talent
[07:02:26] Oog: has joined #RubyOnRails
[07:02:28] pontiki: which means my contract is probably pretty secure
[07:03:09] recurrence: has joined #RubyOnRails
[07:03:15] pontiki: a lot of their stuff is just wordpress sites; typical for people just needing a web site
[07:03:30] pontiki: but there's also a pretty good bench in rails
[07:04:00] pontiki: they now need .net folks, mobile app folks, front end devs
[07:04:04] arup_r: tubbo: Es capable to do seach through a model to its child and its child like that ?
[07:04:07] DoubleMalt: has joined #RubyOnRails
[07:04:13] tubbo: same here. we just folded our .net department
[07:04:24] tubbo: arup_r: it's capable of searching whatever you tell it to index.
[07:05:02] tubbo: arup_r: they all have very comparable features. solr and elasticsearch are both built on lucene. postgres search is obviously a little different, it's also a bit less capable.
[07:05:30] tubbo: but, postgres search is useful if you just need basic search and you don't want to configure an additional dependency
[07:05:41] arup_r: hum. due the fact I am not going to use Postgres search
[07:06:03] pontiki: anyway, time for bed
[07:06:04] arup_r: My search will go over multiple models through its relation
[07:06:08] pontiki: night folx
[07:06:16] build22_: has joined #RubyOnRails
[07:07:39] tubbo: arup_r: mostly, their capabilities are differentiated through their ability to tokenize and analyze search queries
[07:07:45] tubbo: you can index whatever you want
[07:08:33] tubbo: arup_r: this is actually a second database...so you're basically copying data from your main DB into the search datastore.
[07:08:57] tubbo: i use pg_search's multisearch feature on http://beta.brother.ly
[07:09:23] linocisco: tubbo, u know why rare rail developers because learning ruby is the first step to learn rails
[07:09:34] tubbo: it still needs some work but i think it's possible to make it a bit more capable. right now it indexes episodes and artists.
[07:10:02] tubbo: linocisco: rails developers aren't rare, good rails developers are. but that's pretty common.
[07:10:03] moeabdol1: has joined #RubyOnRails
[07:10:23] linocisco: Radar, Mr. Author
[07:10:41] linocisco: Radar, Mr. Rails Author to be exact title. how r u?
[07:10:42] Radar: linocisco: You know why Zend developers are rare? because learning PHP is the first step to learning Zend
[07:10:49] mooru: has joined #RubyOnRails
[07:10:56] Radar: linocisco: You know why Phoenix developers are rare? Because learning Elixir is the first step to learning Phoenix
[07:11:01] linocisco: Radar, same story
[07:11:04] Radar: Your argument does not hold up to scrutiny
[07:11:08] Radar: linocisco: I am good, thanks :)
[07:11:11] Radar: Headed home.
[07:11:35] sevenseacat: zend developers are rare because any developer with sense takes one look at the framework and runs screaming
[07:11:41] linocisco: wordpress themes are like Rails style mostly
[07:11:44] jas02: has joined #RubyOnRails
[07:11:46] MartinElvar: has joined #RubyOnRails
[07:11:48] tubbo: basically
[07:12:00] tubbo: wordpress is pretty much rails except like you know
[07:12:26] sevenseacat: linocisco: I think you just offended wordpress devs *and* rails devs.
[07:12:29] tubbo: its like i can make a blog in 15 minutes
[07:12:35] tubbo: just open cpanel
[07:12:39] tubbo: click the wordpress button
[07:12:43] linocisco: sevenseacat, I didn't mean to
[07:12:45] tubbo: boom done that wasn't even 15 minutes
[07:12:54] sevenseacat: tubbo: you rockstar.
[07:13:02] tubbo: who's this weird dude saying whoops all the time telling me how to make my sites
[07:13:11] Radar: sevenseacat: we have a Zend developer in the office who doesn't even spend his time crying. It's amazing.
[07:13:27] sevenseacat: Radar: he's a bigger man than I am.
[07:13:47] Radar: Yeah, he's built like a brick shit house.
[07:13:58] tubbo: he's letting it all hang out?
[07:14:13] sevenseacat: had to build a thick skin to reflect all the insults zend hurls at his mother
[07:15:37] sevenseacat: the only thing I havent blocked out of my memory from working with zend is writing Zend_Application_Bootstrap_Bootstrap_Bootstrap classes
[07:16:46] Radar: The icing on the cake is that he's writing a Magento plugin that integrates with our JSON API.
[07:17:04] sevenseacat: oh that poor man.
[07:17:05] Radar: Products come from Magento, get sold on our site, and then orders of those products get reported back to Magento.
[07:17:27] Radar: He's doing better financially now than he was 3 weeks ago ;)
[07:17:29] linocisco: http://telegraph.rubyforge.org/Home.html is built on rails according to their words
[07:17:33] Radar: Mental-state wise, not sure.
[07:17:41] sevenseacat: seriously, would you like to make his life any worse? wanna throw drupal or joomla at him too?
[07:17:48] tubbo: i used zend libraries to make an amazon s3 file browser once. well...i tried.
[07:17:50] Radar: sevenseacat: nope
[07:18:08] Radar: Is telegraph by who I think it's by.
[07:18:10] tubbo: turns out the libs weren't capable of creating folders. because, you know...no one needs that or anything.
[07:18:13] Radar: If it is, then I am about to get sad.
[07:18:18] TvL2386: has joined #RubyOnRails
[07:18:21] sevenseacat: or moodle. oh god, moodle.
[07:18:21] Radar: *waits for trainternet to load*
[07:18:32] tubbo: Jonathan Palley?
[07:18:42] Radar: Nope, not that personl
[07:18:49] Radar: David Ryder on that list at all?
[07:19:10] sevenseacat: thats a name I haven't heard in a while :(
[07:19:18] tubbo: who the hell is that
[07:19:26] Radar: He asked me to review some code for Asterix and Ruby (I had no idea what I was doing, but thought I'd do it anyway) and then a couple of weeks later he was killed.
[07:19:54] Radar: tubbo: Dude who I hung out with at my first Ruby on Ales. Showed me Crater Lake which is my favourite place on earty.
[07:20:09] Radar: Enough moping, abck to writing.
[07:20:28] tubbo: yeah get back to work
[07:20:44] tubbo: all of us plebs need to know how to make software
[07:21:16] linocisco: Does somebody use http://adhearsion.com/?
[07:22:53] Trynemjoel: has joined #RubyOnRails
[07:22:56] rickmasta: has joined #RubyOnRails
[07:23:42] Radar: http://take.ms/tK4Wd
[07:25:55] tetraktys: has joined #RubyOnRails
[07:27:18] sevenseacat: I miss writing
[07:27:48] freezevee: has joined #RubyOnRails
[07:32:57] sinkensabe: has joined #RubyOnRails
[07:35:25] sinkensa_: has joined #RubyOnRails
[07:35:27] rgrmatt: has joined #RubyOnRails
[07:36:20] scmx: has joined #RubyOnRails
[07:37:13] owenjones: has joined #RubyOnRails
[07:37:13] imstar: has joined #RubyOnRails
[07:37:41] krz: has joined #RubyOnRails
[07:38:54] comrad: has joined #RubyOnRails
[07:39:19] artto: has joined #RubyOnRails
[07:40:31] annlewis: has joined #RubyOnRails
[07:41:20] ur5us: has joined #RubyOnRails
[07:41:57] arup_r: After logging to Google I am getting failure .. Any hints where to go and check log ? https://gist.github.com/aruprakshit/9c7120f6abd1ea72b780
[07:42:11] arup_r: seeking help again! :/
[07:42:37] arup_r: I am using Devise and https://github.com/zquestz/omniauth-google-oauth2
[07:42:42] schu: has joined #RubyOnRails
[07:42:45] schu: has left #RubyOnRails: ()
[07:44:16] d34th4ck3r: has joined #RubyOnRails
[07:44:43] sevenseacat: arup_r: what have you tried to debug the problem
[07:44:44] arup_r: shouldn't I have space in scope? scope: 'email, profile'
[07:45:18] arup_r: sevenseacat: I don't know where to look? Rails log don't show me any more useful only seeing which action it is coming
[07:45:20] tvw: has joined #RubyOnRails
[07:45:31] bruno-: has joined #RubyOnRails
[07:45:43] freezevee: has joined #RubyOnRails
[07:46:09] sevenseacat: perhaps look in the data being returned in the failure?
[07:46:27] sevenseacat: or validation errors on the user being created?
[07:46:35] ja: Why doesn't AR use MySQL SMALLINT, BIGINT, etc?
[07:46:55] sevenseacat: or anything instead of just pasting a bunch of code and saying 'halp'
[07:47:45] arup_r: sevenseacat: It is not coming to the action where the user might be created
[07:47:49] njero: has joined #RubyOnRails
[07:48:02] sevenseacat: you're right. that doesn't invalidate all of what i said.
[07:48:23] d34th4ck3r: has left #RubyOnRails: ()
[07:48:37] darrencauthon: has joined #RubyOnRails
[07:49:10] User458764: has joined #RubyOnRails
[07:49:51] arup_r: that is what I have to show right now.. I am digging through,,
[07:50:53] sevenseacat: arup_r: I'd start by looking at the data saved in the env from the oath request.
[07:51:05] arup_r: yes adding log there..
[07:51:19] krz: has joined #RubyOnRails
[07:51:37] yottanami: has joined #RubyOnRails
[07:52:45] yottanami: Is anyway to use doorkeeper without devise? ( for example using another app as outh server )
[07:53:18] ja: Oh, wait, what, disregard my last (stupid) question. Since when does Rails support SMALLINT, BIGINT, etc.?! I'm very pleasantly surprised.
[07:54:42] ja: It seems bugged though??? Or maybe I should just sleep ???????
[07:54:52] yardenbar: has joined #RubyOnRails
[07:56:20] ibouvousaime: has joined #RubyOnRails
[07:59:55] trosborn: has joined #RubyOnRails
[08:00:04] solars: has joined #RubyOnRails
[08:01:42] krz: has joined #RubyOnRails
[08:01:46] bePolite: has joined #RubyOnRails
[08:03:44] ja: Has anyone here succesfully used integer columns with a limit (in Rails 4.2)?
[08:04:45] malcolmva: has joined #RubyOnRails
[08:04:51] ja: It looks great and it does indeed make the column a BIGINT(20) in my MySQL database, but when I try to save, I get `RangeError: 10737418240 is out of range for ActiveRecord::Type::Integer with limit 4`. (My limit is 8, not 4.)
[08:05:11] agoldboi: has joined #RubyOnRails
[08:05:59] vigintas: has joined #RubyOnRails
[08:06:18] ja: Maybe never mind; I just recalled how to use Google???
[08:09:17] build22_: has joined #RubyOnRails
[08:09:35] ja: heh?????hehe??? turns out: I was looking in the wrong file at the wrong column all along, hehehe???
[08:09:49] ja: maybe Radar should've kept me muted, hehehehe
[08:09:52] ja: goodnight people!
[08:09:59] logius: has joined #RubyOnRails
[08:11:21] agoldboi: has joined #RubyOnRails
[08:13:21] vdmo_: has joined #RubyOnRails
[08:14:18] rgtk: has joined #RubyOnRails
[08:14:19] darutoko: has joined #RubyOnRails
[08:16:14] MartinEl_: has joined #RubyOnRails
[08:17:29] arup_r: not useful data in log https://gist.github.com/aruprakshit/9c7120f6abd1ea72b780/edit
[08:19:46] mark2: has joined #RubyOnRails
[08:20:13] cac: has joined #RubyOnRails
[08:21:16] bePolite: has joined #RubyOnRails
[08:21:16] bePolite: has joined #RubyOnRails
[08:22:17] shock_one: has joined #RubyOnRails
[08:25:41] DEA7TH: has joined #RubyOnRails
[08:25:53] njero: has joined #RubyOnRails
[08:27:11] nettoweb: has joined #RubyOnRails
[08:27:37] sevenseacat: github pages doesn't yet support jekyll 3. there goes the idea of upgrading
[08:28:10] User458764: has joined #RubyOnRails
[08:30:35] sevenseacat: https://github.com/github/pages-gem/pull/175 blerp
[08:35:46] quazimodo: has joined #RubyOnRails
[08:36:36] rgrmatt: has joined #RubyOnRails
[08:38:05] owenjones: has joined #RubyOnRails
[08:40:20] artto: has joined #RubyOnRails
[08:41:08] annlewis: has joined #RubyOnRails
[08:42:20] dopie: sevenseacat, Can you help me understand background jobs? I'm not grasping how it works when a person wants to upload a 500 meg file... the file still needs to be uploaded
[08:42:31] zpe: has joined #RubyOnRails
[08:43:07] sevenseacat: I don't think it would work in that scenario. but if you wanted to do some kind of processing on that file after it was uploaded, that could be farmed out to a background job
[08:45:44] bruno-: has joined #RubyOnRails
[08:48:07] czerasz: has joined #RubyOnRails
[08:48:13] agoldboi: has left #RubyOnRails: ()
[08:49:41] darrencauthon: has joined #RubyOnRails
[08:50:07] tuelz1: has joined #RubyOnRails
[08:53:49] stamina: has joined #RubyOnRails
[08:54:52] Juanchito: has joined #RubyOnRails
[08:55:46] kp666_: has joined #RubyOnRails
[08:57:29] jvanbaarsen: has joined #RubyOnRails
[08:59:40] chubijs: has left #RubyOnRails: ("Leaving")
[08:59:53] chubijs: has joined #RubyOnRails
[09:00:15] cac: has joined #RubyOnRails
[09:01:17] arBmind: has joined #RubyOnRails
[09:01:57] lipoqil: has joined #RubyOnRails
[09:02:49] pawnbox_: has joined #RubyOnRails
[09:03:52] nfk|laptop: has joined #RubyOnRails
[09:04:28] defsdoor: has joined #RubyOnRails
[09:06:40] xcesariox: has joined #RubyOnRails
[09:08:20] ibouvousaime: has joined #RubyOnRails
[09:11:13] marr: has joined #RubyOnRails
[09:14:00] exadeci: has joined #RubyOnRails
[09:18:08] moeabdol1: has joined #RubyOnRails
[09:18:57] trosborn: has joined #RubyOnRails
[09:18:57] glaksmono: has joined #RubyOnRails
[09:19:05] glaksmono: anyone can help me with optimizing rails query?
[09:19:36] glaksmono: i'm trying to figure out what are the ways i can optimize this AR code: https://gist.github.com/glaksmono/67428a98aea686524037
[09:20:34] rvanlieshout: glaksmono: inner join outlets
[09:20:38] rvanlieshout: next to includes
[09:20:42] rvanlieshout: and inner join payments
[09:20:48] rvanlieshout: or this is a payment?
[09:21:44] ImmoveableOne: has joined #RubyOnRails
[09:22:25] arBmind: has joined #RubyOnRails
[09:22:28] glaksmono: rvanlieshout, yes this is a payment table the main
[09:22:32] glaksmono: then it includes a bunch of things
[09:23:18] Mia: has joined #RubyOnRails
[09:23:18] Mia: has joined #RubyOnRails
[09:23:26] trosborn: has joined #RubyOnRails
[09:23:34] rvanlieshout: glaksmono: and why are you concerned about performance?
[09:23:37] nettoweb: hello guys, Im running my RoR app locally with no problem but today my first tried to deploy to production I receive this message: Could not find fog-aliyun-0.0.10 in any of the sources
[09:24:05] nettoweb: I've already removed Gemfile.lock and rebundled and it's ok locally
[09:24:15] nettoweb: but dont know what to do in production
[09:24:22] glaksmono: rvanlieshout, because right now i'm haivng this issue haha
[09:24:31] glaksmono: literally i'm seeing new relic spending too much time on this query
[09:24:39] glaksmono: and my RDS instance is already 98%
[09:24:50] glaksmono: this is the toughest query that we have compared to the rest of the app
[09:24:50] rvanlieshout: and what 's the query executed?
[09:24:55] ibouvousaime: has joined #RubyOnRails
[09:25:02] glaksmono: https://gist.github.com/glaksmono/67428a98aea686524037
[09:25:10] rvanlieshout: that's not a query
[09:25:15] ava: has joined #RubyOnRails
[09:25:29] glaksmono: ok, let me take that back, that is the call that takes too long
[09:25:49] rvanlieshout: so what's the query executed?
[09:25:55] dhjondoh: has joined #RubyOnRails
[09:26:01] njero: has joined #RubyOnRails
[09:26:05] bonemind: has joined #RubyOnRails
[09:26:11] yaw: has joined #RubyOnRails
[09:27:27] chiamaka: has joined #RubyOnRails
[09:28:36] pawnbox_: has joined #RubyOnRails
[09:30:23] vigintas: has joined #RubyOnRails
[09:30:53] trosborn: has joined #RubyOnRails
[09:31:18] aganov: has joined #RubyOnRails
[09:32:07] Tempesta: has joined #RubyOnRails
[09:34:41] jsrn_: has joined #RubyOnRails
[09:35:15] weckl: has joined #RubyOnRails
[09:38:43] dideler: has joined #RubyOnRails
[09:38:53] owenjones: has joined #RubyOnRails
[09:40:26] Palsson: has joined #RubyOnRails
[09:40:48] RegulationD: has joined #RubyOnRails
[09:40:54] walidvb: has joined #RubyOnRails
[09:40:58] annlewis: has joined #RubyOnRails
[09:42:19] walidvb: i'm having some issues using geocoder's location. I need to make some things free for a country, but the response of the request depends on the result of it... i'm getting a lot of timeouts, which i'm not sure how to handle at all..
[09:43:12] walidvb: putting it in a background job will not allow me to do that..
[09:43:17] walidvb: i'm a bi stuck, to be honest
[09:44:45] linocisco: has joined #RubyOnRails
[09:46:44] bruno-: has joined #RubyOnRails
[09:48:34] Peg-leg: has joined #RubyOnRails
[09:49:52] vigintas: has joined #RubyOnRails
[09:50:27] darrencauthon: has joined #RubyOnRails
[09:50:33] Megamos: has joined #RubyOnRails
[09:51:19] srinidhi: has joined #RubyOnRails
[09:53:27] krz: has joined #RubyOnRails
[09:53:37] glaksmono: has joined #RubyOnRails
[09:55:47] Scymex: has joined #RubyOnRails
[09:57:11] erbse: has joined #RubyOnRails
[09:58:43] lucaspinto: has joined #RubyOnRails
[09:59:19] trosborn: has joined #RubyOnRails
[10:00:04] build22_: has joined #RubyOnRails
[10:01:15] rodfersou: has joined #RubyOnRails
[10:02:47] erbse: hi, I'm considering switch from asp.net + iis to rails, I want to ask the frequency of the ugly problem occurs
[10:03:38] sevenseacat: ugly problem occurs?
[10:03:38] sameerynho: has joined #RubyOnRails
[10:03:57] erbse: when I use asp.net I meat many ugly problems like reference load version error, iis privilege error, visual studio hang, such of these
[10:04:28] build22_: has joined #RubyOnRails
[10:04:58] sevenseacat: um... im not sure how to answer that
[10:05:06] sevenseacat: problems happen
[10:05:33] erbse: yeah, it will, but is there some problems very hard to resolve?
[10:05:53] Spami: has joined #RubyOnRails
[10:06:07] JanPeter: has joined #RubyOnRails
[10:07:07] sevenseacat: no, but the other problems you mentioned dont seem hard to resolve either
[10:09:00] erbse: maybe, first time those problems happens it cost me days, but later other guys ask me for same problem only cost me minutes, but I'm not happy with that
[10:10:55] DEA7TH: has joined #RubyOnRails
[10:12:15] czerasz: has joined #RubyOnRails
[10:13:34] mehakkahlon: has joined #RubyOnRails
[10:14:12] tetraktys: has joined #RubyOnRails
[10:22:39] rubyonrails002: has joined #RubyOnRails
[10:22:40] wethu: has joined #RubyOnRails
[10:27:58] ldnunes: has joined #RubyOnRails
[10:28:15] mooru: has joined #RubyOnRails
[10:29:36] Ergo: has joined #RubyOnRails
[10:29:54] moeabdol1: has joined #RubyOnRails
[10:33:04] sadaf2605: has joined #RubyOnRails
[10:33:13] nfk|laptop: has joined #RubyOnRails
[10:33:24] mrbubbles: has joined #RubyOnRails
[10:33:53] Pupeno: has joined #RubyOnRails
[10:35:24] ldnunes_: has joined #RubyOnRails
[10:38:00] rgrmatt: has joined #RubyOnRails
[10:40:19] fifi-v: has joined #RubyOnRails
[10:40:33] dionysus69: has joined #RubyOnRails
[10:40:39] youngbaks: has joined #RubyOnRails
[10:41:04] Ergo: has joined #RubyOnRails
[10:44:47] xcm: has joined #RubyOnRails
[10:46:35] Megamos: has joined #RubyOnRails
[10:49:04] annlewis: has joined #RubyOnRails
[10:51:00] tuelz1: has joined #RubyOnRails
[10:51:11] darrencauthon: has joined #RubyOnRails
[10:51:47] stamina: has joined #RubyOnRails
[10:56:16] user: has joined #RubyOnRails
[11:00:12] bruno-: has joined #RubyOnRails
[11:02:39] yottanami: has joined #RubyOnRails
[11:04:24] zpe: has joined #RubyOnRails
[11:04:31] yottanami: I just configured devise on my project that is using mongoid but after sigining in session[:user_id] is empty
[11:04:39] yottanami: How can I find out why
[11:07:24] DEA7TH: has joined #RubyOnRails
[11:09:40] andrew9184: has joined #RubyOnRails
[11:14:50] andrew91841: has joined #RubyOnRails
[11:15:14] alb12: has joined #RubyOnRails
[11:19:19] FailBit: why do you need session[:user_id] ?
[11:20:00] fifi-v: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[11:20:23] rickmasta: has joined #RubyOnRails
[11:20:34] yottanami: FailBit, In my doorkeeper initializer I need to return current user id
[11:20:57] njero: has joined #RubyOnRails
[11:21:00] yottanami: I also checked current_user but it seams it is available only in controller
[11:21:22] yottanami: FailBit, http://dpaste.com/0D98HEM
[11:21:54] FailBit: since you have a pry session open there
[11:21:59] FailBit: if you spit out the keys in session, what do you see?
[11:23:33] bmalum: has joined #RubyOnRails
[11:23:53] yottanami: FailBit, when I signed in: session_id, flash, warden.user.user.key
[11:26:57] Megamos: I'm done connecting angularJS to my rails backend. I get this problem though ( see rails_server.txt ): https://gist.github.com/megamos/655f3547e34f5eb617a1 . Used tutorial code so I kinda see the problem but can't solve it.
[11:27:49] andywww: has joined #RubyOnRails
[11:28:10] wethu: has joined #RubyOnRails
[11:30:44] andywww: I have a script which uses event machine seperate to rails. I want to include the rails environment so i can utilise active record and some of the functionality in the models. I want to deamonize the script and monitor it with runit
[11:31:15] andywww: would it be an abuse of rails runner to use that? or should i really be including the rails environment directly in the script?
[11:31:43] sevenseacat: has joined #RubyOnRails
[11:33:35] MartinElvar: has joined #RubyOnRails
[11:38:09] liquid-silence: has joined #RubyOnRails
[11:38:09] liquid-silence: has joined #RubyOnRails
[11:39:00] andywww: has left #RubyOnRails: ()
[11:39:08] youngbaks: has joined #RubyOnRails
[11:39:36] trosborn: has joined #RubyOnRails
[11:40:20] kitsuneyo: has joined #RubyOnRails
[11:41:15] kanzure: has joined #RubyOnRails
[11:41:47] trosborn: has joined #RubyOnRails
[11:41:49] cac: has joined #RubyOnRails
[11:43:18] weihan: has joined #RubyOnRails
[11:44:54] norc: has joined #RubyOnRails
[11:49:51] annlewis: has joined #RubyOnRails
[11:49:56] sinkensabe: has joined #RubyOnRails
[11:50:24] tetraktys: has joined #RubyOnRails
[11:50:46] vigintas: has joined #RubyOnRails
[11:50:54] JohnBat26: has joined #RubyOnRails
[11:51:15] tvw: has joined #RubyOnRails
[11:51:31] bmalum: has joined #RubyOnRails
[11:52:37] darrencauthon: has joined #RubyOnRails
[11:52:37] njero: has joined #RubyOnRails
[11:52:55] moeabdol1: has joined #RubyOnRails
[11:54:00] cac: has joined #RubyOnRails
[11:55:42] scmx: has joined #RubyOnRails
[11:56:13] freezevee: has joined #RubyOnRails
[11:56:15] Pazician: has joined #RubyOnRails
[12:00:00] kp666_: has joined #RubyOnRails
[12:01:07] norc: So.. when I have the need to change HTML attributes (like classes or other things) based on model attributes, would a decorator be a good place to do this in?
[12:01:52] rvanlieshout: norc: would you expect an answer with only that info?
[12:02:00] norc: rvanlieshout: Uh. :(
[12:02:51] rvanlieshout: you want to change what on what source using what data?
[12:03:09] Cervajz: has joined #RubyOnRails
[12:03:41] yogeshrt: has joined #RubyOnRails
[12:04:18] norc: rvanlieshout: http://pastie.org/10540580
[12:04:21] norc: Something like that just feels plain wrong.
[12:04:50] rvanlieshout: there are several solutions to this
[12:04:56] rvanlieshout: a helper method that returns that right class
[12:05:10] rvanlieshout: a helper method that yields a block and creates the full span
[12:05:12] htmldrum: has joined #RubyOnRails
[12:05:17] rvanlieshout: a decorator method for the right class
[12:05:22] rvanlieshout: a decorator method for the label
[12:05:37] rvanlieshout: does you task already have a decorator?
[12:06:02] rvanlieshout: got more to decorate?
[12:06:08] rvanlieshout: would this be the first decorator for you app?
[12:06:34] norc: And yes. :)
[12:06:42] rvanlieshout: have you researched decorators?
[12:06:51] tuelz1: has joined #RubyOnRails
[12:07:14] norc: rvanlieshout: Only in passing.
[12:07:46] rvanlieshout: then read more and make a proper decision
[12:08:09] norc: Do you have a decent read at hand?
[12:08:34] rvanlieshout: https://www.ruby-toolbox.com/categories/rails_presenters
[12:12:57] kitsuneyo: has joined #RubyOnRails
[12:14:47] Cervajz: has joined #RubyOnRails
[12:15:32] MartinElvar: has joined #RubyOnRails
[12:17:29] kp666_: has joined #RubyOnRails
[12:19:10] norc: rvanlieshout: Beautiful. Draper looks exactly like what I have been needing. :)
[12:19:13] norc: Thank you very much.
[12:19:21] rvanlieshout: have fun with it
[12:19:23] bmalum: has joined #RubyOnRails
[12:19:47] suchness: has joined #RubyOnRails
[12:22:00] darrencauthon: has joined #RubyOnRails
[12:25:53] JanPeter: has joined #RubyOnRails
[12:26:30] kp666_: has joined #RubyOnRails
[12:28:35] build22_: has joined #RubyOnRails
[12:28:44] craigp: has joined #RubyOnRails
[12:32:43] kerunaru: has joined #RubyOnRails
[12:33:24] tknz: has joined #RubyOnRails
[12:34:32] mooru: has joined #RubyOnRails
[12:36:27] adre: has joined #RubyOnRails
[12:36:50] kitsuneyo: has joined #RubyOnRails
[12:38:06] Megamos: I'm done connecting angularJS to my rails backend. I get this problem though ( see rails_server.txt ): https://gist.github.com/megamos/655f3547e34f5eb617a1 . Used tutorial code so I kinda see the problem but can't solve it.
[12:39:24] ruurd: has joined #RubyOnRails
[12:40:17] yottanami: has joined #RubyOnRails
[12:41:30] chipotle: has joined #RubyOnRails
[12:42:08] walidvb: has joined #RubyOnRails
[12:42:13] walidvb: i'm having some issues using geocoder's location. I need to make some things free for a country, but the response of the request depends on the result of it... i'm getting a lot of timeouts, which i'm not sure how to handle at all..
[12:42:52] walidvb: i'm a bit stuck, to be honest. How can i ensure that the geo will return? should i simply run the request multiple times, until i'm sure it went through?
[12:43:13] walidvb: (with a minimal timeout, such as 2-3 seconds, at the cost of having the user wait long?)
[12:44:18] artto: has joined #RubyOnRails
[12:45:01] kitsuneyo: has joined #RubyOnRails
[12:45:50] jscheel: has joined #RubyOnRails
[12:45:58] craigp: has joined #RubyOnRails
[12:46:49] darklight03: has joined #RubyOnRails
[12:50:36] annlewis: has joined #RubyOnRails
[12:52:24] yottanami: I have a Grape API and I just add doorkeeper now I want to try how it works, but I do not know how should I send access_tocken using swagger ui
[12:52:33] teclator: has joined #RubyOnRails
[12:53:06] craigp: has joined #RubyOnRails
[12:55:53] rvanlieshout: so you're using grape, doorkeeper and swagger
[12:56:05] rvanlieshout: did you create anything yourself? :)
[12:56:18] rvanlieshout: (can't say much about your problem.. never used either of those 3 gems)
[12:58:17] jkamenik: has joined #RubyOnRails
[12:59:34] wethu: has joined #RubyOnRails
[12:59:54] jsrn_: has joined #RubyOnRails
[13:00:27] dhjondoh: has joined #RubyOnRails
[13:00:43] HayesHimself: has joined #RubyOnRails
[13:04:10] Scymex: has joined #RubyOnRails
[13:04:47] liquid-silence: has joined #RubyOnRails
[13:04:47] liquid-silence: has joined #RubyOnRails
[13:09:33] moeabdol: has joined #RubyOnRails
[13:10:50] sankaber: has joined #RubyOnRails
[13:11:43] Pupeno: has joined #RubyOnRails
[13:11:51] sankaber: has joined #RubyOnRails
[13:12:46] pawnbox_: has joined #RubyOnRails
[13:13:00] robbyoconnor: has joined #RubyOnRails
[13:13:25] cac: has joined #RubyOnRails
[13:14:54] syath: has joined #RubyOnRails
[13:15:56] sevenseacat: has joined #RubyOnRails
[13:16:18] atomical: has joined #RubyOnRails
[13:18:18] njero: hey.. In rails is it a good practice to pass foreign key to database level?
[13:19:15] njero: i mean referral integrity..!!!!!
[13:20:13] rvanlieshout: 'pass foreign key to database' = ?
[13:20:36] rvanlieshout: or do you mean to actually use foreign key constraints in your db?
[13:21:02] rvanlieshout: then somewhat. it's a good thing to have an additional check for sure
[13:21:10] rvanlieshout: i would say the index on it has a higher preference
[13:21:17] rvanlieshout: but there is no downside in adding them imho
[13:21:27] njero: what's that
[13:21:48] [ddmp]: has joined #RubyOnRails
[13:22:26] njero: rvanlieshout: i haven't seen any in association examples in railsguide.. that's y got confused
[13:22:59] rvanlieshout: you also shouldn't be adding them manually
[13:23:34] njero: you mean raw sql using execute?
[13:23:50] rvanlieshout: that would be the wrong approach :)
[13:23:50] njero: rvanlieshout: k
[13:24:17] rvanlieshout: you should have your connection adapter do that when using references as a type for an attribute
[13:25:04] njero: you mean foreign_key: true in migration ?
[13:25:13] acovrig: has joined #RubyOnRails
[13:25:33] rvanlieshout: something like that
[13:25:45] njero: k.. will do :)
[13:25:50] dhjondoh: has joined #RubyOnRails
[13:26:32] acovrig: so, I have a the following layout: users <-> link1 <-> people and users <-> link2 <-> people, normally I would do User.find(1).people << Person.find(1) to link a person to a user, how do I specify which link to use?
[13:27:50] acovrig: I tried User.find(1).link1.people << Person.find(1) but got undefined method `people??????
[13:29:04] rvanlieshout: acovrig: gist your user, link and person model
[13:29:28] liquid-silence: has joined #RubyOnRails
[13:29:28] liquid-silence: has joined #RubyOnRails
[13:31:06] lacrymology: has joined #RubyOnRails
[13:32:31] acti0nman: has joined #RubyOnRails
[13:33:01] acovrig: rvanlieshout: https://gist.github.com/acovrig/1b163962cb791e3424f8 and http://imgur.com/rAPXoj0
[13:33:13] cac: has joined #RubyOnRails
[13:34:01] rvanlieshout: your user doesn't have a relationship to people
[13:34:05] Cervajz: has joined #RubyOnRails
[13:34:19] acovrig: rvanlieshout: I would like to tie a student to a user, but specifying if it should go through teach or guard (I was replacing student with people)
[13:35:17] lacrymology: I've got a many 2 many like this: device group has_many :device_group_devices; has_many :devices, through: :device_group_devices. What's the standard way of creating these records on group creation?
[13:35:38] acovrig: so, User.find(1).teaches.students << Student.find(1) or User.find(1).guards.students << Student.find(1) but neither can find students (in teaches or guards)
[13:35:40] lacrymology: I get device_ids in the request
[13:36:01] rvanlieshout: lacrymology: group.device_ids = [1,2,3]
[13:36:21] rvanlieshout: acovrig: there is no way to make that 1 relationship
[13:36:32] lacrymology: rvanlieshout: if I do it on DeviceGroup.new, will it work too?
[13:36:39] sinkensabe: has joined #RubyOnRails
[13:36:47] acovrig: rvanlieshout: so does that mean I would need to do SQL manually to use this?
[13:36:48] rvanlieshout: lacrymology: you don't already have a group instance ready?
[13:37:07] lacrymology: rvanlieshout: this is on the create handler
[13:37:16] rvanlieshout: lacrymology: create of what?
[13:37:27] liquid-silence: has joined #RubyOnRails
[13:37:27] liquid-silence: has joined #RubyOnRails
[13:37:31] rvanlieshout: then just add it to the variables assigned to that group
[13:37:37] acovrig: I would like to do something like User.find(1).students << Student.find(1), via teaches or guards
[13:37:59] rvanlieshout: acovrig: what exactly should go via teachers or guards here? i'm not really certain that i even get what you're trying to do
[13:38:08] Megamos: has joined #RubyOnRails
[13:38:09] rvanlieshout: acovrig: cause it should choose one of both relationships
[13:38:13] rvanlieshout: and it won't make that desicion for you
[13:38:19] acovrig: tie a student to a user, specifying which via table
[13:38:22] lacrymology: rvanlieshout: I'm basically asking, will this work: DeviceGroup.add(params.require(:device_group).permit(device_ids: [])
[13:38:55] acovrig: user could be a parent or a teacher and I would like to specify how I???m tying a studen to a user (as a teacher or parent)
[13:38:56] rvanlieshout: lacrymology: it might, but it's a wrong way in doing that
[13:39:01] rvanlieshout: if you're creating a group instance
[13:39:20] rvanlieshout: acovrig: shouldn't you make this a polymorphic association then?
[13:39:32] rvanlieshout: acovrig: cause if you define 2 relationships, you'll need to specify which one to use
[13:39:36] rvanlieshout: even if you're going to write this using plain sql
[13:40:10] shock_one: has joined #RubyOnRails
[13:40:15] acovrig: ACTION looks into polymorphic association
[13:40:16] The_Phoenix: has joined #RubyOnRails
[13:40:17] lacrymology: rvanlieshout: ok, so what's the right way? group = DeviceGroup.new(), group.device_ids = params[device_ids]?
[13:40:28] rvanlieshout: lacrymology: !gist your controller
[13:40:28] helpa: lacrymology: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[13:40:41] rvanlieshout: if you're creating a group, ____ just assign it to the group ____
[13:40:47] [ddmp]: has joined #RubyOnRails
[13:41:43] goodcodeguy: has joined #RubyOnRails
[13:41:51] acovrig: polymorphic associations sounds like what I need, I???ll switch things and see how it goes
[13:42:22] RegulationD: has joined #RubyOnRails
[13:42:30] Betray1st: has joined #RubyOnRails
[13:42:41] mag42c: has joined #RubyOnRails
[13:44:18] tyl: has joined #RubyOnRails
[13:44:31] lacrymology: rvanlieshout: like this? https://gist.github.com/Lacrymology/02ad62867a7a8596dc00
[13:44:41] tyl: Hi I would like to know if rails 4.2 supports prepared statments
[13:44:47] tyl: http://patshaughnessy.net/2011/10/22/show-some-love-for-prepared-statements-in-rails-3-1
[13:45:01] mices: has joined #RubyOnRails
[13:45:01] tyl: when i type User.find 1 twice i do not see Using cached prepared statement
[13:45:05] nickenchuggets: has joined #RubyOnRails
[13:45:06] tyl: in console anymore
[13:45:41] scmx: has joined #RubyOnRails
[13:45:56] tyl: I am using postgresql btw
[13:46:41] rvanlieshout: tyl: tyl http://guides.rubyonrails.org/4_2_release_notes.html#adequate-record
[13:47:03] rvanlieshout: lacrymology: you're using the create action of device_group to create multiple device_groups?
[13:47:11] acovrig: so, `belongs_to :teach, polymorphic: true??? and `belongs_to :guard, polymorphic: true??? in User model and `has_many :users, as: :teach??? and `has_many :users, as: :guard??? in Student model?
[13:47:15] njero: has joined #RubyOnRails
[13:47:26] rvanlieshout: something like that yes, acovrig
[13:47:55] bruno-_: has joined #RubyOnRails
[13:47:59] lacrymology: rvanlieshout: no. I'm creating one group. With multiple devices, which already exist
[13:48:12] rvanlieshout: where are you creating the group?
[13:48:13] eggoez: has joined #RubyOnRails
[13:48:19] rvanlieshout: it's not the group#create?
[13:48:26] noah256: has joined #RubyOnRails
[13:48:28] acovrig: how would that work in code though, User.find(1).guard.students?
[13:48:30] lacrymology: L9 in that gist?
[13:48:42] kitsuneyo: has joined #RubyOnRails
[13:48:48] rvanlieshout: lacrymology: if so, this is the wrong controller
[13:48:52] rvanlieshout: and that creates a DeviceGroup
[13:49:03] rvanlieshout: so you're not creating a group, but a device_group
[13:49:04] lacrymology: each DeviceGroup is a group
[13:49:16] rvanlieshout: eacht devicegroup is a relationship between a group and device
[13:49:28] lacrymology: device_group_device is the relationship
[13:49:31] jocuman: has joined #RubyOnRails
[13:49:40] rvanlieshout: ok. so whatwas the question again?
[13:49:45] rvanlieshout: anremove line 10
[13:49:57] lacrymology: how do I add the devices on group.new
[13:49:58] dionysus69: any sublime text 3 package that lets me use shortcut for <%= %> ?
[13:50:03] rvanlieshout: dionysus69: haml :)
[13:50:13] rvanlieshout: lacrymology: you're not using group.new
[13:50:22] rvanlieshout: lacrymology: params.require(:device_group).permit(:name)
[13:50:23] dionysus69: rvanlieshout: yes but I won't be forced to use haml itself?
[13:50:31] rvanlieshout: dionysus69: yes :)
[13:50:48] lacrymology: you're either not understanding my question or not answering it, don't worry. I think I got it now
[13:50:52] dionysus69: so is it like scss and css haml html?
[13:51:06] quazimodo: has joined #RubyOnRails
[13:51:16] rvanlieshout: dionysus69: no just joking, i just like haml
[13:51:22] annlewis: has joined #RubyOnRails
[13:51:32] mfoo: has joined #RubyOnRails
[13:51:34] rvanlieshout: lacrymology: the only thing you should need for this to work is to allow it in strong params
[13:51:41] rvanlieshout: there should be no other controller code for those ids
[13:51:50] dionysus69: lol ok thats a lil early for me ^.^
[13:51:58] stannard: has joined #RubyOnRails
[13:52:13] lacrymology: rvanlieshout: I asked: how do I add devices to a device group on group creation? you answered: assigned it. That's why I didn't permit it in the params and added it in L10
[13:52:42] rvanlieshout: why wouldn't you just permit it? passing it in new is also an assignment
[13:52:44] tuelz1: has joined #RubyOnRails
[13:53:03] lacrymology: rvanlieshout: not by any standard meaning of the word "assignment" it's not ;)
[13:53:11] erts: has joined #RubyOnRails
[13:53:22] mfoo: Hello. Does anybody know how I can get ActiveModel::Serialization to respect ActiveSupport::JSON::Encoding.escape_html_entities_in_json? I'm embedding some javascript inside an HTML page and the JS may contain </script>, introducing an XSS vulnerability.
[13:53:43] rgtk: has joined #RubyOnRails
[13:54:10] rvanlieshout: lacrymology: the docs use 'Initializes a new model with the given params.'
[13:56:14] quazimodo: has joined #RubyOnRails
[13:57:08] barttenbrinke: has joined #RubyOnRails
[13:57:50] lacrymology: come on, "assignment" is to do var = value, in any sane programming context
[13:58:06] lacrymology: anyway, you guided me in the right direction, so thanks
[13:58:22] lacrymology: device_group = DeviceGroup.new(params.require(:device_group).permit(:name, device_ids: []), customer: current_customer) << this is returning an error: customer: can't be blank (it is not)
[13:58:43] lacrymology: so I'm guessing that adding the customer like that to the initializer doesn't quite work
[13:59:12] rvanlieshout: create a method for that params
[13:59:24] rvanlieshout: def device_group_params
[13:59:26] rvanlieshout: params.require(:device_group).permit(:name, device_ids: [])
[13:59:35] rvanlieshout: DeviceGroup.new(device_group_params.merge(customer: current_customer))
[14:02:19] acovrig: has joined #RubyOnRails
[14:03:23] The_Phoenix: has joined #RubyOnRails
[14:03:42] roxtrongo: has joined #RubyOnRails
[14:03:50] acovrig: I???m kinda wondering if it would be better to have Guardain, Teacher, Admin models to tie Users to Students, but it seems sad from a DB perspective to just store an email field in a join table...
[14:03:50] leehambley: has joined #RubyOnRails
[14:05:19] The_Phoenix: has joined #RubyOnRails
[14:05:39] maxz: has joined #RubyOnRails
[14:05:46] jscheel: has joined #RubyOnRails
[14:06:10] suffice: has joined #RubyOnRails
[14:06:11] atrius: has joined #RubyOnRails
[14:06:13] eggoez: has joined #RubyOnRails
[14:06:56] flip_digits: has joined #RubyOnRails
[14:07:47] tuelz1: has joined #RubyOnRails
[14:07:52] TheNet: has joined #RubyOnRails
[14:08:08] vayan: has joined #RubyOnRails
[14:08:35] acovrig: because say I use polymorphic association, how would I access the DB from teh controller? @user.teach.students or @user.guard.students? how do I specify which direction to go?
[14:08:45] Guest53: has joined #RubyOnRails
[14:12:16] nibbo: has joined #RubyOnRails
[14:12:22] maxz: has joined #RubyOnRails
[14:13:52] ramortegui: has joined #RubyOnRails
[14:14:18] rvanlieshout: acovrig: the full set of students?
[14:14:35] acovrig: to find what students the @user teaches
[14:15:02] rvanlieshout: how did you define the relationship now?
[14:15:40] acovrig: polymorphic associations
[14:16:42] acovrig: OK, gist (https://gist.github.com/acovrig/1b163962cb791e3424f8) updated
[14:16:55] annlewis: has joined #RubyOnRails
[14:17:10] rvanlieshout: ah, that won't work
[14:17:14] rvanlieshout: your student has 1 has_many users
[14:17:19] rvanlieshout: they should be unique
[14:17:31] rvanlieshout: has_many :teaching_users, as: .., class_name, ...
[14:17:52] acovrig: ACTION confused
[14:17:59] nertzy: has joined #RubyOnRails
[14:17:59] zpe: has joined #RubyOnRails
[14:18:05] rvanlieshout: you can only have 1 'has_many :users' :)
[14:18:10] mxrguspxrt: has joined #RubyOnRails
[14:18:21] slash_part: in a given model?
[14:18:38] acovrig: so can I specify multiple ???as??? things? as a user can have many students as teach and many as guard and there can be overlap
[14:18:39] rvanlieshout: and you don't need to
[14:18:43] rvanlieshout: the has_many :foo is only the name
[14:18:55] rvanlieshout: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many
[14:19:05] rvanlieshout: add class_name
[14:19:39] jkamenik: has joined #RubyOnRails
[14:20:10] slash_part: if you're just wanting to access the related via student.a_relateds and student.b_relateds, you could alias the second... not really sure what the goal is
[14:21:59] acovrig: how do I tie a user to the student through multiple routes, it only accepts 1 as statement, so I can only tie User->Student via teach or guard, but not both
[14:22:27] aaronr: has joined #RubyOnRails
[14:22:31] rvanlieshout: acovrig: your student has multiple relationships
[14:22:34] rvanlieshout: each relationship has a unique name
[14:22:41] kitsuneyo: has joined #RubyOnRails
[14:22:42] rvanlieshout: so 2x has_many :users is just not possible
[14:22:48] youngbaks: has joined #RubyOnRails
[14:22:51] rvanlieshout: it's possible to have multiple relationships to the same class though
[14:23:10] acovrig: now I???m very confused???
[14:23:27] rvanlieshout: explain the relationship between a user and student in plain english
[14:23:29] acovrig: does that mean it???s not possible to tie a student to a user with multiple relationships
[14:23:44] [ddmp]: has joined #RubyOnRails
[14:24:10] acovrig: a user can have many students and a student can have many users, this can be via teach or via guard or both as a user can teach multiple students and/or guard multiple students
[14:24:16] voker57: has joined #RubyOnRails
[14:24:25] rvanlieshout: so 2 different relationships
[14:24:28] rvanlieshout: with different names
[14:24:50] acovrig: isn???t that what I did earlier with has_many :users, as :teach and has_many :users, as :guard?
[14:25:00] rvanlieshout: yes, but that's still wrong
[14:25:25] acovrig: how would I do it then? isnt??? this 2 relationships with different names?
[14:25:36] rvanlieshout: you've got has_many :users 2 times
[14:25:36] GarethAdams: has joined #RubyOnRails
[14:25:41] rvanlieshout: so no, they have similar names
[14:26:00] rvanlieshout: it should be has_many :guarding users and has_many :teaching_users
[14:26:22] rvanlieshout: and read the api docs about the options for has_many
[14:26:33] njero: has joined #RubyOnRails
[14:27:07] aadam21: has joined #RubyOnRails
[14:28:08] acovrig: so would I not to a user has many students, but a user has many teach and user has many guard, then in the teach and guard model has_many students?
[14:28:35] rvanlieshout: acovrig: ok. let me approach this differently
[14:28:42] rvanlieshout: explain the 2 relationships from student to user
[14:28:54] rvanlieshout: in plain english, giving each of them a unique name :)
[14:29:14] uri: has joined #RubyOnRails
[14:29:29] acovrig: student has many users via teach and student has many users via guard
[14:29:38] rvanlieshout: they don't have a unique name
[14:29:46] acovrig: teach and guard
[14:30:05] rvanlieshout: so you would expect student.teach to return a list of users that student teaches?
[14:30:23] acovrig: return a list of users that teach the student, yes
[14:30:42] rvanlieshout: i would name it teaching_users or something.. so imply the user
[14:30:47] rvanlieshout: i've got an other idea
[14:30:54] rvanlieshout: can a single user be both teachter and guard for a single student?
[14:31:56] rvanlieshout: create a model student_user as the relationship between a student and a user
[14:32:02] rvanlieshout: give it booleans for teach and for guard
[14:32:41] lacrymology: How do I validate a specific field field on a m2m relationship? I want to make sure that group.owner == element.owner when elements are added to a group
[14:33:09] acovrig: I presume I should delete the teach and guard models then?
[14:33:22] artto: has joined #RubyOnRails
[14:33:31] lacrymology: I guess it might be easier to validate on the relation table
[14:34:14] rvanlieshout: acovrig: lemme try to gather some info
[14:34:18] rvanlieshout: i'll get back to you in a few min
[14:36:38] symbol: has joined #RubyOnRails
[14:40:55] rvanlieshout: acovrig: maybe something like has_many :student_users ; has_many :users, through: :student_users ; has_many :teaching_users, -> { where(teach: true) }, through: :student_users, :user
[14:41:12] rvanlieshout: you might need to read the has_many doc a few times
[14:41:15] rvanlieshout: that :user should be source: :user
[14:41:24] rvanlieshout: but i'm not really sure if that's the way how you should use the source
[14:41:32] rvanlieshout: in this case you would have 1 relationship between user and student
[14:41:42] rvanlieshout: and 2 has_manies with additional conditions
[14:42:06] User458764: has joined #RubyOnRails
[14:42:53] solars: hi, I updated rails and noticed that ActiveRecord::Base.connection.select seems to be outdated - is .select_all the correct replacement?
[14:43:02] johnflux: has joined #RubyOnRails
[14:43:02] johnflux: has joined #RubyOnRails
[14:43:29] njero: has joined #RubyOnRails
[14:43:48] norc: http://pastie.org/10540847 -- Given this _form.html.haml, I want the checkbox collection to only appear when this partial is rendered for GET /rollout_zones/new
[14:43:50] Mession: has joined #RubyOnRails
[14:44:00] adavia: has joined #RubyOnRails
[14:44:03] norc: Aside from rendering different partials to begin with, is there a sensible way to do this=
[14:44:50] rvanlieshout: norc: pass in a local
[14:45:08] rvanlieshout: so you can 'tell' that partial to behave different
[14:45:12] mooru: has joined #RubyOnRails
[14:45:29] pawnbox_: has joined #RubyOnRails
[14:45:31] rvanlieshout: or you actually mean only when @rollout_zone is a new record?
[14:45:43] norc: rvanlieshout: Oh oh. I see where you are getting at.
[14:45:53] rvanlieshout: if f.object.new_record?
[14:45:54] acovrig: rvanlieshout: student_users belongs_to both :user and :student, right?
[14:46:05] rvanlieshout: yes, that would be your relationship-model
[14:46:06] rgtk: has joined #RubyOnRails
[14:46:07] norc: rvanlieshout: You mean I could also utilize #new_record? then ?
[14:46:17] rvanlieshout: if that's the condition
[14:47:11] norc: That is even better. :)
[14:48:19] svkurowski: has joined #RubyOnRails
[14:49:43] sarink: has joined #RubyOnRails
[14:50:28] acovrig: rvanlieshout: it seems to work DB-wise, how would I access the relationships in code?
[14:51:09] s2013: has joined #RubyOnRails
[14:51:26] bmalum: has joined #RubyOnRails
[14:51:41] rvanlieshout: @student.users
[14:51:45] rvanlieshout: or @student.teaching_users
[14:52:44] tvon: has joined #RubyOnRails
[14:52:45] acovrig: s.teaching_users ==> ActiveRecord::HasManyThroughAssociationNotFoundError: Could not find the association :student_users in model Student
[14:53:02] acovrig: yet the Student model has this: has_many :users, through: :student_users
[14:53:15] rvanlieshout: did you also add the has_many :student_users
[14:54:55] rclanan: has joined #RubyOnRails
[14:55:20] izzol: has joined #RubyOnRails
[14:56:05] podman: has joined #RubyOnRails
[14:56:08] izzol: I'm new with Rails and I have a strange problem. Not sure where to look at to solve it.
[14:56:25] izzol: I'm calling in my method: flash[:danger] = 'Invalid email/password combination'
[14:56:31] izzol: and I don't see anything on the screen :P
[14:56:44] izzol: and the method works fine.
[14:56:51] izzol: So why? CSS? JS?
[14:56:54] rvanlieshout: izzol: did you include stuff to display the flashes in your html?
[14:56:59] acovrig: rvanlieshout: didn???t but I do now, but now I???m getting this: Unknown column 'users.teach' in 'where clause': SELECT `users`.* FROM `users` INNER JOIN `student_users` ON `users`.`id` = `student_users`.`user_id` WHERE `student_users`.`student_id` = ? AND `users`.`teach` = 1
[14:57:20] acovrig: it seems to be searching for teach in the users table instead of the student_users table...
[14:57:25] rvanlieshout: acovrig: ah right, so that where should be where(student_users: { teach: true })
[14:57:44] kitsuneyo: has joined #RubyOnRails
[14:57:57] AlexW2611: has joined #RubyOnRails
[14:58:11] mission712: has joined #RubyOnRails
[14:58:34] acovrig: :) it works!
[14:59:10] acovrig: is it possible to lookup the other way: @user.teaching_students?
[14:59:28] rvanlieshout: similar relationships
[14:59:49] jkamenik1: has joined #RubyOnRails
[14:59:54] ddv: many must get a lot of highlights in here
[15:02:44] acovrig: rvanlieshout: looking at the api doc, I would do @user.teaching_students << @student to add a student to a user in the teaching context and @user.teaching_students.find(s.id).delete to remove a student from a user?
[15:03:21] rvanlieshout: i don't know if rails can apply that condition teach: true using that method
[15:03:31] rvanlieshout: but youcan try
[15:05:03] acovrig: rvanlieshout: I was able to add with u.teaching_students << s but not delete with u.teaching_students.find(s.id).delete as u.teaching_students still has that student; is .delete what I should be using?
[15:05:27] acovrig: or is it .destroy (I feel like destroy would remove the student from the DB)
[15:05:45] rvanlieshout: u.teaching_students would destroy the student
[15:05:49] Pupeno_: has joined #RubyOnRails
[15:06:07] rvanlieshout: you need the u.student_users.where(student_id: s.id)
[15:06:26] mxrguspxrt: has joined #RubyOnRails
[15:06:57] dionysus69: has joined #RubyOnRails
[15:07:26] njero: has joined #RubyOnRails
[15:08:22] acovrig: Unknown column 'students.student_id???, it seems to be searching student instead of student_users
[15:08:57] rvanlieshout: ah. that just needs some tweakings
[15:09:28] tyl: guys if the active record log shows
[15:09:29] tyl: SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
[15:10:20] tyl: [["id", 1]] this binding means that this statement is using a prepared statement?
[15:10:38] TheNet: has joined #RubyOnRails
[15:13:20] kitsuneyo: has joined #RubyOnRails
[15:13:43] PlasmaStar: has joined #RubyOnRails
[15:14:02] EminenceHC: has joined #RubyOnRails
[15:14:03] acovrig: rvanlieshout: I got it: u.teaching_students.delete(s); thanks so much for your patience in helping me figure this out!
[15:14:15] infamos: has joined #RubyOnRails
[15:15:31] njero: has joined #RubyOnRails
[15:15:37] scmx: has joined #RubyOnRails
[15:16:06] RegulationD: has joined #RubyOnRails
[15:16:39] sankaber: has joined #RubyOnRails
[15:16:43] Mession: has joined #RubyOnRails
[15:16:53] nomadicoder: has joined #RubyOnRails
[15:17:42] fluchtreflex: has joined #RubyOnRails
[15:17:42] fluchtreflex: has joined #RubyOnRails
[15:18:33] izzol: has joined #RubyOnRails
[15:20:33] xcesariox: has joined #RubyOnRails
[15:20:56] fryguy: tyl: no, not necessarily
[15:21:27] tyl: fryguy i am trying to search how to know or log when rails is using a prepared statement but I can't seem to find anything
[15:21:36] teclator: has joined #RubyOnRails
[15:21:46] fryguy: tyl: I don't think rails ever uses prepared statements
[15:21:58] fryguy: don't know enough details to elaborate more than that though
[15:22:01] tyl: Adequate Record seems to only work for very basic statments
[15:22:13] fryguy: given that it supports several database engines that don't have prepared statements, I would be surprised
[15:22:25] tyl: fryguy rails does create prepared statments
[15:22:31] tyl: i mean rails 4
[15:22:46] tyl: its turned on by default
[15:22:53] tyl: and has a default of 1000 statments
[15:23:13] kitsuneyo: has joined #RubyOnRails
[15:23:16] tyl: I want to know because i am in the process of preparing some of my quries
[15:23:17] mooru: has joined #RubyOnRails
[15:23:25] Mession: has joined #RubyOnRails
[15:26:31] Spami: has joined #RubyOnRails
[15:26:40] HalcyonicStorm: has joined #RubyOnRails
[15:26:41] sarink: has joined #RubyOnRails
[15:26:51] build22_: has joined #RubyOnRails
[15:27:04] axl_: has joined #RubyOnRails
[15:27:09] chipotle: has joined #RubyOnRails
[15:28:50] mxrguspxrt: has joined #RubyOnRails
[15:29:15] Axsuul: has joined #RubyOnRails
[15:29:40] t4nkD: has joined #RubyOnRails
[15:29:44] Pupeno: has joined #RubyOnRails
[15:29:54] Polysics: has joined #RubyOnRails
[15:30:02] Polysics: my usual heisenbug
[15:30:20] Polysics: I have a layout defined in my base mailer, just with layout: "email"
[15:30:29] izzol: has joined #RubyOnRails
[15:30:31] Polysics: and I do have a file in layouts/email.html.haml
[15:30:36] DylanJ: has joined #RubyOnRails
[15:30:44] Polysics: Missing template layouts/email with {:locale=>[:it], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :haml, :jbuilder, :rabl], :versions=>[:v1]}
[15:30:51] Polysics: ACTION flips table
[15:31:12] mhenrixon: has joined #RubyOnRails
[15:31:26] rickmasta: has joined #RubyOnRails
[15:31:28] svkurowski: has joined #RubyOnRails
[15:31:47] Polysics: I tried the usual suspects of restarting and killing spring
[15:32:38] Polysics: and now ST has crashed on me. Universe, what are you trying to tell me?
[15:33:41] jgpawletko: has joined #RubyOnRails
[15:33:44] marahin: has left #RubyOnRails: ("Leaving")
[15:33:52] tuelz1: has joined #RubyOnRails
[15:34:26] Kenrick: has joined #RubyOnRails
[15:35:07] roxtrongo: has joined #RubyOnRails
[15:36:21] gregf_: has joined #RubyOnRails
[15:37:34] Palsson: has joined #RubyOnRails
[15:37:50] atomical: has joined #RubyOnRails
[15:38:59] johnflux: has joined #RubyOnRails
[15:38:59] johnflux: has joined #RubyOnRails
[15:39:02] mooru: has joined #RubyOnRails
[15:41:18] arthurix: has joined #RubyOnRails
[15:44:51] blackmesa: has joined #RubyOnRails
[15:45:17] DoubleMalt: has joined #RubyOnRails
[15:46:05] umgrosscol: has joined #RubyOnRails
[15:46:16] lacrymology: can I generally check a_model == another_model?
[15:46:27] lacrymology: or will that fail, them being different ruby objects?
[15:46:28] alb12_: has joined #RubyOnRails
[15:46:38] infamos: has joined #RubyOnRails
[15:46:46] User458764: has joined #RubyOnRails
[15:47:46] rgtk: has joined #RubyOnRails
[15:47:54] kitsuneyo: has joined #RubyOnRails
[15:51:31] lacrymology: are queries on relations done on request? like, do I gain anything from doing foo.bar_id instead of foo.bar.id?
[15:52:10] roxtrongo: has joined #RubyOnRails
[15:52:27] mooru: has joined #RubyOnRails
[15:52:38] infamos: has joined #RubyOnRails
[15:55:10] pawnbox_: has joined #RubyOnRails
[15:56:39] mary5030: has joined #RubyOnRails
[15:57:35] mhenrixon: has joined #RubyOnRails
[15:58:36] erbse: has left #RubyOnRails: ()
[16:00:24] tbuehlmann: lacrymology: checking == with models works, active record will check the class and primary keys, iirc
[16:00:52] mxrguspxrt: has joined #RubyOnRails
[16:01:05] tbuehlmann: foo.bar.id will often be two queries, one for foo, one for bar. foo.bar_id will only be one query for foo
[16:01:35] n1ck7: has joined #RubyOnRails
[16:02:31] griffindy: has joined #RubyOnRails
[16:03:35] chouhoulis: has joined #RubyOnRails
[16:04:09] kitsuneyo: has joined #RubyOnRails
[16:05:11] arthurix: has joined #RubyOnRails
[16:05:53] TPBallbag: has joined #RubyOnRails
[16:05:55] TheNet: has joined #RubyOnRails
[16:06:07] i: has joined #RubyOnRails
[16:07:21] nya: has joined #RubyOnRails
[16:08:23] TheNet: has joined #RubyOnRails
[16:09:36] TheNet: has joined #RubyOnRails
[16:10:58] TheNet_: has joined #RubyOnRails
[16:11:59] lacrymology: tbuehlmann: thanks
[16:12:05] TheNet__: has joined #RubyOnRails
[16:12:23] smathy: has joined #RubyOnRails
[16:12:24] DanielN: has joined #RubyOnRails
[16:12:37] kies: has joined #RubyOnRails
[16:12:47] infamos: has joined #RubyOnRails
[16:14:40] TPBallbag: has joined #RubyOnRails
[16:14:55] TheNet: has joined #RubyOnRails
[16:18:07] s2013: has joined #RubyOnRails
[16:18:27] disgrntld: has joined #RubyOnRails
[16:18:40] baweaver: has joined #RubyOnRails
[16:19:48] bmalum_: has joined #RubyOnRails
[16:20:31] kitsuneyo: has joined #RubyOnRails
[16:20:53] DoubleMalt: has joined #RubyOnRails
[16:21:24] mooru: has joined #RubyOnRails
[16:21:51] darrencauthon: has joined #RubyOnRails
[16:23:47] s2013: has joined #RubyOnRails
[16:23:58] TheNet: has joined #RubyOnRails
[16:25:42] TheNet_: has joined #RubyOnRails
[16:25:54] nertzy: has joined #RubyOnRails
[16:26:32] annlewis: has joined #RubyOnRails
[16:26:41] hardtail: has joined #RubyOnRails
[16:27:16] TheNet__: has joined #RubyOnRails
[16:27:38] dici: has joined #RubyOnRails
[16:28:39] TheNet__: has joined #RubyOnRails
[16:28:59] njero: has joined #RubyOnRails
[16:29:32] kerunaru: has joined #RubyOnRails
[16:32:25] TheNet: has joined #RubyOnRails
[16:33:55] TheNet_: has joined #RubyOnRails
[16:34:38] Tempesta: has joined #RubyOnRails
[16:35:04] flashpoint9: has joined #RubyOnRails
[16:38:14] theblang: has joined #RubyOnRails
[16:38:42] DanielN: has joined #RubyOnRails
[16:39:45] sye: has joined #RubyOnRails
[16:40:17] based_pdev: has joined #RubyOnRails
[16:40:19] Cache_Money: has joined #RubyOnRails
[16:42:43] youngbaks: has joined #RubyOnRails
[16:42:53] Megamos: has joined #RubyOnRails
[16:45:01] guillaume-rb: has joined #RubyOnRails
[16:48:24] kitsuneyo: has joined #RubyOnRails
[16:51:19] alb12: has joined #RubyOnRails
[16:51:38] Megamos: has joined #RubyOnRails
[16:52:07] troyready: has joined #RubyOnRails
[16:54:32] nya: has joined #RubyOnRails
[16:54:41] jim1138: has joined #RubyOnRails
[16:54:51] cnk: has joined #RubyOnRails
[16:55:42] [Butch]: has joined #RubyOnRails
[16:56:05] Sylario: has joined #RubyOnRails
[16:56:09] Spami: has joined #RubyOnRails
[16:56:11] richipargo: has joined #RubyOnRails
[16:56:28] Sylario: What is used to consume the API in this test : https://github.com/ivaldi/brimir/blob/master/test/integration/api/v1/api_login_test.rb
[16:56:39] Sylario: the @response is coming from nowhere
[16:57:25] w0rd-driven: has joined #RubyOnRails
[16:57:27] maxz: has joined #RubyOnRails
[16:57:53] bamorim: has joined #RubyOnRails
[17:01:18] lacrymology: Does anyone use cancan? I'm using rails 4.2.4, and cancan 1.6.10 and on create I'm getting a ForbiddenAttributesError before my controller code ever gets executed
[17:02:09] tyl: has joined #RubyOnRails
[17:02:42] jrgarcia: has joined #RubyOnRails
[17:02:45] tweeeaks: lacrymology: you should probally use cancancan now instead of cancan
[17:03:24] adac: has joined #RubyOnRails
[17:03:27] adac: Guys, can sidekiq use posgres hstore instead of redis?
[17:06:16] nocontrol: has joined #RubyOnRails
[17:07:40] freezevee: has joined #RubyOnRails
[17:10:09] codeurge: has joined #RubyOnRails
[17:10:53] sinkensabe: has joined #RubyOnRails
[17:12:32] tubbo: adac: nope
[17:13:50] adac: tubbo, kk thanks!
[17:14:02] sye: any reason delete_all returns nil sometimes, when operating on a relation?
[17:14:17] sye: seems that if it's scoped, or conditions are passed in, it returns an int of the # of records
[17:14:58] sye: has_many :comments
[17:15:14] sye: comments.delete_all returns nil though (but successfully deletes all the comments)
[17:17:25] nfk: has joined #RubyOnRails
[17:18:37] kitsuneyo: lacrymology, i use pundit. it works well.
[17:18:40] craigp: has joined #RubyOnRails
[17:18:40] slash_part: dtordable: whatcha got?
[17:18:56] dtordable: creating my blog systemb I used scaffolding and Devise to manage the users. how do I relate a user with the created post?
[17:19:40] Megamos: has joined #RubyOnRails
[17:19:44] slash_part: dtordable: there's some good resources here http://guides.rubyonrails.org/association_basics.html
[17:20:32] slash_part: dtordable: sounds like you want a user to be able to have many blog posts... that's usually done by adding a foreign key (user_id:integer) column to your blog post model
[17:20:43] slash_part: (and some more, check out that page)
[17:20:44] gavit: I have a list of subcriptions customer:refernces start_date:date end_date name, how would one get a list of subcriptions active for a customer at a particular date?
[17:20:48] lindii_: has joined #RubyOnRails
[17:20:50] dtordable: that webpage? was there recently hehehe
[17:21:19] slash_part: dtordable: the answers are there... i promise! hopefully what i said will help you find it
[17:21:38] dtordable: slash_part: need a db:migrate in there?
[17:22:06] slash_part: dtordable: you'll need a db:migrate somewhere in there if the blog posts table doesn't yet have the user_id column...
[17:22:10] gavit: is there a shorter way than if(year>=subscription.start_date.year&& year <= subscription.end.date.year (and for month, and day)
[17:22:52] slash_part: dtordable: it's pretty straight forward... if a blog post has a title of "Some Title" and a user_id of 3, then it belongs to the user with an id of 3.
[17:22:58] DEA7TH: has joined #RubyOnRails
[17:23:08] gavit: I want something like between, but the 'opposite'
[17:23:08] Kenrick: has joined #RubyOnRails
[17:23:32] gavit: get all records where request_date is between start & end-date
[17:24:21] secretlives: has joined #RubyOnRails
[17:24:23] dtordable: slash_part: how do I add the field in command line to the model?
[17:24:46] sye: you have to generate a migration.
[17:24:47] cnk: gavit, most sql flavors have 'between'
[17:25:25] kitsuneyo: has joined #RubyOnRails
[17:26:15] Maletor: has joined #RubyOnRails
[17:26:33] towski_: has joined #RubyOnRails
[17:27:18] slash_part: gavit: Time.now.all_day.cover? Time.now # if you're looking for something outside of sql
[17:27:23] gavit: cnk: I'll try select * from subscriptions WHERE (requested_date BETWEEN supscription.start_date and subscription.end_date)
[17:28:50] slash_part: dtordable: sye was talking to you, yeah.. he's right, it's easy to generate a migration for adding a column to a table... there's a generator specifically for it (i'm betting you can find it!)
[17:29:27] jahbrewski: has joined #RubyOnRails
[17:30:31] Megamos: has joined #RubyOnRails
[17:30:41] slash_part: gavit: or if you're just using the years... opment environment (Rails 4.1.9)
[17:30:46] jkamenik: has joined #RubyOnRails
[17:30:49] slash_part: 2.2.0 :001 > 1995.in?(1985..2015)
[17:31:09] stannard: has joined #RubyOnRails
[17:33:06] diggitydane: How can you wait for a Rake Task to finish? I'm using Rake::Task[:task].invoke, but the task keeps going and I need it to wait for api call from the other task
[17:33:37] gavit: cnk: between is for when I have 1 kolom that I need to be between two dates
[17:33:51] gavit: I have 1 date that needs to be between 2 coloms
[17:34:55] nettoweb: has joined #RubyOnRails
[17:35:01] tuelz1: has joined #RubyOnRails
[17:35:02] gavit: cnk: guess I wanted data = ModelName.where("requested_date >= start_date AND requested_date <= end_date")
[17:35:08] gavit: thanks anyways
[17:35:12] cnk: gavit: then I suspect you will need 2 conditions just like that
[17:35:19] gavit: slash_part: gonna check what opment is in a few
[17:35:34] njero: has joined #RubyOnRails
[17:35:36] Tref: has joined #RubyOnRails
[17:35:37] nocontrol: what do you guys use for role administration and devise ? Something totally custom or a ready gem ?
[17:36:38] craigp: has joined #RubyOnRails
[17:37:20] kerunaru: has joined #RubyOnRails
[17:37:25] wldcordeiro: has joined #RubyOnRails
[17:37:36] TheNet: has joined #RubyOnRails
[17:38:54] slash_part: gavit: opment was just something that got accidentally pasted (part of DEVELopment)
[17:38:57] Megamos: has joined #RubyOnRails
[17:39:51] |RicharD|: has joined #RubyOnRails
[17:40:45] craigp: has joined #RubyOnRails
[17:41:31] |RicharD|: how can I do a uniqueness validation with a scope, using a polymorphic association ?
[17:41:51] benlieb: has joined #RubyOnRails
[17:42:26] |RicharD|: usually I do something like this: validates :user_id, uniqueness: { scope: :post_id } but here I can't do postable_id because there is also potable_type
[17:42:52] slash_part: |RicharD|: you can always do a custom validator
[17:43:09] njero: has joined #RubyOnRails
[17:43:10] |RicharD|: yes I know, but I wanted know if there is a better way
[17:43:12] |RicharD|: or rails way
[17:43:15] gavit: slash_part: I need month + year
[17:43:48] slash_part: |RicharD|: scope: [:foo_id, :foo_type]
[17:43:54] slash_part: maybe that'll do :)
[17:45:37] slash_part: gavit: are you trying to write a query, or looking to do date range comparison on objects you've already queried for?
[17:46:59] slash_part: gavit: Event.where(start_time: (1.year.ago)..(Time.now))
[17:50:15] slash_part: oh... that one won't work for you...
[17:51:14] scmx: has joined #RubyOnRails
[17:54:10] slash_part: gavit: Subscription.where('DATE(?) BETWEEN start_date AND end_date', Time.now) #sub Time.now for the requested one
[17:54:35] njero: has joined #RubyOnRails
[17:55:19] Megamos: has joined #RubyOnRails
[17:56:53] recurrence: has joined #RubyOnRails
[17:56:53] rakm: has joined #RubyOnRails
[17:58:28] guillaume-rb: has joined #RubyOnRails
[17:59:54] stannard: has joined #RubyOnRails
[18:01:24] build22: has joined #RubyOnRails
[18:02:25] benlieb: has joined #RubyOnRails
[18:02:44] Megamos: has joined #RubyOnRails
[18:02:52] AzaToth: has joined #RubyOnRails
[18:04:24] kerunaru: has joined #RubyOnRails
[18:05:20] mghaig: has joined #RubyOnRails
[18:05:30] flashpoint9: has joined #RubyOnRails
[18:05:39] djbkd: has joined #RubyOnRails
[18:06:04] erbesharat: has joined #RubyOnRails
[18:06:20] Megamos: has joined #RubyOnRails
[18:07:10] djbkd: has joined #RubyOnRails
[18:07:53] sarink: has joined #RubyOnRails
[18:09:06] hastd: has joined #RubyOnRails
[18:09:18] Guest53: has joined #RubyOnRails
[18:09:20] mghaig: has left #RubyOnRails: ()
[18:11:45] momomomomo: has joined #RubyOnRails
[18:15:38] raunicolae: has joined #RubyOnRails
[18:16:04] lxsameer: has joined #RubyOnRails
[18:17:07] Uranio: has joined #RubyOnRails
[18:17:08] bricker: has joined #RubyOnRails
[18:17:19] andrew9184: has joined #RubyOnRails
[18:17:37] thither: Hey, kinda lost with this error I'm getting from importing to a model. http://pastie.org/private/e6rngeiagem003aij8rgna
[18:17:53] thither: It seems to think something is a Time object
[18:17:55] raunicolae: has left #RubyOnRails: ()
[18:17:55] hightower4: has joined #RubyOnRails
[18:18:18] Denarii: has joined #RubyOnRails
[18:18:31] roxtrongo: has joined #RubyOnRails
[18:18:42] smathy: thither, protip, if you use double ##s then pastie will lay out your paste as separate files
[18:18:56] thither: Thanks, I'll try that next time
[18:19:18] zpe: has joined #RubyOnRails
[18:20:46] smathy: thither, no way to tell what your issue is without seeing what that `import` method is (and if you can just confirm that line 22 is that Tag.import line).
[18:21:28] thither: Yes it's that line.
[18:21:37] thither: I didn't define the import method
[18:21:43] thither: I assumed it was part of ActiveRecord
[18:22:34] sarink: has joined #RubyOnRails
[18:23:00] safety_cut: has joined #RubyOnRails
[18:23:36] thither: OH nvm, someone added it as a Gem
[18:23:42] smathy: thither, nope, and so now your error is even more curious - you should have received "undefined method `import' for #<Class:hex_number>"
[18:23:47] Uranio: has joined #RubyOnRails
[18:23:58] ellisTAA: has joined #RubyOnRails
[18:24:05] thither: It's this :/ https://github.com/zdennis/activerecord-import
[18:24:49] thither: Well I guess I'll just use vanilla ActiveRecord stuff then
[18:25:03] thither: Something's definitely wrong with this gem
[18:26:00] RegulationD: has joined #RubyOnRails
[18:26:11] thither: smathy: thanks for your help
[18:26:27] smathy: thither, actually looks like your code is wrong: https://github.com/zdennis/activerecord-import/wiki/Examples#import-using-columns-and-arrays
[18:26:41] smathy: thither, your `tags` array is supposed to be an array of arrays.
[18:28:13] netzfisch: has joined #RubyOnRails
[18:28:31] romdi: has joined #RubyOnRails
[18:28:51] smathy: thither, not sure what your `load=tags` setting is on the command line either, maybe this gem can load from some other flat files, maybe YAML fixtures or something somewhere else, and maybe that's what that load setting is for.
[18:29:03] woods: has joined #RubyOnRails
[18:30:20] ellisTAA: whenever i install a gem i run bundle install, then i run bundle, is running bundle after bundle install superfluous?
[18:31:15] TheNet: has joined #RubyOnRails
[18:31:24] youngbaks: has joined #RubyOnRails
[18:33:59] cornerma1: has joined #RubyOnRails
[18:35:10] User458764: has joined #RubyOnRails
[18:35:24] nettoweb: has joined #RubyOnRails
[18:36:27] kerunaru: has joined #RubyOnRails
[18:36:43] tbuehlmann: EllisTAA, "bundle" is shorthand for "bundle install"
[18:36:52] ellisTAA: tbuehlmann: ty
[18:37:24] railsknight: has joined #RubyOnRails
[18:37:40] tuelz1: has joined #RubyOnRails
[18:37:45] Cervajz: has joined #RubyOnRails
[18:37:47] framling: has joined #RubyOnRails
[18:37:57] manfrin_: has joined #RubyOnRails
[18:38:57] thither: smathy: Nah that was something I added myself so that I can specify what tables get seeded by rake
[18:40:36] notnoyyyyy: has joined #RubyOnRails
[18:42:18] xcesariox: has joined #RubyOnRails
[18:42:19] m1ck431_: has joined #RubyOnRails
[18:42:43] kerunaru: has joined #RubyOnRails
[18:43:28] Or1on: has joined #RubyOnRails
[18:43:28] Or1on: has joined #RubyOnRails
[18:44:32] ellisTAA: am i missing something from this line that is giving me the error 0 of 2..3 arguments? https://gist.github.com/ellismarte/935c78f502843b8582b8#file-authentications_spec-rb-L8
[18:45:07] nettoweb: has joined #RubyOnRails
[18:46:50] Megamos: has joined #RubyOnRails
[18:48:47] RegulationD: has joined #RubyOnRails
[18:51:04] pixelhandler: has joined #RubyOnRails
[18:51:10] podman: has joined #RubyOnRails
[18:51:28] EminenceHC: has joined #RubyOnRails
[18:52:25] safety_cut: has joined #RubyOnRails
[18:52:44] sameerynho: has joined #RubyOnRails
[18:53:17] kerunaru: has joined #RubyOnRails
[18:53:47] peppers: has joined #RubyOnRails
[18:55:11] Sigfrid: has joined #RubyOnRails
[18:55:19] guillaume-rb: has joined #RubyOnRails
[18:55:25] shafire: has joined #RubyOnRails
[18:57:31] Guest53: has joined #RubyOnRails
[18:59:24] tubbo: EllisTAA: why are you doing params.to_json?
[19:00:01] ellisTAA: tubbo: it???s my first time building an api soo i thought that since i want json coming in i???d have to do that?
[19:00:39] tubbo: EllisTAA: request specs are basically controller specs, they fill the same void so to speak. so you can just pass a hash of params. you should also merge your params with format: :json to configure it to pass as JSON
[19:00:50] tubbo: EllisTAA: instead of configuring the headers there, which is actually in the session :P
[19:01:39] ellisTAA: tubbo: could u explain what you mean by merge params with format: :json? do i do that in my controller or in the specs?
[19:01:43] ellisTAA: specs right?
[19:01:52] woods: has left #RubyOnRails: ("Leaving")
[19:02:04] tubbo: in the specs. you'd pass something like `post my_api_endpoint_path, param: true, whatever: false, format: :json`
[19:03:03] apotry: has joined #RubyOnRails
[19:03:16] djbkd: has joined #RubyOnRails
[19:04:04] ellisTAA: tubbo: thanks
[19:04:15] kerunaru: has joined #RubyOnRails
[19:06:22] TPBallbag: has joined #RubyOnRails
[19:07:13] flip_digits: has joined #RubyOnRails
[19:07:48] bitwise_: anyone familiar with the RESTful Rails Development book? I'm having trouble with the first 50 pages and their AMS implementation
[19:08:53] safety_cut: has joined #RubyOnRails
[19:09:49] tubbo: dmarr: nope, but i've implemented AMS a few times. what's the issue you're having?
[19:10:27] dmarr: tubbo: I'm noticing that the root attribute I am using in my serializer doesn't seem to be working
[19:10:41] shafire: are there any gradle tasks for jrubyonrails?
[19:10:56] tubbo: shafire: what's jrubyonrails
[19:11:27] shafire: rails using jruby
[19:11:32] desmondhume: has joined #RubyOnRails
[19:11:52] dmarr: tubbo: here is the repo i've started https://github.com/marr/wikicat
[19:12:07] Tref: has joined #RubyOnRails
[19:12:23] dmarr: and the relevant line https://github.com/marr/wikicat/commit/d9753ab779d33491448fac2dffd1bcb0fd82d21b#diff-f9a8f3616e4d46f0adfd74eff795b424R8
[19:12:44] Cervajz__: has joined #RubyOnRails
[19:12:45] Uranio: has joined #RubyOnRails
[19:13:55] blackmesa: has joined #RubyOnRails
[19:15:23] benlieb: has joined #RubyOnRails
[19:15:24] Cervajz__: has joined #RubyOnRails
[19:15:37] tubbo: dmarr: if you're using v0.10.0, which includes the new adapters, you need to use the JSON adapter to get root keys in your routes.
[19:16:00] tubbo: dmarr: now that AMS supports JSON API, they added these adapters which help serialize your API for different formats
[19:16:36] tubbo: dmarr: in https://github.com/rails-api/active_model_serializers#example, you can see one configuring their root-key'ed API like: ActiveModel::Serializer.config.adapter = :json
[19:16:49] manfrin: has joined #RubyOnRails
[19:17:13] czerasz: has joined #RubyOnRails
[19:17:23] dmarr: ok thanks tubbo
[19:17:29] tubbo: shafire: not that i know of, no. would be kinda cool to make some kind of bridge between that and rake though, right?
[19:17:33] dmarr: im not familiar with json-api
[19:17:49] tubbo: dmarr: it's a neat idea, http://jsonapi.org/
[19:18:40] tubbo: active_model_serializers is typically used alongside ember.js on the frontend. there used to be a special adapter in ember called ActiveModelAdapter which would be designed to work specifically with AMS. but the ember guys proposed we standardize hypermedia-esque APIs in JSON with something everyone could work around.
[19:19:06] adac: has joined #RubyOnRails
[19:19:11] tubbo: i like the concept. at some point i think you'll be able to develop generic HTTP clients that can work with just about anything.
[19:20:15] shafire: tubbo: yes that would be really cool
[19:21:04] ellisTAA: sorry but i???m still getting a wrong # of arguments error ??? and i???m following rspec docs ??? https://gist.github.com/ellismarte/935c78f502843b8582b8#file-authentications_spec-rb-L6-L7
[19:23:04] SteenJobs: has joined #RubyOnRails
[19:24:19] sankaber: has joined #RubyOnRails
[19:24:39] dmarr: tubbo: do i still need the respond_to stuff with AMS?
[19:24:40] Fire-Dragon-DoL: has joined #RubyOnRails
[19:25:59] Spami_: has joined #RubyOnRails
[19:27:40] tubbo: dmarr: you can just do render @category and it will serialize the model automatically when requested as JSON
[19:27:48] tubbo: you don't need all that other configuration stuff
[19:29:24] mxrguspxrt: has joined #RubyOnRails
[19:29:41] ur5us: has joined #RubyOnRails
[19:30:10] TheNet: has joined #RubyOnRails
[19:30:25] DEA7TH: has joined #RubyOnRails
[19:31:33] rakm: has joined #RubyOnRails
[19:32:19] atmosx: has left #RubyOnRails: ("WeeChat 0.4.4-dev")
[19:32:37] dmarr: tubbo: what is the default ActiveModel::Serializer.config.adapter>
[19:33:13] dmarr: says 'flatten_json' when I output it.. is that just :json without the root element?
[19:33:31] tubbo: dmarr: https://github.com/rails-api/active_model_serializers#built-in-adapters shows you what's default and what comes with AMS.
[19:33:40] freezevee: has joined #RubyOnRails
[19:34:34] s2013: has joined #RubyOnRails
[19:34:59] dmarr: got it.. this book is gonna need a rev2 pretty quickly
[19:35:48] arup_r: has joined #RubyOnRails
[19:37:22] alex88: has joined #RubyOnRails
[19:37:42] craigp_: has joined #RubyOnRails
[19:38:01] tubbo: yeah, AMS changed a bit recently. and that seems to be the case with books. unfortunately, publishing takes longer than the technology does to develop.
[19:38:08] duncannz: has joined #RubyOnRails
[19:38:40] youngbaks: has joined #RubyOnRails
[19:39:13] djbkd: has joined #RubyOnRails
[19:39:22] njero: has joined #RubyOnRails
[19:39:48] djbkd: has joined #RubyOnRails
[19:42:35] speakingcode: has joined #RubyOnRails
[19:43:00] Cervajz: has joined #RubyOnRails
[19:43:20] arup_r: what class_methods does ? http://api.rubyonrails.org/classes/ActiveSupport/Concern.html
[19:43:39] yardenbar: has joined #RubyOnRails
[19:43:39] arup_r: I am writing something where I need to understand how this thing works..
[19:44:31] njero: hey.. gotta doubt with act-as-taggable-on gem.. why would context is stored in taggable table instead of saving on tag table which would avoid repeated string entry due to context specification?
[19:45:01] desmondhume: has joined #RubyOnRails
[19:45:08] veloutin: has joined #RubyOnRails
[19:45:59] veloutin: is there a clean way to force an after_commit callback to execute, even if I didn't change an instance?
[19:46:20] nettoweb: has joined #RubyOnRails
[19:47:06] arup_r: veloutin: yes, probably you need to touch your active record object.. Go try and say me if it works
[19:47:26] tubbo: veloutin: you could just call the method on the model..
[19:47:37] arup_r: if not works, after_save/after_update ofcourse will work
[19:47:41] desmondhume: has left #RubyOnRails: ()
[19:47:44] desmondhume: has joined #RubyOnRails
[19:47:48] njero: hey.. gotta doubt with act-as-taggable-on gem.. why would context is stored in taggable table instead of saving on tag table which would avoid repeated string entry due to context specification?
[19:48:01] arup_r: lol ( second time )
[19:48:20] njero: arup_r: sry dude.. thought missed due to connectivity
[19:48:31] Guest75208: has joined #RubyOnRails
[19:48:55] desmondhume: has left #RubyOnRails: ()
[19:48:57] desmondhume: has joined #RubyOnRails
[19:51:56] bamorim: has joined #RubyOnRails
[19:52:37] arBmind: has joined #RubyOnRails
[19:52:44] arup_r: I answered my own question thanks
[19:54:53] tubbo: arup_r: did you read the code? :)
[19:55:09] arup_r: yes I went to github.
[19:55:15] arup_r: and found the answer..
[19:55:25] cfinley: has joined #RubyOnRails
[19:55:33] arup_r: Ruby Metaprogamming all over the Rails
[19:55:36] hardtail: has joined #RubyOnRails
[19:56:17] arup_r: tubbo: https://github.com/rails/rails/blob/d06e42518a4fdd1732f1d75a43c69071bcd79245/activesupport/lib/active_support/concern.rb#L134
[19:56:18] Guest53: has joined #RubyOnRails
[19:56:25] vigintas: has joined #RubyOnRails
[19:56:45] kadoppe: has joined #RubyOnRails
[19:57:36] heyts: has joined #RubyOnRails
[19:58:12] arthurix_: has joined #RubyOnRails
[19:58:41] scmx: has joined #RubyOnRails
[20:01:46] Pazician: has joined #RubyOnRails
[20:03:15] pkrueger: has joined #RubyOnRails
[20:04:38] tuelz1: has joined #RubyOnRails
[20:05:10] a1fa: has joined #RubyOnRails
[20:05:26] a1fa: does anyone have any experience with Ransack gem?
[20:05:27] MartinElvar: has joined #RubyOnRails
[20:06:14] boombadaroomba: has joined #RubyOnRails
[20:08:37] slash_part: a1fa: surely someone does, but what's the real question?
[20:09:53] veloutin: arup_r: actually, just saving the record (it was a related record) did work, thanks!
[20:10:53] DoubleMalt: has joined #RubyOnRails
[20:10:55] ellisTAA: i???m trying to write a spec for a post route, in this example ???post :create, purchase: { attributes: p, purchase_line_items_attributes: [pl] }??? what does the purchase: before the hash refer to??
[20:11:24] a1fa: slash_part: .collection_select
[20:11:34] a1fa: slash_part: but i think i figured it out
[20:16:09] cfinley: EllisTAA: it's the key for the outer hash.
[20:16:29] ellisTAA: cfinley: how do i know what my key is?
[20:16:29] maletor_: has joined #RubyOnRails
[20:16:33] cfinley: The first param for that post is the :create action, the second is the request params
[20:16:39] atomical_: has joined #RubyOnRails
[20:16:44] cfinley: whatever the object is, with it's defined attributes
[20:16:58] ellisTAA: cfinley: i dont think i have one ??? https://gist.github.com/ellismarte/935c78f502843b8582b8#file-authentications_spec-rb-L6-L7
[20:17:45] momomomomo: has joined #RubyOnRails
[20:17:48] cfinley: You should be interacting with request params. Controller actions don't typically take arguments
[20:18:08] rgtk: has joined #RubyOnRails
[20:18:18] cfinley: the request should be something like /authenticate?email=foo@bar.com&password=foo
[20:18:51] cfinley: but i would say you should be using some kind of authentication token for this, not passing raw email/password creds
[20:19:21] cfinley: but in general, controller actions don't take arguments, they should be using the request params
[20:19:30] a1fa: <%= f.collection_select :user_id_eq, Users.all, :id, :login, include_blank: true %>
[20:19:32] dtordable: to think a bit
[20:20:25] dtordable: a ror website section is a controller?
[20:20:25] a1fa: so i'm, using ransack to filter stuff created by users
[20:20:32] jessemcgilallen: has joined #RubyOnRails
[20:20:44] a1fa: but i dont want to give users the list of all users, only the users that have records created
[20:20:52] dionysus69: capistrano is only useful in case I am using my own web server or infrastructure as a service right? is it useful with PAAS for example?
[20:21:00] ellisTAA: cfinley: ah thanks ??? when i change my spec to say ???post "/v1/authenticate?email=ellis@gmail.com&password=asdfadsf?????? i still get the argument error
[20:21:25] cfinley: sorry, that's what the request will look like
[20:21:28] a1fa: how can I join Records and Users, and .Uniq
[20:21:53] a1fa: so the drop down is only for the users who have records?
[20:21:59] cfinley: EllisTAA: your spec would be post :endpoint, foo: "bar"
[20:22:00] atomical: has joined #RubyOnRails
[20:22:18] cfinley: in your controller you would interact with params with params[:foo]
[20:22:23] ellisTAA: cfinley: isn???t that what i had originally?
[20:22:53] cfinley: and your method signature would be just def authenticate, since the action params are captured in the params object
[20:23:27] Pazician: has joined #RubyOnRails
[20:23:31] cfinley: EllisTAA: http://guides.rubyonrails.org/action_controller_overview.html#parameters
[20:24:28] djbkd: has joined #RubyOnRails
[20:24:33] cfinley: EllisTAA: yes that is what you had original, what I was trying to illustrate was how the request will look to the controller. I didn't mean that's how your spec should be written. My comment was unclear.
[20:25:41] ellisTAA: cfinley: thanks
[20:25:48] ngscheurich: has joined #RubyOnRails
[20:33:11] ellisTAA: :\ if someone could help me figure out why my authentication_spec is getting an argument error i???d really appreciate it https://github.com/ellismarte/Stateful_Rails_API ???
[20:35:16] tbuehlmann: EllisTAA, um, why does your authenticate action take two method parameters?
[20:35:57] netzfisch: has joined #RubyOnRails
[20:36:31] cfinley: That's what I was saying earlier. Controller actions don't take arguments. They read the request parameters object. http://guides.rubyonrails.org/action_controller_overview.html#parameters
[20:37:01] cfinley: Also, that spec would be in spec/controllers/authentication_spec.rb since it's a controller spec
[20:37:10] arup_r: If I use this https://github.com/Casecommons/pg_search#pg_search_scope , can the :against can also have a method name as a symbol, or it should always be a column name of a model ?
[20:37:57] arup_r: tubbo: ^^ :)
[20:39:18] mikamika: has joined #RubyOnRails
[20:39:46] slash_part: arup_r: i'm betting on column name... as psql's not going to know what to do with ruby method names
[20:40:15] arup_r: yes, then I am going with multiple search, it supports.
[20:41:07] shock_one: has joined #RubyOnRails
[20:41:08] ramortegui: has joined #RubyOnRails
[20:42:31] Maxz_: has joined #RubyOnRails
[20:42:55] a1fa: how can i insert ":lastname, :firstname" in for :lastname
[20:42:58] a1fa: <%= f.collection_select :user_id_eq, User.joins(:records).distinct, :id, :lastname, include_blank: true %>
[20:43:20] j4d: has joined #RubyOnRails
[20:45:27] a1fa: should i change it to f.select and then collect?
[20:45:46] Radar: GOOD MORNING
[20:46:03] dsimon: ONLY ON SOME PARTS OF EARTH
[20:46:06] slash_part: a1fa: see the docs here... the author's example defines a name_with_initial method... you could define a last_comma_first method, or pretty_name method
[20:46:11] Radar: a1fa: define a .to_s method that is lastname + firstname
[20:46:26] dsimon: in other parts, it is afternoon, evening, night, or terrible regardless of time of day
[20:46:27] Coldblackice_: has joined #RubyOnRails
[20:46:31] Radar: dsimon: http://www.total-knowledge.com/~ilya/mips/ugt.html
[20:46:49] slash_nick: beat me to it
[20:47:05] dsimon: Radar, i approve of this idea
[20:47:30] dsimon: so: good morning to you as well :-)
[20:47:50] recurrence: has joined #RubyOnRails
[20:48:39] adac: has joined #RubyOnRails
[20:48:44] a1fa: slash_nick: doh, nice. thank you
[20:49:19] slash_nick: a1fa: i failed to paste the url... nice job tracking it down anyway :)
[20:49:51] cac: has joined #RubyOnRails
[20:50:19] tubbo: arup_r: i was wondering the same thing actually
[20:50:21] tubbo: arup_r: !try
[20:50:21] helpa: arup_r: Why don't you try it and find out for yourself?
[20:51:02] ellisTAA: tbuehlmann: sorry call. my authentication action takes two methods because one is an email and one is a password, and an optional argument is for users signing up
[20:51:02] kuroro: has joined #RubyOnRails
[20:51:15] arup_r: I tried but didn't work
[20:51:28] tubbo: well shit
[20:51:40] kuroro: i want my server to download a user specified large file, and then constantly notify the user of its progress. My current plan is to have an endpoint queue the download in a background job (i.e resque), and once the download job starts, have it update its progress in a redis hash. Then, let the browser constantly poll an endpoint that looks at the value of this redis hash. Is there a library that already does this for me?
[20:51:40] slash_nick: it's postgres search, makes sense it'd need a column
[20:51:54] ellisTAA: tbuehlmann: oh fuck nvm ur right
[20:52:01] ellisTAA: cfinley: >< i feel so dumb
[20:52:04] chouhoulis: has joined #RubyOnRails
[20:52:09] arup_r: tubbo: That's why I changed mind and going to use https://github.com/Casecommons/pg_search#multi-search
[20:52:51] tubbo: oh right, yeah
[20:53:05] kuroro: or is there a simpler/better way to achieve what im trying to do?
[20:53:10] dikaio: has joined #RubyOnRails
[20:53:18] tubbo: pg_search_scope definitely needs to work on a column, because it's just creating a scope that crafts a fulltext search query for that given column (or set of columns)
[20:53:33] n1lo: has joined #RubyOnRails
[20:53:58] tubbo: however, multisearch uses a whole different object called a pg_search_document that you have to rebuild the index for if you make updates (but pg_search adds hooks to your models that have `multisearchable` defined so you don't have to do this manually)
[20:54:03] alex88: has joined #RubyOnRails
[20:54:13] yardenbar: has joined #RubyOnRails
[20:54:30] tubbo: so it depends on whether PgSearch indexes based on what's in the DB (like if it just runs SQL queries against the data and populates the index with that), or if it is instantiating the objects themselves.
[20:54:54] cfinley: EllisTAA: no worries
[20:55:00] tubbo: because once the data you want is in that index, it'll get picked up when you search for it
[20:55:19] ellisTAA: cfinley: thanks
[20:55:51] arthurix: has joined #RubyOnRails
[20:55:59] SteenJobs: has joined #RubyOnRails
[20:57:02] nickenchuggets: anyone know how I might add something like a "preview" link to my ActiveAdmin resources?
[20:57:06] ellisTAA: do i want to use strong params on my api?
[20:57:29] arup_r: tubbo: this multiesearch thing looks ok.. It will do global search as well as single table search. Because it is a polymorphic table
[20:57:32] nickenchuggets: ActiveAdmin provides some "default_actions" I believe, view edit and delete, but I want to add a "preview" link to that set
[20:57:52] nickenchuggets: and I thought I should use the action_item method for this purpose
[20:57:54] arup_r: I can bend it the way I want
[20:57:56] dstarh: has joined #RubyOnRails
[20:58:57] nickenchuggets: oh, I think I figured it out :)
[21:02:17] craysiii: has joined #RubyOnRails
[21:02:32] cfinley: EllisTAA: always use strong parameters
[21:02:55] cfinley: it sets a whitelist, so that only the elements you want are allowed into the controller
[21:03:47] ellisTAA: cfinley: since i don???t have a model, would i just write params.permit(:email, :password, :address) instead of params.require(:user).permit(:email, :password, :address)
[21:05:00] cfinley: EllisTAA: The readme has info on that https://github.com/rails/strong_parameters
[21:05:07] ellisTAA: cfinley: thanks
[21:05:34] drbayer: has joined #RubyOnRails
[21:06:05] htmldrum: has joined #RubyOnRails
[21:06:43] hardtail: has joined #RubyOnRails
[21:09:45] roxtrongo: has joined #RubyOnRails
[21:10:00] n1lo: has joined #RubyOnRails
[21:10:43] Megamos: has joined #RubyOnRails
[21:11:40] nettoweb: has joined #RubyOnRails
[21:12:49] Guest53: has joined #RubyOnRails
[21:15:36] momomomomo: has joined #RubyOnRails
[21:16:38] Klumben: has joined #RubyOnRails
[21:18:45] desmondhume: has joined #RubyOnRails
[21:19:46] arup_r: I am trying to autoattach the attributes while including the searhable module. using rails concerns/ path(feature). But it is not doing what I want. Where to put the class method to make it working ?
[21:19:52] arup_r: https://gist.github.com/aruprakshit/1d83d4b31938b62e3b3f
[21:20:24] arup_r: If I take straight approach what docs said, https://github.com/Casecommons/pg_search#multisearchable then all is working
[21:20:36] arup_r: but I want to use this with concerns.
[21:20:49] arup_r: Help/Hints please..
[21:23:53] raunico3: has joined #RubyOnRails
[21:24:22] arup_r: let me know if my question feels to you as vague .. :/
[21:24:29] arup_r: I'll clarify it to you
[21:26:06] mike_bueti: has joined #RubyOnRails
[21:29:26] Hates_: arup_r: Show your concern code
[21:29:39] arup_r: Gave it in the Gist
[21:29:53] Hates_: arup_r: oops, sorry didn't see it at the bottom
[21:29:53] netzfisch: has joined #RubyOnRails
[21:30:45] framlinqp: has joined #RubyOnRails
[21:30:50] Hates_: arup_r: maybe search_atrributes is spelt wrong?
[21:31:22] arup_r: yes, but it is wrong both places.. so didn't matter. I will correct it later
[21:31:36] arup_r: but here I have some conceptual error
[21:32:18] arup_r: The idea is when the searchable module will be included, then the respective model will be matached and the value will be attached there
[21:32:41] arup_r: but the class method somehow not getting called..
[21:32:46] arup_r: or something else.
[21:33:07] arup_r: because If I write multisearchable against: [:full_name, :email]` in `User` it worked will.
[21:33:15] Hates_: well IMO you shouldn't be checking the class type in the concern
[21:33:16] arup_r: But my stunt hits me back
[21:33:27] arup_r: oh. then ?
[21:34:51] Hates_: arup_r: well personal opinion, but a concern should shouldn't know about the classes. It should be up to the class itself or a different class to provide the attributes.
[21:37:56] Megamos: has joined #RubyOnRails
[21:38:12] trosborn: has joined #RubyOnRails
[21:39:37] arup_r: not bad idea OOP wise. let me move them..
[21:40:39] nettoweb: has joined #RubyOnRails
[21:40:44] safety_cut: has joined #RubyOnRails
[21:41:23] Guest53: has joined #RubyOnRails
[21:43:29] arup_r: moving them to seprate class throwing error..
[21:43:53] arup_r: `method_missing': undefined local variable or method `search_atrributes' for User (call 'User.connection' to establish a connection):Class (NameError)
[21:44:41] jahbrewski: has joined #RubyOnRails
[21:45:44] alex88: has joined #RubyOnRails
[21:47:18] shock_one: has joined #RubyOnRails
[21:48:02] cac: has joined #RubyOnRails
[21:49:16] nickenchuggets: fucking activeadmin
[21:50:19] ValicekB: has joined #RubyOnRails
[21:50:19] Radar: nickenchuggets: !admin
[21:50:19] helpa: nickenchuggets: Please do not use active_admin, rails_admin or any other gems to build your admin interfaces. Instead, build it yourself. This will lead you to a safe path of understanding of the code, rather than to the Hell that is those gems.
[21:50:23] Radar: We told you.
[21:50:55] nickenchuggets: ok grandmaster sir
[21:52:40] x-light: has joined #RubyOnRails
[21:53:35] Aeyrix: grandmaster sir
[21:54:32] VeryBewitching: has joined #RubyOnRails
[21:56:34] rromanchuk: has joined #RubyOnRails
[21:57:31] meoblast001: has joined #RubyOnRails
[22:00:30] arup_r: Hates_: I fixed it :) https://gist.github.com/aruprakshit/1d83d4b31938b62e3b3f/edit
[22:01:02] Hates_: arup_r: did you try self.class ?
[22:01:03] arup_r: Issue was case use `Module#===` and `User === User` ofcourse always false, so the method returning `nil`
[22:01:14] arup_r: no self.name
[22:01:27] Hates_: arup_r: hmm, that sounds pretty bad
[22:01:44] nogic: has joined #RubyOnRails
[22:02:03] arup_r: anyway.. work done. going to sleep it is 3:30 am .. should I really sleep or still continue my work
[22:02:12] arup_r: too tired not getting sleep
[22:02:48] VeryBewitching: how's it going tubbo?
[22:03:24] slash_nick: arup_r: play hangman
[22:04:09] arup_r: need some sleep
[22:04:20] arup_r: bloddy eyes will get some rest
[22:04:55] nickenchuggets: ActiveAdmin isn't all that bad
[22:05:15] drbayer: has joined #RubyOnRails
[22:06:02] arup_r: nickenchuggets: when you will try to customize it, don't curse your boss/client.. please
[22:06:04] cac: has joined #RubyOnRails
[22:06:13] arup_r: otherwise make your own
[22:06:21] adaedra: I used ActiveAdmin once.
[22:06:29] fryguy: activeadmin. not even once.
[22:06:33] arup_r: and that is the last.........
[22:06:37] nickenchuggets: works just fine for me
[22:06:44] momomomomo: has joined #RubyOnRails
[22:06:45] nickenchuggets: yeah it's a bit frustrating at first
[22:06:46] adaedra: Depends on your needs.
[22:06:51] VeryBewitching: nickenchuggets: With the amount of time you'll fight to do something in the ActiveAdmin way, you probably could have written your tests and built it all by hand.
[22:06:51] blueM: has joined #RubyOnRails
[22:06:56] nickenchuggets: learning how to customize it is a pain in the cornhole
[22:07:02] nickenchuggets: but, it can be done
[22:07:13] adaedra: I prefer to make software my way than making the way of the software.
[22:07:26] nickenchuggets: then why do you use Rails
[22:07:31] blueM: has left #RubyOnRails: ()
[22:07:37] VeryBewitching: My users don't use Rails, I do
[22:08:02] VeryBewitching: Rails != ActiveAdmin with terms of how a developer is using it.
[22:08:44] VeryBewitching: If you like it, that's great, but tailor-made has value.
[22:09:13] circ-user-RqiAg: has joined #RubyOnRails
[22:09:48] Hates_: there's the new https://github.com/thoughtbot/administrate too
[22:10:13] nickenchuggets: Hates_: ooo, nice
[22:10:15] Cervajz: has joined #RubyOnRails
[22:10:30] rgtk: has joined #RubyOnRails
[22:11:25] wethu: has joined #RubyOnRails
[22:12:37] acti0nman: has joined #RubyOnRails
[22:15:29] tuelz1: has joined #RubyOnRails
[22:15:33] infamos: has joined #RubyOnRails
[22:15:50] pixelhandler: has joined #RubyOnRails
[22:19:01] craysiii: any alternatives to trello?
[22:20:14] Guest53: has joined #RubyOnRails
[22:20:18] bruno-: has joined #RubyOnRails
[22:22:01] yfeldblum: has joined #RubyOnRails
[22:22:04] tweeeaks: has joined #RubyOnRails
[22:22:11] CodingWolf: has joined #RubyOnRails
[22:23:09] fre: has joined #RubyOnRails
[22:24:12] Pazician: has joined #RubyOnRails
[22:27:46] johnflux: has joined #RubyOnRails
[22:27:46] johnflux: has joined #RubyOnRails
[22:29:17] Radar: craysiii: waffle.io works with GitHub issues.
[22:29:59] codeurge: has joined #RubyOnRails
[22:30:15] tubbo: trying to deploy all the things and shit is broked up
[22:30:58] craysiii: that seems really cool
[22:34:11] melonstorm: has joined #RubyOnRails
[22:35:06] bayvakoof: has joined #RubyOnRails
[22:39:04] ellisTAA: has joined #RubyOnRails
[22:41:49] ss_much: has joined #RubyOnRails
[22:48:58] ja: Hi peeps. Where can I put code that's only initialized when I start the Rails console?
[22:49:21] tubbo: ja: config/initializers
[22:49:27] ja: E.g. I'd like a different I18n.locale in the console than on the site
[22:49:40] ja: tubbo: But how do I make it run only in the console?
[22:49:52] ja: I need some `if Rails.console?` or so
[22:50:30] tubbo: ja: you could maybe use .irbrc
[22:50:44] ja: Hmmm???
[22:50:58] tubbo: oh that might need to be in your home dir though
[22:51:01] ja: Does Pry load .irbrc, I wonder? ^_^" Otherwise it must have its own
[22:51:15] ja: I think you can do dir-specific irbrc or pryrc
[22:51:31] ja: Maybe only with Pry
[22:51:36] EminenceHC: has joined #RubyOnRails
[22:51:48] tubbo: ja: here's a rails issue related to what you're talking about https://github.com/rails/rails/issues/14577
[22:51:51] tubbo: pry does load irbrc iirc
[22:51:59] tubbo: it's actually just a nice little wrapper around IRB
[22:53:32] quazimodo: has joined #RubyOnRails
[22:53:50] ja: Thanks, tubbo
[22:54:04] ja: Hmm??? Spring hooks, huh???
[22:56:02] lemur: has joined #RubyOnRails
[22:56:54] fre: has joined #RubyOnRails
[22:57:50] shibabu: has joined #RubyOnRails
[22:57:53] tds5016: has joined #RubyOnRails
[22:57:58] K3VA: has joined #RubyOnRails
[22:58:02] ja: tubbo: Just throwing e.g. `I18n.locale = :en` in ./.pryrc of my app dir seemed to work beautifully! THanks!
[22:58:33] tds5016: hi all. I was wondering if it's possible to create a model object that looks like it came from my orm without actually querying the database?
[22:58:52] tds5016: basically I need to say "I have x data, I retrieved from a lower level api; create a model based on this info"
[22:59:21] htmldrum: has joined #RubyOnRails
[23:00:17] ja: tds5016: ActiveModel is what you want, I think
[23:00:30] tds5016: I'm using cequel.
[23:00:39] ja: morning quazimodo
[23:00:44] ja: oh, I have no idae what that is, tds5016
[23:00:47] ellisTAA: let & before in rspec are used to define variables correct?
[23:01:13] tds5016: which creates an active model like object.
[23:01:25] momomomomo: has joined #RubyOnRails
[23:01:32] tds5016: I need to figure out out how to create one without actually using cequel to fetch :-/.
[23:02:06] jessemcgilallen: has joined #RubyOnRails
[23:03:09] craysiii: does the model class exist though? why cant you do something like why cant you just build it instead of creating it from the data that you grab from the other api
[23:03:20] craysiii: oops didnt edit that correctly.
[23:04:05] pixelhan_: has joined #RubyOnRails
[23:05:28] VeryBewitching: EllisTAA: before is a hook that runs before the examples, let defines a memoized helper method.
[23:06:06] shock_one: has joined #RubyOnRails
[23:06:16] ellisTAA: VeryBewitching: so let defines it once & it persists for some amount of time? what do u mean by hook
[23:07:21] VeryBewitching: EllisTAA: before defines a series of steps you want to have run before each example. See https://www.relishapp.com/rspec/rspec-core/v/2-2/docs/hooks/before-and-after-hooks
[23:07:44] VeryBewitching: You can define instance variables in before.
[23:07:51] fre: has joined #RubyOnRails
[23:08:55] ellisTAA: VeryBewitching: i think i would use let if the value of something isn???t going to change during the entire test ???. but i???d use before if the value is going to change throughout the tests? sound right?
[23:09:12] VeryBewitching: EllisTAA: I use let to define values all the time in my tests.
[23:09:31] VeryBewitching: let(:user) { create(:user) }
[23:09:47] ellisTAA: why not use before in that example
[23:10:24] VeryBewitching: There are some reasons to not use an instance variable defined in before
[23:10:36] northfurr: has joined #RubyOnRails
[23:11:21] VeryBewitching: The value from let is created when you call the helper.
[23:11:40] VeryBewitching: Defined in before, if the objects you're using are expensive, it runs prior to every test.
[23:11:48] Ropeney: has joined #RubyOnRails
[23:11:56] bricker: sometimes that's what you want though (hence `let!`)
[23:12:05] rgtk: has joined #RubyOnRails
[23:12:07] alex88: has joined #RubyOnRails
[23:12:19] VeryBewitching: bricker: Yes, sometimes, I was talking about http://stackoverflow.com/questions/5359558/when-to-use-rspec-let
[23:12:29] smathy: That lazy execution also allows you to override values in your tests - very handy.
[23:13:02] smathy: ...whereas `before` is always called outside-in.
[23:14:36] crystal77: has joined #RubyOnRails
[23:16:39] bvbrandon: has joined #RubyOnRails
[23:16:40] riotjones: has joined #RubyOnRails
[23:16:45] pydave6367: has joined #RubyOnRails
[23:17:11] fre: has joined #RubyOnRails
[23:18:02] mary5030: has joined #RubyOnRails
[23:19:06] bvbrandon: hello all, lets say I have class first and subclass second, if the first#show says, @first = First.find_by_slug(params[:id]), why would it say nilclass when I try to render a college?
[23:19:27] bvbrandon: render a ???Second??? I mean
[23:19:38] nya: has joined #RubyOnRails
[23:19:53] bricker: bvbrandon: try find_by_slug!(params[:id])
[23:19:57] bricker: for a more useful error
[23:21:04] bvbrandon: aha, thanks
[23:21:08] bvbrandon: that could help
[23:27:04] drbayer_: has joined #RubyOnRails
[23:30:18] safety_cut: has joined #RubyOnRails
[23:32:19] ellisTAA: if i had a method called get_first_name that took an full name as an argument, would i mock the argument & stub the method if i wanted to use a stub and a mock? in other words is a mock a predefined variable, and a stub is the return value of a method?
[23:34:57] seank_: has joined #RubyOnRails
[23:35:48] recurrence: has joined #RubyOnRails
[23:36:48] Radar: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
[23:37:13] Radar: Even though eh's gone, it's still a good read.
[23:38:19] gambl0re: has joined #RubyOnRails
[23:38:30] ja: Radar: haha, nice
[23:38:40] Radar: Hello again ja.
[23:38:45] ja: Hello, Radar.
[23:39:57] ellisTAA: has joined #RubyOnRails
[23:40:48] user1138: has joined #RubyOnRails
[23:41:40] VeryBewitching: Radar: That's cool.
[23:43:22] VeryBewitching: So if I changed my legal name to <script type="text/javascript">window.close();</script>, should I not be allowed the expressive power to close a browser window when someone sees my name?
[23:43:24] ja: Radar: I'm started using by_star after stalking you on GitHub. Very nice and oft-usable gem, I must say.
[23:43:37] Radar: ja: oh nice :D That was one of my first gems.
[23:44:12] ja: sweet! :> it does exactly what I was about to write myself
[23:46:18] djbkd: has joined #RubyOnRails
[23:52:09] seank__: has joined #RubyOnRails
[23:52:33] Uranio: has joined #RubyOnRails
[23:53:16] ja: The only way to make ???computed attributes??? in Rails is by defining an instance method on the model, right?
[23:53:46] ja: If so, I wish there was another way?????Since I could really use some computed attributes to show up in #attributes??? >_>
[23:53:54] rickmasta: has joined #RubyOnRails
[23:54:02] Radar: ja: !rule0
[23:54:02] helpa: ja: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[23:54:03] arthurix_: has joined #RubyOnRails
[23:55:12] ja: Sorry & thanks, Radar. I'm not really sure how to show the code for this though since it's all over the place.
[23:55:23] Radar: ja: Show us an example of what you want to do.
[23:55:28] Radar: What is the attribute computing?
[23:55:52] djbkd: has joined #RubyOnRails
[23:57:03] freztek: has joined #RubyOnRails