« Back to channel list

#RubyOnRails - 10 June 2015

« Back 1 day Forward 1 day »
[00:00:16] grp066: has joined #RubyOnRails
[00:00:33] givanse_: has joined #RubyOnRails
[00:01:22] asteros: has joined #RubyOnRails
[00:01:37] rodfersou: has joined #RubyOnRails
[00:01:40] attlasbot: has joined #RubyOnRails
[00:02:41] borodin: anybody know if there's a way to add a string before every url in a rails app. Similar to '2.6 Controller Namespaces and Routing' here: http://edgeguides.rubyonrails.org/routing.html ut without the path changes for the controllers
[00:03:00] sevenseacat: has joined #RubyOnRails
[00:03:16] Radar: borodin: Yes.
[00:03:25] borodin: it's a regular app, it just lives in ${hostname}/escrow/ instead of ${hostname}/
[00:03:37] borodin: Radar I bought your book. How do you do it
[00:03:41] Radar: borodin: so configure that to be the case in your Apache/Nginx configuration.
[00:03:50] quazimodo: has joined #RubyOnRails
[00:04:06] borodin: I'm using mod_proxy to direct all /escrow/ to my app's doc root
[00:04:22] borodin: but when my app generates a url, it doesn't include the /escrow/ part
[00:04:28] Radar: Would you need to do that if your server was configured to serve the app at escrow? Probably not.
[00:04:48] borodin: maybe I don't understand the problem... sign
[00:04:54] Radar: I don't know the configuration option. I think ##apache or #nginx would tell you.
[00:05:06] borodin: *somebody else* is doing mod proxy
[00:05:26] borodin: they just told me it appears as though the urls in my site don't have /escrow/ on them
[00:05:30] Radar: scope path: "/escrow" do; <all your routes>; end
[00:06:32] borodin: in routes.rb?
[00:06:56] borodin: ok I see it
[00:07:28] borodin: "If you want to route /admin/articles to ArticlesController (without the Admin:: module prefix), you could use:"
[00:08:01] borodin: hey one more detail, since you're being so noice
[00:08:40] shyshy: has joined #RubyOnRails
[00:09:13] borodin: if I have added a block to a resource, like ... aw screw it I"ll just try it and see...
[00:10:07] zorak8: has joined #RubyOnRails
[00:10:52] charliesome: has joined #RubyOnRails
[00:12:54] LicHacker: has joined #RubyOnRails
[00:13:56] fmcgeough: has joined #RubyOnRails
[00:14:17] GPrime: has joined #RubyOnRails
[00:16:19] commondream: has joined #RubyOnRails
[00:18:05] commondream: has joined #RubyOnRails
[00:18:55] fgo: has joined #RubyOnRails
[00:19:03] prereflect: has joined #RubyOnRails
[00:19:08] bruno-: has joined #RubyOnRails
[00:19:41] twilling: has joined #RubyOnRails
[00:19:57] _blizzy_: has joined #RubyOnRails
[00:23:51] siddart: has joined #RubyOnRails
[00:24:08] smathy: has joined #RubyOnRails
[00:25:38] dclo: has joined #RubyOnRails
[00:25:41] njero: has joined #RubyOnRails
[00:26:53] fgo: has joined #RubyOnRails
[00:27:13] Scripore: has joined #RubyOnRails
[00:29:42] one_zero: has joined #RubyOnRails
[00:30:14] ur5us: has joined #RubyOnRails
[00:32:27] jonahR: has joined #RubyOnRails
[00:33:33] justintv90: has joined #RubyOnRails
[00:37:28] arooni-mobile: has joined #RubyOnRails
[00:38:02] robustus|Off: has joined #RubyOnRails
[00:40:11] hotpancakes: has joined #RubyOnRails
[00:43:14] jenrzzz: has joined #RubyOnRails
[00:43:19] centrx: has joined #RubyOnRails
[00:44:50] jonahR: has joined #RubyOnRails
[00:45:02] crevax: has joined #RubyOnRails
[00:46:06] babykosh: has joined #RubyOnRails
[00:47:00] patie: has joined #RubyOnRails
[00:51:18] BlissOfBeing: has joined #RubyOnRails
[00:52:31] premera: has joined #RubyOnRails
[00:53:46] kies: has joined #RubyOnRails
[00:53:55] pothibo: has joined #RubyOnRails
[00:54:17] mello: has joined #RubyOnRails
[00:54:17] mello: has joined #RubyOnRails
[00:55:04] centrx: has joined #RubyOnRails
[00:56:31] scottmatheina: has joined #RubyOnRails
[00:57:57] kinduff: has joined #RubyOnRails
[00:57:57] kinduff: has joined #RubyOnRails
[01:01:51] eggoez: has joined #RubyOnRails
[01:03:32] superlou: has joined #RubyOnRails
[01:05:07] m0r0n: has joined #RubyOnRails
[01:05:39] centrx: has joined #RubyOnRails
[01:07:38] attlasbot: has joined #RubyOnRails
[01:08:36] edwinrozario: has joined #RubyOnRails
[01:12:59] ght: Question: Can anyone provide a specific example of sending the current values of a web form to another host via a POST statement using Ajax?
[01:13:16] ght: With or without Rails helpers, we're using Rails 4.2
[01:13:33] rhizome: not a rails question
[01:17:47] jonahR: has joined #RubyOnRails
[01:18:01] twilling: has joined #RubyOnRails
[01:19:11] rubyonrailed: has joined #RubyOnRails
[01:22:41] commondream: has joined #RubyOnRails
[01:27:43] TinkerTyper: has joined #RubyOnRails
[01:28:18] ght: Radar: Brilliant, thank you.
[01:28:32] Radar: My googling skills are unmatched.
[01:28:57] prereflect: has joined #RubyOnRails
[01:29:15] ght: Clearly.
[01:29:43] dopie: has joined #RubyOnRails
[01:30:09] ght: Can anyone else provide a specific example of sending the current values of a web form to another host via a POST statement using ajax?
[01:30:30] ght: With or without Rails helpers, we're using Rails 4.2. Helpers are, of course, acceptable.
[01:30:35] kinduff: search about "remote: true" for the form_tag helper
[01:30:43] rhizome: what have you tried?
[01:30:45] sevenseacat: that'd be the easiest way, yeah.
[01:31:10] kinduff: wtv you find, it's going to be pretty straightforward, rails makes it easy for simple forms
[01:31:24] JoshGlzBrk: has joined #RubyOnRails
[01:31:28] rhizome: "another host"
[01:32:03] kinduff: lmgtfy then
[01:32:49] ght: kinduff: I did, was reading documentation on it. The issue is, however, that we have a standard user profile form in a view. What we want to provide is the ability for users to send specific form elements to our app server for processing via a POST statement.
[01:32:51] CalvinnHobbes: has joined #RubyOnRails
[01:33:04] ght: Without having to update the entier form and commit the changes to the database.
[01:33:11] rhizome: you're not being clear
[01:33:45] ght: Another issue is, the elements in question are dynamic, loaded via a partial, utilizing the cocoon gem.
[01:34:02] kinduff: That doesn't matter
[01:34:08] ght: None of that matters, ok.
[01:34:22] Fire-Dra_: has joined #RubyOnRails
[01:34:29] kinduff: in resume what you're looking for is how to send a post request to another server via POST
[01:34:38] yfeldblum: has joined #RubyOnRails
[01:34:44] ght: The cocoon gem's link_to_remove_association functionality breaks if the partial elements are contained within a different div than the greater form.
[01:34:44] kinduff: not two times as I wrote, of course
[01:34:48] rhizome: i'm not sure they actually mean "another server" anymore
[01:34:52] ght: Yes, correct.
[01:35:07] kinduff: r u a bot m8?
[01:35:15] sandstrom: has joined #RubyOnRails
[01:35:21] ght: I just need a "test" link to read a series of dynamic form elements and send them to another server via POST.
[01:35:29] ght: kinduff: Yes.
[01:36:04] kinduff: The dynamic form elements doesn't matter as they don't interfer with the POST request to wtv host you want to do it
[01:36:33] kinduff: yet again, listen to Radar: http://www.google.com/search?q=jquery+ajax+post
[01:36:53] ght: Yes, Radar is always helpful with his generic google searches.
[01:37:12] Radar: and ght is always useful with his generic questions
[01:37:23] Radar: My snark is also unmatched (if you don't count sevenseacat)
[01:37:31] surrealanalysis: has joined #RubyOnRails
[01:37:36] ght: Well, that would require it making sense, of course.
[01:37:41] centrx: has joined #RubyOnRails
[01:37:41] kinduff: He's pointing you to the correct direction, we don't have this "generic examples" of how to solve any kind of problem
[01:37:42] sevenseacat: my snark is unsurpassed.
[01:37:44] mary5030: has joined #RubyOnRails
[01:37:57] Radar: ght: Steps to reproduce in a new app, please.
[01:38:22] ght: So a specific example of sending specific elements of a given form to another host via a POST statement, utilizing AJAX, too broad for this channel?
[01:38:39] ght: I'll check elsewhere, thank you just the same.
[01:39:16] Radar: ght: https://gist.github.com/radar/f5999dc18de37d789db3
[01:39:30] beauby: has joined #RubyOnRails
[01:39:38] unreal: has joined #RubyOnRails
[01:40:04] sevenseacat: the moment someone takes the time to write up an example, you're going to throw some other condition or spanner in the works
[01:40:24] sevenseacat: because your requirements are too abstract
[01:42:14] cornerma1: has joined #RubyOnRails
[01:42:59] asheinfeld: has joined #RubyOnRails
[01:47:47] gusrub: has joined #RubyOnRails
[01:48:16] Pazician_: has joined #RubyOnRails
[01:51:12] jan1337z: has joined #RubyOnRails
[01:53:51] arooni-mobile: has joined #RubyOnRails
[01:53:56] earthquake: has joined #RubyOnRails
[01:55:30] barriommx: has joined #RubyOnRails
[01:57:31] centrx: has joined #RubyOnRails
[01:59:18] merryfett: has joined #RubyOnRails
[02:00:42] rubyonrailed: has joined #RubyOnRails
[02:02:07] ur5us: has joined #RubyOnRails
[02:03:09] simplyianm: has joined #RubyOnRails
[02:04:43] charliesome: has joined #RubyOnRails
[02:07:40] fgo: has joined #RubyOnRails
[02:08:44] beauby: has joined #RubyOnRails
[02:09:05] Pazician: has joined #RubyOnRails
[02:09:11] darrik: has joined #RubyOnRails
[02:10:56] baweaver: has joined #RubyOnRails
[02:11:09] Pazician: has joined #RubyOnRails
[02:12:25] gusrub: has joined #RubyOnRails
[02:13:32] coetry: has joined #RubyOnRails
[02:13:53] aloneintheworld: has joined #RubyOnRails
[02:14:24] gusrub: has joined #RubyOnRails
[02:14:37] Lightsword: has joined #RubyOnRails
[02:15:22] Pazician_: has joined #RubyOnRails
[02:15:39] asteros: has joined #RubyOnRails
[02:17:45] djbkd: has joined #RubyOnRails
[02:17:53] centrx: has joined #RubyOnRails
[02:19:44] remendo: has joined #RubyOnRails
[02:21:19] RegulationD: has joined #RubyOnRails
[02:21:42] Pazician: has joined #RubyOnRails
[02:28:58] asheinfeld: has joined #RubyOnRails
[02:31:27] moei: has joined #RubyOnRails
[02:31:35] Aeyrix: <sevenseacat> my snark is unsurpassed.
[02:31:39] Aeyrix: I take offence to that.
[02:31:45] sevenseacat: pfft, you're small-time.
[02:31:46] Pazician: has joined #RubyOnRails
[02:32:10] sevenseacat: ACTION nods
[02:32:21] ChanServ: +o sevenseacat
[02:32:37] Aeyrix: I'm being oppressed.
[02:32:39] CalvinnHobbes: has joined #RubyOnRails
[02:32:40] ChanServ: -o sevenseacat
[02:32:52] Aeyrix: What's going on, #ror?
[02:32:56] Aeyrix: Anyone working on anything interestng?
[02:35:06] njero: has joined #RubyOnRails
[02:35:16] Pazician_: has joined #RubyOnRails
[02:35:43] hakunin: has joined #RubyOnRails
[02:36:16] BaNzounet: has joined #RubyOnRails
[02:37:27] GPrime: has joined #RubyOnRails
[02:37:35] Elion: has joined #RubyOnRails
[02:37:51] centrx: has joined #RubyOnRails
[02:39:12] klacointe: has joined #RubyOnRails
[02:40:14] moeabdol: has joined #RubyOnRails
[02:41:36] beauby: has joined #RubyOnRails
[02:42:14] commondream: has joined #RubyOnRails
[02:43:02] mello: has joined #RubyOnRails
[02:44:07] Axsuul: has joined #RubyOnRails
[02:44:22] klue: has joined #RubyOnRails
[02:54:56] edwinrozario: has joined #RubyOnRails
[03:00:00] swhitt: has joined #RubyOnRails
[03:01:21] codeurge: has joined #RubyOnRails
[03:01:22] skiz: has joined #RubyOnRails
[03:03:10] smathy: has joined #RubyOnRails
[03:04:01] Fire-Dragon-DoL: has joined #RubyOnRails
[03:04:08] givanse_: has joined #RubyOnRails
[03:06:08] edwinrozario: has joined #RubyOnRails
[03:07:03] Fire-Dragon-DoL: Aeyrix: yes! I'm working with amazon SQS and it's really cool
[03:07:06] RubyNewbey: has joined #RubyOnRails
[03:07:20] Fire-Dragon-DoL: scaling email sending :)
[03:07:24] Aeyrix: Fire-Dragon-DoL: Ooh. How is it?
[03:07:26] Aeyrix: Never used, want to.
[03:07:37] RubyNewbey: Can someone give me a hand? I have no idea what I'm doing, trying to get a ruby app running
[03:07:38] philcrissman: has joined #RubyOnRails
[03:07:45] RubyNewbey: I installed rvm and ran bundle install in the app directory
[03:07:53] RubyNewbey: I just don't know how to "run" the app so I can access it on the web
[03:08:01] RubyNewbey: Can someone point me in the right direction?
[03:08:02] Aeyrix: ohboy.mov
[03:08:24] Fire-Dragon-DoL: Aeyrix: well the most fantastic thing is that it makes really straightforward to split a process into multiple subprocesses, the queue just allow you to send/retrieve messages from anywhere (even locally) as long as you have correct access credentials
[03:08:30] Aeyrix: RubyNewbey: "app"?
[03:08:32] Aeyrix: Rails app or/
[03:08:39] Radar: RubyNewbey: View it locally or through the web?
[03:08:55] RubyNewbey: Aeyrix: I think so. I have "app.rb, config.ru, Gemfile, Gemfile.lock, and 2 directories - public and views"
[03:08:59] RubyNewbey: Radar: through the web
[03:09:02] RubyNewbey: I have it on a VPS
[03:09:06] Fire-Dragon-DoL: RubyNewbey: on the web = on your browser?
[03:09:10] RubyNewbey: Fire-Dragon-DoL: yeah
[03:09:13] hahuang65: has joined #RubyOnRails
[03:09:19] Radar: RubyNewbey: Use Nginx + Passenger, that's the easiest way.
[03:09:24] Fire-Dragon-DoL: or literally through the web (on a domain and whatever)
[03:09:32] fgo: has joined #RubyOnRails
[03:09:34] RubyNewbey: Just in my browser through the VPS' IP
[03:09:42] Fire-Dragon-DoL: ah ok so through web, right
[03:09:46] TuRnaD0_: has joined #RubyOnRails
[03:09:49] beauby: has joined #RubyOnRails
[03:09:50] mase-chatter: has joined #RubyOnRails
[03:09:56] Fire-Dragon-DoL: RubyNewbey: read a guide for nginx + passenger
[03:10:09] Fire-Dragon-DoL: it's not straightforward as PHP but it's quite easy
[03:10:31] scottmatheina: has joined #RubyOnRails
[03:11:23] Fire-Dragon-DoL: Aeyrix: so the cool part, you can write a process in any language, get the messages, do something and in my case, use your rails API to get a result back
[03:11:38] bin_005: has joined #RubyOnRails
[03:11:41] RubyNewbey: Fire-Dragon-DoL: thanks
[03:11:51] braincrash: has joined #RubyOnRails
[03:11:54] Radar: RubyNewbey: Sounds like you have a sinatra app there but I can't be sure until I see the contents of Gemfile.
[03:12:16] RubyNewbey: Radar: yeah it is, someone recommended I try rackup, so I did rackup config.ru and it's up and running now
[03:12:26] jonahR: has joined #RubyOnRails
[03:12:32] RubyNewbey: (it is using sinatra)
[03:12:47] Radar: RubyNewbey: That'll serve it in a "light" fashion through Rack. If you close that window that connection will terminate.
[03:13:01] RubyNewbey: I just ran it in screen, is there a better way to do it?
[03:13:06] Radar: RubyNewbey: Passenger will handle starting + running the application, nginx will handle the server end.
[03:13:23] Radar: Request comes through to nginx, is then piped through to Passenger, which then pipes it through to this application.
[03:13:29] Radar: Benefit of that is that you don't have to manage a screen session.
[03:14:02] RubyNewbey: i'll read up on it
[03:14:16] RubyNewbey: thank you very much guys for the help/words of advice
[03:15:03] xcesariox: has joined #RubyOnRails
[03:15:25] Lightsword: has joined #RubyOnRails
[03:17:44] ruby384: has joined #RubyOnRails
[03:18:04] willharr_: has joined #RubyOnRails
[03:18:15] ruby384: has left #RubyOnRails: ()
[03:19:40] commondream: has joined #RubyOnRails
[03:23:01] matenia: has joined #RubyOnRails
[03:23:48] duderonomy: has joined #RubyOnRails
[03:24:15] aloneintheworld: is it a good idea to test calculations / fixed values ? like.. ???assert_equal mymodel.calculationmethod, 92328.32???
[03:26:01] michael_mbp: has joined #RubyOnRails
[03:26:56] rickmasta: has joined #RubyOnRails
[03:30:44] baweaver_: has joined #RubyOnRails
[03:32:42] Fire-Dragon-DoL: has joined #RubyOnRails
[03:33:20] Fire-Dragon-DoL: aloneintheworld: yes, if no one answered, that's the best idea, assert for the result
[03:33:38] SurgeReaper: has joined #RubyOnRails
[03:34:55] erich__: has joined #RubyOnRails
[03:35:15] mark[oz]: has joined #RubyOnRails
[03:35:32] Spami: has joined #RubyOnRails
[03:36:45] aloneintheworld: thank you Fire-Dragon-DoL
[03:36:54] rhizome: aloneintheworld: put the number first so the test evaluation doesn't barf if your method is nil or whatever
[03:37:42] rhizome: np. it's just the difference between a mere failure and a stack trace
[03:37:44] Fire-Dragon-DoL: rhizome: wait, isn't a good idea to let it barf in that case?
[03:38:45] willharr_: has left #RubyOnRails: ()
[03:39:18] rhizome: it's just how much barf comes out.
[03:39:38] rhizome: i think the message is less unclear iirc
[03:39:50] rhizome: less clear, i mean
[03:40:22] Lightsword: has joined #RubyOnRails
[03:40:33] rhizome: i.e. a failure of the evaluation "method foo called for Nil::nil" or whatever, rather than an equality message
[03:41:13] willharrison: has joined #RubyOnRails
[03:41:20] willharrison: any opinions on this? https://upcase.com/test-driven-rails
[03:41:29] SurgeReaper: is this a good place for help?
[03:43:26] Radar: SurgeReaper: Sure is.
[03:43:53] Scripore: has joined #RubyOnRails
[03:45:33] Fire-Dragon-DoL: I really want to try minitest in place of rspec once
[03:48:22] Exuma: has joined #RubyOnRails
[03:48:56] Fire-Dragon-DoL: and I really don't get how hipchat managed to create a bug where message order is reversed sometimes, so the sentece you write after the previous is then send in opposite order, argh
[03:49:34] Aeyrix: Fire-Dragon-DoL: The virtues of async
[03:50:06] SurgeReaper: I'm new to rails and I'm having a lot of trouble with it. I have a nested form that creates entries in two tables. The problem is that I can't figure out how to pass user_id to the nested form when updating it. I managed to do it for creating it though.
[03:50:08] Fire-Dragon-DoL: Aeyrix: they can really work around this with some timestamps... not to mention that TCP should preserve order, in theory
[03:50:36] Fire-Dragon-DoL: SurgeReaper: we will need a gist, your form looks complex from what you wrote
[03:50:48] Aeyrix: Fire-Dragon-DoL: TCP is irrelevant in this instance, really.
[03:51:01] SurgeReaper: https://github.com/avnikulin/rails_investments/blob/master/app/controllers/portfolios_controller.rb
[03:51:02] Aeyrix: It's not a stream socket connection IIRC.
[03:51:41] Fire-Dragon-DoL: Aeyrix: yes but don't you find it a bit hilarious, writing code based on an architecture that preserve order, and introduce a bug where the order is wrong?
[03:52:07] SurgeReaper: https://github.com/avnikulin/rails_investments/blob/master/app/views/portfolios/_form.html.erb
[03:52:44] shyshy: has joined #RubyOnRails
[03:52:57] darrencauthon: has joined #RubyOnRails
[03:54:51] towski_: has joined #RubyOnRails
[03:54:59] eggoez: has joined #RubyOnRails
[03:55:06] Fire-Dragon-DoL: SurgeReaper: you can just add a hidden field with value @portfolio.user_id
[03:55:18] Fire-Dragon-DoL: (in the nested form)
[03:55:23] SurgeReaper: is that secure?
[03:56:00] SurgeReaper: I've managed to avoid that for everything else
[03:56:03] Aeyrix: Does the user own the portfolio?
[03:56:17] Aeyrix: Is the user logged in?
[03:56:21] Aeyrix: Get the user ID from the user token stored in the session.
[03:56:30] choke: has joined #RubyOnRails
[03:56:40] Fire-Dragon-DoL: SurgeReaper: as Aeyrix said
[03:57:08] Aeyrix: Otherwise you run the risk of someone (like me) fiddling with that hidden field and potentially breaking something.
[03:57:11] SurgeReaper: where would I put that? in def update?
[03:57:48] Fire-Dragon-DoL: SurgeReaper: if you want to let it behave more or less if data is supplied by the form, set the params[whatever][0..n][:user_id] from the controller right before generating the stuff
[03:58:12] rubyonrailed: has joined #RubyOnRails
[03:58:12] SurgeReaper: what would the syntax be? I'm struggling with the controller a lot
[03:58:54] Aeyrix: Show me the code for your `authenticate_user!` method.
[03:59:39] Aeyrix: Lemme look it up then.
[03:59:40] fgo: has joined #RubyOnRails
[04:00:13] Fire-Dragon-DoL: mhhh I don't know your setup for session, I would get the current user, and then literally performs params[:portfolio][:holdings].each { |holding| holding[:user_id] = current_user.id }
[04:00:19] coetry: has joined #RubyOnRails
[04:00:34] Fire-Dragon-DoL: SurgeReaper: in that case should just be current_user.id ;)
[04:00:45] Aeyrix: Ugh of course I have to trawl through Warden's docs as well.
[04:01:03] ght: I am using Rails 4.2 with turbolinks; I have a test coffeescript function that is only supposed to execute when the button with id test-tag-button is clicked. However, after clicking it once, every time I load the page the test alert "Hi" is executed. Research indicates this is because of turbolinks, and I have tried a thousand different varitions of the code to no avail.
[04:01:06] Fire-Dragon-DoL: Aeyrix: it has the current_user utility method
[04:01:06] SurgeReaper: You guys don't use devise?
[04:01:08] ght: Here is the gist: https://gist.github.com/anonymous/c450ed56b6ea19c9c5a1
[04:01:17] Aeyrix: SurgeReaper: I don't, no.
[04:01:21] Aeyrix: Shotgun for a fly.
[04:01:38] Fire-Dragon-DoL: SurgeReaper: I don't like devise but after reading about all the things they do to avoid al those type of attacks, I restarted using it
[04:01:42] RegulationD: has joined #RubyOnRails
[04:01:43] quazimodo: has joined #RubyOnRails
[04:01:50] ght: Anyone have experience with turbolinks causing issues with executing coffeescript prematurely, on page load for example, regardless of events?
[04:02:01] Aeyrix: ght: Are you using jQ with Coffeescript?
[04:02:38] sevenseacat: ght: so whats executing prematurely?
[04:02:48] ght: The test "Hi" alert specified in the code.
[04:02:55] ght: It's executing every time I load the page.
[04:03:05] Fire-Dragon-DoL: ght: when you use turbolinks, your page becomes "stateful", you have to reset your variables manually
[04:03:14] Radar: How I handle this situation (and please don't take offense because Aeyrix will yell at me again for 15 minutes): Disable Turbolinks. Problem solved :D
[04:03:16] ght: And I've confirmed with the guys in #javascript it should not be doing that, and research indicates it's related to using jquery-turbolinks.
[04:03:38] sevenseacat: well jquery-turbolinks is a hack to fix a bad idea
[04:03:39] Scripore: has joined #RubyOnRails
[04:03:46] sevenseacat: I'd start by removing it.
[04:04:06] Fire-Dragon-DoL: ght: are you using rails caching for views?
[04:04:11] quazimodo: has joined #RubyOnRails
[04:04:13] ght: Assuming we can't, because it was recommended we enable it to ensure foundation was fully initializing, any other recommendations?
[04:04:34] sevenseacat: its got nothing to do with foundation
[04:04:35] ght: Fire-dragon: The site is in development, I'd have to check if the cache setting has been altered but I doubt it.
[04:04:38] sevenseacat: absolutely nothing
[04:04:48] ght: lol sevenseacat, no one said it did.
[04:04:53] ght: Good lord people.
[04:04:57] dopie: https://gist.github.com/staycreativedesign/262e5d3102e3dce4d336 , how would i get to list the partnership that a specific patient has
[04:05:13] sevenseacat: if its got nothing to do with it, then it wont matter if you remove it :)
[04:05:15] Aeyrix: Fire-Dragon-DoL: The yelling was for trivialising users' problems mostly, for context.
[04:05:20] Fire-Dragon-DoL: ght: I recommend not including tubolinks unless you understand javascript quite well, it changes a lot the way a webpage behaves
[04:05:27] ght: 00:04 < ght> Assuming we can't, because it was recommended we enable it to ensure foundation was fully initializing, any other recommendations?
[04:05:33] Aeyrix: SurgeReaper: I kinda need to know the session cookie name. I don't know what it is for Devise.
[04:05:46] SurgeReaper: ill try to find out
[04:05:50] dopie: p.partnership_products
[04:05:56] sevenseacat: 'we enabled jquery-turbolinks to make sure foundation worked right, but its got nothing to do with foundation at all'
[04:05:57] Aeyrix: SurgeReaper: Got it, I think.
[04:06:00] sevenseacat: are you reading what you're typing?
[04:06:11] Aeyrix: SurgeReaper: Just do uh
[04:06:12] merryfett: has joined #RubyOnRails
[04:06:20] Aeyrix: params[:user_id] = current_user.id
[04:06:30] ght: So the answer is, no one knows in here knows how to resolve this issue presumably caused by turbolinks other than to remove it entirely? It's a well documented issue, with multiple posts on it, just so far none of them are working and was wondering if one of you fine people knew a solution.
[04:06:47] Aeyrix: ght: I've had issues with the opposite - jQ not executing.
[04:06:52] sevenseacat: its not caused by turbolinks, you said its caused by jquery-turbolinks
[04:06:56] Aeyrix: Not your issue, of jQ executing prematurely.
[04:07:04] ght: Sevenseacat: I'm completely aware that I wrote that it was recommended we deploy turbolinks to resolve a foundation initalizing issue, which it did resolve, apparently you're having trouble understanding it.
[04:07:05] sevenseacat: not the same thing.
[04:07:10] ght: I'll continue researching, thank you for your time everyone.
[04:07:16] sevenseacat: i guess the two things really are related :P
[04:07:29] sevenseacat: step 1: remove jquery-turbolinks. step 2: if problems persist, remove turbolinks. the end.
[04:07:31] Aeyrix: > apparently you're having trouble understanding it.
[04:07:35] agent_white: has joined #RubyOnRails
[04:07:46] Aeyrix: no, I won't.
[04:08:20] sevenseacat: ght: we don't recommend using jquery-turbolinks for many reasons - bugs like this are one of them.
[04:08:42] sevenseacat: I can see how 'remove the buggy library' may be a hard solution for you. sorry bout that.
[04:08:59] sevenseacat: would you rather we patch the hack that fixes the other buggy library?
[04:09:12] Aeyrix: Which bit's that?
[04:09:17] Aeyrix: Turbolinks in general?
[04:09:22] sevenseacat: the patch, the hack, or the buggy library?
[04:09:31] Aeyrix: I guess all of them.
[04:09:44] sevenseacat: the patch is what ght wants. the hack is jquery-turbolinks. the buggy library is turbolinks.
[04:09:56] Aeyrix: Why is turbolinks even a thing?
[04:10:01] sevenseacat: because dhh said so.
[04:10:08] Aeyrix: And enough people agreed?
[04:10:17] sevenseacat: no, but dhh runs rails.
[04:10:22] pvertenten: has joined #RubyOnRails
[04:10:25] Aeyrix: Remember how we had that conversation about testing?
[04:10:29] sevenseacat: what he says, goes.
[04:10:37] Aeyrix: DHH wasn't BDFL then. :^)
[04:10:43] davpet77: has joined #RubyOnRails
[04:10:49] sevenseacat: no-one would ever call dhh benevolent
[04:10:55] Aeyrix: Hurrhurrhurr.
[04:11:08] Aeyrix: I reckon he's a pretty cool guy,.
[04:11:17] Aeyrix: Wrote ruby on traintracks and doesn't afraid of anything.
[04:11:23] sevenseacat: he manages rails into the 'backpack' that he wants to use, its very opinionated, and one of the opinions he has is turbolinks
[04:11:29] Fire-Dragon-DoL: well turbolinks might fit some situations, although I don't like it being rails default
[04:11:38] Aeyrix: it was extracted from his company.
[04:11:40] Aeyrix: Kinda makes sense/
[04:11:44] sevenseacat: turbolinks can be good. however, it's misunderstood and buggy.
[04:11:49] Aeyrix: If people don't like it, it's under the MIT license and can be forked.
[04:11:56] sevenseacat: or just remove turbolinks.
[04:12:18] Fire-Dragon-DoL: sevenseacat: yeah, that's why the "shouldn't be default", it's like forcing people to use reactjs for their next project
[04:12:48] Aeyrix: convention, configuration, etc
[04:12:52] Aeyrix: then again it's bad convention heh
[04:13:46] sevenseacat: they don't force people to do anything. its very easy to remove turbolinks.
[04:14:01] Aeyrix: Isn't there a command line arg for it?
[04:14:02] agent_white: has joined #RubyOnRails
[04:14:07] Aeyrix: Like, pre-project generation.
[04:14:11] sevenseacat: when generating an app, theres an arg to skip it yeah
[04:14:18] Aeyrix: Yep, --skip-turbolinks.
[04:14:23] shock_one: has joined #RubyOnRails
[04:14:25] sevenseacat: there's also one to skip spring
[04:14:28] sevenseacat: god I hate spring
[04:14:30] Aeyrix: What's spring even do?
[04:14:34] Aeyrix: I've never run into it.
[04:14:38] sevenseacat: preloads the app and keeps it in memory
[04:14:42] sevenseacat: to 'fix' slow boot times
[04:14:52] Aeyrix: I think I might've removed that.
[04:14:53] sevenseacat: and slow restart times
[04:15:16] sevenseacat: you most likely did, after it cached way too many things and you wasted hours tracking down bugs in code that didnt exist in your app
[04:15:21] Aeyrix: That entire gem is an accident.
[04:15:25] Aeyrix: Yeah probably, heh.
[04:15:35] sevenseacat: it's a solution that attacks the entirely wrong problem.
[04:16:02] sevenseacat: instead of 'lets make it boot faster', its 'lets cache the booting so that we don't notice that it boots slowly'
[04:16:45] Aeyrix: I've never written a *massive* rails app anyway so I don't really have a problem with the boot time.
[04:16:53] Aeyrix: Generally it's a couple seconds, if that.
[04:16:59] sevenseacat: I do. one app I worked on at my last job took 45sec to boot.
[04:17:24] sevenseacat: and its not what I would call a massive rails app.
[04:17:40] Aeyrix: were you factoring prime numbers during boot?
[04:18:03] sevenseacat: nope, just normal rails things. granted it was rails 3.2 and ruby 1.9.3, so upgrades would have given a speed boost.
[04:18:15] sevenseacat: but again, devops went hrnnnnnnnnh no.
[04:18:40] Aeyrix: SurgeReaper: Got it sorted?
[04:19:09] davpet77: I'm trying to deploy my first rails app to a vps. Works fine locally in development mode. Deployed fine with capistrano. Bundle install runs fine with no errors. I try to run unicorn and I get all these missing gem errors and it tells me to run bundle install. But bundle install installs nothing new and the gems aren't in my gemfile so i'M LOST.
[04:19:35] Aeyrix: davpet77: Error log to gist.github.com please.
[04:19:48] ur5us: has joined #RubyOnRails
[04:19:56] SurgeReaper: Aeyrix: I'm trying to figure out how to put your code in -.-
[04:20:02] Aeyrix: SurgeReaper: Oh, sorry
[04:20:08] Aeyrix: link me the gist again?
[04:20:22] Fire-Dragon-DoL: Aeyrix: I actually like the spring idea but I've read a lot of people suggesting to use Zeus instead, for me, after the first time I smashed my face on spring, I learned the lesson, now I keep it. Makes single test run much faster
[04:20:32] eggoez: has joined #RubyOnRails
[04:20:34] SurgeReaper: https://github.com/avnikulin/rails_investments/blob/master/app/controllers/portfolios_controller.rb
[04:20:38] Aeyrix: Fire-Dragon-DoL: My gemfile is so fresh, so clean.
[04:20:42] Aeyrix: I make sure I remove all superfluous stuff.
[04:20:44] Maletor: has joined #RubyOnRails
[04:21:07] Aeyrix: SurgeReaper: Add it at line 53
[04:21:16] Aeyrix: So, above 53, but below 52.
[04:21:27] Aeyrix: Should work. :>
[04:21:38] Fire-Dragon-DoL: Aeyrix: lol, well that's not superflous for me. Even a brand clean rails app for me it's too slow at booting
[04:21:39] SurgeReaper: yea i figured but what's the syntax
[04:21:59] Fire-Dragon-DoL: SurgeReaper: time to study ruby :P
[04:22:16] SurgeReaper: i did the whole hartl tutorial
[04:22:57] SurgeReaper: trying to figure it out on your own is totally different
[04:22:58] Fire-Dragon-DoL: SurgeReaper: I have no idea what tutorial is that, but you need more training if you don't know the syntax, that's sure (not joking, maybe a book?)
[04:23:16] Zen-Zen: has joined #RubyOnRails
[04:23:30] SurgeReaper: where can I learn?
[04:23:51] SurgeReaper: i did railstutorial.org
[04:24:18] SurgeReaper: so I figured making an app would get me up to speed even better
[04:24:19] Fire-Dragon-DoL: I studied my first programming language (actually a scripting language for an ultima online server) without any book, because it didn't exist. When I discovered what a function was, after writing TONS of copy-paste, I've seen light
[04:24:49] SurgeReaper: I started programming like 10 years ago
[04:25:15] Fire-Dragon-DoL: you don't really understand the value of functions until you have your slice of code copy-pasted in 15 different places and you need to update it
[04:25:26] SurgeReaper: I learned PHP but it made me quit programming
[04:25:39] SurgeReaper: so i started last year again
[04:26:01] Fire-Dragon-DoL: usually if php is your first language you don't have enough competence to drop programming because of it :P
[04:26:07] ProLoser: has joined #RubyOnRails
[04:26:28] Fire-Dragon-DoL: anyway, I used two books, one for ruby and THEN rails
[04:26:38] Fire-Dragon-DoL: but I don't remember the name of the ruby book
[04:26:50] SurgeReaper: I think I'm just not understanding MVC?
[04:27:07] njero: has joined #RubyOnRails
[04:27:10] Fire-Dragon-DoL: SurgeReaper: and you can always use RPGMaker if you want to learn ruby, it uses ruby as its scripting language
[04:27:18] Fire-Dragon-DoL: if you don't know the syntax you need Ruby
[04:27:41] Fire-Dragon-DoL: MVC, you'll probably understand it later on in any case
[04:27:41] n3b: has joined #RubyOnRails
[04:28:27] Fire-Dragon-DoL: if you understand object oriented programming well, mvc makes sense instantly, but it's easier to understand mvc that undertand object oriented programming well
[04:29:23] SurgeReaper: I think I understand OOP somewhat
[04:29:42] Fire-Dragon-DoL: ...hurray for me, we have our first customer sending emails from a separate machine from our rails app, means I managed to scale email sending correctly :O
[04:30:40] Fire-Dragon-DoL: SurgeReaper: while I understand it, I learn new things every day, really. I'm currently following Sandi Metz, her book POODR was like the best programming reading I've ever had
[04:31:47] JamesBrink: has joined #RubyOnRails
[04:31:53] mello: has joined #RubyOnRails
[04:31:53] mello: has joined #RubyOnRails
[04:32:12] Fire-Dragon-DoL: SurgeReaper: get the book "well grounded rubyist"
[04:32:56] Fire-Dragon-DoL: SurgeReaper: unless for syntax you mean you don't know the rails api
[04:33:02] towski_: has joined #RubyOnRails
[04:33:11] Fire-Dragon-DoL: in which case you might not need a ruby book :P
[04:34:02] SurgeReaper: I don't get what the controller part where you write @something = something
[04:34:29] Matrix9180: has joined #RubyOnRails
[04:35:36] remendo: SurgeReaper: You don't know what that means?
[04:38:01] Fire-Dragon-DoL: has joined #RubyOnRails
[04:38:27] SurgeReaper: remendo: I'm a little confused and I can't find a good explanation. I know that @something enables you to call something in a view
[04:39:24] remendo: SurgeReaper: You need to learn Ruby before Rails.
[04:39:26] Fire-Dragon-DoL: SurgeReaper: ok, the controller is a class, which is instanciated by rails every time a request arrives. By doing @something you set an instance variable on that controller. Then rails builds an instance of the view like View.new(controller) and so the view has access to all instance variables
[04:39:54] Fire-Dragon-DoL: but yeah you definitely need a ruby book SurgeReaper
[04:40:48] Fire-Dragon-DoL: I wonder why it's called Ruby on Rails when it should be Rails on Ruby, lol
[04:41:27] Fire-Dragon-DoL: mhhh I'm going to play a bit, chat is quite tonight
[04:42:35] SurgeReaper: well looking at a ruby book I can see why you tell me to read it
[04:42:40] SurgeReaper: it's all in there -.-
[04:43:48] jwaldrip: has joined #RubyOnRails
[04:44:48] djbkd: has joined #RubyOnRails
[04:51:29] krz: has joined #RubyOnRails
[04:52:57] Fire-Dragon-DoL: SurgeReaper: doh, looks like that tutorial wasn't really complete
[04:57:32] cac_: has joined #RubyOnRails
[04:58:17] juzemack: has joined #RubyOnRails
[05:00:10] bronson: has joined #RubyOnRails
[05:04:38] arooni-mobile: has joined #RubyOnRails
[05:04:52] Fire-Dragon-DoL: SurgeReaper: the one you used before discovering ruby book :P
[05:05:22] SurgeReaper: it said don't worry you'll learn ruby as you go
[05:07:43] Fire-Dragon-DoL: SurgeReaper: I'm not sure why people (or tutorials) keep saying that, without a solid ruby base you won't go far in rails. Not to mention that Rails is so good also because Ruby is a great language, it's a pleasure to learn
[05:08:18] sevenseacat: Fire-Dragon-DoL: because you run into cases like this, where SurgeReaper doesn't understand whats going on because they don't know basic ruby
[05:08:34] sevenseacat: thats why we recommend a working knowledge of ruby first
[05:08:37] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[05:08:55] sevenseacat: doesnt have to be super in-depth, but at least enough to know that `@something` is actually an instance variable might help.
[05:08:55] SurgeReaper: yea I'll try to learn it...also still trying to fix that problem -.-
[05:09:50] Radar: 3.2 is where that book covers instance variables
[05:10:08] sevenseacat: SurgeReaper: what problem is that?
[05:10:17] sevenseacat: ACTION procrastinating over learning backbone
[05:10:28] SurgeReaper: the one firedragon was helping me on earlier
[05:10:49] SurgeReaper: finding out how to pass a user_id into an updated nested form
[05:11:11] sinkensabe: has joined #RubyOnRails
[05:11:20] SurgeReaper: https://github.com/avnikulin/rails_investments/blob/master/app/controllers/portfolios_controller.rb
[05:11:44] SurgeReaper: authentication is by devise
[05:11:47] sevenseacat: ok, it's a scaffolded controller
[05:12:02] SurgeReaper: i managed to get it working on create
[05:12:05] SurgeReaper: but not on update
[05:12:26] sevenseacat: to assign the first holding of a portfolio to the current user?
[05:12:30] sevenseacat: what about all the other holdings?
[05:13:01] SurgeReaper: lol well I was trying to figure why that worked but I couldn't understand it
[05:13:25] SurgeReaper: replace it with all?
[05:13:34] sevenseacat: well in the create action you're building a new portfolio with nested holdings, and then assigning a user to one of the holdings
[05:13:35] Fire-Dragon-DoL: sevenseacat: any chance you tried/seen lutusrb ?
[05:13:38] sevenseacat: are you just guessing?
[05:13:46] sevenseacat: Fire-Dragon-DoL: if you mean lotusrb, I've heard of it
[05:14:23] sevenseacat: SurgeReaper: you would need to iterate over the holdings and assign the user to all of them, if you really need a link between holdings and users, which i would question
[05:14:55] Fire-Dragon-DoL: sevenseacat: the codebase looks really good, not sure how mature is, but I really appreciated the separation of model and "repository" (store stuff in database)
[05:15:12] SurgeReaper: I don't think I need a link
[05:15:16] SurgeReaper: now that you say that
[05:15:18] sevenseacat: I looked at it when it was 1.0. I had no idea how to get started with it because the documentation was non-existent
[05:15:45] yfeldblum: has joined #RubyOnRails
[05:16:05] Fire-Dragon-DoL: sevenseacat: we recently hit a situation where I wanted to share some code with a process that must not connect to the database, unfortunately ActiveRecord connects even with a #new call, basically making impossible to use any method in our model, sigh
[05:16:15] SurgeReaper: so this is way too advanced for a beginner right?
[05:16:34] hololeap: has joined #RubyOnRails
[05:16:38] sevenseacat: SurgeReaper: i didnt say that, but you dont understand your domain and neither do I
[05:16:39] Fire-Dragon-DoL: SurgeReaper: yes definitely, and without ruby knowledge is like building a bridge without materials
[05:17:06] SurgeReaper: i'll take your advice by not having the user_id link anymore since I already have the portfolio_id
[05:18:08] lxsameer: has joined #RubyOnRails
[05:18:08] lxsameer: has joined #RubyOnRails
[05:18:17] Aeyrix: Fire-Dragon-DoL: Just don't inherit ActiveRecord::Base.
[05:18:22] tvw: has joined #RubyOnRails
[05:18:22] Fire-Dragon-DoL: restarting router, not sure why my local connection is not good as it's supposed to be
[05:18:29] shock_one: has joined #RubyOnRails
[05:18:33] hololeap: has left #RubyOnRails: ()
[05:18:42] Fire-Dragon-DoL: Aeyrix: yes but the project started like 4 years ago, and not by me :P
[05:18:44] SurgeReaper: thanks for the help fire, aeyrix, and seven
[05:19:37] hololeap: has joined #RubyOnRails
[05:19:40] Fire-Dragon-DoL: let me reboot this router, give me 3 minutes
[05:19:54] x-light: has joined #RubyOnRails
[05:20:06] rvanlieshout: has joined #RubyOnRails
[05:20:51] krz: has joined #RubyOnRails
[05:20:56] shock_one: has joined #RubyOnRails
[05:21:03] yfeldblum: has joined #RubyOnRails
[05:21:49] Fire-Dra_: has joined #RubyOnRails
[05:25:22] Fire-Dragon-DoL: has joined #RubyOnRails
[05:26:42] Aeyrix: Not much yo, work. :<
[05:26:45] Aeyrix: Where you at rvanlieshout
[05:26:50] Aeyrix: that it's morning now?
[05:28:58] rvanlieshout: so your already in the second half of your workday?
[05:29:11] sinkensabe: has joined #RubyOnRails
[05:29:40] Fire-Dragon-DoL: I have yet to go to bed, but I'm a night owl, it's 7 am here :P
[05:30:12] sevenseacat: progress today has been very little
[05:30:18] rvanlieshout: try having a kid :)
[05:30:24] rvanlieshout: ah... is it that kind of day
[05:30:35] aganov: has joined #RubyOnRails
[05:30:42] Fire-Dragon-DoL: rvanlieshout: I' still 26, leave me a few more years
[05:30:44] tagrudev: has joined #RubyOnRails
[05:32:40] Fire-Dragon-DoL: there is something wrong when you develop all day and wen you stop, you play a game that IS programming hidden behind some fancy graphics :P
[05:32:57] sevenseacat: isnt that all games?
[05:33:41] Fire-Dragon-DoL: sevenseacat: mhh no, most AAA games are usually reflex based, good games are similar to programming, but FACTORIO is really, terribly equal to programming
[05:34:04] Fire-Dragon-DoL: sevenseacat: you have to build and automatize a giant factory to produce stuff to face aliens, basically
[05:34:34] Fire-Dragon-DoL: I call it "trap for developers"
[05:34:37] Aeyrix: Grey Goo?
[05:35:06] philcrissman: has joined #RubyOnRails
[05:37:19] ferr1: has joined #RubyOnRails
[05:37:49] Radar: Hey brainstrust: why is this the case? https://gist.github.com/radar/f60bd50f0d80639d1e75
[05:37:59] Radar: I thought .permit(:product_details => []) would allow that parameter
[05:38:07] Radar: Seems to be borked because it contains a Hash inside that array
[05:39:19] siemprefresco: has joined #RubyOnRails
[05:39:56] Fire-Dragon-DoL: has joined #RubyOnRails
[05:40:36] Fire-Dragon-DoL: mhhh today I can't stream internally... weird
[05:40:37] duncannz: has joined #RubyOnRails
[05:41:53] pwnz0r: has joined #RubyOnRails
[05:43:28] moeabdol: has joined #RubyOnRails
[05:45:20] Aeyrix: Radar: No brakes on the rails train. :^)
[05:48:49] Radar: https://github.com/rails/rails/issues/9454#issuecomment-14163123
[05:49:04] Radar: So strong params won't do this. We'll just manually assign this particularly attribute
[05:49:54] bmalum: has joined #RubyOnRails
[05:51:20] lessless: has joined #RubyOnRails
[05:51:54] juzemack: has left #RubyOnRails: ()
[05:52:37] Lightsword: has joined #RubyOnRails
[05:56:36] sandstrom: has joined #RubyOnRails
[05:57:48] Axilla: has joined #RubyOnRails
[05:58:19] metus_violarium: has joined #RubyOnRails
[06:00:01] sandelius: has joined #RubyOnRails
[06:01:55] Guest34113: has joined #RubyOnRails
[06:01:57] roolo: has joined #RubyOnRails
[06:05:02] Fire-Dragon-DoL: good night guys
[06:05:48] Fire-Dragon-DoL: and by guys I mean everyone
[06:07:52] fgo: has joined #RubyOnRails
[06:08:17] VaibhavRajput: has joined #RubyOnRails
[06:09:00] darrencauthon: has joined #RubyOnRails
[06:12:29] rvanlieshout: and with good he meant 'have a' and with night he meant 'nice day'?
[06:14:58] dseitz: has joined #RubyOnRails
[06:16:44] Aeyrix: I think they were going to bed.
[06:16:49] Aeyrix: So "good night" is probably appropriate.
[06:17:30] tbuehlmann: it's just Universal Greeting Time
[06:17:35] kerunaru: has joined #RubyOnRails
[06:19:17] raunicolae: has joined #RubyOnRails
[06:19:21] raunicolae: has left #RubyOnRails: ()
[06:20:33] mello: has joined #RubyOnRails
[06:21:30] commondream: has joined #RubyOnRails
[06:28:46] moeabdol: has joined #RubyOnRails
[06:28:51] arBmind: has joined #RubyOnRails
[06:29:34] axilla_: has joined #RubyOnRails
[06:32:11] Pathfinder: has joined #RubyOnRails
[06:33:19] DoubleMalt: has joined #RubyOnRails
[06:34:00] michael_mbp: has joined #RubyOnRails
[06:35:01] TinkerTyper: has joined #RubyOnRails
[06:35:44] Axilla: has joined #RubyOnRails
[06:37:24] moei: has joined #RubyOnRails
[06:39:06] kwd: has joined #RubyOnRails
[06:46:26] maz-dev: has joined #RubyOnRails
[06:46:27] ChargedLight: has joined #RubyOnRails
[06:47:32] benhuda: has joined #RubyOnRails
[06:47:43] Pathfinder: has joined #RubyOnRails
[06:48:37] Armegeden: has joined #RubyOnRails
[06:48:47] commondream: has joined #RubyOnRails
[06:50:22] allenn: has joined #RubyOnRails
[06:51:35] RegulationD: has joined #RubyOnRails
[06:51:48] SurgeReaper: has joined #RubyOnRails
[06:52:18] yottanami: has joined #RubyOnRails
[06:53:07] yottanami: I want to precompile and got this error http://dpaste.com/22GD82S is anyway to findout which line of my CSS have problem?
[06:53:08] pwnz0r: has joined #RubyOnRails
[06:53:41] Ergo: has joined #RubyOnRails
[06:56:58] Lightsword: has joined #RubyOnRails
[06:59:17] quazimodo: can we rename a database using a migration?
[06:59:31] Radar: rename it using console commands
[06:59:32] seank_: has joined #RubyOnRails
[07:02:36] strixd: has joined #RubyOnRails
[07:02:43] greengriminal: has joined #RubyOnRails
[07:03:50] strixd: has joined #RubyOnRails
[07:07:25] abracadaniel: has joined #RubyOnRails
[07:07:31] solars: has joined #RubyOnRails
[07:08:40] dhjondoh: has joined #RubyOnRails
[07:09:29] arjunghosh: has joined #RubyOnRails
[07:09:47] darrencauthon: has joined #RubyOnRails
[07:10:05] arjunghosh_: has joined #RubyOnRails
[07:14:58] arjunghosh: A newbie here on #rubyonrails IRC chat
[07:16:24] arjunghosh: Anyone here to show me the ropes??
[07:16:30] comrad: has joined #RubyOnRails
[07:17:23] ddv: arjunghosh: sure google.com
[07:18:59] moeabdol: has joined #RubyOnRails
[07:19:13] ayaz: has joined #RubyOnRails
[07:22:08] moeabdol: has joined #RubyOnRails
[07:22:53] fgo: has joined #RubyOnRails
[07:24:39] hahuang65: has joined #RubyOnRails
[07:25:13] waseem_: arjunghosh: !begin
[07:25:17] helpa: https://gist.github.com/waseem/5068050
[07:25:22] waseem_: arjunghosh: ^
[07:26:27] arjunghosh: #waseem: thanks
[07:27:07] arjunghosh: but I was asking more on using #irc :) Have been doing #rubyonrails from last 5yrs though...
[07:27:27] waseem_: arjunghosh: You're using it pretty well.
[07:34:02] DEA7TH: has joined #RubyOnRails
[07:34:13] livathinos: has joined #RubyOnRails
[07:34:36] artto: has joined #RubyOnRails
[07:35:36] GnuYawk: has joined #RubyOnRails
[07:37:35] sandstrom: has joined #RubyOnRails
[07:38:04] simmerz: has joined #RubyOnRails
[07:40:09] GnuYawk: has joined #RubyOnRails
[07:40:09] GnuYawk: has joined #RubyOnRails
[07:41:36] arjunghosh: That's me : http://linkd.in/ArjunGhosh_LinkedIn & http://bit.ly/ArjunRubyOnRails
[07:41:39] ndrei: has joined #RubyOnRails
[07:44:36] jenrzzz: has joined #RubyOnRails
[07:48:41] arjunghosh: has left #RubyOnRails: ()
[07:50:20] bronson: has joined #RubyOnRails
[07:50:47] arBmind: has joined #RubyOnRails
[07:50:49] davidhq: has joined #RubyOnRails
[07:51:26] commondream: has joined #RubyOnRails
[07:51:26] bog: has joined #RubyOnRails
[07:52:22] rromanchuk: has joined #RubyOnRails
[07:53:04] baweaver: has joined #RubyOnRails
[07:54:40] bog: has left #RubyOnRails: ()
[07:55:36] cajone: has left #RubyOnRails: ()
[07:55:59] JamesBrink: has joined #RubyOnRails
[08:03:34] philcrissman: has joined #RubyOnRails
[08:05:07] karimb: has joined #RubyOnRails
[08:07:27] ndrei: has joined #RubyOnRails
[08:07:41] IanVorn: has joined #RubyOnRails
[08:08:57] bruno-: has joined #RubyOnRails
[08:09:21] mello: has joined #RubyOnRails
[08:09:21] mello: has joined #RubyOnRails
[08:10:04] adre: has joined #RubyOnRails
[08:10:09] krz: has joined #RubyOnRails
[08:10:42] IanVorn: has joined #RubyOnRails
[08:10:56] darrencauthon: has joined #RubyOnRails
[08:11:45] krisquigley: has joined #RubyOnRails
[08:11:46] kadoppe: has joined #RubyOnRails
[08:11:50] IanVorn: has joined #RubyOnRails
[08:12:01] jsrn_: has joined #RubyOnRails
[08:12:58] darutoko: has joined #RubyOnRails
[08:15:06] drale2k: has joined #RubyOnRails
[08:15:37] krz: im conceptualizing admin access. im thinking of going with a separate app and hooking it up to an admin subdomain. however it got me thinking. the models on the www facing web app and admin web app would essentially be the same. so it would be up to me to make sure that any changes to any files in the model directories are synced. is this the way you guys go about it?
[08:15:49] coetry: has joined #RubyOnRails
[08:15:49] mikecmpbll: has joined #RubyOnRails
[08:16:13] krz: or do you have the www and admin dashboard in a single rails app. i.e. single git repo?
[08:16:14] x-light: has joined #RubyOnRails
[08:16:45] ProLoser: has joined #RubyOnRails
[08:17:06] universa1: you could extract shared models and code into an engine and base your other apps off of that.
[08:17:39] krz: hmmm, universa1 any documentation on that?
[08:17:57] universa1: there is a rails guide on engines iirc
[08:18:18] krz: sevenseacat: so the how would you subdomain admin.foobar.com in that way? or do you do foobar.com/admin ?
[08:18:33] sevenseacat: either, depends on requirements.
[08:18:45] sevenseacat: its just a change in the routes file.
[08:19:23] krz: isnt it better though, to separate admin app from main app? perhaps for security reasons? you can also have it behind an ELB which only allows traffic from a subnet?
[08:19:31] krz: elb = aws elastic load balancer
[08:19:53] sevenseacat: I dont know what that means, and don't really care. I don't know what kind of security considerations your app has.
[08:19:57] granthatcher: has joined #RubyOnRails
[08:19:57] sevenseacat: I make public web apps.
[08:20:01] Anakat: has joined #RubyOnRails
[08:20:39] krz: the admin app, is intended to be used by internal staff only. so its public in some way
[08:20:48] sevenseacat: great, so what I said applies.
[08:21:02] sevenseacat: load balancer, subnet, do whatever you want.
[08:21:24] krz: can i put sevenseacat in front of the load balancer then?
[08:21:38] sevenseacat: if you want your app to continue working, no.
[08:23:23] ferr: has joined #RubyOnRails
[08:23:34] dhjondoh: has joined #RubyOnRails
[08:24:53] DEA7TH: has joined #RubyOnRails
[08:25:22] Ropeney: Radar: You suggested going to sydney the night before for the conference before party, would that be something after 7pm? (Trying to book tickets still and not effect work to much)
[08:26:14] speakingcode: has joined #RubyOnRails
[08:27:06] Trefex: has joined #RubyOnRails
[08:27:26] Trefex: has joined #RubyOnRails
[08:28:39] dede: has joined #RubyOnRails
[08:30:32] camonz: has joined #RubyOnRails
[08:33:03] rvanlieshout: parties always affect work
[08:34:56] marr: has joined #RubyOnRails
[08:38:23] speakingcode: has joined #RubyOnRails
[08:40:15] RegulationD: has joined #RubyOnRails
[08:40:22] blackhuey1: has joined #RubyOnRails
[08:41:39] tianyi_: has joined #RubyOnRails
[08:42:35] universa1: rvanlieshout: democrats? republicans? ... :p
[08:42:46] attlasbot: has joined #RubyOnRails
[08:42:57] starfox_sf: has joined #RubyOnRails
[08:44:28] dideler: has joined #RubyOnRails
[08:44:47] ProLoser: has joined #RubyOnRails
[08:46:15] srinidhi: has joined #RubyOnRails
[08:47:28] edwinvdgraaf: has joined #RubyOnRails
[08:48:49] Rubie: has joined #RubyOnRails
[08:50:37] bin_005: has joined #RubyOnRails
[08:51:15] patie: has joined #RubyOnRails
[08:52:19] AnoHito: has joined #RubyOnRails
[08:53:52] patie_: has joined #RubyOnRails
[08:54:18] abracadaniel: has joined #RubyOnRails
[08:58:25] quazimodo: has joined #RubyOnRails
[08:59:02] hmnhf: has joined #RubyOnRails
[08:59:07] bratsche: has joined #RubyOnRails
[09:01:54] Sylario: has joined #RubyOnRails
[09:04:44] abracadaniel: has joined #RubyOnRails
[09:06:14] abracadaniel: has joined #RubyOnRails
[09:07:03] Radar: Ropeney: It would still be going until later in the night
[09:07:15] abracadaniel: has joined #RubyOnRails
[09:07:15] Ropeney: Radar: Thanks :D
[09:07:32] gaussblurinc1: has joined #RubyOnRails
[09:07:36] Radar: see you all tomorrow
[09:08:45] abracadaniel: has joined #RubyOnRails
[09:09:45] abracadaniel: has joined #RubyOnRails
[09:10:59] hakunin: has joined #RubyOnRails
[09:11:15] abracadaniel: has joined #RubyOnRails
[09:11:45] darrencauthon: has joined #RubyOnRails
[09:11:48] alex88: has joined #RubyOnRails
[09:14:20] karimb: has joined #RubyOnRails
[09:15:59] startupality: has joined #RubyOnRails
[09:16:13] karmatronic: has joined #RubyOnRails
[09:20:42] karmatronic: has joined #RubyOnRails
[09:23:15] BaNzounet: Is it possible with a static class to have the some properties not shared without instantiate it?
[09:24:43] bruno-: has joined #RubyOnRails
[09:27:36] n008f4g_: has joined #RubyOnRails
[09:28:01] edwinvdgraaf: has joined #RubyOnRails
[09:28:27] Hates_: has joined #RubyOnRails
[09:28:55] Hates_: has joined #RubyOnRails
[09:29:56] ProLoser: has joined #RubyOnRails
[09:30:30] laut: has joined #RubyOnRails
[09:32:43] karimb: has joined #RubyOnRails
[09:33:52] karmatronic: has left #RubyOnRails: ()
[09:42:16] universa1: BaNzounet: whaaaat?
[09:43:53] BaNzounet: I've this kind of class : https://gist.github.com/AlexGaspar/2552514c43a6d69c6151
[09:45:13] BaNzounet: And I'd like to have the attr super_properties not to be share
[09:45:40] toomus: has joined #RubyOnRails
[09:45:42] edwinvdg_: has joined #RubyOnRails
[09:45:58] BaNzounet: at the moment if I set it to something, all the others requests will have a values for super_properties
[09:46:50] universa1: BaNzounet: yes, because that is what class level variables are supposed to too.
[09:47:01] universa1: BaNzounet: it sounds like you want an instance.
[09:49:38] Pazician: has joined #RubyOnRails
[09:50:05] Rubie: has joined #RubyOnRails
[09:50:08] BaNzounet: universa1: Yep I guess that's the only solution. Could you advice on how should I store that instance, I need something "global" in term of request.
[09:50:21] arup_r: has joined #RubyOnRails
[09:50:42] universa1: BaNzounet: def analytics; @analatics ||= Analytics.new
[09:50:46] toomus: My another problem with .size http://pastie.org/private/5tzenv8mll7qq8fmi3ifg
[09:51:14] universa1: BaNzounet: in application_controller as a private method, whenever you need access to it, just call analytics in your controllers.
[09:51:32] rvanlieshout: toomus: that's not size to blaim
[09:51:35] rvanlieshout: it just caches
[09:52:04] rvanlieshout: @thread.chat_members.uncached.count
[09:52:17] toomus: OK, let me try
[09:52:18] rvanlieshout: also cause destroyed objects remain in the collection
[09:53:55] arup_r: How can I handle this issue ? https://gist.github.com/aruprakshit/da3538518481cb56b6d5
[09:54:10] arup_r: this is coming due to https://gist.github.com/aruprakshit/da3538518481cb56b6d5#file-posts-js-erb-L24
[09:54:10] universa1: arup_r: what is this issue?
[09:55:09] arup_r: getting error https://gist.github.com/aruprakshit/da3538518481cb56b6d5#file-error-txt-L7
[09:55:27] arup_r: inside the ERb code `data` is not being recognized.. which is a JS object
[09:55:30] universa1: arup_r: describe it in plain english words.
[09:55:30] arup_r: universa1: ^^
[09:55:59] arup_r: universa1: I don't know what you are not getting ?
[09:56:44] universa1: arup_r: !rules
[09:56:44] helpa: arup_r: https://gist.github.com/996779
[09:56:51] arup_r: While I am loading the page I am getting the error as I have shown to you.. because inside the ERB take `data` is not vaild as it is reported..
[09:56:52] toomus: rvanlieshout: uncached need a block?
[09:57:11] universa1: arup_r: state your question in the channel, provide a link to the code with error, stack trace, ...
[09:57:13] wethu: has joined #RubyOnRails
[09:57:18] rvanlieshout: toomus: not sure about that
[09:57:24] universa1: arup_r: you understand the different locations where and when js code is executed?
[09:57:29] arup_r: universa1: I gave already the Gist link
[09:57:46] universa1: arup_r: ohh noes why is this broken? random link? ....
[09:57:47] rvanlieshout: arup_r: posting random gist links doesn't really work for most
[09:57:58] universa1: arup_r: you're not making it easy for someone to help you...
[09:57:59] arup_r: then what's the use of `.js.erb` kind of thig
[09:58:05] mello: has joined #RubyOnRails
[09:58:08] arup_r: universa1: https://gist.github.com/aruprakshit/da3538518481cb56b6d5#file-error-txt-L7
[09:58:12] arup_r: how it is random
[09:58:32] arup_r: rvanlieshout: how is it random..
[09:58:39] universa1: arup_r: your "question" was just hits: issue -> link. no description of what the problem is...
[09:59:01] universa1: arup_r: and again, the error is very obvious. you're thinking of executing a ruby function in the browser...
[09:59:11] arup_r: That's too much :/
[09:59:18] rvanlieshout: that error really explains it wel indeed
[09:59:29] arup_r: then why do we have .js.erb.. I need to figure out..
[09:59:35] universa1: arup_r: https://gist.github.com/aruprakshit/da3538518481cb56b6d5#file-posts-js-erb-L24 .
[09:59:40] arup_r: Really.... you are true
[10:00:08] arup_r: .js.erb files have other purposes then I don't know.. yet.. so I need to think about it
[10:00:08] universa1: arup_r: because it's sometimes easier to use ruby to generate js code... ...but tbh i haven't used it ever in the assets part of any app
[10:01:09] toomus: rvanlieshout: It looks like .count isn't cached by default
[10:01:10] arup_r: I got some other idea and that worked..
[10:01:20] BaNzounet: universa1: I need to be able to call it from Observers, if it's a private method in application_controller, that won't work, will it?
[10:01:25] arup_r: universa1: thanks.. be cool!! Why so tempted ? :/
[10:01:44] kerunaru: You are trying to use "data" in js and ruby when that data var is a js variable, arup_r
[10:01:51] charliesome: has joined #RubyOnRails
[10:01:57] arup_r: kerunaru: yes.. I got it
[10:02:14] universa1: arup_r: because you're a regular user and should know by now how to ask good questions imho... ...sorry if i came across aggressive, condescending, ...
[10:02:44] rvanlieshout: no need for sorry in this case imo :)
[10:03:19] universa1: arup_r: think about it from the viewpoint of the person potentially trying to help you: is it easier for someone to read a question in the channel and thinking: ohh i know smething about this, i'll have a look: OR this is broken, why? -> link
[10:03:20] arup_r: I understand.. I have shown 2 links.. back to back in my gist.. and that's saying what is what and from where.. I just wandering why ... universa1: its ok.. It happened..
[10:03:45] sevenseacat: has joined #RubyOnRails
[10:04:20] universa1: in the latter case the helpful person has to open some link, read through it, ..., if he's on a mobile device he quickly gets annoyed imho
[10:04:39] coderhs: has joined #RubyOnRails
[10:05:06] arup_r: rvanlieshout: we all should be helpful.. not needed to point anything which is too personal what some people here do.. People those who do that they are probably doing coding 20+ years and they try to compare themselves with a people coding may be 3+ years.. there is a huge difference,,,,
[10:05:30] kerunaru: Take it easy, guys
[10:06:01] rvanlieshout: and we're all volunteering here
[10:06:13] workmad3: ACTION sits back and slurps coffee
[10:06:38] universa1: arup_r: make it easy for people trying to be helpful. and also a good asked question often leads to answering it yourself, that is at least my experience. if often start writing some question here, and while trying to explain what the problem is, i realize the solution ;)
[10:06:50] universa1: that is all what i'm trying to say. my english is somewhat limited.
[10:07:07] rvanlieshout: universa1: that sad, what is your native language?
[10:07:15] universa1: workmad3: waiting for sevenseacat's popcorn ;)
[10:07:18] universa1: rvanlieshout: german
[10:08:18] workmad3: universa1: I was considering a popcorn moment... but I don't like popcorn
[10:08:28] kerunaru: You are right, universa1. But, imo, if someone comes and don't respect the rules, we must explain those rules kindly.
[10:08:40] rvanlieshout: kerunaru: how often?
[10:08:47] brenop: has joined #RubyOnRails
[10:08:56] kerunaru: Yes, I know
[10:09:06] bruno-: has joined #RubyOnRails
[10:09:13] arup_r: humm.. Radar: is one of them.. always do it.. It is not respectful.. anway have a good day to all of you guys..
[10:09:34] arup_r: rvanlieshout: we need to have patience ... that's it both way
[10:09:36] kerunaru: But I don't think that a newbie must pay for all the times people don't respect the rules
[10:09:46] rvanlieshout: arup_r: true, but you know better then that
[10:09:55] rvanlieshout: and it's ok for somebody to be a newbie
[10:10:01] rvanlieshout: it's just no ok to be lazy and / or a dick
[10:10:04] arup_r: rvanlieshout: you are not following me..
[10:10:04] sevenseacat: ooh, I missed drama
[10:10:17] fgo: has joined #RubyOnRails
[10:10:18] universa1: sevenseacat: you're never too late to join :-)
[10:10:22] arup_r: rvanlieshout: now see your langiage...
[10:10:29] arup_r: *language...
[10:10:43] arup_r: rvanlieshout: what you meant by "be lazy and / or a dick..."
[10:10:45] rvanlieshout: that's because there is a huge cultural difference between the US and NL :)
[10:10:57] rvanlieshout: exactly what i wrote?
[10:11:10] arup_r: yes.. it hits a culture...
[10:11:28] arup_r: You should thiunk this channel as International..
[10:11:40] rvanlieshout: and i've helped a lot of people here
[10:11:42] arup_r: You shouldn't write wrods..
[10:11:48] arup_r: That's ok..
[10:11:59] workmad3: rvanlieshout: enjoying your lesson in IRC etiquette? :)
[10:12:01] sevenseacat: people can translate if meanings dont come across well.
[10:12:02] rvanlieshout: that doesn't mean i have to change my opinion about why i should help people and when
[10:12:03] arup_r: You got lots of blesses from them
[10:12:07] rvanlieshout: workmad3: sure amm :)
[10:12:26] arup_r: But still use some acceptable words..
[10:12:30] darrencauthon: has joined #RubyOnRails
[10:12:39] rvanlieshout: cause lazy isn't acceptable?
[10:13:06] arup_r: rvanlieshout: NO.. That's your fault how are you taking someone..
[10:13:20] rvanlieshout: i know that what i wrote could offend people
[10:13:28] rvanlieshout: but since when is that a bad thing per se?
[10:13:29] arup_r: before someone finished you are start reacting...
[10:13:39] kerunaru: Ok, we hate lazy people. That's right, BUT that does not give us the right to offend people, man???
[10:14:01] gaussblurinc1: hi! am I right about puma server that workers_count means additional processes to run, so, total processes count would be worker_count + 1?
[10:14:01] rvanlieshout: kerunaru: but somebody could be offended by me wearing something pink for example
[10:14:04] sevenseacat: ACTION goes to check the logs to see what actually started this lesson
[10:14:46] kerunaru: If someone gets offended by that, he/she has a problem
[10:15:13] rvanlieshout: and what's the difference between asking for somebody to explain it and not posting some links with some semi-random data?
[10:15:41] arup_r: there was nothing random.. and if you don't get .. be there... don't comment.. by pass it..
[10:15:47] arup_r: that's ok..
[10:15:58] k4nd4lf: has joined #RubyOnRails
[10:16:07] sevenseacat: then you'll complain that no-one helps you
[10:16:08] kerunaru: That wearing a pink t-shirt is a ridiculous fact to be offended for
[10:16:13] workmad3: sevenseacat: typical vague "Halp, this is broken! Fix it plz!" with an error that I know has been explained to arup_r multiple times...
[10:16:28] arup_r: All IRC clients don't have sane characters size support..
[10:16:31] rvanlieshout: kerunaru: i've spoken to people who were offended cause the teacher on the school where their child went to was gay
[10:16:38] workmad3: arup_r: *I'd* have been pissed off at you if I'd seen that and answered it
[10:17:14] arup_r: workmad3: sorry! come again ?
[10:17:29] workmad3: arup_r: the way you asked your question, and what the error was
[10:17:49] workmad3: arup_r: if I'd been active and seen that, I'd have gotten pissy at you
[10:17:54] ndrei: has joined #RubyOnRails
[10:18:04] sevenseacat: arup_r: you do have quote a frustrating habit of just going 'halp' and dumping out slabs of code and expecting people to help
[10:18:05] arup_r: I can ask anything which I am not getting... I don't ask here by measuring your inteligence..
[10:18:43] kerunaru: But that's more about the stigmatization of the gay collective than the fact their teacher was gay, rvanlieshout
[10:18:45] arup_r: questions comes from my level of understanding.. right workmad3: ?
[10:19:44] workmad3: arup_r: sure... but at the same time, it's up to *you* to make sure you're asking good questions, and it's up to *you* to make sure you've tried to answer the question yourself first
[10:20:21] zorak8: has joined #RubyOnRails
[10:20:28] kerunaru: Anyway, another point to have present is not all people have the same english level and maybe they make question abruptly because they are shy or they can't express themselves in another way
[10:20:29] arup_r: I wouldn't talk anymore .... Nice to talk with you guys...
[10:20:40] rvanlieshout: kerunaru: that's also not the problem
[10:20:47] rvanlieshout: it's never the problem if somebody is really trying
[10:20:53] workmad3: arup_r: and if you don't do that, don't be surprised if people get a bit annoyed when you ask vague questions and code that shows errors from mis-understandings that have been explained repeatedly to you in this channel
[10:21:04] commondream: has joined #RubyOnRails
[10:21:31] dionysus69: has joined #RubyOnRails
[10:21:42] baron: has joined #RubyOnRails
[10:21:59] workmad3: arup_r: and if you want a teacher that won't get annoyed at you... pay for one (and then prepare to be disappointed :P)
[10:22:11] arup_r: workmad3: I did.. I got confused by the fact .html.erb and .js.erb. for sometime.. and it happened for all.. I gurantee
[10:22:32] arup_r: my wort decision was I came here to ask
[10:22:41] workmad3: arup_r: I just got confused by the complete lack of *any* meaning in what you just said you were confused about...
[10:22:47] kerunaru: Ok, I'm not saying that arup_r made all things fine, obviously he didn't follow the rules. But I think the reaction was excessive
[10:23:23] sevenseacat: kerunaru: because this isnt the first time its happened.
[10:23:33] arup_r: kerunaru: that's because I ask questions.. And more people do answers only.. and answering much easier than questioning...
[10:23:44] workmad3: kerunaru: fuses diminish in proportion to the number of offences
[10:23:59] kerunaru: Again, I don't think that a newcomer must to pay the accumulated frustation
[10:24:00] sevenseacat: lol more people dont do answers only
[10:24:05] workmad3: kerunaru: arup_r isn't a newcomer
[10:24:10] sevenseacat: thats not a newcomer.
[10:24:12] workmad3: kerunaru: arup_r has been around for a year
[10:24:18] maz-dev: has joined #RubyOnRails
[10:24:42] arup_r: workmad3: can you stop please now..
[10:25:09] kerunaru: Ok, I stop arup_r
[10:25:47] rvanlieshout: ok. let's all just enjoy this sunny day again
[10:25:51] rvanlieshout: assuming it's sunny all over the world
[10:25:57] workmad3: arup_r: because you asked nicely, ok :P
[10:26:04] arup_r: You guys have no patience that's the problem.. Well formatted things are better suits in SO and mailing list... not in channel..
[10:26:19] workmad3: oooh, and it started again!
[10:26:21] arup_r: ok thanks..
[10:26:27] arup_r: No.. it stopped now
[10:26:40] workmad3: arup_r: you don't get to drop shit like that after asking everyone to stop
[10:26:41] rvanlieshout: that's because we all have to work for a living and this is not something we get paid for
[10:26:59] rvanlieshout: also assuming we all have to work for a living
[10:27:00] rvanlieshout: we do, right?
[10:27:12] arup_r: then please don't log in here.. very simple.. or by pass my comments more simple..
[10:27:30] workmad3: arup_r: it's always nice when you think you can lay down the rules ;)
[10:27:32] sevenseacat: i wish I didnt have to work for a living, but sadly I do.
[10:27:42] ChanServ: +o workmad3
[10:27:46] sevenseacat: arup_r: we have channel rules here, and we all have to follow them. that includes you.
[10:27:55] rvanlieshout: i've started working on my second milion... the first one just isn't going to happen i'm afraid
[10:28:00] universa1: off to lunch :-) sorry for starting this long discussion ;)
[10:28:01] sevenseacat: rvanlieshout: lol
[10:29:06] RegulationD: has joined #RubyOnRails
[10:30:11] arup_r: sevenseacat: when those rules cross 50+ .. I guarantee you.. this channel will start loosing members.. you can write down...
[10:30:14] workmad3: arup_r: and you can take your own advice btw... if you don't appreciate people here who try to help you, despite repeatedly giving vague questions and then getting offended when people are a bit abrupt in trying to pull out more information so *they* can help *you*... for free...
[10:30:15] creature: has joined #RubyOnRails
[10:30:35] sevenseacat: arup_r: those rules have been in place since long before you or I came here.
[10:30:45] sevenseacat: and we're still going strong.
[10:30:51] workmad3: there's also only 13 of them
[10:30:56] arup_r: workmad3: Let me laugh first,, DHH gave RoR free us too,,,,
[10:31:03] BaNzounet: I want to store an instance of a class (shouldn't be gobal for the app, just for the current request), and be able to access it in controllers, observers, models. what's the best way to do this?
[10:31:08] philcrissman: has joined #RubyOnRails
[10:31:19] rvanlieshout: BaNzounet: the best way sould be to pass it along
[10:31:24] sevenseacat: BaNzounet: what kind of instance is it, that you need it access it everywhere?
[10:31:27] rvanlieshout: cause models don't operate in the same scope as your controller does
[10:31:29] workmad3: arup_r: and you've seen the way he rants at and insults people who do things 'wrong' to his world-view, right?
[10:31:30] arup_r: sevenseacat: How many got added by last years and it will keep increasing..
[10:31:42] rvanlieshout: oh.. almost something to celebrate
[10:31:50] sevenseacat: arup_r: I think we've added one in the last year.
[10:32:05] sevenseacat: so we should be good for the next 37 or so years, if we keep adding one a year.
[10:32:14] intinig: has joined #RubyOnRails
[10:32:21] BaNzounet: sevenseacat: analytics stuff, something to be able to do, Analytics.track('eventName');
[10:32:26] arup_r: sevenseacat: well.. not to worry.. wait for 50+.. then come and say me I was wrong..
[10:32:27] sevenseacat: yeah #13 is relatively new, and its for the people helping, not for the people asking.
[10:32:39] rvanlieshout: oh. i didn't see that one
[10:32:40] helpa: https://gist.github.com/996779
[10:32:46] allcentury: has joined #RubyOnRails
[10:32:51] rvanlieshout: ah right. makes sense
[10:33:37] workmad3: rvanlieshout: heh :) I think I violate rule #9 all the time...
[10:33:40] kerunaru: arup_r, you said us to stop. Just let it go
[10:33:52] rvanlieshout: workmad3: ... :)
[10:34:05] arup_r: kerunaru: yes.. I am now going to my vim.. something there is not working :p
[10:34:27] workmad3: arup_r: enjoy :P
[10:34:32] BaNzounet: rvanlieshout: what do you mean to pass it along?
[10:34:44] arup_r: ACTION feels bold now.........
[10:34:46] rvanlieshout: BaNzounet: as an argument to the differnt things you're calling
[10:35:19] rvanlieshout: arup_r: no need for that
[10:35:21] Scripore: has joined #RubyOnRails
[10:35:42] arup_r: as always didn't get you..
[10:39:16] sandelius: has joined #RubyOnRails
[10:43:53] MartinElvar: has joined #RubyOnRails
[10:45:43] artto_: has joined #RubyOnRails
[10:50:48] rodfersou: has joined #RubyOnRails
[10:51:33] mikecmpbll: did i miss the fun?
[10:51:36] erich__: has joined #RubyOnRails
[10:51:38] rodfersou: has joined #RubyOnRails
[10:52:19] kerunaru: has joined #RubyOnRails
[10:52:21] thelastinuit: has joined #RubyOnRails
[10:53:38] Pupeno: has joined #RubyOnRails
[10:53:38] Pupeno: has joined #RubyOnRails
[10:54:56] charliesome: has joined #RubyOnRails
[10:55:42] kerunaru: has joined #RubyOnRails
[10:57:29] workmad3: mikecmpbll: yeah
[10:58:04] ChanServ: -o workmad3
[10:58:29] workmad3: mikecmpbll: you can always sit down with the logs and a nice relaxing cup of coffee ;)
[10:58:50] maz-dev: has joined #RubyOnRails
[10:59:05] mikecmpbll: haha, irc logs are my weekend indulgence, it'll have to wait.
[10:59:13] mikecmpbll: i print 'em out and take em to the park.
[10:59:52] maz-dev_: has joined #RubyOnRails
[11:02:17] kerunaru_: has joined #RubyOnRails
[11:02:46] jenrzzz: has joined #RubyOnRails
[11:02:51] cmisenas: has joined #RubyOnRails
[11:05:03] kerunaru: has joined #RubyOnRails
[11:07:34] ekain: has joined #RubyOnRails
[11:08:02] yoongkang: has joined #RubyOnRails
[11:09:37] edwinvdgraaf: has joined #RubyOnRails
[11:12:56] ur5us: has joined #RubyOnRails
[11:13:13] darrencauthon: has joined #RubyOnRails
[11:14:26] rvanlieshout: back from lunch
[11:14:30] arup_r: workmad3: Are you also a mod here ? out of topic question :)
[11:14:33] srinidhi: has joined #RubyOnRails
[11:14:57] sevenseacat: thats what the @ means.
[11:14:59] edwinvdg_: has joined #RubyOnRails
[11:15:01] sevenseacat: channel operator.
[11:15:02] arup_r: Ok.. good to know..
[11:15:37] mikecmpbll: i forgot how to even op up
[11:15:59] mikecmpbll: hope there's no emergencies when i'm the only one around.
[11:16:10] mikecmpbll: ACTION lunch
[11:18:47] k4nd4lf: has joined #RubyOnRails
[11:19:08] Scripore: has joined #RubyOnRails
[11:20:25] scottmatheina: has joined #RubyOnRails
[11:21:50] ndrei: has joined #RubyOnRails
[11:25:26] ProLoser: has joined #RubyOnRails
[11:27:10] fgo: has joined #RubyOnRails
[11:28:31] mrbubbles: has joined #RubyOnRails
[11:29:27] stamina: has joined #RubyOnRails
[11:31:14] raunico3: has joined #RubyOnRails
[11:33:29] uris: has joined #RubyOnRails
[11:34:51] Pazician: has joined #RubyOnRails
[11:35:03] doodlehaus: has joined #RubyOnRails
[11:38:56] coetry: has joined #RubyOnRails
[11:39:29] premera: has joined #RubyOnRails
[11:40:55] crdpink2: has joined #RubyOnRails
[11:41:25] sarink: has joined #RubyOnRails
[11:41:43] siemprefresco: has joined #RubyOnRails
[11:43:51] lessless: has joined #RubyOnRails
[11:44:25] rushed: has joined #RubyOnRails
[11:47:00] startupality: has joined #RubyOnRails
[11:47:02] mello: has joined #RubyOnRails
[11:47:02] mello: has joined #RubyOnRails
[11:48:16] dopie: has joined #RubyOnRails
[11:49:17] ndrei: has joined #RubyOnRails
[11:54:42] darrencauthon: has joined #RubyOnRails
[11:55:02] dopie: anyone available for paring?
[11:55:16] BaNzounet: rvanlieshout: (my response 1hour later), I'm not sure I understand how should I pass the instance of my class to an observer?
[11:55:23] meoblast001: has joined #RubyOnRails
[11:55:54] gaboesquivel: has joined #RubyOnRails
[11:55:56] rvanlieshout: BaNzounet: not for an observer, but could you explain waht you're trying to do?
[11:57:00] raunicolae: has joined #RubyOnRails
[11:57:00] dopie: rvanlieshout, can you pair with me on a subject??? I'm having problems/doubts
[11:58:13] jcaho: has joined #RubyOnRails
[11:58:44] dopie: ehow would you like to pair?
[11:58:59] wpp: has joined #RubyOnRails
[11:59:12] tagrudev: with a beer
[12:00:24] ndrei: has joined #RubyOnRails
[12:01:23] ajax0xd9: has joined #RubyOnRails
[12:02:04] bmalum: has joined #RubyOnRails
[12:03:50] BaNzounet: rvanlieshout: sure, I've this class https://gist.github.com/AlexGaspar/2552514c43a6d69c6151 to send events to Segment.io, like signup, purchase, ... So I want to be able to call myClass.user_signup kindof everywhere
[12:07:05] rvanlieshout: hmm. create a singleton class?
[12:07:06] mostlybadfly: has joined #RubyOnRails
[12:08:15] mrbubbles: has joined #RubyOnRails
[12:09:44] rikkipitt: has joined #RubyOnRails
[12:10:24] rikkipitt: hey guys, how do you go about giving a client a model in a CMS for a one off bit of content (say, a homepage hero introduction)
[12:10:44] melonstorm: has joined #RubyOnRails
[12:11:06] rikkipitt: or for an intro for a model that has many items
[12:11:31] mikecmpbll: rikkipitt: have a page model, or a snippets model?
[12:11:40] mikecmpbll: it depends on the specifics
[12:11:46] rikkipitt: snippets sounds nice
[12:11:58] rikkipitt: rather than a home_hero model
[12:12:35] mikecmpbll: well, if there's more than one of these, don't create a table for each that'll only ever have one row.
[12:13:17] rikkipitt: so don't have a snippets model with multiple fields for the various areas?
[12:13:39] rikkipitt: how do you normally go about assigning a snippet for a certain areas on a site?
[12:13:51] zack6849: has joined #RubyOnRails
[12:13:51] zack6849: has joined #RubyOnRails
[12:13:54] BaNzounet: rvanlieshout: That's what I had, but I need to add information to every events I'm sending, if I use a singleton, and I update an attribute of the singleton, every other 'user' will have that update, that's not what I want :/ (I don't know If understandable)
[12:14:10] rvanlieshout: ah right. ok. so an observer observers model changes
[12:14:21] rvanlieshout: and a model doesn't know about the world where a controller lives in
[12:14:27] mikecmpbll: rikkipitt: just place the snippet in your view?
[12:14:35] rvanlieshout: so if you want information in an observer you'll have to set it on the model
[12:14:42] rvanlieshout: could use an attr_accesor for it
[12:14:51] rvanlieshout: that's a dummy attribute that's not saved to the db
[12:15:02] RegulationD: has joined #RubyOnRails
[12:15:08] rikkipitt: thanks mikecmpbll, food for thought
[12:15:10] jmignault: has joined #RubyOnRails
[12:15:48] darrencauthon: has joined #RubyOnRails
[12:17:04] bog: has joined #RubyOnRails
[12:18:29] ldnunes: has joined #RubyOnRails
[12:19:37] bhorn1_: has joined #RubyOnRails
[12:20:37] bog: has left #RubyOnRails: ()
[12:20:52] bog: has joined #RubyOnRails
[12:20:56] bhorn1: has joined #RubyOnRails
[12:21:26] bmalum: has joined #RubyOnRails
[12:22:06] llafodog_sh: has joined #RubyOnRails
[12:22:38] tedstriker: has joined #RubyOnRails
[12:23:09] CanTonic: has joined #RubyOnRails
[12:24:20] BaNzounet: rvanlieshout: I don't see how I could use that, that mean for me that all my models need that dummy attribute and I need to set it, every where before it's calling the .save methode (Or I didn't get you right?)
[12:24:38] llafodog_sh: has left #RubyOnRails: ()
[12:24:47] BaNzounet: (Not all, but a lot)
[12:25:25] greengriminal: has joined #RubyOnRails
[12:25:43] stephskardal: has joined #RubyOnRails
[12:25:55] rvanlieshout: euhm. that would be true indeed
[12:26:04] rvanlieshout: you could save it in the current thread
[12:26:51] ProLoser: has joined #RubyOnRails
[12:27:54] greengriminal: has joined #RubyOnRails
[12:28:21] BaNzounet: it feels like I'm trying to do something wrong :(
[12:28:46] rvanlieshout: agreed on that one :)
[12:29:16] universa1: BaNzounet: look at auditing gems, they solve a similar problem to yours.
[12:29:26] davidhq: has joined #RubyOnRails
[12:30:01] thatkid: has joined #RubyOnRails
[12:31:14] thatkid: How can I avoid the password reset token in devise? I just want to update the password with `change user password - PUT /users/password`
[12:31:44] universa1: thatkid: write a controller that updates the user?
[12:32:01] BaNzounet: And If I understand it well, it's not possible to have a global variable only in the scope of a request?
[12:32:18] universa1: BaNzounet: you can use thread.local variables for that.
[12:33:30] jkamenik: has joined #RubyOnRails
[12:34:42] [H]unt3r: has joined #RubyOnRails
[12:35:59] mrbubbles: has joined #RubyOnRails
[12:38:29] BaNzounet: What's your opinion on storing stuff inside thread.local ?
[12:39:23] Rubie: has joined #RubyOnRails
[12:39:39] Valien: has joined #RubyOnRails
[12:40:09] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[12:40:17] diegoviola: has joined #RubyOnRails
[12:40:45] BaNzounet: Maybe I should reformulate my first question, I've a singleton class being used in observer, model, controller. I want to add information in one of the method of my singleton class comming from the cookie[:MyCookie], how would you do that?
[12:41:37] rvanlieshout: save it as an instance variable in your singleton
[12:41:41] treehug88: has joined #RubyOnRails
[12:44:02] edwinvdgraaf: has joined #RubyOnRails
[12:45:06] universa1: rvanlieshout: he wants a globally accessible, but request specific, instance ;) auditing gems solved this exact problem ;)
[12:45:29] givanse: has joined #RubyOnRails
[12:45:31] bruno-: has joined #RubyOnRails
[12:45:32] Detch: has joined #RubyOnRails
[12:45:40] BaNzounet: universa1: https://github.com/collectiveidea/audited ?
[12:45:43] BaNzounet: this kind of stuff?
[12:45:53] mikecmpbll: universa1: don't they normally just hook into the models?
[12:45:55] universa1: BaNzounet: i think so yes, paper_trail is another one
[12:46:02] universa1: mikecmpbll: they keep current_user around ;)
[12:46:06] mikecmpbll: ah of course.
[12:46:24] universa1: which is basically the same problem ;)
[12:46:29] mikecmpbll: indeed it is!
[12:46:48] treehug88: BaNzounet, universa1 : I researched both of those, and Audited was better in my estimation - paper_trail doesn't record the initial state
[12:47:10] sevenseacat: paper_trail uses a thread variable to store the current user in - that's how they access it in models
[12:47:21] sevenseacat: not the best idea, but if isolated, isn't too bad
[12:47:56] BaNzounet: okay, so that's what I've to go for, thread variable right?
[12:49:00] melter: has joined #RubyOnRails
[12:49:03] BaNzounet: okay guys thanks :)
[12:50:22] ndrei: has joined #RubyOnRails
[12:50:29] edwinvdgraaf: has joined #RubyOnRails
[12:50:38] coetry: has joined #RubyOnRails
[12:51:32] edwinvdg_: has joined #RubyOnRails
[12:52:15] jenrzzz: has joined #RubyOnRails
[12:54:37] boom1992: has joined #RubyOnRails
[12:56:17] BaNzounet: -> https://github.com/steveklabnik/request_store
[12:56:42] BaNzounet: Do you know this?
[12:57:18] surrealanalysis: has joined #RubyOnRails
[12:58:16] annlewis: has joined #RubyOnRails
[12:59:00] krisquigley: has joined #RubyOnRails
[12:59:10] bmurt: has joined #RubyOnRails
[12:59:44] brendan-: has joined #RubyOnRails
[13:00:24] agent_white: has joined #RubyOnRails
[13:01:34] mikecmpbll: BaNzounet: don't really get the point of that, but it sure does what it says on the tin :).
[13:03:01] mikecmpbll: all it does is exactly what it says in the "Problem" section, but reset the thread var at the end of the request.
[13:05:37] freezevee: has joined #RubyOnRails
[13:06:48] darrencauthon: has joined #RubyOnRails
[13:08:26] griffindy: has joined #RubyOnRails
[13:08:36] arup_r: has joined #RubyOnRails
[13:08:39] leex: Hi, I am using hstore and if I am saving a value it, e.g. my_hstore_hash[1] = 1, it will save: { "1" => "1" } to the database, but when I am doing the same in rspec it saves { 1 => 1 }, this let's my tests fail, is there a way to define an accessor for the store? that always makes sure that the elements are strings?
[13:15:31] ndrei: has joined #RubyOnRails
[13:16:45] bronson: has joined #RubyOnRails
[13:17:02] bmalum: has joined #RubyOnRails
[13:17:19] DigitallyBorn: has joined #RubyOnRails
[13:18:22] njero: has joined #RubyOnRails
[13:20:34] acti0nman: has joined #RubyOnRails
[13:20:44] mary5030: has joined #RubyOnRails
[13:21:41] fgo: has joined #RubyOnRails
[13:23:09] umgrosscol: has joined #RubyOnRails
[13:23:42] commondream: has joined #RubyOnRails
[13:25:40] SeanLazer: has joined #RubyOnRails
[13:27:49] startupality_: has joined #RubyOnRails
[13:28:17] tjbiddle: has joined #RubyOnRails
[13:28:50] sarink: has joined #RubyOnRails
[13:29:10] doodlehaus: has joined #RubyOnRails
[13:29:48] Xiti: has joined #RubyOnRails
[13:31:40] erich: has joined #RubyOnRails
[13:32:33] gonglexin: has joined #RubyOnRails
[13:33:05] allcentury: has joined #RubyOnRails
[13:33:11] Trefex: has joined #RubyOnRails
[13:34:47] arup_r: has joined #RubyOnRails
[13:35:05] michaeldeol: has joined #RubyOnRails
[13:35:45] mello: has joined #RubyOnRails
[13:35:45] mello: has joined #RubyOnRails
[13:35:57] davidhq: has joined #RubyOnRails
[13:36:06] benhuda: has joined #RubyOnRails
[13:37:59] jwaldrip: has joined #RubyOnRails
[13:39:56] wplatnick: has joined #RubyOnRails
[13:43:36] tempspace: has joined #RubyOnRails
[13:45:00] darrencauthon: has joined #RubyOnRails
[13:45:16] axl___: has joined #RubyOnRails
[13:47:55] arup_r: from where this error is coming? any idea.. I am getting syntax error.... with link_to
[13:47:57] arup_r: https://gist.github.com/aruprakshit/c8f7387129052f29d0fb
[13:48:28] arup_r: As per the doco it is valid syntax http://apidock.com/rails/ActionView/Helpers/UrlHelper/link_to
[13:49:14] tbuehlmann: it's not. try surrounding with ()
[13:49:21] charliesome: has joined #RubyOnRails
[13:49:28] sevenseacat: the {} are treated like a block
[13:50:07] arup_r: let me try
[13:50:34] arup_r: sevenseacat: +1
[13:50:44] leex: Is there a way to overwrite the [] and []= methods of the store_accessor? When working with hstore?
[13:50:50] arup_r: But why Ruby didn't understand it
[13:51:00] ndrei: has joined #RubyOnRails
[13:51:25] arup_r: and we need to explicitly supply the paren .. no idea
[13:51:45] mikecmpbll: arup_r: def foo(a = {}); end; foo { some: 'hash' }
[13:52:05] mikecmpbll: will replicate your syntax error, and sevenseacat already said why ruby cannot parse it.
[13:52:14] rubyonrailed: has joined #RubyOnRails
[13:52:31] arup_r: mikecmpbll: yes.. as I know last argument should be block argument when there is a argument lists..
[13:52:56] arup_r: Why then it got confused with the syntax
[13:53:17] mikecmpbll: because `method { ..` is parsed as a opening a block
[13:53:30] mikecmpbll: rather than a hash literal as first argument.
[13:55:46] symbol: has joined #RubyOnRails
[13:56:30] Scripore: has joined #RubyOnRails
[13:56:45] SeanLazer: has joined #RubyOnRails
[13:57:26] diego3: has joined #RubyOnRails
[13:59:26] sjeijk: has joined #RubyOnRails
[13:59:54] Hates_: has joined #RubyOnRails
[14:04:45] arup_r: mikecmpbll: humm
[14:04:47] The_Phoenix: has joined #RubyOnRails
[14:04:50] yoongkang: has joined #RubyOnRails
[14:04:50] asheinfeld: has joined #RubyOnRails
[14:04:59] edwinvdgraaf: has joined #RubyOnRails
[14:06:05] prasselpikachu: has joined #RubyOnRails
[14:06:07] The_Phoenix: has joined #RubyOnRails
[14:06:36] bruno-: has joined #RubyOnRails
[14:07:23] mikecmpbll: arup_r: humm indeed!
[14:07:31] kinduff: has joined #RubyOnRails
[14:10:11] mase-chatter: has joined #RubyOnRails
[14:10:31] RegulationD: has joined #RubyOnRails
[14:11:23] tubbo: has joined #RubyOnRails
[14:11:36] arup_r: but funny... hehehe
[14:12:15] bogdanchil: has joined #RubyOnRails
[14:12:51] arup_r: it only happens when you have method arguments as hash and block..
[14:12:57] asheinfeld: has joined #RubyOnRails
[14:13:02] arup_r: otherwise or not..
[14:13:17] zorak8: has joined #RubyOnRails
[14:13:30] mikecmpbll: just hash ..
[14:13:43] bogdanchil_: has joined #RubyOnRails
[14:14:09] arup_r: yes just hash
[14:14:12] simplyianm: has joined #RubyOnRails
[14:15:03] Spami: has joined #RubyOnRails
[14:15:54] rubyonrails074: has joined #RubyOnRails
[14:16:40] frt: has joined #RubyOnRails
[14:16:40] rubyonrails996: has joined #RubyOnRails
[14:16:46] frt: has left #RubyOnRails: ()
[14:17:46] commondream: has joined #RubyOnRails
[14:18:23] bogdanchil: has joined #RubyOnRails
[14:19:15] sshuff: has joined #RubyOnRails
[14:20:09] justintv90: has joined #RubyOnRails
[14:21:23] justintv90: has joined #RubyOnRails
[14:21:53] Synthead: has joined #RubyOnRails
[14:22:38] justintv90: has joined #RubyOnRails
[14:22:40] smathy: has joined #RubyOnRails
[14:23:43] bogdanchil: has joined #RubyOnRails
[14:23:45] jonahR: has joined #RubyOnRails
[14:24:19] Pazician: has joined #RubyOnRails
[14:24:57] bratsche: has joined #RubyOnRails
[14:24:59] jonahR: has joined #RubyOnRails
[14:25:32] justintv90: has joined #RubyOnRails
[14:27:56] baweaver: has joined #RubyOnRails
[14:28:41] Rubie: has joined #RubyOnRails
[14:29:21] coetry: has joined #RubyOnRails
[14:30:40] kenpoint: has joined #RubyOnRails
[14:30:51] sarink: is there support to tell rails to log to a remote server, via snmp or something
[14:32:19] jonahR: has joined #RubyOnRails
[14:33:02] drale2k: has joined #RubyOnRails
[14:33:54] tubbo: sarink: yeah, you can use the Syslogger gem to easily write to syslog, then `rsyslog` to send those log lines to your log server. here's an example of how one might do it... https://www.loggly.com/docs/rails-logs/
[14:35:01] brenop: has left #RubyOnRails: ()
[14:35:13] krz: has joined #RubyOnRails
[14:35:25] DaniG2k: has joined #RubyOnRails
[14:35:54] dstarh: has joined #RubyOnRails
[14:36:47] bogdanchil_: has joined #RubyOnRails
[14:37:46] sonofdirt: has joined #RubyOnRails
[14:38:08] cornerma1: has joined #RubyOnRails
[14:39:21] hardtail: has joined #RubyOnRails
[14:39:27] dejean: has joined #RubyOnRails
[14:40:00] codepete: has joined #RubyOnRails
[14:40:03] mary5030: has joined #RubyOnRails
[14:41:25] mary5030: has joined #RubyOnRails
[14:41:26] krisquigley: has joined #RubyOnRails
[14:42:07] Pazician: has joined #RubyOnRails
[14:42:16] jenrzzz: has joined #RubyOnRails
[14:42:50] dEPy: has joined #RubyOnRails
[14:43:02] justintv90: has joined #RubyOnRails
[14:43:23] platosha: has joined #RubyOnRails
[14:43:58] fuzzyhorns: has joined #RubyOnRails
[14:44:11] jmignault: has joined #RubyOnRails
[14:45:46] doodlehaus: has joined #RubyOnRails
[14:46:05] joaomdmoura: has joined #RubyOnRails
[14:46:12] bogdanchilianu_: has joined #RubyOnRails
[14:46:13] jkamenik1: has joined #RubyOnRails
[14:46:50] bogdanchilianu_: has joined #RubyOnRails
[14:47:49] bogdanchilianu: has joined #RubyOnRails
[14:50:30] asheinfeld: has joined #RubyOnRails
[14:50:50] bogdanchilianu: has joined #RubyOnRails
[14:51:06] Coldblackice_: has joined #RubyOnRails
[14:52:00] njero: has joined #RubyOnRails
[14:52:53] logik-bomb: has joined #RubyOnRails
[14:54:33] logik-bomb: guys, what's the best way to store an unknown amount of params on my db?
[14:54:52] fuzzyhorns: logik-bomb: hmm?
[14:56:12] dopie: has joined #RubyOnRails
[14:57:50] mikecmpbll: logik-bomb: serialize them probably
[14:58:03] allcentury: has joined #RubyOnRails
[14:58:29] tjbiddle: has joined #RubyOnRails
[14:59:07] gambl0re: has joined #RubyOnRails
[15:00:10] prasselpikachu: has joined #RubyOnRails
[15:00:22] justintv90: has joined #RubyOnRails
[15:00:27] tvw: has joined #RubyOnRails
[15:00:36] treehug88: logik-bomb: in a table :)
[15:01:14] justintv90: has joined #RubyOnRails
[15:01:20] Papierkorb: has joined #RubyOnRails
[15:02:11] ogpastaling: has joined #RubyOnRails
[15:03:34] edwinvdgraaf: has joined #RubyOnRails
[15:10:47] diegobiavati: has joined #RubyOnRails
[15:11:57] zzing: has joined #RubyOnRails
[15:14:50] sdwrage: has joined #RubyOnRails
[15:15:58] joaomdmoura: has joined #RubyOnRails
[15:16:21] vbexpert: has joined #RubyOnRails
[15:16:43] DaniG2k: is sunspot even maintained?
[15:16:52] DaniG2k: would seem not
[15:17:07] jgpawletko: has joined #RubyOnRails
[15:17:24] tubbo: DaniG2k: definitely maintained, just not very well imho
[15:19:09] Leigh: has joined #RubyOnRails
[15:19:11] Fire-Dragon-DoL: has joined #RubyOnRails
[15:21:31] mello: has joined #RubyOnRails
[15:21:31] mello: has joined #RubyOnRails
[15:23:27] ndrei: has joined #RubyOnRails
[15:24:02] disgrntld: has joined #RubyOnRails
[15:24:03] DaniG2k: damn when I look at people's code on Github
[15:24:14] DaniG2k: I feel like I don't know how to code at all
[15:25:12] Rubie: has joined #RubyOnRails
[15:26:29] mikecmpbll: get off my github ..
[15:27:18] jkamenik: has joined #RubyOnRails
[15:28:13] mikecmpbll: i can't even seem to add a class to a div at the moment.
[15:28:20] mikecmpbll: no fucking idea what is going on.
[15:29:30] mikecmpbll: oh, JS was removing it ????
[15:30:26] fedexo: has joined #RubyOnRails
[15:30:29] tubbo: that'll do it
[15:31:14] edwinvdg_: has joined #RubyOnRails
[15:31:46] highcup: has joined #RubyOnRails
[15:32:35] sonofdirt: has joined #RubyOnRails
[15:32:36] pipework: That'll do, pig.
[15:34:37] adavia: has joined #RubyOnRails
[15:35:33] lessless: has joined #RubyOnRails
[15:36:08] volkk: has joined #RubyOnRails
[15:36:13] slash_nick: mikecmpbll: had that happen to me yesterday... must've reset my shell and restarted my rails server 5 times before I remembered, "oh yeah, i replaced this partial last week"
[15:36:54] dopie: has joined #RubyOnRails
[15:37:49] mikecmpbll: slash_nick: eheh, it can happen.
[15:38:36] volkk: has left #RubyOnRails: ()
[15:39:29] baron: has joined #RubyOnRails
[15:39:46] baron: has left #RubyOnRails: ()
[15:40:18] volk_: has joined #RubyOnRails
[15:41:00] volk_: hey fellas i have a quick question ??? is it a code smell if i write a concern that depends on something being defined on a model thus making me include this concern later in the code after X had been defined already?
[15:41:39] sdwrage: has joined #RubyOnRails
[15:41:42] volk_: the concern depends on a gem
[15:43:15] pipework: volk_: Can you provide some sensible warning or default behaviour to inform the user or behave sanely with a default option, respectively?
[15:44:00] mikecmpbll: & is there a reason the dependent thing isn't also in the concern
[15:44:17] mikecmpbll: oops, a gem. i see.
[15:44:23] volk_: good point. let me just explain it a bit more so you guys have a slightly clearer picture. im using ???workflow"
[15:44:32] volk_: so in workflow you define states with a DSL
[15:44:35] volk_: based on the model
[15:45:04] adavia: so i have a user who has_one relationship with a profile. Any idea why each time i update the profile i also get the profile id updated incremetally?
[15:45:11] volk_: my concern dynamically creates some methods that work with workflow that depend on the states defined. if i include it at the top of the file, the states arent defined yet
[15:45:20] volk_: so i have to include it right after the states. was wonderinf if thats weird
[15:45:30] volk_: pipework , mikecmpbll ^
[15:45:42] mikecmpbll: adavia: not without seeing your code, no.
[15:46:13] pipework: volk_: Oh it depends on that model to be using a state machine like that, yeah?
[15:46:13] Rebecca13: has joined #RubyOnRails
[15:46:16] mikecmpbll: volk_: why doesn't the concern also define the states?
[15:46:31] pipework: Can you detect the presence of the state machine in some meaningful way?
[15:47:10] volk_: mikecmpbll: yeah ??? so you think thats a good idea? the thing is that different models could have different states. so i would need to instaniate the concern in some way
[15:47:18] volk_: with special states
[15:47:31] volk_: depending on the model. is there a pattern for that sort of thing?
[15:48:02] volk_: pipework: well yeah there is, but the state machine will just never be defined if i include it at the top of the file
[15:48:14] adavia: mikecmpbll: http://pastie.org/10233852
[15:48:20] pipework: volk_: I don't mind using includes at the end.
[15:48:23] ruv: has joined #RubyOnRails
[15:48:26] zekriad: has joined #RubyOnRails
[15:48:37] Rebecca13: Hi, Could someone help me out with a basic question on rails directory structure?
[15:48:38] pipework: There are some times when you need to.
[15:48:42] volk_: thats fair
[15:48:51] volk_: maybe i???ll do that
[15:49:05] n3b: has joined #RubyOnRails
[15:49:13] coderkatze: has left #RubyOnRails: ()
[15:50:04] Rebecca13: I have a job I really want that's not technical, but they asked us "bonus question" on ruby on rails directory structure
[15:50:33] mikecmpbll: volk_: you can just keep doing it the way you are, it's not a tragedy. if it was me i'd probably add a method to my concern which takes my model-specific stuff as arguments and defines the states
[15:50:52] mikecmpbll: i think the behaviour is better contained that way
[15:51:00] weckl: has joined #RubyOnRails
[15:51:20] volk_: mikecmpbll: i 100% agree and i want to do that. any idea where i would instantiate this model specific thing though in the model?
[15:51:33] volk_: im just a bit confused because it needs to be instantiated before the model is
[15:51:35] philcrissman: has joined #RubyOnRails
[15:51:37] SeanLazer: has joined #RubyOnRails
[15:51:45] volk_: so it needs to hook into something, so maybe a before callback?
[15:51:55] volk_: not sure if that makes sense
[15:52:06] moeabdol1: has joined #RubyOnRails
[15:53:02] pipework: volk_: Why not just use an include with a module that does its thing?
[15:53:50] volk_: well no pipework , i dont think i can do that because
[15:54:08] towski_: has joined #RubyOnRails
[15:54:15] volk_: i need specific arguments being passed into the include to make sure the states are dependant on the model including it
[15:54:19] mikecmpbll: this "workflow" thing doesn't mean anything to me so i don't know any specifics of how these "states" are defined, but you can extend the base class when your concern is included
[15:54:20] pipework: Use the .included hook on the module or the .extended hook if you're into that.
[15:54:27] mikecmpbll: and then call the extended method after the include
[15:55:22] catcher: has joined #RubyOnRails
[15:55:28] volk_: mikecmpbll: basically it just defines states on a model , a statemachine thing. but i dont think thats important. im just more interested in figuring out a way to instantiate a concern in a proper way (with arguments) dependant on the class including it
[15:56:20] pipework: volk_: You can always use the module injection pattern-y thing. include ModuleGenerator.new(args)
[15:56:23] pipework: Something like that.
[15:56:40] pipework: It returns a module for the class.
[15:57:12] pixelhandler: has joined #RubyOnRails
[15:58:00] volk_: i???l look into it
[15:58:02] Pazician_: has joined #RubyOnRails
[15:58:35] livathinos: has joined #RubyOnRails
[15:59:28] SeanLazer: has joined #RubyOnRails
[16:00:23] mikecmpbll: volk_: this was what i was thinking btw: https://gist.github.com/mikecmpbll/f93009eb9bbc4c9e033c
[16:01:07] GarethAdams: has joined #RubyOnRails
[16:01:12] Rebecca13: Any help pleaseee?
[16:01:15] ProLoser: has joined #RubyOnRails
[16:01:51] ascarter: has joined #RubyOnRails
[16:01:51] mikecmpbll: Rebecca13: !ask2ask
[16:01:51] helpa: Rebecca13: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[16:01:59] mikecmpbll: ooops, you did
[16:02:01] volk_: mikecmpbll: thanks :)
[16:02:05] volk_: makes sense
[16:02:10] mikecmpbll: oh, no you didnt
[16:02:22] Rebecca13: I know nothing about ruby but this job questionaire is asking and I want to get some bonus points
[16:02:38] shinnya: has joined #RubyOnRails
[16:02:44] Rebecca13: they want to know the directories the gemfile and routes file are
[16:03:24] startupality: has joined #RubyOnRails
[16:04:04] Rebecca13: all I can find is the command to use to find where these are but not where the default location is
[16:04:18] mikecmpbll: Rebecca13: the Gemfile goes in the root of the app, the routes file is in config/
[16:05:24] ChargedLight: has joined #RubyOnRails
[16:06:47] jcaho: has joined #RubyOnRails
[16:07:14] Xiti: has joined #RubyOnRails
[16:07:52] waseem_: #RubyOnRails - Always hepling people ace their interviews.
[16:08:02] Rebecca13: this isn't even a technical role
[16:08:06] DoubleMalt: has joined #RubyOnRails
[16:08:17] mikecmpbll: i'm still taking 10% if you get it.
[16:08:25] Rebecca13: It's for an administrative assistant position here in texas
[16:08:34] Rebecca13: Now, they want me to conver this code from javascript to ruby :(
[16:08:35] tubbo: lol why do you need to know about the codebase then?
[16:08:40] Rebecca13: ??\_(???)_/??
[16:08:40] waseem_: Rebecca13: Why are they asking you technical question?
[16:08:45] Rebecca13: "bonus points"
[16:08:48] tubbo: Rebecca13: oh, because this is a programmer job.
[16:08:57] simplyianm: has joined #RubyOnRails
[16:08:58] tubbo: Rebecca13: what's the pay?
[16:08:58] Papierkorb: Anyone in here knows how to get capybara to use SSL with selenium?
[16:09:01] Rebecca13: administrative assistant at a tech company
[16:09:06] Rebecca13: not sure yet..
[16:09:17] waseem_: What does that position even mean?
[16:09:44] tubbo: Rebecca13: that is a secretarial role, not a developer role. something is severely wrong over there if they are hiring an admin assitant to do the job of a TEAM of programmers.
[16:09:51] Rebecca13: i do know javascript though so i think i might be able to code this in ruby
[16:10:02] Rebecca13: theyre not its just bonus questions
[16:10:16] tubbo: Rebecca13 | Now, they want me to conver this code from javascript to ruby :(
[16:10:30] Rebecca13: as a bonus question
[16:10:55] mikecmpbll: in small companies people have diverse roles .. we did put that SQL is a bonus when we advertised some admin position
[16:11:18] pipework: I speak squirrel.
[16:11:23] nertzy: has joined #RubyOnRails
[16:11:47] mikecmpbll: pipework: take me to to nuts!
[16:12:32] jonahR: has joined #RubyOnRails
[16:12:39] bricker: has joined #RubyOnRails
[16:12:49] Scripore: has joined #RubyOnRails
[16:13:39] adavia: so i have a user who has_one relationship with a profile. Any idea why each time i update the profile i also get the profile id updated incremetally? http://pastie.org/10233852
[16:14:07] ProLoser: has joined #RubyOnRails
[16:14:10] krisquigley: has joined #RubyOnRails
[16:15:33] tubbo: adavia: you probably need to show more of User and Profile, because that sounds like you're creating a Profile around every time the User is saved.
[16:15:49] adavia: tubbo: right
[16:16:05] adavia: tubbo: im using after create
[16:16:07] ChargedLight: Hello. I am trying to create a parser, that will scrape info about iphone warranty status. I have an URL - https://selfsolve.apple.com/agreementWarrantyDynamic.do and i need to fill the form with an IMEI and press Continue to get info about the phone. I am using mechanize for this. The problem is - there is a hidden field in this form - http://goo.gl/AMlNfC And this field is filled automatically with a random number when i interact with page v
[16:16:07] ChargedLight: ia browser. So if i open this page with mechanize, i should fill this field manually with that random generated number. I've figured out in which part of code this number generated - http://goo.gl/P8nvpx The problem is - it's inside JavaScript function. I am not very strong at JS and i have no idea how to fetch this number using mechanize, or maybe somehow else. Need help with this one.
[16:16:31] adavia: tubbo: to create a profile once a user is created
[16:16:49] adavia: but why that behaviour
[16:17:36] war_pigs: has joined #RubyOnRails
[16:18:32] adavia: tubbo: http://pastie.org/10233894
[16:18:51] bronson_: has joined #RubyOnRails
[16:18:51] ascarter: has joined #RubyOnRails
[16:20:35] Etriaph: has joined #RubyOnRails
[16:22:00] commondream: has joined #RubyOnRails
[16:23:20] ruv: has joined #RubyOnRails
[16:23:48] commondream: has joined #RubyOnRails
[16:24:00] ciree: ChargedLight: you need a web driver, something that can process javascript
[16:24:37] AzaToth: has joined #RubyOnRails
[16:24:56] njero: has joined #RubyOnRails
[16:25:43] Parker0: has joined #RubyOnRails
[16:25:52] smathy: adavia, nothing in the code you've shown would lead to that behavior, as tubbo said, you need to show more code.
[16:27:13] ChargedLight: ciree, maybe you can name one that can do what i need?
[16:28:03] batasrki: has joined #RubyOnRails
[16:28:24] gambl0re: has joined #RubyOnRails
[16:28:45] batasrki: anyone here running a rails app that needs access to Redis, but it does so through Redis Sentinel rather than straight access?
[16:29:06] ciree: ChargedLight: https://stackoverflow.com/questions/802225/how-do-i-use-mechanize-to-process-javascript
[16:29:12] ciree: ChargedLight: google :)
[16:29:16] the_real_intinig: has joined #RubyOnRails
[16:29:41] surrealanalysis: has joined #RubyOnRails
[16:29:55] hardtail: Hi all. I am trying to create a to-do list. I have an instance of an item created in the database. I am trying to display in a partial the items created but receive No Method Error. Can someone take a look at my code please? https://gist.github.com/jonathanmusso/d58339f6f423b99e52b3
[16:30:00] michael_mbp: has joined #RubyOnRails
[16:30:53] asheinfeld: has joined #RubyOnRails
[16:31:29] batasrki: hardtail: well, for one, you don't have a new action that would set up @item
[16:31:43] smathy: hardtail, you haven't shown any controller code for the show action, but basically you've not set @items and so it's nil being passed into the partial.
[16:31:46] batasrki: hardtail: for two, @item.each is not the same as @items.each
[16:32:14] smathy: batasrki, he doesn't have @item.each he has item.each
[16:32:41] batasrki: smathy: ....for three
[16:32:53] smathy: batasrki, well, poor naming, but it's passed in from show.haml
[16:33:27] hardtail: Arg, thank you all. I will attempt to rectify this. I believe I did not understand my instructions properly.
[16:36:55] codepete: has joined #RubyOnRails
[16:38:33] x1337807x: has joined #RubyOnRails
[16:39:08] Scripore: has joined #RubyOnRails
[16:39:23] JimmyNeutron: has joined #RubyOnRails
[16:40:16] smathy: has joined #RubyOnRails
[16:40:55] kerunaru: has joined #RubyOnRails
[16:41:15] intinig: has joined #RubyOnRails
[16:42:21] Spami: has joined #RubyOnRails
[16:43:39] baweaver: has joined #RubyOnRails
[16:45:04] dionysus69: has joined #RubyOnRails
[16:45:08] Spami: has joined #RubyOnRails
[16:47:19] simplyianm: has joined #RubyOnRails
[16:47:47] volk_: has joined #RubyOnRails
[16:47:48] hardtail: Is this a head in the right direction? https://gist.github.com/jonathanmusso/d58339f6f423b99e52b3
[16:48:44] batasrki: hardtail: closer, but still a few problems
[16:48:51] ascarter: has joined #RubyOnRails
[16:49:16] batasrki: hardtail: 1) the ERB file expects variables named @new_item and @items, but the show action only supplies a variable named @item
[16:50:26] _djbkd: has joined #RubyOnRails
[16:50:28] rromanchuk: has joined #RubyOnRails
[16:51:31] volk_: has joined #RubyOnRails
[16:51:33] _djbkd: has joined #RubyOnRails
[16:52:03] thiagovsk: has joined #RubyOnRails
[16:52:24] Lightsword: has joined #RubyOnRails
[16:52:54] ChadyG_: has joined #RubyOnRails
[16:52:59] towski_: has joined #RubyOnRails
[16:53:00] starfox_sf: has joined #RubyOnRails
[16:56:14] jkamenik1: has joined #RubyOnRails
[16:58:39] batasrki: has joined #RubyOnRails
[17:00:41] tskogberg: has joined #RubyOnRails
[17:01:13] ogpastal_: has joined #RubyOnRails
[17:01:27] erwqsdefr: has joined #RubyOnRails
[17:01:44] allcentury: has joined #RubyOnRails
[17:02:16] erich: has joined #RubyOnRails
[17:03:15] pjackson: has left #RubyOnRails: ()
[17:03:23] tubbo: has joined #RubyOnRails
[17:05:07] armyriad: has joined #RubyOnRails
[17:05:14] rodferso1: has joined #RubyOnRails
[17:05:33] Filete: has joined #RubyOnRails
[17:06:09] hardtail: bataskri, thank you I will fix this
[17:06:19] artto: has joined #RubyOnRails
[17:10:15] mello: has joined #RubyOnRails
[17:10:15] mello: has joined #RubyOnRails
[17:10:58] rustymyers: has joined #RubyOnRails
[17:11:57] sshuff: has joined #RubyOnRails
[17:12:19] thiagovsk: has left #RubyOnRails: ()
[17:13:05] paulcsmith: has joined #RubyOnRails
[17:13:13] dseitz: has joined #RubyOnRails
[17:13:30] acti0nman: has joined #RubyOnRails
[17:14:35] dionysus69: hello people
[17:14:59] dionysus69: i got a quick question, how do you evaluate my plan to install centos as my main os I am planning to get into RoR?
[17:17:06] tubbo: dionysus69: i'd advise using an OS that you're very comfortable working with
[17:17:10] tubbo: whatever that may be
[17:18:02] dionysus69: tubbo: well I am on ubuntu right now, I wanna make sure I am not missing out on anything
[17:18:45] bmalum: has joined #RubyOnRails
[17:19:07] arBmind: has joined #RubyOnRails
[17:19:31] tubbo: dionysus69: why would you be missing out on anything?
[17:20:36] dionysus69: dunno, i read centos supports some nice server administration stuff which maybe also would be useful to know while hosting my ror site in the future
[17:22:17] jonahR: has joined #RubyOnRails
[17:22:34] joaomdmoura: has joined #RubyOnRails
[17:22:37] tubbo: dionysus69: yeah, if you're trying to learn rails stick with what you know...learn 1 new thing at a time.
[17:22:59] tubbo: it's difficult to debug problems whose origin is obfuscated
[17:23:16] dionysus69: tubbo: ok thanks, you just saved me a week of tinkering around haha
[17:23:18] jglover: has joined #RubyOnRails
[17:23:24] batasrki: has joined #RubyOnRails
[17:23:28] dionysus69: i was about to delete my hard drive
[17:23:37] tubbo: dionysus69: well that's just stupid :P
[17:23:39] krz: has joined #RubyOnRails
[17:23:50] tubbo: you *never* try out a whole new OS without at least having a trail back to where you started
[17:23:54] batasrki: oooh, what'd I miss?
[17:24:11] jglover: does Rails 4.2 config_for (loading yml files into your app) have to read the file every time, or does it only do it once?
[17:24:11] tubbo: batasrki: i saved dionysus69' job apparently ;)
[17:24:28] dionysus69: haha i have history of trying different flavors
[17:24:36] dionysus69: just wierdly enough never tried fedora
[17:26:05] tubbo: dionysus69: then i would highly advise the use of CentOS...as your hypervisor
[17:26:15] tubbo: just install bare KVM on it and run all your OS tryouts on each VM
[17:26:28] krisquigley: has joined #RubyOnRails
[17:26:28] tubbo: CentOS makes a really good hypervisor imho
[17:26:37] asheinfeld: has joined #RubyOnRails
[17:26:47] tubbo: maybe not in production but good enough to dev on
[17:27:10] drale2k: has joined #RubyOnRails
[17:27:21] jglover: http://stackoverflow.com/questions/9825970/is-it-efficient-to-load-a-yaml-file-as-a-constant-in-my-rails-controller seems like my assumption was wrong
[17:27:23] dionysus69: ye thats why I wanted to try it but you were right i ll stick with learning ror first
[17:28:07] tubbo: dionysus69: either way, it's ok because ubuntu works as a HV. you could use KVM to load up a CentOS VM and try it out
[17:28:40] maxshelley: has joined #RubyOnRails
[17:28:48] Maletor: has joined #RubyOnRails
[17:29:13] tubbo: jglover: every time you call config_for, it loads the file.
[17:29:19] baweaver: has joined #RubyOnRails
[17:29:29] dionysus69: ye i guess :s ugh I want like 10 lifetimes, I wanna go many different ways at the same time
[17:29:29] tubbo: there's no memoization going on in the source code
[17:29:39] dionysus69: damn it why is IT world so wide
[17:29:44] ogpastaling: has joined #RubyOnRails
[17:29:52] jglover: tubbo: it doesn't cache a yml file?
[17:30:01] tubbo: jglover: look at the source, you tell me :)
[17:30:11] tubbo: jglover: i don't see anywhere that such a provision for caching YAML configuration exists
[17:30:21] jglover: tubbo: Hm ok, what should I be doing then?
[17:30:40] tubbo: jglover: i actually know less about this than you. i heard about config_for at approximately 1:24pm EST, which is the moment you posted about it to this chatroom :)
[17:30:44] batasrki: jglover: what are you trying to accomplish?
[17:30:46] haz111: has joined #RubyOnRails
[17:31:05] jglover: for development, we have some developer specific Twilio configs, and I need to have a .gitignore'd config file in the repo, that loads the configuration
[17:31:16] tubbo: jglover: but if i were you, i'd just cache the value myself. @config ||= Rails.application.config_for('config/my_config.yml') in a method or something
[17:31:18] ascarter: has joined #RubyOnRails
[17:31:36] tubbo: jglover: if you're on Rails 4.2, can't you just stuff that shit into config/secrets.yml?
[17:31:47] tubbo: ohh, developer-specific :D
[17:32:21] thomcom: has joined #RubyOnRails
[17:32:37] jenrzzz: has joined #RubyOnRails
[17:32:58] zendrix: has joined #RubyOnRails
[17:33:04] jglover: tubbo: http://innovativethought.net/2009/01/02/making-configuration-files-with-yaml-revised/ may work
[17:33:12] chouhoul_: has joined #RubyOnRails
[17:33:58] batasrki: jglover: have you looked at Figaro?
[17:34:17] towski_: has joined #RubyOnRails
[17:34:51] Detch: has joined #RubyOnRails
[17:35:31] ascarter: has joined #RubyOnRails
[17:35:56] moretti: has joined #RubyOnRails
[17:36:40] volk_: has joined #RubyOnRails
[17:36:43] jwaldrip: has joined #RubyOnRails
[17:38:38] jwaldrip: has joined #RubyOnRails
[17:39:55] obelich: has joined #RubyOnRails
[17:39:57] duderonomy: has joined #RubyOnRails
[17:40:03] moeabdol2: has joined #RubyOnRails
[17:40:30] zendrix: has joined #RubyOnRails
[17:40:36] treehug88: I'm trying to mix in a Concern that makes all my AR::Base subclasses sort by id, but I can't get it to work. Anyone know how to get this to work? https://github.com/rubyrailhead/ar-default-orderby/compare/ar-concern-order-by
[17:40:47] jwaldrip: has joined #RubyOnRails
[17:41:22] treehug88: (the other non-master branched in that project show other ways to do it, but I'd love to get the functionality into AR::Base)
[17:41:48] obelich: some one here using carrierwave i have a troble trying to get access to model fields for some razon in create it give all fields in nil but in update it give data in the fields i need params from controller but i dont know how to send that params :(
[17:41:52] batasrki: treehug88: isn't it default behaviour to sort by ID?
[17:42:01] treehug88: batasrki def not
[17:42:06] yaw: has joined #RubyOnRails
[17:42:10] tubbo: treehug88: first of all, don't use default_scope...use that `scope :default` instead.
[17:42:13] tubbo: treehug88: !default_scope
[17:42:13] helpa: treehug88: http://www.innovationontherun.com/activerecord-default_scope-is-an-anti-pattern/
[17:42:33] tubbo: treehug88: second of all, you are including the module improperly. it should be ActiveRecord::Base.send :include, InIdOrder
[17:42:48] tubbo: i think it's because AR::Base is already defined or osmething
[17:42:52] treehug88: tubbo: can you get it to work? I tried lots of things
[17:42:54] jwaldrip: has joined #RubyOnRails
[17:43:54] mike___1234: has joined #RubyOnRails
[17:44:01] tubbo: treehug88: i just showed you how, you're simply including the module wrong...you should just do ActiveRecord::Base.send(:include, InIdOrder) within an initializer file. that should make this work.
[17:44:27] tubbo: treehug88: for example, https://github.com/plataformatec/devise/blob/1a0192201b317d3f1bac88f5c5b4926d527b1b39/lib/devise/orm/active_record.rb
[17:44:29] treehug88: I'll give that a shot, tubbo, thanks
[17:44:51] mello: has joined #RubyOnRails
[17:45:52] cac_: has joined #RubyOnRails
[17:46:04] gsd: has joined #RubyOnRails
[17:46:50] batasrki: so, no one here uses Redis Sentinel with Rails?
[17:47:22] obelich: not me im newbie in redis jejeje :P
[17:48:07] simplyianm: has joined #RubyOnRails
[17:48:49] jwaldrip_: has joined #RubyOnRails
[17:49:36] obelich: some one no busy can give some hand to get params in carrerwave class please
[17:50:11] joaomdmoura: has joined #RubyOnRails
[17:50:12] arooni-mobile: has joined #RubyOnRails
[17:50:40] ascarter: has joined #RubyOnRails
[17:52:16] ProLoser: has joined #RubyOnRails
[17:52:30] ascarter: has joined #RubyOnRails
[17:54:07] jwaldrip_: has joined #RubyOnRails
[17:54:33] hakunin: has joined #RubyOnRails
[17:54:58] rhizome: aren't there a lot of carrierwave howtos out there?
[17:55:20] sandelius: has joined #RubyOnRails
[17:56:23] obelich: yes i go to documentation rhizome and it say can access to the data in model or @model i can access but onli in update not in create :(
[17:57:07] obelich: rhizome im trying to find other way to send that information to my uploader class but realy dont have a idea how to and i already google it
[17:58:01] umgrosscol: has joined #RubyOnRails
[17:58:49] sarink: has joined #RubyOnRails
[17:59:28] cnk: has joined #RubyOnRails
[18:00:19] jkamenik: has joined #RubyOnRails
[18:03:36] obelich: has joined #RubyOnRails
[18:03:47] obelich: sorry i get link death
[18:03:50] ascarter: has joined #RubyOnRails
[18:03:55] rhizome: maybe it would be better for you to start out by implementing it the basic way first
[18:04:05] treehug88: tubbo, I tried what you suggested but it seems to have no effect: https://github.com/rubyrailhead/ar-default-orderby/compare/ar-concern-order-by?expand=1 . Any additional tips?
[18:04:14] mike___1234: has joined #RubyOnRails
[18:04:35] Pazician: has joined #RubyOnRails
[18:05:16] hahuang65: has joined #RubyOnRails
[18:05:59] michaeldeol: has joined #RubyOnRails
[18:06:02] moeabdol3: has joined #RubyOnRails
[18:06:29] adavia: tubbo: i found the problem and i needed to pass also the id attribute in the nested params
[18:06:33] adavia: which is weird
[18:06:44] tubbo: interesting
[18:06:44] baweaver: has joined #RubyOnRails
[18:08:24] obelich: rhizome are you talkin about carrierwave ?
[18:08:35] Scriptonaut: hey guys, with capybara if I go: page.body, it returns "", however expect(page).to have_selector('p') returns true. Anyone know how I can get the page.body, including html?
[18:08:51] treehug88: anyone else have suggestions on how to get https://github.com/rubyrailhead/ar-default-orderby/compare/ar-concern-order-by?expand=1 to work?
[18:10:48] nertzy: has joined #RubyOnRails
[18:11:25] dici: has joined #RubyOnRails
[18:11:41] borodin_: has joined #RubyOnRails
[18:12:53] simplyianm: has joined #RubyOnRails
[18:14:06] borodin_: anybody know how I can get assets to use a prefix for url's when I add a prefix as in http://guides.rubyonrails.org/routing.html 2.6
[18:14:12] jwaldrip_: has joined #RubyOnRails
[18:14:35] borodin_: the prefix works for urls generated, but the page views are requesting assets without the prefix
[18:14:43] borodin_: by absolute url's
[18:14:59] rhizome: Obelich: yes
[18:15:46] obelich: im using basic carrierwave the modification i use and in debug console is model.file and that is nil
[18:15:52] rhizome: Scriptonaut: what's wrong with the second way?
[18:16:05] rhizome: Obelich: i don't understand
[18:16:07] mike___1234: has joined #RubyOnRails
[18:16:14] obelich: rhizome sorry me english is bad :(
[18:16:23] rhizome: i know, that's ok. just use more words
[18:17:30] mikecmpbll: has joined #RubyOnRails
[18:17:41] mdcox: has joined #RubyOnRails
[18:18:35] Dopagod: has joined #RubyOnRails
[18:18:44] Dopagod: has joined #RubyOnRails
[18:19:00] rhizome: borodin_: google 'rails namespace assets'
[18:19:28] jwaldrip_: has joined #RubyOnRails
[18:20:29] mdcox: Hey all, quick question about organization. I need to define the criteria for what makes a User a Customer, but I don't really have a need for a User or Customer class since I'm really just using them for metrics and am not operating on them directly. So if I need to define the criteria for being a customer, should that be made into a model, or a function within a module, or...
[18:21:06] treehug88: just add a method that says if the user is a customer or not
[18:21:09] tubbo: mdcox: classes are cheap, why not create more objects?
[18:21:13] iamjarvo: has joined #RubyOnRails
[18:21:14] treehug88: or what tubbo said
[18:21:16] tubbo: not enough data that differs?
[18:21:24] __butch__: has joined #RubyOnRails
[18:21:36] rhizome: if you don't have users or customers in the app, what are you measuring?
[18:21:46] mdcox: tubbo: I can, it just doesn't feel totally significant you know? But that does feel the Ruby way...
[18:22:15] tubbo: mdcox: i'm also a little unsure as to how you plan to create a "model" when you don't want to create a User *or* Customer class
[18:22:19] tubbo: like, where does the data go then? :)
[18:22:24] Axsuul: has joined #RubyOnRails
[18:22:54] mdcox: rhizome: It's a standalone metrics app that pulls in streams of json from elsewhere. I guess I should make it more OO but it's so far it's just been functional, feeding everything in and storing the calculated stats.
[18:23:21] Papierkorb: I want to count number of views on all routes I have. (A 'view' is just a valid HTTP request). I'd like to record the controller- and action-name, and also all params passed to it. ??? So, how do I do this? Can I access the controller_name inside a before_filter?
[18:23:23] MrPunkin: has joined #RubyOnRails
[18:23:39] mdcox: Although now that people are saying things, I feel silly about the way this is done and I guess I have my answer, haha. Thanks everyone!
[18:23:47] rhizome: Papierkorb: that already exists. it's called a webserver log
[18:24:11] Papierkorb: rhizome: yeah but I'd like to have that in redis for easy access to it
[18:24:12] jordonbiondo: has joined #RubyOnRails
[18:24:18] gsd: has joined #RubyOnRails
[18:24:31] rhizome: what do you mean by "access?"
[18:24:53] Papierkorb: rhizome: like display "this page has been viewed 1234 times already" on a page
[18:25:49] gamma2: has joined #RubyOnRails
[18:26:12] rhizome: oh, i'd probably jsut put a record_request before_filter in the application controller and throw it to redis that way
[18:26:25] rhizome: record_request would be a method that does the write
[18:26:29] jenrzzz: has joined #RubyOnRails
[18:26:48] Papierkorb: rhizome: Thought of something like that, yeah. Do I already have the magic 'controller_name' variable (or method) in there?
[18:27:04] umgrosscol: has joined #RubyOnRails
[18:27:31] weaksauce: self.class.to_s probably works.
[18:28:20] rhizome: find_or_create_by(url: request.url).increment(:views)
[18:28:24] rhizome: something like that
[18:28:48] Papierkorb: rhizome: yeah, thanks, I'll figure something out
[18:28:50] gamma2: has left #RubyOnRails: ()
[18:29:26] simplyianm: has joined #RubyOnRails
[18:29:35] jwaldrip_: has joined #RubyOnRails
[18:30:30] bin_005: has joined #RubyOnRails
[18:30:58] sandelius: is it possible to use a block in a route? e.g get '/foo' do |req, res| or something similar. I don't need a whole controller for this simple task
[18:31:30] rhizome: if you're in rails, you're already in a controller
[18:31:54] kinduff: has joined #RubyOnRails
[18:31:54] kinduff: has joined #RubyOnRails
[18:32:04] sandelius: ahh I can add a rack endpoint
[18:33:16] jocuman: has joined #RubyOnRails
[18:33:54] asheinfeld: has joined #RubyOnRails
[18:34:07] batasrki: has left #RubyOnRails: ()
[18:34:26] Dingus: has joined #RubyOnRails
[18:34:47] zendrix: has joined #RubyOnRails
[18:35:06] tempspace: I have a rails app running on 1.9.3 that has a memory leak, one of the workers is at like 700 MB at the moment, what's the best way to peak inside?
[18:37:20] rhizome: what's the worker doing?
[18:38:31] thatkid: has joined #RubyOnRails
[18:38:44] Xiti`: has joined #RubyOnRails
[18:42:09] moeabdol3: has joined #RubyOnRails
[18:42:43] simplyianm: holy shit i just spent 30 minutes on the dumbest bug
[18:42:49] thatkid: Hello, I want to update a column with random values, How can I do that? I did something like this, Foo.update_all(:bar => [3,4,5].sample ) But that doesn't work, Is there any way to add values as random
[18:42:50] simplyianm: i was naming a controller method "send"
[18:42:57] simplyianm: and i was getting a wrong arguments error
[18:43:07] simplyianm: i need to learn
[18:43:44] rhizome: reserved words are common in pretty much every language
[18:43:54] jwaldrip_: has joined #RubyOnRails
[18:44:27] cnk: rhizome: yes but I don't think I would have guessed that send was reserved
[18:45:00] simplyianm: it's not a reserved word
[18:45:01] rhizome: it's a method on Object, which is inherited by almost everything
[18:45:02] asheinfeld: has joined #RubyOnRails
[18:45:04] simplyianm: it's a method
[18:45:39] cnk: OK how about 'it's special'
[18:45:39] rhizome: so i guess i was a little loose on my definition of reserved word
[18:46:07] simplyianm: 'it\'s special'
[18:46:10] coin3d: has joined #RubyOnRails
[18:46:18] yaw: has joined #RubyOnRails
[18:47:13] yaw: has joined #RubyOnRails
[18:47:56] SeanLazer: has joined #RubyOnRails
[18:49:17] Axsuul: has joined #RubyOnRails
[18:49:34] jwaldrip_: has joined #RubyOnRails
[18:51:58] fragamus: has joined #RubyOnRails
[18:53:13] steve0hh: has joined #RubyOnRails
[18:54:57] kadoppe: has joined #RubyOnRails
[18:57:34] treehug88: help? https://groups.google.com/forum/#!topic/rubyonrails-talk/o9Qbl6GTFDs
[18:58:32] MrPunkin: has left #RubyOnRails: ()
[18:58:50] jwaldrip_: has joined #RubyOnRails
[18:59:38] Oog: has joined #RubyOnRails
[18:59:45] Oog: how do i specify the routing table with redirect_to ?
[18:59:50] IanVorn118: has joined #RubyOnRails
[18:59:56] Oog: im using rails_admin doing redirct_to failing because using wrong table
[18:59:57] sonofdirt: has joined #RubyOnRails
[19:00:12] Senjai: Oog: Step 1, dont use rails admin :P
[19:00:16] Pazician: has joined #RubyOnRails
[19:00:42] Senjai: Oog: !admin
[19:00:42] helpa: Oog: 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.
[19:00:59] rhizome: you don't redirect to a table
[19:01:47] Oog: Senjai: best practice is really to reinvent the wheel?
[19:01:52] Oog: like writing wrails_admin is not a 5 minute thing
[19:02:13] solars: has joined #RubyOnRails
[19:02:21] Samba: has joined #RubyOnRails
[19:02:37] Senjai: Oog: Admins are very very rarely generic. They're almost always business specific.
[19:02:41] Senjai: It's not reinventing the wheel
[19:02:58] Senjai: Your logic is the same as "Why create an App when there are already Apps?"
[19:03:43] Senjai: And writing admin controllers behind devise really is a 5 minute thing. It isn't too difficul
[19:03:47] Oog: i agree custom admin will be nice sometime
[19:03:50] qwertme: has joined #RubyOnRails
[19:03:52] Senjai: More if you want fancy styles
[19:03:53] ProLoser: has joined #RubyOnRails
[19:03:59] Oog: how/why is devise different
[19:04:04] jwaldrip_: has joined #RubyOnRails
[19:04:26] Senjai: Devise gets rid of the authentication issue
[19:04:36] tubbo: Oog: check out the http://github.com/plataformatec/devise repo and wiki
[19:04:37] Senjai: Combine it with cancan or something for authorization, and life is just easy
[19:04:39] tubbo: its just user auth
[19:04:42] tubbo: cancan blows
[19:04:44] tubbo: use pundit
[19:04:45] joelataylor: has joined #RubyOnRails
[19:04:51] iamjarvo: has joined #RubyOnRails
[19:04:54] Senjai: tubbo: They're different. I may be taking a swing at making cancan better
[19:04:56] Oog: this gives me the nice ui of rails-admin
[19:04:57] tubbo: this conversation is turning into http://blog.circleci.com/its-the-future/
[19:05:00] Oog: thats what i want not authentication
[19:05:03] snockerton: has joined #RubyOnRails
[19:05:31] tubbo: Oog: unfortunately i've found that gems like rails_admin and active_admin tend to break down when you require more complex admin-panel logic
[19:05:31] iamjarvo: has joined #RubyOnRails
[19:05:45] tubbo: Oog: i wouldn't say "just don't use it", but i would say "there are very few needs for something like that"
[19:05:46] Oog: tubbo: were already seeing limitations
[19:05:51] Senjai: I would say just don't use it
[19:05:59] Oog: but its great right now - i can see my users
[19:06:05] Oog: etc without using rails console...
[19:06:06] Senjai: Oog: If you keep it, you'll have to eventually remove it, and thats harder than doing it correctly the first time
[19:06:08] Oog: its 100 times better
[19:06:14] tubbo: Oog: like if you just need a way to visualize your data in your app or play with it, and you're like the only one who needs to see it, that's fine
[19:06:25] iamjarvo: has joined #RubyOnRails
[19:06:25] Oog: yeah thats like where ia m
[19:06:33] tubbo: but if you need to have salespeople or non-techy folks use the thing, they'll inevitably want things that seem easy but are actually very difficult in RA or AA.
[19:06:43] Oog: yeah nope dont need that
[19:06:49] Oog: not right now i know well get there
[19:06:59] Oog: anyway so no way to redirect_to what route table to use?
[19:07:03] Oog: i should just hardcode the route?
[19:07:08] iamjarvo: has joined #RubyOnRails
[19:07:11] FCser: has joined #RubyOnRails
[19:07:19] jstanton: has joined #RubyOnRails
[19:07:33] Oog: i got to run - thanks for the help
[19:07:35] rhizome: first you should let us know what you're talking about
[19:07:37] Oog: be back later
[19:07:47] iamjarvo: has joined #RubyOnRails
[19:07:58] chrisja: has joined #RubyOnRails
[19:08:02] DEA7TH: has joined #RubyOnRails
[19:08:07] IanVorn118: has joined #RubyOnRails
[19:08:23] krisquigley: has joined #RubyOnRails
[19:08:25] iamjarvo: has joined #RubyOnRails
[19:09:03] iamjarvo: has joined #RubyOnRails
[19:09:05] jwaldrip_: has joined #RubyOnRails
[19:09:36] iamjarvo: has joined #RubyOnRails
[19:09:41] SteenJobs: has joined #RubyOnRails
[19:10:14] iamjarvo: has joined #RubyOnRails
[19:10:32] IanV0rn: has joined #RubyOnRails
[19:10:51] iamjarvo: has joined #RubyOnRails
[19:11:34] iamjarvo: has joined #RubyOnRails
[19:12:19] iamjarvo: has joined #RubyOnRails
[19:12:57] stesind: has joined #RubyOnRails
[19:12:57] iamjarvo: has joined #RubyOnRails
[19:13:38] iamjarvo: has joined #RubyOnRails
[19:14:01] baweaver: has joined #RubyOnRails
[19:14:07] jwaldrip_: has joined #RubyOnRails
[19:14:30] iamjarvo: has joined #RubyOnRails
[19:14:33] BootstrapRails: has joined #RubyOnRails
[19:15:03] iamjarvo: has joined #RubyOnRails
[19:15:40] iamjarvo: has joined #RubyOnRails
[19:15:49] Pazician: has joined #RubyOnRails
[19:16:20] iamjarvo: has joined #RubyOnRails
[19:17:00] iamjarvo: has joined #RubyOnRails
[19:17:31] sarink: has joined #RubyOnRails
[19:17:39] iamjarvo: has joined #RubyOnRails
[19:18:00] BootstrapRails: Hi! I'm trying to use a query (Query B) that currently is preventing me from accessing "belongs_to" and "has_many" for each object, I found an alternative way (Query A) to do it but it's too slow. Can anyone help? Please have a look http://pastie.org/10234155
[19:18:11] iamjarvo: has joined #RubyOnRails
[19:18:57] iamjarvo: has joined #RubyOnRails
[19:19:25] skkeeper: has joined #RubyOnRails
[19:19:35] iamjarvo: has joined #RubyOnRails
[19:20:01] srinidhi: has joined #RubyOnRails
[19:20:19] iamjarvo: has joined #RubyOnRails
[19:20:51] cac_: has joined #RubyOnRails
[19:20:57] Lightsword: has joined #RubyOnRails
[19:20:59] bdnelson: has joined #RubyOnRails
[19:21:00] iamjarvo: has joined #RubyOnRails
[19:21:31] BootstrapRails: Hi! I'm trying to use a query (Query B) that currently is preventing me from accessing "belongs_to" and "has_many" for each object, I found an alternative way (Query A) to do it but it's too slow. Can anyone help? Please have a look http://pastie.org/10234155
[19:21:34] iamjarvo: has joined #RubyOnRails
[19:22:12] rubyonrailed: I just setup a csv downloader and I want to change true/false values to Yes and No. Does anyone have a tutorial for doing this?
[19:22:44] iamjarvo: has joined #RubyOnRails
[19:22:52] Papierkorb: yes_or_no = the_bool and "Yes" or "No"
[19:23:20] dstarh: BootstrapRails have you looked at active-record preloaders?
[19:24:37] BootstrapRails: dstarh: the question is does Query A preloads anything?
[19:25:43] dstarh: Unless you either call ActiveRecord.Preloader.new (i think thats the class) or add a .includes(:some_association) it won't preload anything by default
[19:25:44] BootstrapRails: dstarh: And can I use active record preloaders with find_by_sql?
[19:26:58] dstarh: you should be able to do ActiveRecord::Associations::Preloader.new.preload(records, associations)
[19:26:59] BootstrapRails: dstarh: So I'm not preloading anything on Query A, why does Query A works and Query B does not?
[19:27:24] cmisenas: has joined #RubyOnRails
[19:27:30] dstarh: where records is the collection back from find_by_sql and associations is the hash of objects you want preloaded
[19:27:42] pullphinger: has joined #RubyOnRails
[19:28:00] podman: has joined #RubyOnRails
[19:28:01] dstarh: what do you mean Query B does not work
[19:28:17] dstarh: and what do you mean that it "prevents" you from accessing a belongs_to
[19:28:18] pullphinger: has joined #RubyOnRails
[19:28:57] rubyonrailed: has joined #RubyOnRails
[19:29:00] jenrzzz: has joined #RubyOnRails
[19:29:04] SteenJobs: I changed the routes for Devise sign_out, and i repeatedly get an error that there???s no GET request for ???/sign_out???, because of the fact that i defined the route as a delete request - however, when I define the route as a GET request, it works properly - does this sound like a case of two negatives making a positive?
[19:29:05] dstarh: also you should avoid sub-selects whenever possible
[19:29:09] jwaldrip_: has joined #RubyOnRails
[19:30:00] dstarh: SteenJobs are you actually sending an HTTP DELETE?
[19:30:15] SteenJobs: dstarh: yessir. i defined method: :delete in the view file
[19:30:47] x-light: has joined #RubyOnRails
[19:30:54] dstarh: and it's doing a post or a get request with that link?
[19:31:22] dstarh: the logout link that is
[19:31:25] rhizome: links are GETs
[19:31:25] SteenJobs: dstarh: yea it???s doing a GET req, checked the server logs
[19:31:45] SteenJobs: dstarh: and that???s why it???s throwing an error that there???s no GET route
[19:31:54] SteenJobs: rhizome: unless you define the method of the link as :delete....
[19:31:59] sonofdirt: has joined #RubyOnRails
[19:32:03] BootstrapRails: dstarh: If I get a user from Query A and do user.user_group (user belongs_to user_group) it works, but if I do the same with Query B it doesn't work and I get the error undefined method 'user_group'.
[19:32:06] rhizome: links shouldn't change the database
[19:32:14] rhizome: s/database/state
[19:32:37] SteenJobs: rhizome: it???s deleting a session???
[19:32:43] dstarh: yeah i don't think that get requests will translate the method to post, put or delete, i think that's only on a post where it can be translated
[19:32:44] rhizome: better to use button_to and style it as a link
[19:32:49] diegoviola: has joined #RubyOnRails
[19:33:03] rhizome: that's my opinion
[19:34:04] jwaldrip_: has joined #RubyOnRails
[19:34:11] BootstrapRails: If I get a user from Query A and do user.user_group (user belongs_to user_group) it works, but if I do the same with Query B it doesn't work and I get the error undefined method 'user_group'. Why does this happens ? Please have a look on http://pastie.org/10234155
[19:34:13] SteenJobs: dstarh: when the route is a GET it deletes the session properly and logs the user out
[19:34:22] boom1992: has joined #RubyOnRails
[19:34:37] SteenJobs: rhizome: not sure why that should make any difference. think about any logout link. they???re not buttons, and they send a delete request to the sessions controller.
[19:34:47] ajax0xd9: has joined #RubyOnRails
[19:35:02] SteenJobs: rhizome: that???s totally normal practice
[19:35:26] SteenJobs: rhizome: the only odd bit is that when i send it as a GET, it works properly, so i???m worried that???s indicative of an error somewhere else in my code.
[19:35:30] dstarh: SteenJobs rails will translate posts that come in with method: :delete to an http delete, it's simulating it, with get request, it does not
[19:35:48] SteenJobs: dstarh: ha i???m aware.
[19:36:00] SteenJobs: dstarh: but the fact is, as a GET req it works properly.
[19:36:16] dstarh: you're not matching the route
[19:36:28] dstarh: if you define the route with DELETE it has to be a delete reqeust
[19:36:35] dstarh: you're only ever sending gets
[19:36:47] BootstrapRails: dstarh: Any idea why this happens?
[19:36:55] dstarh: no matter what you've got method set to in your link_to
[19:37:08] SteenJobs: dstarh: when i define the route with DELETE, and send it as a delete request it does NOT work
[19:37:17] SteenJobs: dstarh: which is why this situation is so weird
[19:37:20] dstarh: how are you sending it a delete request
[19:37:35] dstarh: SteenJobs code sample
[19:37:39] SteenJobs: link_to ???foobar???, sign_out_path, method: :delete
[19:38:04] BootstrapRails: Can anyone help?
[19:38:04] SteenJobs: dstarh: DELETE ???/sign_out??? => sessions#destroy
[19:38:06] rubyonra_: has joined #RubyOnRails
[19:38:10] BootstrapRails: Can anyone help?
[19:38:21] BootstrapRails: If I get a user from Query A and do user.user_group (user belongs_to user_group) it works, but if I do the same with Query B it doesn't work and I get the error undefined method 'user_group'. Why does this happens ? Please have a look on http://pastie.org/10234155
[19:38:33] edwinvdgraaf: has joined #RubyOnRails
[19:39:06] weaksauce: BootstrapRails stop begging for help... it's rule 10
[19:39:10] SteenJobs: BootstrapRails: Don???t keep reposting if no one responds, just wait.
[19:39:16] rhizome: BootstrapRails: on what line of your pastie does the term "user_group" appear?
[19:39:20] weaksauce: https://gist.github.com/radar/996779
[19:39:32] user121212: has joined #RubyOnRails
[19:39:32] SteenJobs: weaksauce: sup brothaaa
[19:39:39] weaksauce: how goes it SteenJobs
[19:39:56] SteenJobs: BootstrapRails: out of curiosity, why are you using SQL syntax rather than Rails to make a query?
[19:40:00] SteenJobs: weaksauce: been too long!
[19:40:00] smathy: BootstrapRails, your first query is returning User objects, the second is returning Kin objects.
[19:40:23] SteenJobs: smathy: sup brothaaa! awesome to see you too!
[19:40:29] smathy: BootstrapRails, you can't call associations defined in your User class on a Kin instance.
[19:40:37] user121212: Is there any analytic tools to track and visualize db queries?
[19:40:45] BootstrapRails: rhizome: it doesn't, so if I do @elements.first.user_group.name, that is when the error appears if I use Query B.
[19:40:46] smathy: SteenJobs, hi there, I'm very well. You?
[19:40:48] apofis: has joined #RubyOnRails
[19:41:06] sarink: has joined #RubyOnRails
[19:41:11] rhizome: BootstrapRails: do we already know what your associations are?
[19:41:17] smathy: BootstrapRails, I've explained that to you already.
[19:41:18] BootstrapRails: SteenJobs: I do that on Query A, but that is slower
[19:41:37] smathy: rhizome, all they've said is that User belongs_to :user_group, they've said nothing about Kin.
[19:41:46] SteenJobs: smathy: doing pretty well, we need to have our regular start-up catch up chat
[19:42:02] BootstrapRails: smathy: AHHHH so I have to invert the query?
[19:42:13] smathy: SteenJobs, yeah, I moved to Jackson last week.
[19:42:14] sjuxax: has joined #RubyOnRails
[19:42:30] smathy: BootstrapRails, well, you have to call a method on User not Kin.
[19:43:08] Macaveli: has joined #RubyOnRails
[19:43:16] BootstrapRails: smathy: let me try that to see if it works, but it makes sense..
[19:43:20] sjuxax: Hello. I have a form that allows the user to add a dynamic number of some model. When submitted, I want to say something like params.require(:model = []) and have it pass through person[0], person[1], person[2], etc. How can we resolve that?
[19:43:39] leex: Is anyone here using active model serializer 0.9.3 and knows how to get get it working with rspec and serialization_options? Because if I hand an serialization_option to the serilizer during a render this option is passed to the serializer and gets serialized correclty, but if I try to do the same from rspec via FooBarSerializer.new(@foobar, my_option: "baz") it just ignores that value
[19:43:55] alexclark: has joined #RubyOnRails
[19:44:07] ruv: has joined #RubyOnRails
[19:44:24] jgpawletko: has joined #RubyOnRails
[19:44:43] alexclark: I'm trying to write a controller test and i keep getting a 302 as my response. could someone please help me?
[19:45:00] ruv: Are lookup tables possible and if so where can I find a good example.
[19:45:02] Pazician: has joined #RubyOnRails
[19:45:11] weaksauce: sjuxax If I am reading that correctly, strong parameters is not really what you want for that.
[19:45:32] rhizome: sjuxax: strong params docs cover that
[19:45:32] BootstrapRails: smathy: OMG, I love you! It worked like a charm and I learned something new at the same time :) Double win !
[19:45:47] weaksauce: SteenJobs indeed. how's it going?
[19:45:53] tubbo: ruv: what
[19:45:56] sonofdirt: has joined #RubyOnRails
[19:45:59] leex: alexclark: if you post some code in a gist, then yes :)
[19:46:01] smathy: BootstrapRails, you're welcome.
[19:46:04] tubbo: what's a "lookup table"? like a rainbow table?
[19:46:16] alexclark: https://gist.github.com/alexclarkofficial/09d8ad2932f20e05c953 leex was working on it as you spoke
[19:46:59] ruv: tubbo, a lookup table, a table with predefined table
[19:47:08] smathy: tubbo, no, just a table dedicated to mapping keys to values.
[19:47:17] smathy: tubbo, thing {}.freeze
[19:47:26] tubbo: ruv: yeah you can do that :D
[19:47:31] baweaver: has joined #RubyOnRails
[19:47:39] cmisenas: has joined #RubyOnRails
[19:47:47] leex: alexclark: well the error seems to be in your controller ;)
[19:48:01] ruv: tubbo, know where I can find a good value
[19:48:32] alexclark: leex: uh oh. not sure if gists allow code as long as that controller action haha :|
[19:48:32] tubbo: ruv: still not entirely sure of your question, the way i see it you're looking for LOOKUP_TABLE = { key: 'value' }.freeze
[19:48:43] tubbo: ruv: but your question *must* be more complicated than that...
[19:48:56] Lightsword: has joined #RubyOnRails
[19:49:50] leex: alexclark: ah sorry you said 302, so a redirect, so your routing seems to be off? or try put :create, format: :json, id: ... title: ...
[19:50:57] meoblast001: has joined #RubyOnRails
[19:51:01] maz-dev: has joined #RubyOnRails
[19:51:03] alexclark: leex: ahh i think that might work
[19:51:18] leex: alexclark: ping me if it doesn't
[19:51:27] ruv: tubbo, so I have a table called hosts and another called os. I want os to be a lookup table and have a foreign key on hosts to match an os.
[19:51:31] alexclark: leex: nope, still 302
[19:51:42] DCio: has joined #RubyOnRails
[19:52:08] DCio: anyone good with dynamic form population ajax type stuff?
[19:52:36] smathy: ruv, have you read the ActiveRecord guides here: http://guides.rubyonrails.org/index.html ?
[19:52:51] smathy: ruv, there's nothing complex in what you're asking, it's a simple association.
[19:53:01] smathy: ...like any other in Rails.
[19:53:05] leex: alexclark: 302 indicates a redirect, I am not sure they are followed during testing
[19:53:21] ruv: smathy, everytime i try it I get multiple entries in the os table.
[19:53:46] k4nd4lf: has joined #RubyOnRails
[19:53:47] alexclark: leex: I think theres a method for that in integration tests
[19:53:49] Coldblackice: has joined #RubyOnRails
[19:54:01] alexclark: not sure if this should be an intergration or a controller test
[19:54:24] alexclark: anyways found this in the routes `put 'notes/:id' => "notes#create" `
[19:54:39] alexclark: should that be giving me a redirect?
[19:54:49] dented42: has joined #RubyOnRails
[19:55:07] jenrzzz: has joined #RubyOnRails
[19:55:11] smathy: ruv, !gist
[19:55:11] helpa: ruv: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:56:01] smathy: alexclark, all Rails's default write actions redirect on success, so yes, that redirects if it's successful.
[19:56:03] leex: alexclark: try put :create, format: :json, id: your_id, rest: {...}
[19:58:02] gr1zzlybe4r: has joined #RubyOnRails
[19:58:15] ValicekB: has joined #RubyOnRails
[19:58:36] Lightsword: has joined #RubyOnRails
[19:59:23] alexclark: smathy: I think you could have just set me straight
[19:59:36] smathy: alexclark, excellent :)
[19:59:38] gr1zzlybe4r: is there a Rails way of doing dynamic sorting on a page? I'm thinking like changing the way that all of my stored records are shown on my index.html.erb page based on a radio button input. I want it to change without a page reload, though. I've done this with Angular but was wondering if there was Rails specific way to do it.
[19:59:40] alexclark: so should i be able to do `puts "THE NEW TITLE IS " + note.reload.title` and see the new title?
[19:59:50] alexclark: leex: the format really helped, thanks!
[20:00:23] Parker0: has joined #RubyOnRails
[20:00:40] Sigma00: alexclark: no. You'll have to use javascript on your end to update the DOM. Also the JSON reply won't need a reload of the model
[20:00:56] lessless: has joined #RubyOnRails
[20:00:58] alexclark: Sigma00: what?!
[20:01:17] Sigma00: I jumped in at midpoint, but you're talking about async forms, right?
[20:01:20] iamjarvo: has joined #RubyOnRails
[20:01:27] alexclark: nope testing
[20:01:35] Sigma00: then I said nothing
[20:01:37] cac_: has joined #RubyOnRails
[20:01:44] simplyianm: has joined #RubyOnRails
[20:01:47] DigitallyBrn: has joined #RubyOnRails
[20:01:54] alexclark: Sigma00: hahaha no worries
[20:02:20] Sigma00: all I saw was JSON blablabla, mind immediately went to that
[20:02:25] bmalum: has joined #RubyOnRails
[20:03:46] alexclark: shit my tests still not working
[20:03:50] tannerj: has joined #RubyOnRails
[20:03:53] arup_r: has joined #RubyOnRails
[20:04:28] leex: alexclark: good, so what's failing now?
[20:05:06] tubbo: has joined #RubyOnRails
[20:05:22] alexclark: leex: the success assertion was just a debug assertion
[20:05:42] alexclark: leex: now im trying to update the note and check the updated_at timestamp after the update
[20:06:30] alexclark: leex: but i cant prove the note updated and whats worse is that the assertion fails by ms sometimes and passes others
[20:06:53] leex: alexclark: ok, I would leave the expect(response).to have_http_status(:ok)
[20:07:02] leex: alexclark: in your case assert succes
[20:07:11] leex: alexclark: what are you getting back?
[20:07:40] alexclark: which i should get from an update
[20:07:40] Sigma00: you should get a 302 sending you to show/:id
[20:07:50] Sigma00: er, the #show action I mean
[20:08:23] x1337807x: has joined #RubyOnRails
[20:08:34] alexclark: Sigma00: it's going to respond with json. would that still send me the 302?
[20:08:35] Sigma00: alexclark: is that gist above still what your tests look like, mostly?
[20:09:40] bendangelo: has joined #RubyOnRails
[20:09:52] Sigma00: alexclark: depends on your controller
[20:10:14] Sigma00: you should return an OK response
[20:10:36] alexclark: Sigma00: ok, what are some keywords i can search for? It's 120 lines of hot trash
[20:11:02] Sigma00: alexclark: anyhow, if that's how your tests look... assert_equal new_updated_at, (original_updated_at + 2), note.title <-- why are you adding two to the original_updated_at?
[20:11:16] Sigma00: just check that the new time is bigger
[20:11:38] alexclark: oh, to make it fail. sorry
[20:11:54] alexclark: when i took that out i have intermittent failure
[20:13:03] yfeldblum: has joined #RubyOnRails
[20:13:32] Sigma00: what's the intermittent failure?
[20:13:39] netzfisch: has joined #RubyOnRails
[20:14:26] jcaho: has joined #RubyOnRails
[20:15:05] alexclark: Sigma00: I'll update gist. one sec
[20:15:17] tannerj: has joined #RubyOnRails
[20:16:32] Maletor: has joined #RubyOnRails
[20:16:32] alexclark: https://gist.github.com/alexclarkofficial/09d8ad2932f20e05c953
[20:16:51] alexclark: updated. it's passing everytime right now, but i want it to fail
[20:17:12] dented42: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[20:17:12] alexclark: if it fails its a difference of ms
[20:17:28] Pazician: has joined #RubyOnRails
[20:17:36] qejk: has joined #RubyOnRails
[20:17:48] Sigma00: oh, wait, you're sending :create instead of :update
[20:18:20] alexclark: Sigma00: yeah, theres no update action
[20:18:32] Sigma00: and your create action is updating?
[20:18:44] alexclark: yeah, awesome right?
[20:19:16] _djbkd: has joined #RubyOnRails
[20:19:25] tannerjones10: has joined #RubyOnRails
[20:19:57] Sigma00: only if you do it right :P
[20:21:49] alexclark: haha nothings done right
[20:21:50] Pazician: has joined #RubyOnRails
[20:21:53] siddart: has joined #RubyOnRails
[20:21:58] tannerjones10: has left #RubyOnRails: ()
[20:22:18] philcrissman: has joined #RubyOnRails
[20:22:56] Sigma00: alexclark: add a delay between the creation of the note and your PUT
[20:22:57] IanV0rn: has joined #RubyOnRails
[20:23:16] sdwrage: has joined #RubyOnRails
[20:23:31] alexclark: Sigma00: the whole point is that im testing an update
[20:23:35] alexclark: i need the note to update
[20:24:00] alexclark: response.body is this `<html><body>You are being <a href="http://test.host/">redirected</a>.</body></html>`
[20:24:07] Sigma00: alexclark: your test runs quickly, so the timestamp doesn't change between the @dan.notes.create and the put :create
[20:24:34] Pazician_: has joined #RubyOnRails
[20:24:58] Sigma00: so add sleep 0.2 between them
[20:25:27] Sigma00: ^ and now we hopefully get a better idea
[20:25:34] alexclark: Sigma00: but i need to be able to show that note.title has changed
[20:25:45] Sigma00: how does my suggestion affect that?
[20:26:42] tannerj: has joined #RubyOnRails
[20:26:59] alexclark: Sigma00: it doesnt and its actually pretty smart haha
[20:27:12] alexclark: um, ok so its definitely going to pass now
[20:27:18] alexclark: how can i get it to fail
[20:27:18] Sigma00: s/pass/fail
[20:27:33] bin_005_j: has joined #RubyOnRails
[20:27:37] Sigma00: alexclark: it should fail, since new_updated_at should be different
[20:27:41] Sigma00: and you're asserting equality
[20:27:53] alexclark: Sigma00: yes
[20:28:19] jtperreault: Hello all. If I branch for features and 2 different features both have a migrations, will I run into trouble if the more recent migration is merged in and run first?
[20:28:24] Sigma00: yes it fails or yes it should but the rules of reality have been suspended?
[20:28:31] Hates_: why are you even testing updated_at?
[20:28:43] Sigma00: Hates_: 29 test "superadmin does not affect updated_at" do
[20:28:49] Sigma00: I'm assuming that's whhy ^
[20:29:12] alexclark: Sigma00: yeah, it should fail, but it passes. TDD!
[20:29:13] creature: has joined #RubyOnRails
[20:29:22] x-light: has joined #RubyOnRails
[20:29:42] Sigma00: alexclark: and you put the sleep after the create but before the put?
[20:30:11] Sigma00: and your last line still reads "assert_equal new_updated_at, original_updated_at, note.title"
[20:30:53] Hates_: still sounds like something that should be in a controller test rather than a functional test
[20:31:01] codepete: has joined #RubyOnRails
[20:31:07] Sigma00: alexclark: oh, dude, reload your model after the PUT
[20:31:36] rhizome: "does not affect" implies assert_equal should pass. am i high?
[20:31:41] barnex: has joined #RubyOnRails
[20:31:42] alexclark: `note.reload` ?
[20:31:49] Sigma00: rhizome: yes, but only after he writes the code to do that
[20:31:52] Sigma00: alexclark: yea sure
[20:32:12] alexclark: Sigma00: that worked!
[20:32:17] barnex: hey, what would be the rails-correct plural of 'sms'?
[20:32:19] rhizome: yes, reload
[20:32:35] alexclark: for some reason i did note.reload.title and it wasnt giving me what i wanted
[20:32:44] tannerj: Good Morning, I've just started using rspec/rspec-rails and I'm testing my model validations using Factory Girl like so: expect(build(:user, first_name: nil)).to_not be_valid etc... This is working but after taking a look at the rdoc for RSpec-Rails the be_valid matcher is part of a private api. (http://www.rubydoc.info/gems/rspec-rails/RSpec/Rails/Matchers#be_valid-instance_method) Am I going about t
[20:32:48] Sigma00: alexclark: note.reload.title should also work tbh
[20:32:50] tannerj: his the wrong way or is this how I should be testing ActiveRecord validations? Thanks.
[20:32:52] rhizome: it's an initialism, so who cares
[20:33:10] barnex: rhizome: uh, I don't think so: new_smse GET /smses/new(.:format) smses#new
[20:33:20] barnex: new_smse doesn't sound great ;o
[20:33:24] rhizome: well it's probably not an existing inflection
[20:33:29] Hates_: barnex: you have to add an inflection
[20:33:37] Sigma00: .g add inflection to rails
[20:33:38] alexclark: i even did Note.find(note.id).title and it wasnt working... so i have no ideas anymore
[20:33:44] pipework: !inflections
[20:33:52] pipework: dammit helpa
[20:33:59] Hates_: !botsnack
[20:33:59] helpa: Nom nom. Thanks, Hates_!
[20:34:11] Sigma00: oh, right, it just LMGTFY
[20:34:11] centrx: has joined #RubyOnRails
[20:34:32] Hates_: tannerj: you should be checking it has errors
[20:34:33] barnex: helpa: thanks, I googled it myself :3
[20:34:52] barnex: the acronym method seems like it might be useful
[20:35:14] asheinfeld: has joined #RubyOnRails
[20:35:22] tannerj: Hates_: ahh, Thanks. I knew that what I was doing didn't feel right.
[20:36:31] Hates_: tannerj: not sure the best syntax in rspec 3 though
[20:36:41] Pazician: has joined #RubyOnRails
[20:37:41] tannerj: Hates_: Yea, I'll do some digging. Thanks for pointing me in the right direction.
[20:37:50] centrx: has joined #RubyOnRails
[20:37:59] arBmind: has joined #RubyOnRails
[20:38:39] jamto11: has joined #RubyOnRails
[20:39:55] sinkensabe: has joined #RubyOnRails
[20:40:41] commondream: has joined #RubyOnRails
[20:40:56] tannerj: has left #RubyOnRails: ("Thanks for the help!")
[20:42:41] ogpastal_: has joined #RubyOnRails
[20:43:00] kinduff: has joined #RubyOnRails
[20:43:49] bdnelson: has joined #RubyOnRails
[20:47:27] SeriousMatters: has joined #RubyOnRails
[20:47:45] startupality: has joined #RubyOnRails
[20:49:12] kinduff: Got a couple of Users inside my db but I need to move those records to another table. How can I keep user passwords while doing this?
[20:49:20] kinduff: I'm using Devise
[20:49:26] alexclark: has joined #RubyOnRails
[20:50:08] Senjai: kinduff: It has an encrypted_password field
[20:50:12] Senjai: just copy that over
[20:50:19] Senjai: password and password_confirmation are not stored in the database
[20:50:46] kinduff: Senjai, thanks a lot. Just wanted to be sure :)
[20:50:47] Pazician: has joined #RubyOnRails
[20:50:51] centrx: has joined #RubyOnRails
[20:51:25] SeriousMatters: I think the salt is included in that field. just copying should be fine
[20:52:10] tvw: has joined #RubyOnRails
[20:52:16] jenrzzz: has joined #RubyOnRails
[20:55:47] SeriousMatters: using ActiveRecord::Base.connection.execute to run custom SQL. the output has duplicated columns.
[20:56:31] SeriousMatters: [{"id"=>1, "credits"=>50, 0=>1, 1=>50}, {"id"=>2, "credits"=>34.5, 0=>2, 1=>34.5}]
[20:57:13] SeriousMatters: what are those numbered columns? can I get rid of them?
[20:57:14] krisquigley: has joined #RubyOnRails
[20:58:00] fortunate: has joined #RubyOnRails
[20:59:32] Cyberheb: has joined #RubyOnRails
[21:00:08] sonofdirt: has joined #RubyOnRails
[21:00:33] SeriousMatters: I run the same sql query directly on database and not getting those numbered columns. so they are from rails. I don't understand
[21:01:39] borodin_: has joined #RubyOnRails
[21:01:49] bronson_: has joined #RubyOnRails
[21:02:07] willharrison: has joined #RubyOnRails
[21:02:11] Sigma00: SeriousMatters: how are you using the result?
[21:02:30] SeriousMatters: logger.info(result)
[21:02:32] _djbkd: has joined #RubyOnRails
[21:03:00] SeriousMatters: Sigma00: render :json => result
[21:03:26] jamto11_: has joined #RubyOnRails
[21:04:03] mike___1234: has joined #RubyOnRails
[21:04:18] gsd: has joined #RubyOnRails
[21:04:26] Sigma00: dunno what to tell you, ActiveRecord::Base.connection.execute doesn't add those columns for me when I try result.to_json
[21:04:50] Shidash: has joined #RubyOnRails
[21:04:54] rhizome: why are you using connection_execute?
[21:05:45] SeriousMatters: rhizome: because I am not returning anything related to a model
[21:05:58] asheinfeld: has joined #RubyOnRails
[21:06:10] Radar: GOOD MORNING
[21:06:18] SeriousMatters: rhizome: and i have subquery in my sql
[21:06:58] rhizome: i imagine the extra data has to do with all that
[21:07:33] Blizzy: has joined #RubyOnRails
[21:08:53] edwinrozario: has joined #RubyOnRails
[21:08:59] SeriousMatters: note that the extra data is duplicate of what I am selecting.
[21:09:41] sinkensabe: has joined #RubyOnRails
[21:09:45] SeriousMatters: but with numbered keys
[21:10:37] ur5us: has joined #RubyOnRails
[21:11:05] Sigma00: I tried a select * from, got no numerical columns
[21:11:46] jonahR: has joined #RubyOnRails
[21:11:54] baweaver: has joined #RubyOnRails
[21:12:33] Sigma00: I'm on rails 4.2 though
[21:13:10] nym: has joined #RubyOnRails
[21:13:24] ogpastaling: has joined #RubyOnRails
[21:14:47] simplyianm: has joined #RubyOnRails
[21:17:12] SeriousMatters: Rails 4.2.1 here
[21:18:52] ascarter: has joined #RubyOnRails
[21:19:41] blackmesa: has joined #RubyOnRails
[21:20:42] ascarter: has joined #RubyOnRails
[21:20:47] jocuman: has joined #RubyOnRails
[21:22:23] ascarter: has joined #RubyOnRails
[21:24:04] jamto11: has joined #RubyOnRails
[21:24:08] ascarter: has joined #RubyOnRails
[21:25:07] Frem: has joined #RubyOnRails
[21:25:22] CheckYourSix: Radar: Good Morning! (Evening here)
[21:25:53] ascarter: has joined #RubyOnRails
[21:26:48] DigitallyBorn: has joined #RubyOnRails
[21:27:31] ascarter: has joined #RubyOnRails
[21:28:00] edwinrozario: has joined #RubyOnRails
[21:28:43] FernandoBasso: has joined #RubyOnRails
[21:29:13] ascarter: has joined #RubyOnRails
[21:29:22] SeriousMatters: arghhh... so annoying, no idea where to debug. i'll just make sure client ignore the extra columns for now.
[21:30:48] SteenJobs: has joined #RubyOnRails
[21:30:52] ascarter: has joined #RubyOnRails
[21:32:17] spyderman4g63: has joined #RubyOnRails
[21:33:43] mike___1234: has joined #RubyOnRails
[21:34:35] ascarter: has joined #RubyOnRails
[21:35:08] Lightsword: has joined #RubyOnRails
[21:35:29] snockerton: has left #RubyOnRails: ()
[21:36:12] ascarter: has joined #RubyOnRails
[21:36:31] rickmasta: has joined #RubyOnRails
[21:36:44] moretti: has joined #RubyOnRails
[21:37:13] jonahR: has joined #RubyOnRails
[21:38:41] zendrix: has joined #RubyOnRails
[21:40:34] marr: has joined #RubyOnRails
[21:42:21] chipotle: has joined #RubyOnRails
[21:43:27] sinkensabe: has joined #RubyOnRails
[21:44:29] jonahR: has joined #RubyOnRails
[21:45:10] mrbubbles: has joined #RubyOnRails
[21:46:30] b0nn1e: has joined #RubyOnRails
[21:47:47] moretti: has left #RubyOnRails: ("Leaving...")
[21:49:40] MrPunkin: has joined #RubyOnRails
[21:49:46] cmisenas: has joined #RubyOnRails
[21:51:16] simplyianm: has joined #RubyOnRails
[21:54:15] edwinvdgraaf: has joined #RubyOnRails
[21:55:03] Armegeden: has left #RubyOnRails: ()
[21:55:20] iamjarvo: has joined #RubyOnRails
[21:55:49] Xiti: has joined #RubyOnRails
[21:56:06] Filete: has joined #RubyOnRails
[21:56:11] Valien: has joined #RubyOnRails
[21:56:26] allcentury: has joined #RubyOnRails
[21:57:05] arooni-mobile: has joined #RubyOnRails
[21:57:30] x1337807x: has joined #RubyOnRails
[21:58:25] jenrzzz: has joined #RubyOnRails
[21:58:42] edwinvdgraaf: has joined #RubyOnRails
[21:59:13] siaw23: has joined #RubyOnRails
[22:00:45] Forgetful_Lion: has joined #RubyOnRails
[22:00:59] Dingus: has joined #RubyOnRails
[22:01:06] _djbkd: has joined #RubyOnRails
[22:02:53] nfk: has joined #RubyOnRails
[22:02:55] sar1nk: has joined #RubyOnRails
[22:03:21] ascarter: has joined #RubyOnRails
[22:03:46] alho: has joined #RubyOnRails
[22:05:06] ascarter: has joined #RubyOnRails
[22:06:40] sjuxax: has left #RubyOnRails: ()
[22:06:43] ascarter: has joined #RubyOnRails
[22:08:16] edwinrozario: has joined #RubyOnRails
[22:08:21] ascarter: has joined #RubyOnRails
[22:09:19] zorak8: has joined #RubyOnRails
[22:09:19] chouhoulis: has joined #RubyOnRails
[22:09:29] GPrime: has joined #RubyOnRails
[22:10:02] ascarter: has joined #RubyOnRails
[22:10:20] greengriminal: has joined #RubyOnRails
[22:11:39] darrencauthon: has joined #RubyOnRails
[22:11:40] ascarter: has joined #RubyOnRails
[22:12:14] darrencauthon: has joined #RubyOnRails
[22:13:11] djdarkbeat: has joined #RubyOnRails
[22:13:20] ascarter: has joined #RubyOnRails
[22:14:10] qwertme: has joined #RubyOnRails
[22:16:03] sonofdirt: has joined #RubyOnRails
[22:17:00] michael_mbp: has joined #RubyOnRails
[22:17:43] simplyianm: has joined #RubyOnRails
[22:17:50] Axsuul: has joined #RubyOnRails
[22:19:15] sonofdirt: has joined #RubyOnRails
[22:20:32] x-light: has joined #RubyOnRails
[22:22:39] commondream: has joined #RubyOnRails
[22:24:37] n3b: has joined #RubyOnRails
[22:27:00] Dingus: has joined #RubyOnRails
[22:29:08] simplyianm: has joined #RubyOnRails
[22:33:12] joelataylor: has joined #RubyOnRails
[22:38:14] blackhuey: has joined #RubyOnRails
[22:38:25] pkrnj: has joined #RubyOnRails
[22:40:41] benlieb: is there a way to rescue exceptions at a class level?
[22:41:09] Radar: benlieb: why?
[22:41:13] Radar: and what classes?
[22:41:34] arBmind1: has joined #RubyOnRails
[22:44:08] jenrzzz: has joined #RubyOnRails
[22:44:24] benlieb: Radar: looking to reduce some redundancy
[22:44:31] baweaver: has joined #RubyOnRails
[22:44:39] benlieb: It's one of my own classes in lib
[22:44:45] platosha_: has joined #RubyOnRails
[22:44:45] Radar: benlieb: Lets keep this discussion over in #ruby.
[22:45:27] jamesrward: has joined #RubyOnRails
[22:46:17] krisquigley: has joined #RubyOnRails
[22:46:37] _blizzy_: has joined #RubyOnRails
[22:47:28] simplyianm: has joined #RubyOnRails
[22:47:30] jamesrward: I'm a little confused how to use the countries gem. It was my understanding I wouldn't need to create a new model to take advantage of the Country object type after adding the gem. If I try to make a new country object with c = Country['US'] name error uninitialized constant Country. Any ideas what I missed?
[22:47:52] aderium: has joined #RubyOnRails
[22:49:25] snockerton: has joined #RubyOnRails
[22:51:04] ogpastal_: has joined #RubyOnRails
[22:51:16] dionysus69: has joined #RubyOnRails
[22:51:49] simplyianm: has joined #RubyOnRails
[22:52:14] snockerton: running rails 4.2.1 + passenger, getting 'Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)'
[22:52:17] Radar: jamesrward: Where are you running that code?
[22:52:21] Radar: snockerton: So run bundle for that user.
[22:52:33] Forgetful_Lion: has joined #RubyOnRails
[22:52:41] snockerton: i have run bundle many a time
[22:53:03] snockerton: but rails/passenger still doesn't seem to care
[22:53:21] jamesrward: Radar: I tested in IRB console
[22:53:29] Radar: jamesrward: Did you require 'countries' first?
[22:53:51] jamesrward: Radar: no. Do I do that in my gemfile?
[22:54:09] Radar: jamesrward: Did you literally run "irb" and then expect Country['US'] to work right off the bat?
[22:54:11] Radar: Or did you run rails console?
[22:55:16] nickfausnight: has joined #RubyOnRails
[22:55:36] aderium: ok how do you install ruby 64bit on Solaris 11 ?
[22:55:38] edwinvdgraaf: has joined #RubyOnRails
[22:55:43] barnex: guys, I think this is rather simple, but I'm doing something terribly wrong: https://gist.github.com/barnaba/fab4ef95c5d9d6ce1e1e - result - the nested field isn't showing up
[22:55:47] erich: has joined #RubyOnRails
[22:55:55] aderium: when installing with RVm it always states Solairs/11/i386
[22:55:56] barnex: the :terminal_id field to be precise
[22:56:13] jamesrward: Radar: Sorry rails console. Message I posted was from straight IRB though. I got mixed up. In rails console it looks like it returns nil which I'm guessing means the name didn't match
[22:56:16] Radar: Aderium: step 1) don't use RVM
[22:56:21] Radar: Aderium: step 2) use chruby+ruby-install
[22:56:34] Radar: jamesrward: "rails console" will load your gems. irb won't.
[22:56:46] aderium: chruby never even heard of it
[22:56:48] arooni-mobile: has joined #RubyOnRails
[22:56:52] aderium: lets go give it a try
[22:57:58] erich: has joined #RubyOnRails
[22:58:01] aderium: Uhm there is nothing about Solaris, it carries linux and FreeBSD
[22:58:03] jamesrward: Radar: got it. I was thrown of that USA doesn't return a country object with c = Country.find_country_by_name('USA'). Figured I did something wrong.
[22:58:18] Radar: I've not used that gem so I don't know what's going on here.
[22:58:48] aloneintheworld: has joined #RubyOnRails
[23:00:25] barnex: nvm my question, it was dumb
[23:00:56] barnex: and the error was in file that I managed to not upload to gist :<. Sorry
[23:02:45] aderium: can chruby and rvm coexist ,
[23:03:17] simplyianm: has joined #RubyOnRails
[23:03:18] GPrime: https://github.com/apneadiving/Google-Maps-for-Rails What is dom?
[23:03:38] Aeyrix: GPrime: wat
[23:04:08] twilling: has joined #RubyOnRails
[23:04:09] GPrime: Aeyrix I'm trying to follow the guide, and at one point it mentions "Insert google scripts in your dom"
[23:04:26] Aeyrix: Aderium: Use RubyInstall, not RVM.
[23:04:31] barnex: document object model GPrime
[23:04:32] Aeyrix: (Common preference of people in here)
[23:04:58] Aeyrix: That's incorrect usage of "DOM" in that readme hah.
[23:05:07] mariusz: has joined #RubyOnRails
[23:05:15] Aeyrix: GPrime: Add those scripts to your <head>.
[23:06:51] GPrime: Aeyrix Sorry, I'm a noob. Would <head> be a part of the view file I'm editing?
[23:07:38] simplyianm: has joined #RubyOnRails
[23:08:08] GPrime: To reword my question, <head> refers to html header?
[23:08:26] aloneintheworld: does this smell bad? @school.psus.get_averages(1).map(&:averages).map(&:to_i).to_json.html_safe
[23:08:38] wethu: has joined #RubyOnRails
[23:08:45] edwinrozario: has joined #RubyOnRails
[23:08:45] Senjai: it doesnt smell bad, its just actually bad :P
[23:08:53] Senjai: psus? no idea
[23:09:00] Senjai: get_averages(1) ? no idea what 1 means here
[23:09:06] Senjai: the two maps can be done in one map
[23:09:16] aloneintheworld: psus is a model which belongs to school??? school has many psus
[23:09:28] Senjai: map {|x| x.averages.pluck(:id) }
[23:09:43] Senjai: What? I dont even wnat to know what psus is :P
[23:10:05] aloneintheworld: Oh ok I thought you asked
[23:10:17] aloneintheworld: so only the double map is wrong
[23:10:19] Senjai: I want to know, I'm just scared of the answer
[23:10:24] Senjai: get_averages(1) is terrible
[23:10:30] Senjai: 1 has no meaning
[23:10:33] weaksauce: yeah I agree this is bad code
[23:10:38] Senjai: html_safe doesnt make sense
[23:10:51] Senjai: If your dumping JSON why would you be rendering it to a page?
[23:10:57] Ropeney: has joined #RubyOnRails
[23:11:04] Senjai: and if you are, you're rendering an array of ids, just to_s it instead
[23:11:23] Senjai: Or join(", ")
[23:11:28] Senjai: if you're displaying it for some reason
[23:11:32] aloneintheworld: that ends up in a javascript array like [???230.2???,???232???
[23:11:45] Senjai: Okay, so, why are you html safing it?
[23:11:49] aloneintheworld: thats the final goal
[23:11:51] Senjai: Are there any ids that include html?
[23:12:27] aloneintheworld: because for some reason the to_json alone outputs [\???230.2\???,\???232\???]
[23:12:32] Senjai: Of course it doesn
[23:12:39] Senjai: but you're wrong
[23:12:42] Senjai: it outputs "[\???230.2\???,\???232\???]"
[23:12:48] Senjai: \ escapes the inner quotes
[23:12:53] greengriminal: has joined #RubyOnRails
[23:13:06] Senjai: The actual output, when not looking at it as a string doesnt include the escapes... because they're uh.. escaped
[23:13:18] Rubie: has joined #RubyOnRails
[23:14:18] aloneintheworld: ok this is what happens
[23:15:13] Senjai: I know what happens :P. The only things I dont understand is the argument for get_averages, and what a psus is
[23:15:27] aloneintheworld: if i remove map(&:to_i) and html_safe I get this: [&quot;586.0&quot;,&quot;584.0&quot;,&quot;580.0&quot;]
[23:15:45] aloneintheworld: and the javascript doesnt run well
[23:16:10] Senjai: Probably because averages are stored as strings when they should be stored as decimals
[23:16:18] Senjai: or integers
[23:16:21] Senjai: in your database
[23:16:46] Senjai: If you add the to_i and remove the html_safe it should be fine
[23:17:07] allcentury: has joined #RubyOnRails
[23:17:14] Ropeney: all signed up for railsconf :D
[23:17:16] hardtail: Can I ask about AJAX issues related to my Rails app in here or no?
[23:17:19] Scriptonaut: I'm having a regex issue that even rubular can't fix. Seems simple, I want: either character I or /"(.*?)". How do I do that? Right now I'm trying: [(I)|\"(.*?)\"]
[23:17:27] barnex: hardtail: obviously yes
[23:17:31] aloneintheworld: thats right, if I add to_id and remove html_Safe, it runs Ok
[23:17:44] Senjai: barnex: Not obviously, like if its how to use $.ajax, thats a pure javascript question
[23:18:01] aloneintheworld: i left the html_safe when I had the output printed without the to_i
[23:18:01] barnex: well, he can still have it, it just won't be answered
[23:18:11] weaksauce: Scriptonaut link to your rubular page
[23:18:14] barnex: it's not like he'll be banned for it, and now we don't know what type of question it is
[23:18:25] aloneintheworld: but what If I wanted my averages printed with decimals ?
[23:18:31] barnex: So it'll be way faster to let him ask then explain everything, right?
[23:18:31] Scriptonaut: weaksauce: http://rubular.com/r/tZDFMe5qYn
[23:18:42] Scriptonaut: "blah" should match
[23:18:50] qwertme: has joined #RubyOnRails
[23:18:51] Senjai: barnex: Yes, ask your questions, dont ask to ask. But we like to discourage offtopic questions in this channel
[23:18:52] Scriptonaut: I want 'I' and '"blahsdfsdfsdf"' to match
[23:18:56] aloneintheworld: I get averages like this in the model.. :self.select(:year, 'round(SUM(quantity * average)/SUM(quantity)) AS averages').
[23:18:58] weaksauce: Scriptonaut there is a lot off
[23:19:04] weaksauce: [] are character classes
[23:19:21] Senjai: aloneintheworld: Ew
[23:19:24] Senjai: just do it in ruby
[23:19:25] hardtail: barnex okay thanks, sorry I am new to all of this. Anyway I am working on a school assignment. I have incorporated deletion of "items" with HTTP request which was working fine, but now I have to do this with AJAX. For some reason it will not show the deletion on the page. I have to refresh the browser to see the changes myself. https://gist.github.
[23:19:25] hardtail: com/jonathanmusso/0164eb16cccfae0fea67
[23:19:41] Scriptonaut: weaksauce: I can't match more than a single character inside []?
[23:19:45] aloneintheworld: Senjai: I learned that all the heavy stuff should be put in the database if possible
[23:19:56] Scriptonaut: how do I do 'I' or '"blah"'
[23:20:11] barnex: well, the question currentl discussed (regex one) has as much to do with rails as the "how do I use .ajax", but since there's someone willing to discuss it, and it's a thing you are likely to encounter developing rails I think we're fine with it? Even though there are pure ruby and pure regex channels :P
[23:20:20] Senjai: aloneintheworld: Really? Why dont you just write stored procedures and use mysql as your backend? Dont even need rails :P
[23:20:36] Scriptonaut: a pure regex channel would be useful as hell, seeing as it's basically the same in every language I've used
[23:21:03] barnex: hardtail: : something bad happened to your link
[23:21:41] aloneintheworld: Senjai: so this does smell good ? @school.psus.get_averages(ExamType).map(&:averages).map(&:to_i).to_json
[23:22:01] aloneintheworld: oh well I had to refactor the double map
[23:22:05] weaksauce: Scriptonaut http://rubular.com/r/ip4TEH8Akd
[23:22:07] Senjai: aloneintheworld: ..
[23:22:11] barnex: hardtail: ok, so that's rails related. You are expecting too much automagic. You need to create the destroy.js.erb file and render it in your destroy action
[23:22:13] darrencauthon: has joined #RubyOnRails
[23:22:15] weaksauce: can't recall how to do non matching regex
[23:22:24] Senjai: aloneintheworld: ExamType.averages.to_json is what I would want to se
[23:22:26] barnex: hardtail: the script will be downloaded by the remote link and executed and update whatever you want
[23:22:40] weaksauce: Scriptonaut http://rubular.com/r/5qoBZkFl2r
[23:22:43] weaksauce: actually i did
[23:23:01] aloneintheworld: that clicked on me
[23:23:13] aloneintheworld: exam type is actually a model.. which belongs to psu
[23:23:28] aloneintheworld: psu belongs to exam type
[23:23:39] aloneintheworld: exam type has many psus
[23:24:03] Scriptonaut: weaksauce: thanks
[23:24:13] Scriptonaut: ah, so that's how you use |
[23:24:19] Senjai: aloneintheworld: *shrug* I have to get back to work
[23:24:30] barnex: hardtail: http://guides.rubyonrails.org/working_with_javascript_in_rails.html#link-to see this, there's an example
[23:24:44] dionysus69: has joined #RubyOnRails
[23:24:47] aloneintheworld: no problem, thanks anyway.. I???ll try to perfume this sh*t
[23:24:47] barnex: hardtail: note the last part of it: there's actually script part to this
[23:25:02] weaksauce: Scriptonaut yeah you use it with ()
[23:25:17] twilling: has joined #RubyOnRails
[23:25:40] barnex: hardtail: aaand I missed your js.erb file because I'm a moron, disregard anything I said
[23:25:40] weaksauce: ?: at the start of it means to not save it as a match
[23:25:41] frank_o: has joined #RubyOnRails
[23:26:08] simplyianm: has joined #RubyOnRails
[23:26:10] hardtail: barnex I got confused for a second I thought I did have it XD
[23:26:24] barnex: hardtail: new version: check logs to see if it gets rendered. If it doesn't its a controller problem.
[23:26:26] weaksauce: Scriptonaut does it need to have a trailing "
[23:26:27] hardtail: The deletion works but only after I refresh can I see it
[23:27:12] hardtail: barnex I believe it works, it shows the SQL query deleting it with no errors
[23:27:34] barnex: hardtail: well, does it say that it has rendered the js view? AFAIR it should.
[23:28:01] hardtail: barnex Rendered items/destroy.js.erb (0.1ms) yes sir
[23:28:14] barnex: ok, that's good.
[23:28:52] barnex: hardtail: what I'd do next is 1) add loggers to the js.erb file to check if the if is working like you think it is, check for them in logs
[23:29:18] hardtail: by loggers do you mean, 'raise'?
[23:29:43] barnex: hardtail: I mean Rails.logger.info "delete worked"
[23:29:54] barnex: hardtail: but checking the file your browser is getting is fine too
[23:30:21] hardtail: Oh, I have never seen this before. I need to look that up. So far in my program we have only learned about raise and the better errors gem.
[23:30:29] simplyianm: has joined #RubyOnRails
[23:30:32] hardtail: Ok thank you.
[23:30:47] cmisenas: has joined #RubyOnRails
[23:30:53] hardtail: By the file my browser is getting that you mean with inspector right?
[23:31:02] barnex: hardtail: well, if you have firebug or something simmilar you don't need to learn this just now. You can just see the file downloaded.
[23:31:16] barnex: hardtail: and you should have that for step 2 anyway :-)
[23:32:18] asheinfeld: has joined #RubyOnRails
[23:32:29] barnex: hardtail: http://i.imgur.com/jCCpN1F.png here's how this looks in firefox
[23:32:39] barnex: hardtail: chrome has something simmilar by default I think
[23:34:50] razorgfx: has joined #RubyOnRails
[23:35:21] maxshelley: has joined #RubyOnRails
[23:35:35] Rubie: has joined #RubyOnRails
[23:36:16] yfeldblum: has joined #RubyOnRails
[23:36:48] hardtail: barnex ah yes this is what I have seen
[23:37:10] barnex: hardtail: ok, are you getting the javascript you were expecting?
[23:37:26] hardtail: Nothing when I click the button
[23:37:30] hardtail: in the inspector console that is
[23:38:00] hardtail: that was the last record though, I will add 3 more and try again
[23:38:15] barnex: hardtail: could you elaborate what exactly are you doing? I assume you have just started using the dev tool for your browser?
[23:38:46] yfeldblum: has joined #RubyOnRails
[23:39:09] barnex: hardtail: and clearly something should happen after clicking that button, since logs show the record was deleted and the file got rendered. So how are you clicking it?
[23:39:16] quazimodo: has joined #RubyOnRails
[23:39:36] hardtail: Yes, apologies. I have not used the inspector very much at all so far in my program. Ok so I am viewing my "To-do list" items, and I click to delete a record, nothing happens. So I have to refresh to see the item removed. But there is no output in the inspector console when I click the delete button.
[23:39:51] simplyianm: has joined #RubyOnRails
[23:40:00] hardtail: I am clicking the link in the browser. The Rails server shows it being deleted, but nothing in the view.
[23:40:21] barnex: hardtail: mhm, thanks. Are you looking at the correct tab in your inspector? Something like 'net'?
[23:41:18] yfeldblum: has joined #RubyOnRails
[23:41:31] hardtail: Found it, in Network it shows when I add or delete an item.
[23:41:38] mattcc: has joined #RubyOnRails
[23:42:02] bdnelson: has joined #RubyOnRails
[23:42:08] hardtail: Would it be helpful to provide a screenshot?
[23:42:27] barnex: hardtail: ok, if this is chrome, the default view is sort of useles for this. There's a button on top, that changes it 'show overview'
[23:42:45] feens: has joined #RubyOnRails
[23:42:46] FernandoBasso: Is it possible to do `rake routes <some specific route resource>`?
[23:43:06] hardtail: Chrome yes, I will look for that button
[23:43:29] FernandoBasso: Or `rake routes | grep 'something' | less` is the only way?
[23:43:36] feens: tricky question: I???m trying to have a model with a has_one on a scope, but I need it to not nullify the foreign_key when a new object is assigned
[23:43:41] barnex: hardtail: http://i.imgur.com/mrx5YZW.png here's how the same thing looks in chrome for me
[23:43:45] hardtail: Hmm, it is showing "Name, Method, Status, Type, Initiator, etc"
[23:43:46] x1337807x: has joined #RubyOnRails
[23:43:50] barnex: hardtail: and I've marked the button
[23:43:57] hardtail: Ah I see ty
[23:44:07] barnex: hardtail: click on name :-)
[23:44:22] barnex: hardtail: and you have response there that should contain your javascript
[23:44:39] hardtail: $('#item-' +17).hide();
[23:44:42] feens: i.e. ogranization has_many locations, and has_one primary_location (with primary: true)???so when organization.primary_location is called, I don???t want it to set location.organization_id to nil for the other locations (just to set primary: false)
[23:44:51] barnex: ok, so that's correct and what you wanted.
[23:45:02] hardtail: I suspect #item is not the correct name here?
[23:45:33] barnex: hardtail: might be. There's console window where you can try your javascript to make sure it doesn't work
[23:46:02] barnex: hardtail: just look for $('#item-' +17) and see if it returns any elements
[23:46:30] hardtail: Ok, thank you.
[23:46:47] aloneintheworld: would this be still bad code? @school.psus.exam_type(1).get_averages.to_json
[23:47:00] barnex: aloneintheworld: yeeeah :P
[23:47:27] GPrime: has joined #RubyOnRails
[23:47:36] barnex: aloneintheworld: how about an enum for exam types?
[23:48:06] aloneintheworld: exam type is actually a model, which has_many psus
[23:48:21] _djbkd: has joined #RubyOnRails
[23:48:28] abhishekvasisht: has joined #RubyOnRails
[23:48:39] aloneintheworld: exam type can be math
[23:48:43] smathy: aloneintheworld, what does 1 mean?
[23:48:57] aloneintheworld: that I want the average for all the math exams
[23:49:07] barnex: well, aloneintheworld, you see how confusing it is for us :D
[23:49:12] aloneintheworld: in the database
[23:49:21] barnex: aloneintheworld: so make an enum that says :math = 1
[23:49:40] aloneintheworld: so this would be good @school.psus.exam_type(:math).get_averages.to_json
[23:49:51] barnex: it's better
[23:49:54] smathy: aloneintheworld, if I were you, I'd have: @school.psu_averages_for(:math).to_json
[23:50:05] barnex: yeah, that'd be best
[23:50:34] aloneintheworld: and I???d have to implement the method ???psu_averages_for??? in the School model ? not in Psus or Exam Type ?
[23:50:36] smathy: You caller shouldn't know anything about the internal structure of your school and it's associated records.
[23:50:48] baron: has joined #RubyOnRails
[23:50:53] baron: has left #RubyOnRails: ()
[23:51:01] bar0n: has joined #RubyOnRails
[23:51:11] barnex: aloneintheworld: I'd say spread it around. The calculation of averages should obviously not be in School model
[23:51:41] smathy: aloneintheworld, yes, that method would be on School, but then School isn't going to know what :math is, it'll just pass that into a method on Psu, a scope probably.
[23:51:46] barnex: so let the School call psu, again with as little knowledge of psu internals possible
[23:52:17] simplyianm: has joined #RubyOnRails
[23:52:25] smathy: aloneintheworld, so that method would be something like: def psu_averages_for type; psus.averages_for(type); end
[23:52:27] chouhoulis: has joined #RubyOnRails
[23:53:07] mtchllbr_: has joined #RubyOnRails
[23:53:19] barnex: Psus.averages_for(type), right?
[23:53:23] jstanton: has joined #RubyOnRails
[23:53:34] barnex: because I don't see a way it could be an instance method
[23:53:46] smathy: barnex, I think School has_many :psus
[23:53:52] aloneintheworld: self.psus.averages_for(type) I think
[23:54:00] smathy: aloneintheworld, the self is implied.
[23:54:08] aloneintheworld: yes, School has_many :psus
[23:54:09] smathy: ...but including it isn't bad either, if that's your preference.
[23:54:32] prereflect: has joined #RubyOnRails
[23:54:33] mary5030: has joined #RubyOnRails
[23:54:46] barnex: well, I'm lost now smathy. self.psus is an activerecord::Relation or something, how is he supposed to implement a method on it?
[23:54:56] SteenJobs: has joined #RubyOnRails
[23:55:03] smathy: barnex, as I said, the averages_for will be a scope on Psu
[23:55:15] smathy: barnex, a scope is basically a class method, which is proxied to Relation.
[23:55:18] barnex: I get it now, yeah
[23:55:22] charliesome: has joined #RubyOnRails
[23:55:43] barnex: that's nicely done
[23:56:02] aloneintheworld: smathy: I???ll have to read about scopes. I thought it was enough by defining a method in the Psu class and calling it from the School class with the psus collection
[23:56:31] smathy: aloneintheworld, yeah, you can as long as you define it as a class method. scopes are just Rails syntactic sugar for class methods.
[23:56:47] MrPunkin: has left #RubyOnRails: ()
[23:57:00] smathy: aloneintheworld, but they're very idiomatic, so it behooves you to read about them :)
[23:57:19] frank_o: smathy: your name cathy by any chance?
[23:57:32] aloneintheworld: thank you very much smathy & barnex
[23:57:41] aloneintheworld: ill rewrite the whole thing once again :p
[23:58:22] baweaver: has joined #RubyOnRails