« Back to channel list

#RubyOnRails - 01 March 2016

« Back 1 day Forward 1 day »
[00:05:19] uglybandersnatch: has joined #RubyOnRails
[00:05:39] baweaver: has joined #RubyOnRails
[00:06:17] codesoda: has joined #RubyOnRails
[00:06:33] DoctorMonocular: has joined #RubyOnRails
[00:07:08] DragonPunch: has joined #RubyOnRails
[00:08:32] rubyonra_: has joined #RubyOnRails
[00:10:38] trosborn: has joined #RubyOnRails
[00:12:50] Intii: has joined #RubyOnRails
[00:14:42] netwoodle: has joined #RubyOnRails
[00:14:55] DLSteve: has joined #RubyOnRails
[00:17:06] kirillzh: has joined #RubyOnRails
[00:17:26] ur5us: has joined #RubyOnRails
[00:17:45] ur5us: has joined #RubyOnRails
[00:19:39] Rodya_: has joined #RubyOnRails
[00:21:14] codesoda: has joined #RubyOnRails
[00:24:09] snowy: has joined #RubyOnRails
[00:24:42] askhat: has joined #RubyOnRails
[00:24:45] rodfersou: has joined #RubyOnRails
[00:25:38] codesoda: has joined #RubyOnRails
[00:25:39] Rodya_: has joined #RubyOnRails
[00:27:17] Rodya_: has joined #RubyOnRails
[00:28:18] trosborn: has joined #RubyOnRails
[00:32:14] trosborn: has joined #RubyOnRails
[00:33:10] jfelchner: has joined #RubyOnRails
[00:34:29] diegoviola: has joined #RubyOnRails
[00:35:46] openstruct: has joined #RubyOnRails
[00:36:22] rubyonrails778: has joined #RubyOnRails
[00:38:32] flashpoint9: has joined #RubyOnRails
[00:40:26] pawnbox: has joined #RubyOnRails
[00:40:44] goodcodeguy: has joined #RubyOnRails
[00:43:34] ace05: has joined #RubyOnRails
[00:44:49] HalcyonicStorm: has joined #RubyOnRails
[00:44:59] HalcyonicStorm: has left #RubyOnRails: ()
[00:45:06] baweaver: has joined #RubyOnRails
[00:45:29] one_zero: has joined #RubyOnRails
[00:46:01] augcesar: has joined #RubyOnRails
[00:48:19] jottr: has joined #RubyOnRails
[00:50:52] Axy: has joined #RubyOnRails
[00:50:52] Axy: has joined #RubyOnRails
[00:52:16] dalbusch1t: has joined #RubyOnRails
[00:53:10] statelesscode: has joined #RubyOnRails
[00:54:12] Pazician: has joined #RubyOnRails
[00:54:41] groatyoats: has joined #RubyOnRails
[00:55:46] sevenseacat: has joined #RubyOnRails
[00:59:06] ppinkerton: has joined #RubyOnRails
[00:59:07] robbyoconnor: has joined #RubyOnRails
[01:01:43] DoctorMonocular: has joined #RubyOnRails
[01:02:22] lyoshaja_: has joined #RubyOnRails
[01:03:47] krzkrzkrz: has joined #RubyOnRails
[01:06:44] bb2: has joined #RubyOnRails
[01:06:53] lyoshajapan: has joined #RubyOnRails
[01:07:28] Rodya_: has joined #RubyOnRails
[01:09:54] adre: has joined #RubyOnRails
[01:10:31] pawnbox: has joined #RubyOnRails
[01:10:49] prgmmr: has joined #RubyOnRails
[01:12:37] emachnic: has joined #RubyOnRails
[01:13:05] Guest_: has joined #RubyOnRails
[01:14:08] Rodya_: has joined #RubyOnRails
[01:14:12] bronson: has joined #RubyOnRails
[01:15:12] blackmesa: has joined #RubyOnRails
[01:16:26] a1fa: does try work on methods that take inputs?
[01:16:37] a1fa: in my user model i have def is_available?(date)
[01:17:00] a1fa: trying to do anothermodel.user.try(:is_available? (date))
[01:17:21] rorra: has joined #RubyOnRails
[01:17:55] augcesar: has joined #RubyOnRails
[01:18:32] a1fa: anothermodel.user.try(:is_available?,date) looks the way to go
[01:19:41] chouhoul_: has joined #RubyOnRails
[01:19:51] jeanlinux: has joined #RubyOnRails
[01:19:51] wcalderipe: has joined #RubyOnRails
[01:19:54] bronson: has joined #RubyOnRails
[01:20:26] hackeron: has joined #RubyOnRails
[01:20:41] _Tariq: has joined #RubyOnRails
[01:20:53] benlieb: has joined #RubyOnRails
[01:23:46] alexishuard: has joined #RubyOnRails
[01:24:20] a1fa: is that right?
[01:24:46] Rodya_: has joined #RubyOnRails
[01:25:11] jeanlinux: has joined #RubyOnRails
[01:25:12] Ropeney: has joined #RubyOnRails
[01:27:01] jowiar: has joined #RubyOnRails
[01:27:34] _Tariq_: has joined #RubyOnRails
[01:29:06] ppinkerton: has joined #RubyOnRails
[01:29:28] noodle: has joined #RubyOnRails
[01:29:58] josephkokenge: has joined #RubyOnRails
[01:31:19] trosborn: has joined #RubyOnRails
[01:33:38] DoctorMonocular: has joined #RubyOnRails
[01:34:16] uglybandersnatch: has joined #RubyOnRails
[01:34:27] groaty: has joined #RubyOnRails
[01:37:21] a1fa: i cant get that to work from view for some reason
[01:37:52] DragonPunch: has joined #RubyOnRails
[01:37:58] jenrzzz: has joined #RubyOnRails
[01:40:26] pawnbox: has joined #RubyOnRails
[01:42:43] nfk: has joined #RubyOnRails
[01:44:14] Rodya_: has joined #RubyOnRails
[01:47:18] Rodya_: has joined #RubyOnRails
[01:49:20] kies^: has joined #RubyOnRails
[01:50:46] arBmind: has joined #RubyOnRails
[01:52:29] iuuso: has joined #RubyOnRails
[01:55:40] Rodya_: has joined #RubyOnRails
[01:57:21] Rodya_: has joined #RubyOnRails
[01:57:28] creature: a1fa: You want foo.try(:method, arg1, arg2).
[01:57:50] creature: eg. burger.try(:add, :mayo)
[01:58:00] johnflux: has joined #RubyOnRails
[01:58:01] johnflux: has joined #RubyOnRails
[01:58:18] creature: Oh, you figured that out. Sorry. I am not at my tip-top today.
[01:58:25] ensyde_: has joined #RubyOnRails
[02:00:55] benlieb: has joined #RubyOnRails
[02:01:52] goodcodeguy: has joined #RubyOnRails
[02:01:56] stardiviner: has joined #RubyOnRails
[02:03:51] sleungcy: has joined #RubyOnRails
[02:04:46] Rodya_: has joined #RubyOnRails
[02:04:46] DoctorMonocular: has joined #RubyOnRails
[02:07:42] Rodya_: has joined #RubyOnRails
[02:08:03] cassioscabral: has joined #RubyOnRails
[02:11:43] goodcodeguy: has joined #RubyOnRails
[02:15:33] DragonPunch: has joined #RubyOnRails
[02:16:13] P4Titan: has joined #RubyOnRails
[02:16:35] P4Titan: Hello all. I have some questions for the before_filter and after_filter blocks
[02:16:53] Radar: We have answer and answer like substances.
[02:17:07] Rodya_: has joined #RubyOnRails
[02:17:17] sevenseacat: powdered answer substitute.
[02:17:19] P4Titan: The documentation states that the latter is executed "after actions on this controller are performed", but when is that really
[02:18:57] Radar: P4Titan: I believe it's after the response is rendered for the controller's action.
[02:19:39] P4Titan: That is what I would think, but I put debug prints
[02:19:40] kirillzh: has joined #RubyOnRails
[02:19:41] P4Titan: and its not
[02:19:47] Guest82976: has joined #RubyOnRails
[02:20:07] Guest82976: has left #RubyOnRails: ()
[02:20:11] _Tariq: has joined #RubyOnRails
[02:20:11] P4Titan: It may be that the implicit render is called after the after_filter.
[02:20:15] Radar: "put debug prints"?
[02:20:21] Radar: P4Titan: Yeah, that was going to be my other answeer.
[02:21:03] P4Titan: interesing, yet it still isn't
[02:21:16] P4Titan: by debug prints, I have my webserver in verbose mode to show everything
[02:21:21] kirillzh: has joined #RubyOnRails
[02:21:37] P4Titan: and then in my controller file, I have "puts" calls in different places and I see when there are called
[02:21:59] Radar: P4Titan: !rule0
[02:21:59] helpa: P4Titan: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[02:22:23] P4Titan: I added an explicit "render :index" at the end of my action, yet it printed the after_filter debug print before my webserver said it sent the html code
[02:22:45] P4Titan: I could paste yall something, tho idk how useful it would be to you
[02:23:08] Radar: then we would all be talking about the same thing
[02:23:24] P4Titan: what's the recomended pasting utility?
[02:23:43] krzkrzkrz: has joined #RubyOnRails
[02:24:54] Radar: P4Titan: !rules
[02:24:54] helpa: P4Titan: https://gist.github.com/996779
[02:25:07] Radar: P4Titan: helpa has told you already
[02:26:27] shanemcd_: has joined #RubyOnRails
[02:26:32] P4Titan: http://pastie.org/10742812
[02:26:41] Radar: I am impressed.
[02:27:23] P4Titan: fb should not render my index page if the allow function were to be called after the render
[02:27:32] P4Titan: but it still renders, meaning it is called before render
[02:27:41] Radar: interesting
[02:27:57] P4Titan: and my debug prints can attest to said behavior
[02:28:00] jenrzzz: has joined #RubyOnRails
[02:29:11] _Tariq: has joined #RubyOnRails
[02:30:17] SteenJobs: has joined #RubyOnRails
[02:30:33] pawnbox: has joined #RubyOnRails
[02:30:35] P4Titan: tho my debug print in the allow function is called after the one in index
[02:30:59] slash_nick: are you expecting the filter to run after the server has given its response?... or after the response is formed, but before the server actually responds?
[02:31:18] P4Titan: I expect the former
[02:31:28] P4Titan: or is that a poor assumption?
[02:31:34] baweaver: has joined #RubyOnRails
[02:31:35] slash_nick: i think it might be
[02:31:43] slash_nick: i think the latter is what occurs
[02:32:01] slash_nick: there might be some instrumentation you can use
[02:32:16] P4Titan: would it be due to the behavior of my webserver
[02:32:18] slash_nick: subscribe to the "hey server has responded" event, executing whatever code you pass in
[02:32:19] Rodya_: has joined #RubyOnRails
[02:33:25] P4Titan: would you happen to know this event?
[02:33:53] slash_nick: grepping for it now
[02:34:09] zave: has joined #RubyOnRails
[02:34:34] P4Titan: So, I added more debug prints
[02:34:45] P4Titan: it seems that the render function is called w/o server response
[02:34:55] P4Titan: and then the after_filter and then there's a response
[02:35:16] P4Titan: So it quite frankly may be your latter propositio
[02:35:21] P4Titan: proposition*
[02:36:30] slash_nick: P4Titan: my guess would be "process_action.action_controller"... the last thing done in that block is the last thing done in any request, afaik (append_info_to_payload)
[02:36:41] chagel: has joined #RubyOnRails
[02:37:06] slash_nick: https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/instrumentation.rb#L29
[02:37:44] uglybandersnatch: has joined #RubyOnRails
[02:38:18] nbdy: has joined #RubyOnRails
[02:38:29] P4Titan: Tho after_action executes the allow function after the server's response
[02:39:01] emachnic: has joined #RubyOnRails
[02:39:48] P4Titan: Ignore what I wrote, ...
[02:40:14] _Tariq: has joined #RubyOnRails
[02:40:34] Rodya_: has joined #RubyOnRails
[02:41:08] jenrzzz: has joined #RubyOnRails
[02:41:34] slash_nick: i wasn't laughing because of what you wrote... i was laughing, thinking "oh it was that easy?"
[02:42:07] P4Titan: well ... as it turns out, after_action is merely and alias to after_filter
[02:42:13] P4Titan: and therefore should have identical effects
[02:42:24] bronson: has joined #RubyOnRails
[02:42:35] slash_nick: right... was your mind playing tricks, or did it work just once?
[02:42:55] puff: has joined #RubyOnRails
[02:43:29] P4Titan: I typed before I actually tested it, because I remembered back that I had some issues, tho unrealted to discussed topic
[02:44:24] slash_nick: P4Titan: I'd try to subscribe to the event i linked... http://edgeguides.rubyonrails.org/active_support_instrumentation.html#process-action-action-controller
[02:44:48] slash_nick: http://edgeguides.rubyonrails.org/active_support_instrumentation.html#subscribing-to-an-event perfect example
[02:45:10] krzkrzkrz: has joined #RubyOnRails
[02:45:18] Rodya_: has joined #RubyOnRails
[02:45:25] slash_nick: basically you just need to wrap your #allow_facebook_iframe code in that
[02:45:38] slash_nick: i have no idea what that does, btw
[02:45:47] dopamean_: has joined #RubyOnRails
[02:46:30] slash_nick: if you're trying to attach a response header, you wouldn't want to to that after the server has responded, you'd want to get it onto the response beforehand, no?
[02:46:51] ace05: has joined #RubyOnRails
[02:46:56] zave: has joined #RubyOnRails
[02:48:19] Rodya_: has joined #RubyOnRails
[02:48:36] P4Titan: slash_nick: ofcourse, beforehand
[02:49:00] P4Titan: I subscribed, and it prints after the allow function
[02:49:06] P4Titan: (should this be expected?)
[02:49:32] P4Titan: As for the beforehand suff, I had this code originally expecting that allow be called at the very very end
[02:49:42] P4Titan: which is what wasn't happening
[02:49:46] slash_nick: P4Titan: http://stackoverflow.com/a/14374349/1152759 is how you add it at the very, very end
[02:49:50] P4Titan: and I was intruiged, and therefore asked on this irc chat
[02:50:50] slash_nick: lol well welcome
[02:52:18] P4Titan: I just put the allow function in the before_filter for consistency and saftey purposes
[02:52:21] P4Titan: all's good
[02:52:27] P4Titan: ty for u wise knowlege
[02:52:32] P4Titan: knowledge*
[02:53:00] Guest34101: has joined #RubyOnRails
[02:53:12] slash_nick: no problem... sorry, i spent a while thinking you wanted to execute your code After the server responds
[02:55:01] Pazician: has joined #RubyOnRails
[02:57:07] chagel: has joined #RubyOnRails
[03:00:45] guest56: has joined #RubyOnRails
[03:00:51] pawnbox: has joined #RubyOnRails
[03:01:09] DmitryBochkarev: has joined #RubyOnRails
[03:02:21] chagel: has joined #RubyOnRails
[03:04:46] P4Titan: slash_nick: This was all out of curiosity for the sake of learning (which isn't a bad motif)
[03:04:55] P4Titan: has left #RubyOnRails: ("party")
[03:06:14] sneakerhax: has joined #RubyOnRails
[03:08:07] Radar: How would I go about renaming a table's primary key in Rails _with no downtime_?
[03:08:21] Radar: Some past developer called it `product_id` and I want to call it `id`.
[03:08:33] Radar: But it's our app's main table and I know if I mess up the rename it will take down every single one of our sites for many minutes.
[03:09:18] Chagel_: has joined #RubyOnRails
[03:09:33] sevenseacat: copy db, rename column, point app to new db, copy data modified since db copy over to new db?
[03:09:42] sevenseacat: ACTION doesnt really know
[03:10:01] sevenseacat: hmm there would probably have to be code changes too though
[03:11:26] sevenseacat: ACTION stops talking
[03:14:40] chagel: has joined #RubyOnRails
[03:15:16] uglybandersnatch: has joined #RubyOnRails
[03:15:54] greghoggard: has joined #RubyOnRails
[03:19:38] chagel: has joined #RubyOnRails
[03:21:19] rorra: has joined #RubyOnRails
[03:22:42] _Tariq_: has joined #RubyOnRails
[03:23:53] _bogus_: hey, I'm trying to have text_fields and text_areas in my form with maxlength set to the maximum value allowed in model's validators... i created a helper that's working for the main model, but it doesn't works for the relations, can I have a help on this?
[03:24:25] statelesscode: has joined #RubyOnRails
[03:25:58] chagel: has joined #RubyOnRails
[03:28:49] bronson: has joined #RubyOnRails
[03:30:32] Radar: _bogus_: !rule0
[03:30:32] helpa: _bogus_: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[03:30:48] delgiudices: has joined #RubyOnRails
[03:30:57] chagel: has joined #RubyOnRails
[03:31:19] delgiudices: IDENTIFY montaklk123
[03:31:45] delgiudices: This is awkward
[03:31:47] _bogus_: there's the helpers code
[03:31:48] _bogus_: https://gist.github.com/anonymous/ed32c65917dab3d6ddcb
[03:32:01] _bogus_: along with an example of a field in the form
[03:32:12] sleungcy: has joined #RubyOnRails
[03:32:39] _bogus_: obviously the helper was constructed for Mapa fields, but mapa has some relations and I would like to have the same thing working for those models fields
[03:33:44] SteenJobs: has joined #RubyOnRails
[03:33:48] delgiudices: If i add validations to a model ( ie validates_presence_of :field ) should i have a test for that validation?
[03:34:21] Devalo: has joined #RubyOnRails
[03:34:37] codesoda: has joined #RubyOnRails
[03:36:26] chagel: has joined #RubyOnRails
[03:36:32] emachnic: has joined #RubyOnRails
[03:36:42] djbkd: has joined #RubyOnRails
[03:37:09] creature: delgiudices: You probably don't need to add tests for "Rails still works". It might be useful to add tests for "I expect these models to be valid, and these other ones to be invalid."
[03:38:37] kp666: has joined #RubyOnRails
[03:38:40] delgiudices: creature makes sense
[03:39:03] pawnbox: has joined #RubyOnRails
[03:39:51] Radar: delgiudices: well done on changing your password.
[03:40:12] delgiudices: Radar how did you know? tried to log in?
[03:40:23] Radar: delgiudices: /msg nickserv ghost delgiudices <that pass> and you're still connected
[03:40:45] delgiudices: What does ghost do?
[03:40:50] Radar: It will disconnect you.
[03:41:04] Radar: Then I could /nick to you, identify with nickserv, change your password.
[03:41:12] Radar: But I am not that mean (these days)
[03:41:20] Radar: This is why I always identify in a server window.
[03:41:21] delgiudices: You tried to ghost me
[03:41:35] Radar: Yes, I meant the whole "assuming your identity" part as the mean thing.
[03:41:46] Radar: Not changing your password after so many minutes would just be asking for it ;)
[03:42:25] delgiudices: Cool thing is i didn't know how to change password and google is not that friendly when you're in a rush
[03:44:22] Radar: I hope you don't use that password anywhere else on the web.
[03:45:42] chagel: has joined #RubyOnRails
[03:50:43] chagel: has joined #RubyOnRails
[03:51:39] allcentury: has joined #RubyOnRails
[03:52:36] delgiudices: Radar yeah i just use it on IRC luckily
[03:53:00] Radar: delgiudices: great :)
[03:54:25] _bogus_: do i need to create a new form builder to extend a method like text_field ?
[03:54:26] jetpack_joe: has joined #RubyOnRails
[03:55:37] segy: has joined #RubyOnRails
[03:55:51] chouhoulis: has joined #RubyOnRails
[03:57:17] emachnic: has joined #RubyOnRails
[03:59:05] chagel: has joined #RubyOnRails
[04:00:02] P4Titan: has joined #RubyOnRails
[04:01:14] P4Titan: Hello all.
[04:01:27] P4Titan: Can someone explain why this does not work: http://pastie.org/10742854
[04:01:58] P4Titan: Aparently @test_variable is nil
[04:02:04] P4Titan: whilest in index
[04:02:18] delgiudices: Is it ok to write tests like this? https://gist.github.com/delgiudices/f17738fdc5fa1d235fa8
[04:02:22] sevenseacat: P4Titan: thats... really not a good idea
[04:02:31] DoctorMonocular: has joined #RubyOnRails
[04:02:58] sevenseacat: controllers are not like standard ruby classes
[04:03:05] sevenseacat: they have a lot of rails magic baked in
[04:03:08] Radar: P4Titan: Your test variable initialisation is setting an instance variable on the class.
[04:03:32] Radar: Your action is referring to an instance variable within the context of an instance of that class.
[04:03:37] Radar: It will probably fail because it can't find the variable.
[04:04:05] chagel: has joined #RubyOnRails
[04:04:07] P4Titan: what is the difference between def index and def self.index?
[04:04:28] P4Titan: is def index a static function in C++ terminology?
[04:04:51] Radar: def index defines an instance method, and def self.index defines a class method.
[04:05:14] P4Titan: elaborate please
[04:05:25] Radar: https://gist.github.com/radar/96231b0c9bde7a6d3d81
[04:05:27] Radar: Rule 0 is great.
[04:06:32] hahuang65: has joined #RubyOnRails
[04:06:39] P4Titan: so self.index is effectively the same function accross all instances?
[04:08:31] Radar: self.index is only available on the class. You can only access it from the instances with instance.class.index
[04:09:06] chagel: has joined #RubyOnRails
[04:09:18] P4Titan: interesting
[04:09:41] P4Titan: so, back to my issue ...
[04:10:06] P4Titan: My test variable initialisation is setting an instance variable on the class which cannot be found.
[04:10:46] Guest34101: has joined #RubyOnRails
[04:11:39] braincrash: has joined #RubyOnRails
[04:13:28] ensyde_: has joined #RubyOnRails
[04:13:52] allcentury: has joined #RubyOnRails
[04:14:11] ppinkerton: has joined #RubyOnRails
[04:14:59] shanemcd_: has joined #RubyOnRails
[04:16:19] chagel: has joined #RubyOnRails
[04:21:19] chagel: has joined #RubyOnRails
[04:21:30] slash_nick: P4Titan: i must've missed that gist
[04:21:40] slash_nick: oh there it is
[04:23:41] _bogus_: has joined #RubyOnRails
[04:25:18] Robtop__: has left #RubyOnRails: ()
[04:25:34] pwnd_nsfw: has joined #RubyOnRails
[04:25:49] slash_nick: P4Titan: i don't know what you're expecting... if you want a class variable, that'd be @@your_var
[04:26:12] sneakerhax: has joined #RubyOnRails
[04:26:21] chagel: has joined #RubyOnRails
[04:26:37] slash_nick: P4Titan: if you mean to do that... you'll have to do as Radar suggests, something like MyController.instance_variable_get("@test_variable")
[04:36:04] Radar: Please don't do that.
[04:36:41] pawnbox: has joined #RubyOnRails
[04:40:15] nachoman: has joined #RubyOnRails
[04:44:06] techsethi: has joined #RubyOnRails
[04:46:32] rdavila: has joined #RubyOnRails
[04:47:44] nerium: has joined #RubyOnRails
[04:48:05] ace05: has joined #RubyOnRails
[04:49:59] bronson: has joined #RubyOnRails
[04:51:45] drupald_: has joined #RubyOnRails
[04:56:06] Pazician: has joined #RubyOnRails
[04:59:21] fedexo: has joined #RubyOnRails
[05:02:23] uglybandersnatch: has joined #RubyOnRails
[05:04:42] anonyanoy: has joined #RubyOnRails
[05:04:42] SteenJobs: has joined #RubyOnRails
[05:05:23] Maletor: has joined #RubyOnRails
[05:05:48] rehat: has joined #RubyOnRails
[05:08:34] techsethi: has joined #RubyOnRails
[05:11:22] krzkrzkrz: has joined #RubyOnRails
[05:11:26] adre: has joined #RubyOnRails
[05:11:29] hahuang65: has joined #RubyOnRails
[05:13:02] pawnbox: has joined #RubyOnRails
[05:16:07] ppinkerton: has joined #RubyOnRails
[05:17:47] chagel: has joined #RubyOnRails
[05:18:21] arup_r: has joined #RubyOnRails
[05:20:04] bmalum: has joined #RubyOnRails
[05:21:03] rickmasta: has joined #RubyOnRails
[05:23:21] puff: has joined #RubyOnRails
[05:23:29] Ropeney: has joined #RubyOnRails
[05:23:47] Technodrome: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[05:24:30] baweaver: has joined #RubyOnRails
[05:25:32] ensyde_: has joined #RubyOnRails
[05:25:42] techsethi: has joined #RubyOnRails
[05:27:52] rubyonrailed: has joined #RubyOnRails
[05:30:29] ace05: has joined #RubyOnRails
[05:34:55] djbkd: has joined #RubyOnRails
[05:35:52] Devalo: has joined #RubyOnRails
[05:36:33] sp1rs: has joined #RubyOnRails
[05:39:07] ppinkerton: has joined #RubyOnRails
[05:41:55] DoubleMalt: has joined #RubyOnRails
[05:42:13] chipotle: has joined #RubyOnRails
[05:42:18] allcentury: has joined #RubyOnRails
[05:45:43] DragonPunch: has joined #RubyOnRails
[05:46:20] wethu: has joined #RubyOnRails
[05:48:03] alistairtweed: has joined #RubyOnRails
[05:48:34] ur5us: has joined #RubyOnRails
[05:49:00] emachnic: has joined #RubyOnRails
[05:51:23] pawnbox: has joined #RubyOnRails
[05:51:42] PlasmaStar: has joined #RubyOnRails
[05:51:55] DragonPunch: has joined #RubyOnRails
[05:55:33] BtcBen: has joined #RubyOnRails
[05:56:05] BtcBen: Is there a way to make rake tasks continue even if an error occurs?
[05:56:47] jeanlinux: has joined #RubyOnRails
[05:57:26] sevenseacat: if you handle the error and continue, sure
[05:57:26] benlieb: has joined #RubyOnRails
[05:57:33] sevenseacat: if you dont handle the error, that would be foolish
[05:58:32] BtcBen: it's a small error
[05:58:49] BtcBen: date syntax from old users that inputted the wrong date format
[05:59:12] BtcBen: i'd rather skip their reminders than wipe the data
[05:59:42] alfie_max15: has joined #RubyOnRails
[06:00:09] sevenseacat: then handle the error and continue
[06:00:19] sevenseacat: errors are not to be ignored
[06:00:32] sevenseacat: or they will propagate
[06:01:23] Pazician: has joined #RubyOnRails
[06:03:05] ace05: has joined #RubyOnRails
[06:05:03] uglybandersnatch: has joined #RubyOnRails
[06:06:48] ur5us: has joined #RubyOnRails
[06:10:02] ppinkerton: has joined #RubyOnRails
[06:10:32] DoctorMonocular: has joined #RubyOnRails
[06:11:41] flappynerd: has joined #RubyOnRails
[06:11:59] flappynerd: what's the proper way to do e.g. f.fields_for :some_has_many_through_relation
[06:12:11] flappynerd: e.g. tags on a blog post for example
[06:12:34] flappynerd: should I be doing this on the middle/join table or on the "main" relation
[06:12:51] flappynerd: e.g. should I do f.fields_for :post_tags, or just f.fields_for :tags
[06:14:31] puff: has joined #RubyOnRails
[06:16:15] shanemcd_: has joined #RubyOnRails
[06:16:25] arup_r: has joined #RubyOnRails
[06:17:23] Eswar: has joined #RubyOnRails
[06:18:15] banister: has joined #RubyOnRails
[06:21:07] ppinkerton: has joined #RubyOnRails
[06:21:32] Puffball: has joined #RubyOnRails
[06:22:07] banister: has joined #RubyOnRails
[06:22:21] pawnbox: has joined #RubyOnRails
[06:23:12] Devalo: has joined #RubyOnRails
[06:23:42] yxejamir: has left #RubyOnRails: ("Leaving")
[06:24:01] darutoko: has joined #RubyOnRails
[06:25:25] puff: has joined #RubyOnRails
[06:25:33] banister: has joined #RubyOnRails
[06:31:56] ace05: has joined #RubyOnRails
[06:35:23] lxsameer: has joined #RubyOnRails
[06:35:31] neilfse: has joined #RubyOnRails
[06:36:06] worknick: has joined #RubyOnRails
[06:36:19] intrigueD: has joined #RubyOnRails
[06:36:33] ace05: has joined #RubyOnRails
[06:36:51] worknick: is if params.has_key?(:wall_id) this a correct way to check if :wall_id is present? i have two different forms. one form do not have :wall_id at all . second one has. is this the correct way to check if the data is coming from the second form and :wall_id present?
[06:39:56] ace05: has joined #RubyOnRails
[06:42:42] Chagel_: has joined #RubyOnRails
[06:43:07] BtcBen: got it fixed sevenseacat
[06:43:31] jenrzzz: has joined #RubyOnRails
[06:43:42] ur5us: has joined #RubyOnRails
[06:47:39] chagel: has joined #RubyOnRails
[06:49:16] dopie: has joined #RubyOnRails
[06:50:15] siaW: has joined #RubyOnRails
[06:52:39] chagel: has joined #RubyOnRails
[06:53:57] rvanlieshout: has joined #RubyOnRails
[06:56:10] uglybandersnatch: has joined #RubyOnRails
[06:57:12] jeanlinux: has joined #RubyOnRails
[07:01:02] ppinkerton: has joined #RubyOnRails
[07:02:13] crdpink: has joined #RubyOnRails
[07:02:30] skiz: has joined #RubyOnRails
[07:02:32] krzkrzkrz: has joined #RubyOnRails
[07:03:49] Maletor: has joined #RubyOnRails
[07:04:07] Disavowed: has joined #RubyOnRails
[07:04:52] cnrroxx: has joined #RubyOnRails
[07:05:54] Macaveli: has joined #RubyOnRails
[07:06:12] ppinkerton: has joined #RubyOnRails
[07:08:04] chagel: has joined #RubyOnRails
[07:09:26] emachnic: has joined #RubyOnRails
[07:13:04] chagel: has joined #RubyOnRails
[07:15:53] TBAA: has joined #RubyOnRails
[07:18:16] chagel: has joined #RubyOnRails
[07:20:17] snowy: has joined #RubyOnRails
[07:20:26] scepticulous: has joined #RubyOnRails
[07:20:57] pawnbox: has joined #RubyOnRails
[07:21:04] tambet: has joined #RubyOnRails
[07:21:17] arup_r: has joined #RubyOnRails
[07:22:11] cnr_roxx: has joined #RubyOnRails
[07:22:13] solars: has joined #RubyOnRails
[07:23:28] chagel: has joined #RubyOnRails
[07:27:09] worknick: is if params.has_key?(:wall_id) this a correct way to check if :wall_id is present? i have two different forms. one form do not have :wall_id at all . second one has. is this the correct way to check if the data is coming from the second form and :wall_id present?
[07:27:30] worknick: which is right way?
[07:27:38] rvanlieshout: params[:wall_id] could be present as a key, but still have an empty value
[07:27:39] MrDoctor: has joined #RubyOnRails
[07:27:49] rvanlieshout: params[:wall_id].present?
[07:28:11] rvanlieshout: if you want "" to be falsy
[07:28:28] chagel: has joined #RubyOnRails
[07:28:43] worknick: one form do not have <%=p.hidden_filed :wall_id at all. the second one has. when second one has it :wall_id will always have the valueto it.
[07:32:00] tambet: has left #RubyOnRails: ()
[07:32:01] GreatDanton: has joined #RubyOnRails
[07:32:40] rvanlieshout: but even then
[07:32:46] rvanlieshout: should "" be true or false?
[07:33:40] worknick: if its :wall_id is empty i have to perform one action. and i used your suggestion .present? and its working correctly now.
[07:33:42] crankharder: has joined #RubyOnRails
[07:33:47] worknick: "" should be false.
[07:35:48] chagel: has joined #RubyOnRails
[07:37:17] PlasmaStar: has joined #RubyOnRails
[07:38:09] alistairtweed: Has anyone had experience with Capistrano, Passenger and Rails? I can't seem to get the assets to compile and Passenger to restart :/
[07:38:49] ayoros: has joined #RubyOnRails
[07:41:10] tjbiddle: has joined #RubyOnRails
[07:42:05] rvanlieshout: alistairtweed: threat it as two problems
[07:42:19] rvanlieshout: cause passenger is not related to your asset precompile actions
[07:43:12] chipotle: has joined #RubyOnRails
[07:43:24] ppinkerton: has joined #RubyOnRails
[07:45:07] chagel: has joined #RubyOnRails
[07:45:36] maesitos: has joined #RubyOnRails
[07:47:11] htmldrum: has joined #RubyOnRails
[07:50:08] chagel: has joined #RubyOnRails
[07:50:36] aganov: has joined #RubyOnRails
[07:50:38] alistairtweed: rvanlieshout: Okay, great :P Anyone familiar enough with Capistrano and Rails to help me try and find the problem?
[07:50:56] bronson: has joined #RubyOnRails
[07:51:20] rvanlieshout: alistairtweed: gist your deploy.rb and full deploy outout
[07:51:28] rvanlieshout: start with asset precompile
[07:51:31] rvanlieshout: why do you think it failed?
[07:51:46] rvanlieshout: or could it be it's fixed after you restart passenger?
[07:52:01] defsdoor: has joined #RubyOnRails
[07:52:51] alistairtweed: There are no failure messages. It just doesn't change until I run rake assets: precompile manually on the server
[07:53:21] rvanlieshout: ok. so that output :)
[07:54:06] alistairtweed: https://gist.github.com/anonymous/f010b7bf2ece2f8b67e0
[07:54:24] rvanlieshout: and Capfile, and output of deploy
[07:55:26] djbkd: has joined #RubyOnRails
[07:55:36] alistairtweed: https://gist.github.com/anonymous/53ab9e53e4b299ef303a
[07:56:03] alistairtweed: (I changed the deploy_to and application name for the gist, but realised that was pointless if you see the output)
[07:56:35] alistairtweed: https://gist.github.com/anonymous/3702c4fb9c590c1650fd
[07:56:58] rvanlieshout: there is no precompile called in that output
[07:57:12] trosborn: has joined #RubyOnRails
[07:57:35] rvanlieshout: add require 'capistrano/rails/assets'
[07:57:47] Surt_Q: has joined #RubyOnRails
[07:57:59] alistairtweed: I thought require 'capistrano/rails' would include that
[07:58:44] _bogus_: has joined #RubyOnRails
[07:59:25] _bogus_: please, how could I have form's submit button in the layout's footer
[07:59:39] rvanlieshout: _bogus_: if it's in the form then you can place it anywhere
[08:00:24] jeanlinux: has joined #RubyOnRails
[08:00:38] rubyonrailed: has joined #RubyOnRails
[08:00:53] _bogus_: rvanlieshout, it's not, i mean, i have a specific layout to use with those pages with forms (which is still one but i'll divide it somehow in three steps) and i would like to have them in the layout's footer....
[08:01:02] kenndel_: has joined #RubyOnRails
[08:01:23] diprotic: has joined #RubyOnRails
[08:01:23] diprotic: has joined #RubyOnRails
[08:01:33] rvanlieshout: _bogus_: then you might want to read about this should be done in html
[08:01:44] rvanlieshout: cause it's not a rails problem.. it's a generic client side html issue
[08:01:52] rvanlieshout: where you want a submit button outside of the form element
[08:02:00] rvanlieshout: (which is easily possible with some js though)
[08:03:39] _bogus_: i mean, if i'll use this footer in this specific layout there's no way to <% end %> my form on it, right? it needs to be ended in the form's view.. though you gave me a good idea to do this with JS ...
[08:03:47] mfaeh: has joined #RubyOnRails
[08:03:50] banister: has joined #RubyOnRails
[08:04:44] _bogus_: not sure if it's the best way to do it but.... it should work haha thanks
[08:05:36] maesitos: has joined #RubyOnRails
[08:05:44] pawnbox: has joined #RubyOnRails
[08:05:52] Eswar: has joined #RubyOnRails
[08:06:26] solars: has joined #RubyOnRails
[08:07:53] jas02: has joined #RubyOnRails
[08:08:05] srinidhi: has joined #RubyOnRails
[08:08:19] sleungcy: has joined #RubyOnRails
[08:08:28] allcentury: has joined #RubyOnRails
[08:08:45] mrbubbles: has joined #RubyOnRails
[08:10:18] kies: has joined #RubyOnRails
[08:12:03] alistairtweed: rvanlieshout: adding 'capistrano/rails/assets' didn't seem to help
[08:12:16] ppinkerton: has joined #RubyOnRails
[08:13:54] mark4: has joined #RubyOnRails
[08:15:17] rvanlieshout: alistairtweed: is there any mention of deploy stuff in output?
[08:16:43] chagel: has joined #RubyOnRails
[08:16:47] emilkarl: has joined #RubyOnRails
[08:17:09] chagel: has joined #RubyOnRails
[08:20:06] worknick: how can detect if a partial is being executed on non root (/) page?
[08:22:08] chagel: has joined #RubyOnRails
[08:22:13] sp1rs: has joined #RubyOnRails
[08:22:50] lexileo: has joined #RubyOnRails
[08:25:37] mhoungbo: has joined #RubyOnRails
[08:25:42] emilkarl: has left #RubyOnRails: ()
[08:25:47] emilkarl: has joined #RubyOnRails
[08:26:23] emilkarl: I have a pretty ugly thing that I want to solve and clean up a bit. Firstly, how can I make the date come out right, and how could I clean up this configurable date stringy? http://pastie.org/10743031
[08:26:58] rvanlieshout: what's wrong with the date?
[08:27:08] chagel: has joined #RubyOnRails
[08:27:48] emilkarl: look at the last part
[08:27:57] emilkarl: 1.month.ago returns correct
[08:28:18] emilkarl: 1.try('month').try('ago') does not return the same date. It returns Jan 31.
[08:28:28] emilkarl: trying to figure out why
[08:28:44] rvanlieshout: read the source of months and ago
[08:28:48] rvanlieshout: you might just want to use that over those methods
[08:28:58] rvanlieshout: http://api.rubyonrails.org/classes/Integer.html#method-i-month
[08:29:00] Spami: has joined #RubyOnRails
[08:29:58] apotry: has joined #RubyOnRails
[08:30:46] emilkarl: rvanlieshout: hmm yes
[08:31:30] emilkarl: it seems like the first example, 1.month.ago take in account which month it is...but 1.try('month
[08:31:38] emilkarl: just steps 30 days back?
[08:31:38] universa1: emilkarl: just tried that code.. works for me
[08:31:57] htmldrum: has joined #RubyOnRails
[08:32:07] emilkarl: universa1: do you get the same date?
[08:32:16] universa1: emilkarl: https://gist.github.com/universal/997d3942349c3cc44b87
[08:32:44] andywww: has joined #RubyOnRails
[08:32:45] emilkarl: let me check my rails version.
[08:33:03] emilkarl: I'm on 4.1.14
[08:33:31] lord4163: has joined #RubyOnRails
[08:33:39] universa1: though it might still be buggy because of the leap year...
[08:34:16] emilkarl: tried the code that works for you, same result for me
[08:35:30] chagel: has joined #RubyOnRails
[08:35:57] emachnic: has joined #RubyOnRails
[08:36:45] andywww: do we need one of these javascript build environments for your average rails application?
[08:36:50] andywww: not too heavy on the JS?
[08:37:00] andywww: or will sprockets do all we need?
[08:37:34] ppinkerton: has joined #RubyOnRails
[08:37:41] baweaver: has joined #RubyOnRails
[08:37:42] universa1: andywww: i need to get from a to b, do i need a porsche?
[08:37:47] DoubleMalt: has joined #RubyOnRails
[08:38:08] andywww: i know what you mean
[08:38:20] robbyoconnor: has joined #RubyOnRails
[08:40:30] chagel: has joined #RubyOnRails
[08:42:10] ace05: has joined #RubyOnRails
[08:42:43] dede: has joined #RubyOnRails
[08:42:49] shaman42: has joined #RubyOnRails
[08:43:28] emilkarl: universa1 seems to be the ruby version. setup a new app on 4.2.5 and it works.
[08:43:37] rvanlieshout: rails version
[08:43:42] rvanlieshout: months is a rails method, not a ruby method
[08:43:48] emilkarl: yes i mean rails.
[08:44:18] defsdoor: has joined #RubyOnRails
[08:44:20] emilkarl: but could it be worth an upgrade? Many changes on 4.1.x -> 4.2.x?
[08:45:38] rvanlieshout: read the upgrade guides
[08:45:44] chagel: has joined #RubyOnRails
[08:45:56] rvanlieshout: it's worth the upgrade though
[08:49:51] trxtr: has joined #RubyOnRails
[08:50:32] Depili: has joined #RubyOnRails
[08:50:36] chagel: has joined #RubyOnRails
[08:52:14] n008f4g_: has joined #RubyOnRails
[08:55:36] chagel: has joined #RubyOnRails
[08:56:37] mikecmpbll: has joined #RubyOnRails
[08:56:53] tvw: has joined #RubyOnRails
[08:58:24] artto: has joined #RubyOnRails
[08:59:37] crankharder: has joined #RubyOnRails
[09:01:50] chagel: has joined #RubyOnRails
[09:03:18] ace05: has joined #RubyOnRails
[09:03:31] lord4163: has joined #RubyOnRails
[09:04:34] laith: has joined #RubyOnRails
[09:04:46] jsrn_: has joined #RubyOnRails
[09:06:34] sp1rs: has joined #RubyOnRails
[09:06:59] chagel: has joined #RubyOnRails
[09:07:38] AzaToth: has joined #RubyOnRails
[09:08:32] maesitos: has joined #RubyOnRails
[09:08:58] jenrzzz: has joined #RubyOnRails
[09:10:51] arup_r: has joined #RubyOnRails
[09:11:14] techsethi: has joined #RubyOnRails
[09:11:25] jeanlinux: has joined #RubyOnRails
[09:12:09] quazimodo: has joined #RubyOnRails
[09:12:37] mrbubbles: has joined #RubyOnRails
[09:13:30] ferr: has joined #RubyOnRails
[09:15:13] Ergo: has joined #RubyOnRails
[09:16:23] chagel: has joined #RubyOnRails
[09:20:19] siaW: has joined #RubyOnRails
[09:20:29] htmldrum: has joined #RubyOnRails
[09:21:22] chagel: has joined #RubyOnRails
[09:21:27] siaW: first time writing an API client. i want to ask if there’s a better way to improve my Line 40. I’m using OpenStruct. is there a better way someone could write this: https://gist.github.com/siaw23/5a2a92d857b5d6998e49#file-api_service-rb-L40
[09:21:55] marr: has joined #RubyOnRails
[09:22:38] ziyadb: has joined #RubyOnRails
[09:26:24] chagel: has joined #RubyOnRails
[09:26:28] tjbiddle: How can I set the value of an attribute on create (The model sets it - not the consumer), but disallow it on updates?
[09:27:35] mauro1254: has joined #RubyOnRails
[09:28:02] andywww: has joined #RubyOnRails
[09:29:38] mauro1254: I guys, I have an easy question. I often use A || B, A is kept unless it is null. Is there an equivalent that also consider blank strings? Keep A if present, otherwise keep B
[09:29:54] mauro1254: Many thanks
[09:30:18] rubyonrailed: has joined #RubyOnRails
[09:30:39] njero: has joined #RubyOnRails
[09:30:41] sp1rs: has joined #RubyOnRails
[09:31:22] chagel: has joined #RubyOnRails
[09:31:23] adaedra: A.presence || B
[09:32:34] mauro1254: adaedra: THX
[09:32:40] lxsameer: has joined #RubyOnRails
[09:33:03] FooMunki: has joined #RubyOnRails
[09:33:47] apeiros: is there an up-to-date way to do bulk inserts with rails? preferably working with multiple dbs.
[09:34:51] blackmesa: has joined #RubyOnRails
[09:35:11] pawnbox: has joined #RubyOnRails
[09:35:53] rvanlieshout: bulk insert on multiple dbs?
[09:36:03] apeiros: so far I've come across this https://github.com/zdennis/activerecord-import - sadly it lacks an oracle and mssql adapter, but seems well equipped with regards to other adapters
[09:36:28] apeiros: rvanlieshout: yeah. working on a library which as a part of it has to import a rather large dataset
[09:36:46] rvanlieshout: with multiple dbsses as target for a single import?
[09:36:55] apeiros: not at the same time
[09:37:13] arBmind: has joined #RubyOnRails
[09:37:25] apeiros: we will use it in conjunction with oracle. but since I publish the gem I'd like it to work with other db's too.
[09:37:43] rvanlieshout: but 1 import is on 2 db?
[09:37:52] apeiros: no. 1 import is on 1 db.
[09:37:52] rvanlieshout: then you just need a proper adapter
[09:38:05] comrad: has joined #RubyOnRails
[09:38:09] ferr: It's easy for you guys, how would I use variables in my js so I can get geolocation info? https://gist.github.com/Fercell/51173aad1cae14f26998
[09:38:26] granden: has joined #RubyOnRails
[09:38:33] apeiros: rvanlieshout: 1mio x Model.create is slow. other ways of seeding are usually db dependent.
[09:38:49] rvanlieshout: also it behaves differently
[09:38:53] rvanlieshout: so Model.create might be the only way to go
[09:38:56] apeiros: so just having a proper adapter isn't cutting it
[09:38:59] rvanlieshout: but would your user care how long it takes?
[09:39:05] rvanlieshout: or do you have them waiting for it?
[09:39:52] shanemcd_: has joined #RubyOnRails
[09:40:02] apeiros: if I can cut waiting time by a factor of 10 by simply using a gem, I don't see a reason to let them wait.
[09:40:23] apeiros: but it's not important enough for me to develop my own version. in the worst case I'll go indeed with the horribly slow .create
[09:40:30] apeiros: (horribly slow for this kind of operation)
[09:40:34] rvanlieshout: IF a bulk inserts different behaviour fits here
[09:42:45] chagel: has joined #RubyOnRails
[09:45:46] ql6wlld: has joined #RubyOnRails
[09:45:47] techsethi_: has joined #RubyOnRails
[09:46:25] hahuang65: has joined #RubyOnRails
[09:46:49] jeanlinux: has joined #RubyOnRails
[09:47:49] chagel: has joined #RubyOnRails
[09:48:13] solars: has joined #RubyOnRails
[09:48:49] adre: has joined #RubyOnRails
[09:49:29] arup_r: has joined #RubyOnRails
[09:49:39] solars: has joined #RubyOnRails
[09:50:01] jenrzzz: has joined #RubyOnRails
[09:50:45] htmldrum: has joined #RubyOnRails
[09:53:01] Palsson: has joined #RubyOnRails
[09:53:14] chagel: has joined #RubyOnRails
[09:54:55] quazimod1: has joined #RubyOnRails
[09:55:01] chipotle: has joined #RubyOnRails
[09:55:19] Eswar: has joined #RubyOnRails
[09:56:53] allcentury: has joined #RubyOnRails
[09:57:17] jeanlinux: has joined #RubyOnRails
[09:58:28] artto: has joined #RubyOnRails
[09:59:54] htmldrum: has joined #RubyOnRails
[10:00:08] jfelchner: has joined #RubyOnRails
[10:01:08] bibek_: has joined #RubyOnRails
[10:01:23] bibek_: has left #RubyOnRails: ("Leaving")
[10:03:56] ace05: has joined #RubyOnRails
[10:04:18] hahuang65: has joined #RubyOnRails
[10:05:38] pawnbox: has joined #RubyOnRails
[10:07:35] chagel: has joined #RubyOnRails
[10:08:46] Dbugger: has joined #RubyOnRails
[10:09:02] Dbugger: Do you know how could I, given an object "a", find out what fields of it are "Enums"?
[10:10:22] workmad3: has joined #RubyOnRails
[10:10:59] rvanlieshout: dbugger: http://api.rubyonrails.org/classes/ActiveRecord/Enum.html
[10:11:00] rvanlieshout: look at the source
[10:11:07] rvanlieshout: it contains a defined_enums[name.to_s] = enum_values
[10:12:55] chagel: has joined #RubyOnRails
[10:13:13] Dbugger: rvanlieshout, but how can I do it, when I just have, for instance "a.position"?
[10:13:20] Dbugger: I want to know if "a.position" is an Enum
[10:13:49] rvanlieshout: you did read that source, no?
[10:14:05] rvanlieshout: cause then i would expect defined_enums['position'] to be present
[10:14:14] ur5us: has joined #RubyOnRails
[10:17:46] sp1rs: has joined #RubyOnRails
[10:17:56] chagel: has joined #RubyOnRails
[10:17:59] skiz: has left #RubyOnRails: ()
[10:18:08] arup_r: has joined #RubyOnRails
[10:19:22] Dbugger: oh well, i read that link you sent me, and I found nothing on defined_enums
[10:19:30] Dbugger: but I googled and I found something about it on other page
[10:19:44] Dbugger: even though for it I need to type the attribute as a string
[10:19:56] Dbugger: I would like to be able to do something like "is_enum(a.position)"
[10:20:01] Dbugger: which would be better..
[10:20:29] allcentury: has joined #RubyOnRails
[10:23:15] chagel: has joined #RubyOnRails
[10:24:33] shinnya: has joined #RubyOnRails
[10:26:45] Dbugger: Is there a way to get the string of a model attribute, for instance "status" from myobject.status?
[10:28:56] emachnic: has joined #RubyOnRails
[10:29:20] Ropeney: has joined #RubyOnRails
[10:30:34] htmldrum: has joined #RubyOnRails
[10:31:42] chagel: has joined #RubyOnRails
[10:32:18] rubyonrailed: has joined #RubyOnRails
[10:33:37] tbuehlmann: dbugger, sounds weird. what are you actually trying to do?
[10:33:57] Dbugger: maybe you are right, and Im over complicating things. Forget it, I do not need that.
[10:38:00] n008f4g_: has joined #RubyOnRails
[10:39:56] htmldrum: has joined #RubyOnRails
[10:41:16] tvw: has joined #RubyOnRails
[10:42:25] norc_: has joined #RubyOnRails
[10:45:03] Eswar: has joined #RubyOnRails
[10:45:12] htmldrum: has joined #RubyOnRails
[10:47:12] arup_r: has joined #RubyOnRails
[10:49:17] chagel: has joined #RubyOnRails
[10:49:49] adre: has joined #RubyOnRails
[10:52:44] jenrzzz: has joined #RubyOnRails
[10:53:54] bronson: has joined #RubyOnRails
[10:54:21] chagel: has joined #RubyOnRails
[10:58:51] sp1rs: has joined #RubyOnRails
[10:59:20] chagel: has joined #RubyOnRails
[11:03:16] Pazician: has joined #RubyOnRails
[11:04:42] chagel: has joined #RubyOnRails
[11:05:36] trinaldi: has joined #RubyOnRails
[11:07:52] uglybandersnatch: has joined #RubyOnRails
[11:08:55] c355E3B: has joined #RubyOnRails
[11:14:14] shanemcd_: has joined #RubyOnRails
[11:16:19] Pazician: has joined #RubyOnRails
[11:18:44] agoldboi: has joined #RubyOnRails
[11:18:54] rodfersou: has joined #RubyOnRails
[11:20:31] blackmesa: has joined #RubyOnRails
[11:21:48] Abhijit: has joined #RubyOnRails
[11:22:33] Abhijit: i passed string value ruby, rubyonrails, python, javascript, html, css to my :skills params. then @skills = params[:gig][:skills] and then @skillarr = @skills.split(",") now when i try to do @skillarr.each do |sa| it says undefined method `each' for "ruby, rubyonrails, python, javascript, html, css":String
[11:23:15] mrbubbles: has joined #RubyOnRails
[11:23:39] aishwaryeomer: has joined #RubyOnRails
[11:25:53] artto: has joined #RubyOnRails
[11:26:02] Trynemjoel: has joined #RubyOnRails
[11:28:40] sevenseacat: has joined #RubyOnRails
[11:28:49] sp1rs: has joined #RubyOnRails
[11:30:46] granden: has joined #RubyOnRails
[11:31:36] Ropeney: has joined #RubyOnRails
[11:32:13] ldnunes: has joined #RubyOnRails
[11:32:13] Ergo^: has joined #RubyOnRails
[11:33:03] rubyonrailed: has joined #RubyOnRails
[11:35:16] openstruct: has joined #RubyOnRails
[11:35:42] quazimodo: has joined #RubyOnRails
[11:36:59] laith: has joined #RubyOnRails
[11:38:44] dionysus69: has joined #RubyOnRails
[11:47:45] chipotle: has joined #RubyOnRails
[11:51:38] pawnbox: has joined #RubyOnRails
[11:54:35] shanemcd_: has joined #RubyOnRails
[11:54:42] jenrzzz: has joined #RubyOnRails
[11:55:08] kgutteridge: has joined #RubyOnRails
[11:56:04] bronson: has joined #RubyOnRails
[11:59:22] Eswar: has joined #RubyOnRails
[12:03:05] blackmesa: has joined #RubyOnRails
[12:04:36] shanemcd_: has joined #RubyOnRails
[12:05:33] ace05: has joined #RubyOnRails
[12:09:15] adre: has joined #RubyOnRails
[12:09:44] Irikos: has joined #RubyOnRails
[12:10:37] adre: has joined #RubyOnRails
[12:12:41] maesitos: has joined #RubyOnRails
[12:13:01] allcentury: has joined #RubyOnRails
[12:14:07] emachnic: has joined #RubyOnRails
[12:15:05] arup_r: has joined #RubyOnRails
[12:17:33] Aswebb_: has joined #RubyOnRails
[12:19:21] trinaldi: has joined #RubyOnRails
[12:21:51] emilkarl: has joined #RubyOnRails
[12:24:59] sp1rs: has joined #RubyOnRails
[12:25:29] agoldboi: has joined #RubyOnRails
[12:27:18] emilkarl: has joined #RubyOnRails
[12:33:45] krzkrzkrz: has joined #RubyOnRails
[12:33:51] rubyonrailed: has joined #RubyOnRails
[12:38:09] FrankCastle: has joined #RubyOnRails
[12:39:14] DEA7TH: has joined #RubyOnRails
[12:41:40] Snowy_: has joined #RubyOnRails
[12:46:35] delgiudices: has joined #RubyOnRails
[12:48:37] pawnbox: has joined #RubyOnRails
[12:49:14] rikkipitt: has joined #RubyOnRails
[12:51:54] FrankCastle: Is it always as quiet as it is now?
[12:53:25] jeanlinux: has joined #RubyOnRails
[12:55:08] crst: has joined #RubyOnRails
[12:55:30] rvanlieshout: but nobody is asking questions...
[12:56:16] emachnic: has joined #RubyOnRails
[12:56:28] apotry: has joined #RubyOnRails
[12:56:46] ferr: Does anyone know how alert could impact my script? https://gist.github.com/Fercell/5e48a982dd82806d5674#file-maps-js-L58 If I remove the alert call, it does not render the map properly
[12:57:08] pawnbox: has joined #RubyOnRails
[13:00:03] defsdoor: has joined #RubyOnRails
[13:00:51] ferr: rvanlieshout: how would u solve this issue?
[13:01:05] rvanlieshout: add a console.log(document.getElementById("map"))
[13:01:10] rvanlieshout: before the alert
[13:01:14] rvanlieshout: what's the output?
[13:01:33] rvanlieshout: and console.log(location["lat"])
[13:02:52] ferr: Yea, it's default values and ajax call is not executed
[13:03:12] rvanlieshout: it's executed
[13:03:32] rvanlieshout: https://gist.github.com/Fercell/5e48a982dd82806d5674#file-maps-js-L53
[13:03:36] rvanlieshout: move your map initialize code to there
[13:03:48] rvanlieshout: so that it gets called on a callback of the ajax call
[13:04:37] ferr: But if I move it there
[13:04:59] ferr: The map is not initialized if the address is not provided, I need the map in both ways
[13:05:25] rvanlieshout: then use diffrent mapOptions in your current setup
[13:05:29] rvanlieshout: and update them on that sucess callback
[13:06:13] ace05: has joined #RubyOnRails
[13:06:18] guest56: has joined #RubyOnRails
[13:06:33] nocontrol: has joined #RubyOnRails
[13:07:14] delgiudices: Is this a correct way to test validations for a model? http://codereview.stackexchange.com/questions/121512/shipping-address-validations
[13:09:26] agoldboi: has joined #RubyOnRails
[13:09:54] mikecmpbll: delgiudices: the acid test is ..does it fail when the validation is not present/doing it's job?
[13:10:08] mikecmpbll: and does it succeed when it is. other than that, how you write it isn't that important.
[13:10:37] delgiudices: mikecmpbll well the thing is adding validation is something every model has
[13:10:55] rickmasta: has joined #RubyOnRails
[13:10:56] delgiudices: so it seems strange having to write this much code everytime for every model
[13:11:13] delgiudices: simply to test validations
[13:11:16] mikecmpbll: it's not a great deal of code, in your example it's .. one line per validation?
[13:11:22] workmad3: delgiudices: https://github.com/thoughtbot/shoulda-matchers
[13:11:40] adre: has joined #RubyOnRails
[13:11:42] mikecmpbll: it guards against someone accidentally removing or breaking a validation.
[13:12:05] delgiudices: workmad3 awesome i think this is what i was looking for
[13:12:39] workmad3: delgiudices: as mikecmpbll said though, with the linked code you're not exactly seeing a huge amount of test code per validation... 1 line to check in errors
[13:12:48] tvw: has joined #RubyOnRails
[13:15:15] chagel: has joined #RubyOnRails
[13:15:36] Eswar: has joined #RubyOnRails
[13:15:38] c0defeed: has joined #RubyOnRails
[13:15:59] delgiudices: workmad3 btw why are the tests here different thaan the ones in the rails guide
[13:16:14] delgiudices: Here is see (describe, should .. ) in the guide ( test, assert_not .. )
[13:16:26] c0defeed: Can someone help understand
[13:16:48] c0defeed: I am specifying "method: :delete" in my content_tag, but when the HTML gets rendered the hidden "_method" field has a value of "patch"
[13:16:59] c0defeed: What is going on? Why won't it send a delete?
[13:17:19] sevenseacat: c0defeed: !debug
[13:17:19] helpa: c0defeed: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[13:17:49] workmad3: delgiudices: because the tests there are written using rspec as an example
[13:18:04] delgiudices: And what does rails use by default?
[13:19:01] sp1rs: has joined #RubyOnRails
[13:19:20] c0defeed: sevenseacat: no
[13:19:58] c0defeed: if no one else has experienced that issue that is fine
[13:20:03] c0defeed: i'll search elsewhere
[13:20:05] workmad3: c0defeed: then you're not going to get any help with your issue
[13:20:32] workmad3: c0defeed: because I can think of several ways I could mess up something to achieve that result, but without code I can't say which one it could be... and I'm not going to go through all the possibilities
[13:20:54] crst: Hi, how do you guys sync postgres databases between server and local machine. For me, it is extremely annoying, and i can't find a simple solution.
[13:21:12] railsForDaiz: has joined #RubyOnRails
[13:22:01] Guest34101: has joined #RubyOnRails
[13:22:13] crst: sevenseacat: manually, each time?
[13:22:29] sp1rs: has joined #RubyOnRails
[13:22:30] sevenseacat: one command isnt exactly a huge deal?
[13:22:54] sevenseacat: and what do you mean each time?
[13:23:03] sevenseacat: you dont need production data in dev
[13:23:05] Tempesta: has joined #RubyOnRails
[13:23:16] workmad3: crst: having too much sync between local and production db is generally a bad idea... you shouldn't really be copying your production database around unless you really need to debug a production-specific issue locally
[13:23:30] sevenseacat: you probably shouldnt have a lot of production data in dev, for security reasons
[13:23:42] emilkarl: has joined #RubyOnRails
[13:24:01] ferr: rvanlieshout: thanks, it worked
[13:24:21] Abhijit: has joined #RubyOnRails
[13:24:27] Abhijit: any idea about the string to array isuse?
[13:24:40] rvanlieshout: what string to array issue?
[13:24:42] mikecmpbll: Abhijit : yes
[13:24:48] sevenseacat: Abhijit: we aren't mindreaders. what issue?
[13:24:50] mikecmpbll: i know all the string to array issues >:)
[13:25:11] rvanlieshout: i do recall something about bad database design
[13:25:14] Abhijit: okdas, writing again. i wrote it and internet disconnected so i thought someone might replied
[13:25:19] Abhijit: rvanlieshout, nope
[13:25:31] mikecmpbll: ah: [11:22:33] <Abhijit> i passed string value ruby, rubyonrails, python, javascript, html, css to my :skills params. then @skills = params[:gig][:skills] and then @skillarr = @skills.split(",") now when i try to do @skillarr.each do |sa| it says undefined method `each' for "ruby, rubyonrails, python, javascript, html, css":String
[13:25:38] Abhijit: oh! thanks mikecmpbll
[13:25:43] Abhijit: rvanlieshout, that one
[13:26:25] rvanlieshout: Abhijit: wow. that's some nasty code
[13:26:31] rvanlieshout: but then you didn't execute it right
[13:26:37] Abhijit: nasty? means bad?
[13:26:45] rvanlieshout: wrong variable naming
[13:26:47] Abhijit: oh. what is correct way?
[13:26:53] rvanlieshout: what is params[:gig][:skills]?
[13:26:59] rvanlieshout: raise params[:gig][:skills].inspect
[13:27:09] Abhijit: skill param of gig model? its a string.
[13:27:10] crst: sevenseacat: workmad3: Ah, I see, so I dump the production, say once a day, import it to my dev database which is kept locally and then i only do kind of testing?
[13:27:15] jottr: has joined #RubyOnRails
[13:27:58] mikecmpbll: Abhijit : can you show the actual code? it should work for all intents and purposes
[13:29:11] adre: has joined #RubyOnRails
[13:29:27] Abhijit: mikecmpbll, rvanlieshout https://gist.github.com/abhijitnavale/679c6f0186093d7140f4
[13:30:01] rvanlieshout: Abhijit: !debug
[13:30:01] helpa: Abhijit: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[13:30:08] rvanlieshout: show us the actual value of @skills = params[:gig][:skills]
[13:30:35] Abhijit: taking screenshots.
[13:30:44] sp1rs: has joined #RubyOnRails
[13:30:44] mikecmpbll: Abhijit : typo? https://gist.github.com/abhijitnavale/679c6f0186093d7140f4#file-gigs_controller-rb-L23-L24
[13:30:52] mikecmpbll: @skillarr != @skillsarr
[13:32:04] Abhijit: mikecmpbll, typo is just occured. not the actual cause for this. after correcting typo still same issue.
[13:32:28] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[13:32:38] mikecmpbll: Abhijit: you're calling map on @skills, which will return an array, you're then calling .split(", ") on that
[13:32:44] mikecmpbll: split is a string method
[13:33:04] Abhijit: rvanlieshout, i dont think i have ever used fake values. this is real.
[13:34:08] Abhijit: mikecmpbll, that I added later for inspection. it gives same error without map.
[13:34:16] mikecmpbll: if you can provide an inspect of your `params`, that will be all that is required.
[13:34:23] rvanlieshout: Abhijit: then gist the actual value
[13:34:28] rvanlieshout: using a rails and .inspect
[13:34:31] rubyonrailed: has joined #RubyOnRails
[13:34:42] mikecmpbll: and it's useful to provide the actual code that you're talking about, when you do that :)
[13:34:55] Abhijit: i dont get it. how do i get rails .inspect into gist? i will need to print it in some file or something?
[13:35:03] Abhijit: mikecmpbll, this is latest code. no other code.
[13:35:09] rvanlieshout: 14:30 < rvanlieshout> show us the actual value of @skills = params[:gig][:skills]
[13:35:14] rvanlieshout: 14:26 < rvanlieshout> what is params[:gig][:skills]?
[13:35:16] Abhijit: please check this http://imgur.com/a/QawqE
[13:35:16] rvanlieshout: 14:26 < rvanlieshout> raise params[:gig][:skills].inspect
[13:35:25] Abhijit: rvanlieshout, i am doing .inspect.
[13:35:29] mikecmpbll: Abhijit : this is not the code that is producing the error you talked about though, we've already been through two separate problems with this code that you've shown us that are unrelated.
[13:35:33] Abhijit: i answered you about the :gitg :skill question
[13:35:36] Abhijit: rvanlieshout, ^
[13:35:36] mikecmpbll: Abhijit : raise params.inspect
[13:35:38] techsethi: has joined #RubyOnRails
[13:35:45] B4daBing73: has joined #RubyOnRails
[13:36:28] shanemcd_: has joined #RubyOnRails
[13:36:35] Abhijit: shall I paste the "Parameters" section on error page to gist?
[13:36:42] B4daBing73: has joined #RubyOnRails
[13:37:24] B4daBing73: What material would you recommend to learn Ruby before jumping into RoR?
[13:37:37] rvanlieshout: B4daBing73: what's your background?
[13:37:37] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[13:37:59] Abhijit: rvanlieshout, mikecmpbll updated gits please check https://gist.github.com/abhijitnavale/679c6f0186093d7140f4
[13:38:13] sg19: has joined #RubyOnRails
[13:38:16] B4daBing73: I did mainly front-end development (HTML, CSS, a bit JS/jQuery) and worked a lot with PHP on different CMS
[13:38:34] ddv: then you will have a hard time, B4daBing73
[13:38:51] ddv: to be honest
[13:39:31] mikecmpbll: Abhijit: params[:gig][:skills].split(",").each ...
[13:39:39] ddv: lots to learn
[13:39:44] sevenseacat: there's always lots to learn
[13:39:47] sg19: Hi. I wanted to provide a social share button and after the user completes the sharing process I want to update my database. If the sharing process is not completed then database should not be updated. I am stuck as I dont know from where to start.
[13:40:12] sevenseacat: one thing at a time, keep expanding your knowledge
[13:40:18] B4daBing73: In which area of web devlopment will you not have lots to learn nowadays?
[13:40:32] B4daBing73: Very strange argument
[13:40:59] ddv: I would start with ruby first
[13:41:12] B4daBing73: well, that is the plan
[13:41:41] Abhijit: mikecmpbll, same error.
[13:41:45] B4daBing73: I have no intention to start RoR and then think about Ruby
[13:42:11] B4daBing73: what I heard is that once you know the Ruby syntax, many start with Sinatra first
[13:42:47] ddv: do you want a job?
[13:42:57] ddv: then I would start with Rails
[13:43:06] goodcodeguy: has joined #RubyOnRails
[13:44:30] goodcodeguy: has joined #RubyOnRails
[13:45:11] Abhijit: rvanlieshout, any recommended link of var naming in rails?=
[13:45:21] B4daBing73: ok, thx so far
[13:45:36] workmad3_: has joined #RubyOnRails
[13:47:25] rvanlieshout: Abhijit: well.. what's a gig?
[13:47:50] Abhijit: a model for all kinds of jobs.
[13:47:58] Abhijit: programmer, driver, cook etc
[13:48:02] rvanlieshout: and normal people name it a 'gig'?
[13:48:13] Abhijit: i thought if i name if job it will only mean white collor job
[13:48:16] mikecmpbll: Abhijit : update the gist with the exact code that's now erroring and the error
[13:48:23] irctc190: has joined #RubyOnRails
[13:48:50] notenoth: has joined #RubyOnRails
[13:50:16] Abhijit: mikecmpbll, updated https://gist.github.com/abhijitnavale/679c6f0186093d7140f4
[13:50:32] Abhijit: rvanlieshout, i dont want it to mean only white collar job thats why
[13:50:40] workmad3: has joined #RubyOnRails
[13:50:43] mikecmpbll: Abhijit : params[:skills].split(",").each do |sa|
[13:50:49] mikecmpbll: that's not what I said.
[13:51:21] rvanlieshout: Abhijit: so what does it mean
[13:51:28] rvanlieshout: how did we get from white collar job tot gig?
[13:51:43] mikecmpbll: why is the code in the error different from that below
[13:51:49] Abhijit: rvanlieshout, i just want it to mean any job. not corporate job or something
[13:52:09] rvanlieshout: and Job is taken? have you checked that?
[13:52:10] Abhijit: mikecmpbll, where is it different?
[13:52:12] vedu: Why should I add 2 '%' signs in `where("title like ?", "%#{query}%") ` ?
[13:52:24] Abhijit: rvanlieshout, its not taken. its just how i thought.
[13:52:34] mikecmpbll: https://gist.github.com/abhijitnavale/679c6f0186093d7140f4#file-error-L10 & https://gist.github.com/abhijitnavale/679c6f0186093d7140f4#file-gigs_controller-rb-L25
[13:52:39] rvanlieshout: yeah. but the thing is.. somebody should just understand those variable names
[13:52:51] rvanlieshout: and maybe gig is the right word, it just feels like it's something else
[13:53:00] rvanlieshout: i would not have related it to a job to be executed
[13:53:16] Abhijit: mikecmpbll, sorry wrong error.
[13:53:19] Kampfheizung: has joined #RubyOnRails
[13:53:19] mikecmpbll: ACTION sighs
[13:54:00] Abhijit: mikecmpbll, i was experimenting in params[:skills] works or what
[13:54:07] Abhijit: mikecmpbll, and it does not work with that also.
[13:54:23] Abhijit: i will just create new project.
[13:54:26] Kampfheizung: hey guys i have a question about polymorphism in rails. Why the reference_id from the owner is not set to nil if i destroy the reference (owner => belongs_to :reference, polymorphic: true; reference => has_one :owner, as: :reference; for example)
[13:54:29] mikecmpbll: stop experimenting, just do what i say and report back
[13:54:29] ddv: I would rename gig to job
[13:54:34] mikecmpbll: else forfeit my help.
[13:55:16] Abhijit: mikecmpbll, updated correct error https://gist.github.com/abhijitnavale/679c6f0186093d7140f4
[13:55:22] sevenseacat: vedu: % are wildcards
[13:55:33] sevenseacat: if you didnt have them, it would be looking for an exact match
[13:56:10] mikecmpbll: Abhijit : put raise params[:gig][:skills].inspect after this line and run it again: https://gist.github.com/abhijitnavale/679c6f0186093d7140f4#file-gigs_controller-rb-L24
[13:56:27] jenrzzz: has joined #RubyOnRails
[13:56:35] vedu: sevenseacat: right :)
[13:56:44] arup_r: has joined #RubyOnRails
[13:56:47] techsethi: has joined #RubyOnRails
[13:56:49] ramortegui: has joined #RubyOnRails
[13:56:58] Kampfheizung: anyone have knowledge about polymorphism in rails ? :)
[13:57:34] ddv: I mean this is not #RubyOnRails right
[13:58:34] chouhoulis: has joined #RubyOnRails
[13:58:45] allcentury: has joined #RubyOnRails
[13:58:49] astrofog: has joined #RubyOnRails
[13:59:20] blackmesa: has joined #RubyOnRails
[14:02:25] Abhijit: mikecmpbll, it doesnt do anything different. updated https://gist.github.com/abhijitnavale/679c6f0186093d7140f4
[14:04:32] mikecmpbll: Abhijit : can you post the backtrace of the error
[14:05:01] akshat: has joined #RubyOnRails
[14:05:03] mikecmpbll: it's not erroring where you think it is. there's only one `each` in the code that you've provided, and it's not erroring there because the raise that we put in is before it
[14:05:16] Abhijit: mikecmpbll, you mean Full trace or Application trace?
[14:06:26] Abhijit: mikecmpbll, updated full trace https://gist.github.com/abhijitnavale/679c6f0186093d7140f4
[14:07:42] mikecmpbll: you're permitting params[:gig][:skills] in your strong params
[14:08:07] mikecmpbll: so it's trying to assign the comma separated string as the .skills association of Gig
[14:08:36] mikecmpbll: seeing as you're trying to do it manually, afterwards, probably remove it from your strong params, and remove it from params before calling Gig.new
[14:08:37] nachoman: has joined #RubyOnRails
[14:09:01] mikecmpbll: e.g.: skills_param = params[:gig].delete(:skills)
[14:09:35] Abhijit: mikecmpbll, i am not getting anything.
[14:09:45] Abhijit: any link to read more on?
[14:09:54] mikecmpbll: or, preferably, use accepts_nested_attributes_for to create your skills objects automatically, but i cba to explain that. docs are pretty good though: http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
[14:10:04] Abhijit: im my params i am doing params.require(:gig).permit(:user_id, :title, :description, :skills
[14:10:08] Abhijit: thats how we do it right?
[14:10:20] durexlw: has joined #RubyOnRails
[14:10:29] Abhijit: sure will read the docs. thanks mikecmpbll
[14:10:34] mikecmpbll: yes, but you don't need to permit skills, because you're not passing skills to the model directly
[14:10:40] mikecmpbll: not through params.
[14:10:45] Abhijit: mikecmpbll, oh. right.
[14:11:26] mikecmpbll: Abhijit : because you're permitting it, rails is trying to do @gig.skills = "ruby, rubyonrails, python, javascript, html, css"
[14:11:43] Meow-J: has joined #RubyOnRails
[14:12:30] JakFrist: has joined #RubyOnRails
[14:12:55] shanemcd_: has joined #RubyOnRails
[14:13:10] shanemcd_: has joined #RubyOnRails
[14:13:37] chipotle: has joined #RubyOnRails
[14:14:10] anirban: has joined #RubyOnRails
[14:14:31] artto: has joined #RubyOnRails
[14:15:04] adavia: has joined #RubyOnRails
[14:18:11] durexlw: I need some help on this one... makes my head hurt: I have this Enumerator: test = [{"A1"=>"Year", "B1"=>"Month"},{"A2"=>"2015", "B2"=>"0"},{"A3"=>"2015", "B3"=>"1"}].to_enum
[14:18:19] durexlw: I want the values of the first row, to become the key of the next rows, so, I'm looking for the output: {"Year"=>"2015", "Month"=>"0"}{"Year"=>"2015", "Month"=>"1"}
[14:18:55] durexlw: anyone has an idea on how to do that?
[14:21:53] workmad3: durexlw: you might be able to achieve it with `test[1..-1].map {|t| test[0].values.zip(t.values).to_h }`
[14:22:18] workmad3: durexlw: but that's fairly dependent on the hashes being all constructed in the same order so is somewhat fragile
[14:22:23] sp1rs: has joined #RubyOnRails
[14:22:36] yellow5: has joined #RubyOnRails
[14:22:40] workmad3: durexlw: I'm assuming from your test that the keys don't stay stable across the arrays though, so you may need to accept that sort of cost :)
[14:22:46] durexlw: workmad3: it comes from a spreadsheet, so it's assumed to be consistent
[14:23:34] workmad3: durexlw: ah, so you can assume that you'll always be dealing with `A<something>`, `B<something>` etc?
[14:23:56] daveomcd: I have a form that I'm trying to link up to my association. My parameters are passing through correctly, but before I add some custom code to my update action I was hoping someone might take a peek at it to make sure I'm not doing this harder than it should be... https://gist.github.com/daveomcd/a67e54761ac7d6e4251a
[14:24:27] sp1rs: has joined #RubyOnRails
[14:24:37] drbayer: has joined #RubyOnRails
[14:25:15] durexlw: workmad3: there's something else I don't quite understand: the return I get from the library is a "#<Enumerator: #<Enumerator::Generator:0x00000008552f28>:each>" and "test[1..-1]" doesn't work on it. But I'm not really sure what the enumerator generator is in the first place.
[14:25:49] workmad3: durexlw: an enumerator is a wrapper around a collection that you can use things like .each and .map on, but isn't necessarily indexable directly
[14:26:23] ppinkerton: has joined #RubyOnRails
[14:26:26] workmad3: durexlw: in your case, it could be that you're dealing with some form of lazy-loading enumerable
[14:27:06] durexlw: workmad3: I see... and how can I make that into something that works with your line of code?
[14:27:29] workmad3: durexlw: you may be able to get the first item out of the enumerator by doing `headers = test.next; test.map { ... } `
[14:28:12] durexlw: I'll try that. I appreciate the help man... I'm really struggeling actually to get my head around all these enumerables, hashes, maps, arrays,...
[14:29:19] The_Phoenix: has joined #RubyOnRails
[14:30:07] treehug88: has joined #RubyOnRails
[14:30:12] joshkovach: has joined #RubyOnRails
[14:30:34] durexlw: workmad3: Thanks... I'm starting to realize how the lazy enumerable works now
[14:31:17] czerasz: has joined #RubyOnRails
[14:32:25] rikkipitt: has joined #RubyOnRails
[14:33:01] pixelhandler: has joined #RubyOnRails
[14:33:04] rubyonrailed: has joined #RubyOnRails
[14:33:13] mustmodify: has left #RubyOnRails: ()
[14:38:28] Irikos: has joined #RubyOnRails
[14:38:31] delgiudices: has joined #RubyOnRails
[14:38:39] chouhoulis: has joined #RubyOnRails
[14:39:21] Zackio: has joined #RubyOnRails
[14:40:16] baweaver: has joined #RubyOnRails
[14:40:39] n1lo: has joined #RubyOnRails
[14:40:53] jeanlinux: has joined #RubyOnRails
[14:41:47] Sylario: has joined #RubyOnRails
[14:42:20] Sylario: I just encountered an app claiming to be RoR, but it seems to be sinatra :https://github.com/TracksApp/tracksapp.github.com
[14:42:34] Sylario: can someone confirm this is really Sinatra and not rails
[14:43:12] makerop: has joined #RubyOnRails
[14:43:19] yardenbar: has joined #RubyOnRails
[14:43:23] Sylario: I am almost sure but there may be something silently importing rails stuff that i missed
[14:43:40] adaedra: sylario: just look at the Gemfile.
[14:43:56] adaedra: And what do you see? :)
[14:44:18] delgiudices: has joined #RubyOnRails
[14:44:41] makerop: im in the middle of design, and requirements gathering, I am building a site that has 4 main components, a file store, a client command line app, a dashboard, and I think an API
[14:45:20] makerop: the file store (s3) needs to be multi-tenant, and the commandline client and dashboard need to share an auth mechanism
[14:46:06] makerop: does an API that "links" the dashboard, the filestore, and the client command client, via oath make sense?
[14:46:22] Sylario: you cannot share auth between command line and dashboard, except if the command line is a js thingy enbeded in a webpage
[14:46:43] Sylario: How do you oauth through SSH?
[14:47:04] makerop: I was planning on writing a gem
[14:47:20] makerop: and using rest-client and the API
[14:55:14] mary5030: has joined #RubyOnRails
[14:56:56] rdavila: has joined #RubyOnRails
[14:57:28] jenrzzz: has joined #RubyOnRails
[14:58:24] bronson: has joined #RubyOnRails
[14:58:30] czerasz: has joined #RubyOnRails
[14:59:09] czerasz: has joined #RubyOnRails
[14:59:11] dstarh: has joined #RubyOnRails
[14:59:34] sp1rs: has joined #RubyOnRails
[15:01:20] rakm: has joined #RubyOnRails
[15:02:44] Guest34101: has joined #RubyOnRails
[15:02:46] tubbo: makerop: oauth thru ssh? who do you think you are, github? ;)
[15:06:46] flashpoint9: has joined #RubyOnRails
[15:07:26] ace05: has joined #RubyOnRails
[15:08:02] joshkovach: has joined #RubyOnRails
[15:08:19] arbys: has joined #RubyOnRails
[15:08:59] arbys: has left #RubyOnRails: ()
[15:09:05] tubbo: that sounds really cool though
[15:10:11] pawnbox: has joined #RubyOnRails
[15:10:44] chouhoulis: has joined #RubyOnRails
[15:11:48] configged: has joined #RubyOnRails
[15:13:47] codesoda: has joined #RubyOnRails
[15:13:56] bmalum: has joined #RubyOnRails
[15:14:29] flashpoint9: has joined #RubyOnRails
[15:18:52] Earthnail: has joined #RubyOnRails
[15:19:36] makerops: has joined #RubyOnRails
[15:19:55] uglybandersnatch: has joined #RubyOnRails
[15:19:59] Earthnail: I'm trying to rescue_from ActionDispatch::ParamsParser::ParseError (which occurs when, for example, you post a malformatted JSON body). So I put rescue_from ActionDispatch::ParamsParser::ParseError do ... into my ApplicationController. Unfortunately, that block is never called. It works for other exceptions, such as ActionController::ParameterMissing, but not for this one. Any ideas?
[15:23:35] momomomomo: has joined #RubyOnRails
[15:24:15] ilhami: has joined #RubyOnRails
[15:24:20] ryanRT1: has joined #RubyOnRails
[15:24:39] ilhami: sevenseacat: I went over to Laravel. It was a dumb decision I know.
[15:24:49] beingjohnm: Maybe not a rails specific question but a situation I have. I have a set of accounts each with their own transactions. How would I go about finding the ten accounts that had the most recent transactions? I suspect this is a sql query but wondering if there is a rails way?
[15:25:34] jgpawletko: has joined #RubyOnRails
[15:26:23] RTG`: beingjohnm: activerecord has .order and .limit functionality
[15:27:39] beingjohnm: RTG`: so I can select last transaction for each account and then order that?
[15:28:11] USvER: has joined #RubyOnRails
[15:28:24] sp1rs: has joined #RubyOnRails
[15:28:47] beingjohnm: RTG`: @accounts = user.accounts.transactions(:trade_date).limit(1) or something like that
[15:29:01] dirtibirdi: has joined #RubyOnRails
[15:29:12] dionysus69: has joined #RubyOnRails
[15:31:27] snowy: has joined #RubyOnRails
[15:31:28] USvER: Hey! Didn't worked with One-To-One relations and now i have a problem. I want to automaticaly create related (belongs_to) model but all my attempts failed. Was trying build_* with autosave:true but my model was not saved. Can someone help me?
[15:31:31] RTG`: beingjohnm: you could .joins the transactions in the query
[15:31:38] tbuehlmann: Earthnail, I think the params parser happens too early, your exception rescuing isn't setup by then
[15:31:53] Earthnail: tbuehlmann: that makes sense
[15:31:53] RTG`: however you might end up with duplicate accounts, depends if thats a problem
[15:32:28] beingjohnm: RTG`: that would be but I could handle that easily enouhg. I did not know about joins so I'll look into that.
[15:33:11] tbuehlmann: Earthnail, it's even a middleware, so way too early: https://github.com/rails/rails/blob/664a13e6fb8281107da0da75e7cd91bba1425f76/actionpack/lib/action_dispatch/middleware/params_parser.rb
[15:33:38] Earthnail: tbuehlmann: okay, great. That pretty much answers my question. I'll go with the code at https://robots.thoughtbot.com/catching-json-parse-errors-with-custom-middleware then
[15:34:02] Earthnail: I just didn't know whether that post was outdated.
[15:34:10] wagon63: has joined #RubyOnRails
[15:34:36] tbuehlmann: yeah, adding another middleware seems okay to me for this
[15:34:47] pixelhandler: has joined #RubyOnRails
[15:35:00] sp1rs: has joined #RubyOnRails
[15:36:22] makerops: has joined #RubyOnRails
[15:36:25] jeanlinux: has joined #RubyOnRails
[15:37:05] jeanlinux: has joined #RubyOnRails
[15:38:29] dopie: has joined #RubyOnRails
[15:38:55] makerops: has left #RubyOnRails: ()
[15:39:25] makerops: has joined #RubyOnRails
[15:40:16] rikkipitt: has joined #RubyOnRails
[15:40:18] B1n4r10: has joined #RubyOnRails
[15:40:26] diegoviola: has joined #RubyOnRails
[15:41:41] meekohi: has joined #RubyOnRails
[15:41:58] jeanlinux: has joined #RubyOnRails
[15:42:35] beingjohnm: RTG`: I'm on the right track. Distinct doesn't seem to be helping with the dupilicate records though. I'll get it though. Thanks.
[15:42:48] aegis3121: has joined #RubyOnRails
[15:42:53] wagon63: have a sales_order with (has_many) sales_items, is there a nice way for the sales_item to really be or extend a couiple different models? like if there products, assebilies, services…..
[15:45:35] workmad3: wagon63: I'd probably go with a `SalesItem` model that has a polymorphic association to the product that's sold, but with details like the name, sale price, etc. copied across so that your calculations for old orders don't change if you do something like change the price of an item
[15:46:54] arthurl: has joined #RubyOnRails
[15:47:03] arthurl: hi guys- we're having a production issue where our rails app is experiencing a 'Redis::TimeoutError' from time to time- what's the best practice in terms of retrying the connection if it fails?
[15:47:12] arthurl: i see the redis-retry gem but it looks like it only deals with 'ECONNREFUSED' errors? http://www.rubydoc.info/gems/redis-retry/0.1.0
[15:47:19] Devalo: has joined #RubyOnRails
[15:47:28] tubbo: arthurl: why does redis persistently time out?
[15:47:30] wagon63: workmad3: was planning to copy, and started thinking that maybe the SalesItem really should have no relationship to the product, service, whatever. since they could be deleted / changed in the future
[15:48:00] arthurl: tubbo it isn't persistent-it only happens like 1% of the time, the app is talking to a redis server over a VPN
[15:48:14] arthurl: les than 40ms latency
[15:48:26] arthurl: so not really sure why it's happening but looking for a bandaid
[15:48:37] ddv: arthurl: catching the exception and retrying?
[15:49:26] arthurl: ddv that's what i was thinking- warning: i'm not a dev :) - but this is what i have so far https://gist.github.com/alyssenko/fbdc68c8877cadd5c358
[15:49:46] RTG`: beingjohnm: no problem :)
[15:50:25] RTG`: beingjohnm: another idea might be to also use .group on eg accounts.id
[15:54:19] mrbubbles: has joined #RubyOnRails
[15:54:28] jeanlinux: has joined #RubyOnRails
[15:56:06] kdough: has joined #RubyOnRails
[15:57:43] jeanlinux: has joined #RubyOnRails
[15:58:29] jenrzzz: has joined #RubyOnRails
[16:00:00] beingjohnm: RTG`: tried group by it complained about trans_date needing to be in the group.
[16:00:19] bronson: has joined #RubyOnRails
[16:00:24] trxtr: has joined #RubyOnRails
[16:00:34] DmitryBochkarev: has joined #RubyOnRails
[16:00:45] jscheel: has joined #RubyOnRails
[16:00:47] podman: has joined #RubyOnRails
[16:00:47] a1fa: https://richonrails.com/articles/building-a-basic-calendar-in-ruby-on-rails < how can I exclude Sunday and Saturday from view?
[16:01:21] a1fa: i tried week.map { |day| day_cell(day) unless day == :sunday (or even day == 0..)
[16:01:51] dirtibirdi: has joined #RubyOnRails
[16:02:01] ddv: a1fa: next if day.sunday? etc
[16:02:11] wagon63: has left #RubyOnRails: ()
[16:03:12] Rodya_: has joined #RubyOnRails
[16:04:10] ikarius: has joined #RubyOnRails
[16:04:36] adlerdias: has joined #RubyOnRails
[16:05:09] The_Phoenix: has joined #RubyOnRails
[16:05:16] ikarius: has left #RubyOnRails: ()
[16:07:05] a1fa: awesome ddv
[16:07:08] a1fa: thank you
[16:07:10] ikarius: has joined #RubyOnRails
[16:07:34] snowy: has joined #RubyOnRails
[16:08:06] laith: has joined #RubyOnRails
[16:08:53] laith: has left #RubyOnRails: ()
[16:09:00] nfk: has joined #RubyOnRails
[16:09:03] ikarius: hoping to check if my idea about structuring for a rails project was sane or not
[16:09:24] tjohnson: has joined #RubyOnRails
[16:10:01] baweaver: has joined #RubyOnRails
[16:11:08] groatyoats: has joined #RubyOnRails
[16:11:13] tubbo: ikarius: that's what we're here for :)
[16:11:31] ikarius: I'm looking at using two separate rails projects, one using rails-api and hosting a JSON API, the other using ember-cli-rails + devise + ember-simple-auth
[16:11:56] ikarius: the actual ember app and the api would both be behind devise authentication
[16:12:31] ikarius: then exposing them both via nginx + passenger
[16:14:24] tubbo: seems like a good plan
[16:14:41] tubbo: though ember-cli-rails is often a prelude to breaking the two apps apart (frontend and backend)
[16:15:03] tubbo: though it's a lot easier in my experience to develop them in the same repo, especially if you're just a single-person operation :)
[16:15:28] disgrntld: has joined #RubyOnRails
[16:17:02] ikarius: I am intending this as a front-end/back-end app
[16:17:46] ikarius: the reason for using ember-cli-rails hosted out of rails is because I still need the middleware for the devise views (register, login, reset password)
[16:18:49] tubbo: ikarius: that's not "middleware".
[16:19:09] ikarius: rails middleware- e.g. flash, etc
[16:19:35] ikarius: rails-api pulls the vast majority of that out, though you can re-enable ones that you need
[16:20:45] tubbo: ikarius: that's also not middleware, those are components of ActionController. just so we're clear on the terms...middleware has a certain structured connotation, whereas these features of AC you're talking about are just modules included into ActionController::Base. the very definition of ember is that it's an entire application loaded and executed from the client-side.
[16:20:54] emachnic: has joined #RubyOnRails
[16:20:57] tubbo: ikarius: so there's a very defined separation between what rails is and what ember is.
[16:21:17] ikarius: hmm. according to config/application.rb, those modules are termed middleware.
[16:21:19] godzillaenlacasa: has joined #RubyOnRails
[16:21:28] tubbo: ikarius: are you using rails 5?
[16:21:44] tubbo: they might have changed the names
[16:21:52] ikarius: tubbo: I'm contemplating whether I should or not.
[16:21:58] tubbo: ikarius: don't.
[16:22:05] tubbo: just use 4.2 for now, it will be easy to upgrade
[16:22:14] ikarius: ok, so my initial instinct on that was good then.
[16:23:05] tubbo: ikarius: but yeah, the nice part about ember-cli-rails is that it keeps your ember app and rails app decoupled, so for example you're running most of the UI for your web app on the client-side, served with a CDN, so it's really fast
[16:23:11] Earthnail: Is there a way to set the default request "Content-Type" header to json?
[16:23:14] tubbo: well, it's as fast as the client allows it to be :D
[16:23:21] AntiSpamMeta: has joined #RubyOnRails
[16:23:46] ayoros: has joined #RubyOnRails
[16:23:49] groatyoats: has joined #RubyOnRails
[16:23:54] ikarius: are there any pre-existing frameworks for detecting updated versions of gems and automatically spinning up a VM/docker container w/ a project and executing all tests w/ the updated gems?
[16:24:50] ikarius: … seems that would be a fairly standard practice for production apps
[16:25:09] tubbo: ikarius: bundler detects outdated gems, so i'd imagine all you need is `bundle update && docker-compose up`
[16:25:22] maesitos: has joined #RubyOnRails
[16:25:26] anirban: has joined #RubyOnRails
[16:25:32] tubbo: i guess you'd want to `docker run` the tests as well
[16:26:47] ikarius: well, flow would be detect a new gem version has been released, deploy VM w/ code, update single gem, run tests, report.
[16:26:52] dionysus69: is there no slack community for rails?
[16:27:29] Kedare: has joined #RubyOnRails
[16:27:57] tubbo: ikarius: no, there's no service or framework that does that afaik. most people will just update gems manually and run tests through CI.
[16:28:18] DaniG2k: has joined #RubyOnRails
[16:28:35] tubbo: ikarius: personally, i've stuck with the "don't fix it if it ain't broke" mantra as far as `bundle update` is concerned...but i'm also of the theory that you should be using '~>' gem versions whenever possible
[16:28:39] tubbo: dionysus69: there is.
[16:28:39] ikarius: not hard to build, just wondering if there was already something out there to facilitate it.
[16:29:20] tubbo: not hard to build, but most likely expensive to run, and not sure if the juice is really worth the squeeze ;)
[16:29:21] ikarius: my view is that every gem in my project is one or more potential security holes
[16:29:52] tubbo: in my experience, your biggest security issue is rails ;)
[16:30:17] tubbo: that's because rails does a lot, and deals with (most of) your user input, so it's really the front line of defense against attacks.
[16:30:32] tubbo: haven't had too many security issues with other gems
[16:30:34] ikarius: so as long as my tests are thorough, I'd prefer to update automatically, so long as tests show the update didn't break any of my stuff.
[16:30:38] dionysus69: kk thanks tubbo!
[16:31:08] Psyq: has left #RubyOnRails: ("Conversation terminated")
[16:31:26] ikarius: tubbo: good point about rails being the front line, though it itself is a gem, so it fits in the scheme ;)
[16:31:35] tubbo: i suppose haha
[16:33:05] ikarius: but yeah, I want the whole back end handled by a JSON API, so I'm in a position to go build an iOS and/or android native front end if that becomes appropriate.
[16:34:56] baweaver: has joined #RubyOnRails
[16:35:38] mrgreenfur: has joined #RubyOnRails
[16:35:41] tubbo: ikarius: well if you're asking whether it's a good idea to build that in rails, i'm gonna have to say "yes".
[16:35:51] mrgreenfur: Rails’ fragment caching is the coolest thing I’ve ever seen.
[16:35:54] zave: has joined #RubyOnRails
[16:36:09] tubbo: mrgreenfur: you should get out more ;)
[16:36:17] mrgreenfur: tubbo: i’m using your redis-store!
[16:36:35] chipotle: has joined #RubyOnRails
[16:36:38] mrgreenfur: it’s amazing.
[16:37:02] ikarius: I'm basically sketching out the architecture for an internet-of-things play. the managed devices will be something raspberry pi - like running node, fetching their configs from the central server, and the central server will additionally host an admin interface.
[16:37:04] mrgreenfur: my app is based on data processing, so i was dreading adding all kinds of cache layers, but now i just cache every fragment and it’s speeds right along
[16:37:06] tubbo: haha thanks mrgreenfur, although i didn't make it i just maintain it these days.
[16:37:22] tubbo: ikarius: play?
[16:37:29] mrgreenfur: tubbo: well, thanks you for maintaining it. It’s perfect alongside sidekiq :)
[16:37:31] tubbo: like a stage play?
[16:37:46] ikarius: no, business
[16:38:26] ikarius: in this case, "play" is probably silicon valley terminology.
[16:38:36] sp1rs: has joined #RubyOnRails
[16:38:46] tubbo: ikarius: i suppose so, i'm from philadelphia.
[16:38:46] ikarius: someone might say they're making a SaaS play,
[16:38:58] mrgreenfur: i am, it’s a tradgedy
[16:39:14] tubbo: ikarius: what does "play" mean?
[16:40:09] ikarius: firing up a business, hoping it becomes successful.
[16:40:42] tbuehlmann: tubbo, couldn't you say something? I visited/drove through philadelphia last year. we could've.. talked or something
[16:40:46] cnr_roxx: has joined #RubyOnRails
[16:41:14] tubbo: tbuehlmann: lol sorry i don't typically broadcast my location on the internet in case someone wants to assassinate me.
[16:41:28] ikarius: and around where I am, it's not uncommon to describe a business as a play.
[16:41:54] dopamean_: has joined #RubyOnRails
[16:41:57] ikarius: .. probably because most of the businesses are funded by VC money, so it's fun to gamble with other people's money :p
[16:42:02] akshat: has joined #RubyOnRails
[16:42:27] mrgreenfur: has left #RubyOnRails: ()
[16:42:27] jowiar: has joined #RubyOnRails
[16:42:41] tubbo: not for long
[16:42:55] mrgreenfur: has joined #RubyOnRails
[16:43:10] ikarius: though I've heard it in other contects too- like "make a play for her", or try to set up circumstances to win a girl
[16:43:26] ikarius: s/contects/contexts/
[16:44:06] tubbo: i find it's more rewarding to think of these things as "projects"
[16:44:10] sonofdirt: has joined #RubyOnRails
[16:44:26] tubbo: although i'm never the business guy in those kinds of arrangements, so that's just how i think of things
[16:45:25] workmad3: I always thought of 'play' as a transfer of American Fake-Rugby terminology from jocks in suits...
[16:45:42] ikarius: I've never spun my own company before, but in this case the idea came along- from a cousin of mine even, and I keep looking at it and it keeps looking promising
[16:46:39] codesoda: has joined #RubyOnRails
[16:47:22] jfelchner: has joined #RubyOnRails
[16:47:47] openstruct: has joined #RubyOnRails
[16:48:14] maxx88: ikarius: good luck on your biz. careful when you get to raising money. i’ve raised money from VC’s and high net worth individuals and its a treacherous path. feel free to ping me if you want some pointers on the land mines.
[16:48:35] tubbo: alternatively, don't raise money. bootstrap that shit :)
[16:48:45] tubbo: i'm doing that right now
[16:49:10] maxx88: totally agreed with tubbo:
[16:49:11] YankNYC: has joined #RubyOnRails
[16:49:32] ikarius: I'm not expecting to raise money from VCs for the first round
[16:50:09] ikarius: hoping to build something w/ mostly off-the-shelf hardware and get a product in the market in ~6-9 months or so
[16:50:20] KensoDev: has joined #RubyOnRails
[16:50:58] ikarius: and then look at potential VC funding for subsequent development- custom hardware and the like.
[16:52:08] ikarius: and I fortunately have some resources to call on when it comes to dealing w/ VCs
[16:52:15] korzybski: has joined #RubyOnRails
[16:52:32] maxx88: ikarius: the longer you wait to raise money the higher your pre-money will be
[16:53:28] ikarius: I'm on good terms with some founders of some pretty successful companies, and they're willing to help me when it comes to that.
[16:55:12] fmcgeough: has joined #RubyOnRails
[16:55:22] maxx88: ikarius: sounds like your first board members. that certainly boosts your pre-money
[16:57:06] ikarius: one of the fun tech challenges will be handling ~50k devices asking "is there updated config for me" every 30-60 seconds or so each.
[16:58:03] ikarius: I'm thinking an unauthenticated front-end server who's sole job is to answer that question, nginx + a C shim backed by memcached
[16:58:07] Papierkorb: ikarius: sounds pretty cache-able though
[16:58:49] mag42c: has joined #RubyOnRails
[16:59:08] ikarius: the only thing a hacker would be able to extract from it would be IDs of devices and/or current dataset versions
[16:59:13] Papierkorb: ikarius: http://updates.the_service.com/device_name/devices_version.json - a simple "yes" or "no" suffices?
[16:59:28] jenrzzz: has joined #RubyOnRails
[16:59:59] drbayer: has joined #RubyOnRails
[17:00:18] ikarius: query will be like "I'm device XYZ, what's the current DB version for my config?" - answer "v9" or something of that ilk
[17:00:55] ikarius: a separate process would run on the memcache server to query the full back-end and populate the memcache store.
[17:01:52] Papierkorb: ikarius: compare redis and memcached with 'real world' data too, I think instagram was quite impressed by redis for API caching stuff. YMMV.
[17:02:18] ikarius: hokay, I can do that.
[17:02:44] myntcake: has joined #RubyOnRails
[17:03:39] ikarius: I've looked around, it looks pretty doable to have the client devices properly validate DNSSec signature and then compare that to https server cert.
[17:04:03] [Butch]: has joined #RubyOnRails
[17:04:44] ikarius: … good thing that the client devices will be raspberry-pi or something similar, arduino wouldn't be enough horsepower for decent crypto validation.
[17:04:56] ppinkerton: has joined #RubyOnRails
[17:06:06] adre: has joined #RubyOnRails
[17:06:28] shanemcd: has joined #RubyOnRails
[17:08:04] tubbo: ikarius: yeah it would be easier if your devices just knew their current version and then checked against the "should i update?" api endpoint, which would of course be served by the http cache after the first update
[17:08:15] tubbo: so it would be fast and cheap to serve back to the client, since it's not changing all the time
[17:08:34] the_villiage_idi: has joined #RubyOnRails
[17:08:46] nettoweb: has joined #RubyOnRails
[17:09:00] tubbo: ikarius: also, if you need a super lightweight JSON API built on top of nginx, i'd suggest OpenResty
[17:09:04] ace05: has joined #RubyOnRails
[17:09:08] nettoweb: Hello gys, Im struggling with prcompile assets deploying with capistrano. https://gist.github.com/osnysantos/d1c0b915da993003fcf4
[17:09:08] the_villiage_idi: has left #RubyOnRails: ()
[17:09:29] tubbo: nettoweb: `javascript_include_tag params[:controller]` is a bad idea.
[17:09:45] nettoweb: The application.js is always with the same filename and number, but the second one always change even with no content changes
[17:10:18] tubbo: nettoweb: it might be trying to compile each time. did you add the name of that JS file to config.assets.precompile?
[17:10:19] nettoweb: tubbo yes, I want to create modules is JS to work with, but the entire project is based on this approach.
[17:11:01] nettoweb: tubbo no, my application.rb is like this: config.assets.precompile += ['homepage.js', 'home.css', 'admin.js']
[17:11:29] dirtibirdi: has joined #RubyOnRails
[17:11:34] tubbo: nettoweb: you might have issues with that, i've always had to add extra files that i want precompiled into config.assets.precompile. either way, i think there's a better way to do what you're doign..
[17:11:35] nettoweb: I tried to add a private/articles.js there but doesnt change anything. continue changing it's filename even with no content changes
[17:12:01] fox_mulder_cp: has joined #RubyOnRails
[17:12:28] nettoweb: tubbo could you soggesting some approach?
[17:13:00] rakm: has joined #RubyOnRails
[17:13:07] nettoweb: Either way I'm trying to fix this first
[17:13:44] DylanJ: How can I (outside the context of a request) get a Rails Apps hostname?
[17:13:48] sneakerhax: has joined #RubyOnRails
[17:14:34] jeanlinux: has joined #RubyOnRails
[17:15:06] ppinkerton: has joined #RubyOnRails
[17:15:51] FCser: has joined #RubyOnRails
[17:16:13] chipotle: has joined #RubyOnRails
[17:16:22] ppinkerton: has joined #RubyOnRails
[17:16:59] Maletor: has joined #RubyOnRails
[17:17:22] tubbo: nettoweb: sorry got dragged away for a minute. my advice is rather than load separate JS files per controller, use Sprockets to //= require your javascript files into application.js, then keep with the default <%= javascript_include_tag 'application' %>.
[17:18:02] tubbo: DylanJ: don't think that's possible, since the hostname is populated on a per-request basis. that's why you can serve a rails app from multiple domains.
[17:18:23] nettoweb: tubbo but I need specific JS per pages, for example a WYSIWYG in some rare pages
[17:19:37] tubbo: nettoweb: well first of all it's a lot better to load all the JS on the first request so that subsequent requests are faster (this led to the development of turbolinks), and instead of conditionally loading JS files and making additional HTTP requests, reload the code that's already been loaded. jQuery, for example, won't bind events to elements you've selected that aren't on the page.
[17:21:40] nettoweb: but my website is huge with more than 50 JS files, each group for each section of website.
[17:21:45] mrgreenfur: has joined #RubyOnRails
[17:21:51] nettoweb: that why Im using this approach
[17:22:01] DoctorMonocular: has joined #RubyOnRails
[17:25:48] tubbo: nettoweb: your JS could be organized in such a way that only the JS that is needed for a page is actually executed.
[17:26:01] Papierkorb: nettoweb: Consider making a compromise. bundle scripts you need for a specific subset of pages which somewhat belong together. How large is the total script size?
[17:26:07] nettoweb: tubbo you mean using something like requireJS?
[17:26:20] tubbo: nettoweb: you don't have to use that. sprockets can do what i'm saying.
[17:26:26] Papierkorb: nettoweb: the download size, not the on-disk size of development JS files
[17:26:39] tubbo: nettoweb: here's an extremely small example :) https://github.com/waxpoetic/brotherly/blob/master/app/assets/javascripts/application.js
[17:27:17] diegok: has joined #RubyOnRails
[17:27:22] diegok: has joined #RubyOnRails
[17:27:52] tubbo: nettoweb: but just so you know, we average at about 50ms browser render time per request. and our application.js is 170 lines long before we begin adding customizations. each line is another JS file. just to give you an idea of the scale.
[17:29:27] nettoweb: well I think putting ckeditor in application.js could be a bad idea, dont know exactly.
[17:29:32] chadhs: has joined #RubyOnRails
[17:33:48] railsForDaiz: has joined #RubyOnRails
[17:35:12] tubbo: nettoweb: yeah so ckeditor is the one exception i'd make there
[17:36:41] baweaver: has joined #RubyOnRails
[17:38:28] durexlw: in rails 4, how do we do a "Model.select("something").where( a = 1 OR b = 2) ? So, a where statement, with on 'or' the other
[17:39:35] goodcodeguy: has joined #RubyOnRails
[17:40:01] DoctorMo_: has joined #RubyOnRails
[17:40:03] nettoweb: tubbo right, thanks
[17:42:23] Disavowed: has joined #RubyOnRails
[17:42:26] korzybski: has joined #RubyOnRails
[17:42:44] jxs_: has joined #RubyOnRails
[17:43:08] tbuehlmann: durexlw: by using arel or a raw SQL string
[17:43:43] durexlw: tbuehlmann: ok, thanks. I'll keep looking: arel seems to freak out... used the arel site
[17:44:03] tbuehlmann: didn't understand the last sentence
[17:44:19] workmad3_: has joined #RubyOnRails
[17:44:30] delgiudices: has joined #RubyOnRails
[17:44:59] delgiudices: how can i apply scope with param on railsadmin?
[17:47:35] yoshie902a: has joined #RubyOnRails
[17:47:55] yoshie902a: Anyone have a solution to this http://stackoverflow.com/questions/35729695/conditional-validation-rails-model
[17:48:04] msyvich: has joined #RubyOnRails
[17:49:20] abolishme: has joined #RubyOnRails
[17:49:22] workmad3: has joined #RubyOnRails
[17:50:58] rizenine: has joined #RubyOnRails
[17:52:43] flashpoint9: has joined #RubyOnRails
[17:53:27] wldcordeiro: has joined #RubyOnRails
[17:54:24] Champion_The: has joined #RubyOnRails
[17:54:55] cnk: has joined #RubyOnRails
[17:56:05] delgiudices: Is there a way i can filter by user a model in railsadmin
[17:56:29] godzillaenlacasa: has joined #RubyOnRails
[17:57:32] adre: has joined #RubyOnRails
[17:57:32] sp1rs: has joined #RubyOnRails
[17:58:31] Tref: has joined #RubyOnRails
[17:58:55] stannard_: has joined #RubyOnRails
[18:00:21] jenrzzz: has joined #RubyOnRails
[18:02:22] bronson: has joined #RubyOnRails
[18:02:42] Champion_The: hi, can you help me I added gem font-awesome to my app, now I use 2 main layouts, index and application, problem is that font-awesome applies only to application layout
[18:03:01] sleungcy: has joined #RubyOnRails
[18:03:05] korzybski: has joined #RubyOnRails
[18:04:55] durexlw: tbuehlmann: I used http://www.scuttle.io/ to see if I could use AREL, but the query I use, doesn't work. Using sql does however... that'll do for now
[18:05:00] durexlw: laterz all
[18:05:07] RockLee: has joined #RubyOnRails
[18:05:17] baweaver: has joined #RubyOnRails
[18:08:19] pawnbox: has joined #RubyOnRails
[18:08:53] shanemcd: has joined #RubyOnRails
[18:10:53] intrigueD: has joined #RubyOnRails
[18:11:18] Pazician: has joined #RubyOnRails
[18:11:50] dirtibirdi: has joined #RubyOnRails
[18:13:55] Champion_The: has left #RubyOnRails: ("Leaving")
[18:14:25] Pazician: has joined #RubyOnRails
[18:15:24] DoctorMonocular: has joined #RubyOnRails
[18:15:34] jeanlinux: has joined #RubyOnRails
[18:16:52] slash_nick: Is there a way, similar to how raising ActiveModel::ForbiddenAttributes results in a "400 Bad Request", to cause a "flow through a predefined raise/rescue flow to end up as" a, say 401? I tried raising ActiveResource::UnauthorizedAccess, but no luck there.
[18:17:20] johnflux: has joined #RubyOnRails
[18:17:21] johnflux: has joined #RubyOnRails
[18:17:51] flashpoint9: has joined #RubyOnRails
[18:19:26] ppinkerton: has joined #RubyOnRails
[18:20:46] ppinkert_: has joined #RubyOnRails
[18:21:56] drbayer: has joined #RubyOnRails
[18:22:00] FrankCastle: btw, folks, how old are you? I'm 27 and I've just started and I wonder if I'm too old and if it would be difficult for me finding a job
[18:23:19] nerium: has joined #RubyOnRails
[18:23:38] rdavila: has joined #RubyOnRails
[18:23:39] slash_nick: FrankCastle: age doesn't factor in to our hiring decisions...
[18:24:00] slash_nick: can't speak for everyone... but i think everyone will have to at least claim the same, true or not
[18:24:55] deur-: FrankCastle: for what it's worth; i've known two devs who switched careers at 32 and 34
[18:25:11] deur-: if you enjoy it and keep learning, you'll do fine
[18:25:15] jeanlinux: has joined #RubyOnRails
[18:25:32] deur-: they did anyway
[18:26:06] maesitos: has joined #RubyOnRails
[18:26:18] emachnic: has joined #RubyOnRails
[18:26:40] johnflux: has joined #RubyOnRails
[18:27:21] ikarius: I switched from IT (high end, but still IT) to development at 40+
[18:27:53] allcentury: has joined #RubyOnRails
[18:28:12] blackmesa: has joined #RubyOnRails
[18:28:19] ppinkerton: has joined #RubyOnRails
[18:28:19] ikarius: admittedly, I had programmed as far back as 6th grade, but I hadn't done it professionally for ~20 years when I switched to development.
[18:28:27] sleungcy: has joined #RubyOnRails
[18:28:39] gmci: has joined #RubyOnRails
[18:29:25] arBmind: has joined #RubyOnRails
[18:29:33] tejasmanohar: has joined #RubyOnRails
[18:29:43] chipotle: has joined #RubyOnRails
[18:29:55] go-nuts: has joined #RubyOnRails
[18:29:57] DiabolikFreenode: has joined #RubyOnRails
[18:30:01] IrishGringo: has joined #RubyOnRails
[18:30:16] yoshie902a: has left #RubyOnRails: ()
[18:31:11] go-nuts: I do Model.find_by_sql(ugly_query) ---> unfortunately it doesnt map to an instance of the model like instance_model.join(:foo).select("blah"). any advise?
[18:31:18] magically_: has joined #RubyOnRails
[18:31:26] ebryn_: has joined #RubyOnRails
[18:31:46] cjk101010_: has joined #RubyOnRails
[18:31:48] bitwise_: has joined #RubyOnRails
[18:32:03] jlyndon_: has joined #RubyOnRails
[18:32:11] RockLee: has joined #RubyOnRails
[18:33:51] djinni`_: has joined #RubyOnRails
[18:34:41] dionysus69: I submitted a form for rails slack community and I didn't get an email or anything so how does it work does someone has to check it and approve it or??
[18:34:45] jhill_: has joined #RubyOnRails
[18:35:41] foli_: has joined #RubyOnRails
[18:37:03] Guest34101: has joined #RubyOnRails
[18:37:04] podman: has joined #RubyOnRails
[18:37:06] trinaldi: has joined #RubyOnRails
[18:37:20] jhass|off: has joined #RubyOnRails
[18:37:28] Trynemjoel2: has joined #RubyOnRails
[18:37:43] null__: has joined #RubyOnRails
[18:37:43] null__: has joined #RubyOnRails
[18:39:11] baweaver: has joined #RubyOnRails
[18:43:28] kerunaru: has joined #RubyOnRails
[18:43:38] BtcBen: has joined #RubyOnRails
[18:44:10] hnanon: has joined #RubyOnRails
[18:44:56] hnanon: I just started getting a weird error: undefined method `fetch_value' for nil:NilClass
[18:44:59] arBmind: has joined #RubyOnRails
[18:45:06] hnanon: It's related to my Company model or controller.
[18:45:15] mag42c_: has joined #RubyOnRails
[18:45:18] foli_: i have issues to style my rails form_for with bootstrap
[18:45:38] hnanon: Pointing to this line at my company index page: <% @companies.each do |company| %>
[18:45:52] foli_: i can get the sign_in botton to align with the rest of the form
[18:46:16] hnanon: And also pointing to this line in my users show page: <td><%= @user.company.name %></td>
[18:46:29] hnanon: "company" is commone between the two.
[18:46:38] maxdoubt: has joined #RubyOnRails
[18:46:46] delgiudices: Solution to this anyone? http://stackoverflow.com/questions/35730383/how-to-filter-records-in-railsadmin-list
[18:47:25] foli_: this is the code http://pastebin.com/0sVdXWsg
[18:47:41] hnanon: Same problem for all views that reference "company."
[18:47:49] maxdoubt: i’ve got a bunch of tests that are failing after 6pm. my test environment is set to Central Time (US & Canada), my database is set to US/Central… what am I missing here?
[18:48:12] hnanon: FWIW, companies were created by seeding from a csv file.
[18:48:47] euphoriaa: has joined #RubyOnRails
[18:48:51] Puffball: has joined #RubyOnRails
[18:48:58] hahuang65: has joined #RubyOnRails
[18:49:52] kp666: has joined #RubyOnRails
[18:50:17] helpa: has joined #RubyOnRails
[18:50:36] JoshL: has joined #RubyOnRails
[18:50:41] MuffinPimp: has joined #RubyOnRails
[18:50:43] moei: has joined #RubyOnRails
[18:51:05] B1n4r10: has joined #RubyOnRails
[18:51:32] agent008: has joined #RubyOnRails
[18:51:41] foli_: helpa: did you see ir
[18:51:41] AntiSpamMeta: has joined #RubyOnRails
[18:52:04] agent008: has joined #RubyOnRails
[18:52:38] agent008: has joined #RubyOnRails
[18:52:43] hnanon: foli_: helpa is a bot.
[18:52:48] null__: has joined #RubyOnRails
[18:52:48] null__: has joined #RubyOnRails
[18:52:51] hackeron: has joined #RubyOnRails
[18:53:00] Liothen: has joined #RubyOnRails
[18:53:00] Liothen: has joined #RubyOnRails
[18:53:11] agent008: has joined #RubyOnRails
[18:53:18] agoldboi: has joined #RubyOnRails
[18:55:17] foli_: have issues styling this rails form_for gist:0370e1a6155173bbf4e2
[18:55:42] foli_: https://gist.github.com/foliwe/0370e1a6155173bbf4e2
[18:55:44] msyvich: has joined #RubyOnRails
[18:56:17] foli_: neeh help styling this form_for and bootstrap
[18:57:44] Gabriel403: has joined #RubyOnRails
[18:57:44] Gabriel403: has joined #RubyOnRails
[18:57:45] armyriad: has joined #RubyOnRails
[18:58:18] arup_r: has joined #RubyOnRails
[18:59:17] foli_: bootstap and rails help?
[18:59:27] djellemah: has joined #RubyOnRails
[19:00:28] kerunaru: has joined #RubyOnRails
[19:01:10] kies^: has joined #RubyOnRails
[19:01:15] jenrzzz: has joined #RubyOnRails
[19:01:44] lacuna: has joined #RubyOnRails
[19:02:01] B1n4r10: has joined #RubyOnRails
[19:02:05] Surt_Q: has joined #RubyOnRails
[19:03:21] djbkd: has joined #RubyOnRails
[19:03:51] smathy: has joined #RubyOnRails
[19:04:09] cookiez: has joined #RubyOnRails
[19:04:38] Ergo: has joined #RubyOnRails
[19:05:45] KensoDev: has joined #RubyOnRails
[19:06:32] manfrin: has joined #RubyOnRails
[19:07:29] wldcordeiro: has joined #RubyOnRails
[19:10:13] prgmmr: has joined #RubyOnRails
[19:10:18] ace05: has joined #RubyOnRails
[19:10:41] ss_much: has joined #RubyOnRails
[19:12:09] Devalo_: has joined #RubyOnRails
[19:12:09] Kryptonical: has joined #RubyOnRails
[19:12:25] mfaeh: has joined #RubyOnRails
[19:12:29] pawnbox_: has joined #RubyOnRails
[19:12:52] arBmind1: has joined #RubyOnRails
[19:13:00] makerops_: has joined #RubyOnRails
[19:13:07] kerunaru: has joined #RubyOnRails
[19:13:24] ur5us: has joined #RubyOnRails
[19:13:26] jfelchner: has joined #RubyOnRails
[19:13:56] shanemcd: has joined #RubyOnRails
[19:14:10] adre: has joined #RubyOnRails
[19:15:07] maxx88: foli_: page 113 of rails4 in action has a really good example of form_for using bootstrap and simple_form, don’t feel qualified to give advice beyond that
[19:15:13] ayoros: has joined #RubyOnRails
[19:15:51] leofrozenyogurt: has joined #RubyOnRails
[19:17:01] Kryptonical: has joined #RubyOnRails
[19:19:08] Megamos: has joined #RubyOnRails
[19:21:40] foli_: maxx88: thank
[19:21:50] uglybandersnatch: has joined #RubyOnRails
[19:23:04] josephkokenge: has joined #RubyOnRails
[19:23:13] fox_mulder_cp: has joined #RubyOnRails
[19:23:18] rafaelfranca: has joined #RubyOnRails
[19:24:10] mustmodify: has joined #RubyOnRails
[19:24:48] mustmodify: I have a memory leak. What's the process for isolating it?
[19:25:56] nzst`: has joined #RubyOnRails
[19:26:52] Sephyros: has joined #RubyOnRails
[19:26:53] foli_: maxx88: is this book free or for sale?
[19:27:39] nurey: has joined #RubyOnRails
[19:27:58] Sephyros: How i can do a where query with 2 options to same column? like User.where(name: "Don" or "Ed")
[19:27:59] chouhoulis: has joined #RubyOnRails
[19:28:04] maxx88: foli_: its by ryan bigg, yehuda katz, steve blabnick and rebecca skinner
[19:28:57] tbuehlmann: Sephyros, you can provide an array, as in User.where(name: ['Don', 'Ed'])
[19:28:59] maxx88: foli_: i bought mine via amazon, lots of good stuff in it, i use it as a reference
[19:29:31] kalzz: has joined #RubyOnRails
[19:31:32] cookiez: has joined #RubyOnRails
[19:31:32] tim_s007: has joined #RubyOnRails
[19:31:32] kumavis: has joined #RubyOnRails
[19:31:32] dotty: has joined #RubyOnRails
[19:31:32] jcugno: has joined #RubyOnRails
[19:31:32] manveru: has joined #RubyOnRails
[19:31:32] ciree: has joined #RubyOnRails
[19:31:32] sneep: has joined #RubyOnRails
[19:31:32] Isthar: has joined #RubyOnRails
[19:31:32] JonasOSDever: has joined #RubyOnRails
[19:31:32] robbkidd: has joined #RubyOnRails
[19:31:32] voker57: has joined #RubyOnRails
[19:31:32] gremax: has joined #RubyOnRails
[19:31:32] toydestroyer: has joined #RubyOnRails
[19:31:32] waldi_: has joined #RubyOnRails
[19:31:32] drPoggs: has joined #RubyOnRails
[19:31:32] elektronaut: has joined #RubyOnRails
[19:31:32] phrozen77: has joined #RubyOnRails
[19:31:33] soahccc: has joined #RubyOnRails
[19:31:33] artmann: has joined #RubyOnRails
[19:32:03] dirtibirdi: has joined #RubyOnRails
[19:32:04] baweaver: has joined #RubyOnRails
[19:32:11] tim_s007: has joined #RubyOnRails
[19:33:05] gabeodess: has joined #RubyOnRails
[19:33:53] dotty: has joined #RubyOnRails
[19:34:24] manveru: has joined #RubyOnRails
[19:34:30] phrozen77: has joined #RubyOnRails
[19:34:34] gabeodess: Howdy, I’m trying to delve into the world of documenting my code, and am not quite sure what’s not working. I went through and added a comment to each method in one of my classes, then ran `spring rake doc:app` but when I opent the `index.html` file, I see a list of all the methods, but no documentation. Can anyone help me figure out what I’m missing here? https://gist.github.com/gabeodess/5f22b88a95783d833b2b
[19:34:47] jai-droid: has joined #RubyOnRails
[19:36:20] kumavis: has joined #RubyOnRails
[19:37:28] shanemcd: has joined #RubyOnRails
[19:37:33] delgiudices: has joined #RubyOnRails
[19:39:18] gabeodess: If I remove one of the comments and run `rake doc:app` again I can see the undocumented methods in the output increases by 1, so it seems like it knows the comments are there, it just isn’t rendering them for some reason?
[19:40:15] Dbugger: has joined #RubyOnRails
[19:40:41] Dbugger: Hey fellas, can you give me a hand. My app has not been working for 2 days, and I have no idea why?! It is in this URL: http://46.101.193.154/
[19:40:43] dudo: has joined #RubyOnRails
[19:40:45] Dbugger: I am using Puma
[19:41:23] dudo: Morning, folks!
[19:42:02] Dbugger: I really do not know much about puma, I just followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-puma-and-nginx-on-ubuntu-14-04
[19:42:34] Cohedrin: has joined #RubyOnRails
[19:43:11] deur-_: has joined #RubyOnRails
[19:43:17] dudo: Anyone here know how to assign a serializer to a model?
[19:43:28] dudo: active_model_serializers
[19:43:48] dudo: I have a namespaced serializer, and I'd like to use one of my main models
[19:43:49] maxx88_: has joined #RubyOnRails
[19:44:44] slash_nick: dudo: does it not "just work"?
[19:45:11] Disavowe1: has joined #RubyOnRails
[19:45:27] slash_nick: module Namespace; class YourModel < ActiveModelSerializers::Model; end; end?
[19:46:01] Disavowe1: has joined #RubyOnRails
[19:46:03] michael_mbp: has joined #RubyOnRails
[19:46:21] dudo: class Novatraq::LoanSerializer < ActiveModel::Serializer
[19:46:38] dudo: and the model I want to serialize is Loan
[19:46:56] dudo: ActiveModel::SerializableResource.new(Loan.last).serializer gives me nil
[19:46:58] slash_nick: and if you s/LoanSerializer/Loan/, does it work then?
[19:47:30] slash_nick: dudo: also, what version of AMS are you using?
[19:47:34] Sephyros: i asked the wrong question.... i have a User with role_ids column, i need find all users that have role_ids: [1,3], i tried User.where(role_ids: [1,3]) wont work
[19:48:18] Disavowe1: has joined #RubyOnRails
[19:48:35] Sephyros: because the quesy search role_ids on USERS not on each user
[19:49:01] dudo: ohhh, i see what you mean
[19:49:04] dudo: lemme try
[19:49:18] Sephyros: maybe u = User.all and then u.each do |user| bla bla bla?
[19:50:41] slash_nick: dudo: looks like they test it, but in their tests the model has the same namespace as the serializer: https://github.com/rails-api/active_model_serializers/blob/7bc66c53342540a5a6e9506abdbc04db0c2c966d/test/serializers/serializer_for_test.rb#L104-L116
[19:50:59] dudo: so, i do get the serializer I expect if i remove the namespace
[19:51:00] slash_nick: dudo: you could probably add a test case to their project to see if it should work
[19:51:27] dudo: ah, that's the thing. the resource isn't namespaced
[19:51:46] dudo: the resource is just models/loan.rb
[19:52:08] dudo: the serializer is serializers/namespace/namespace_loan_serializer.rb
[19:52:48] rafaelfranca: has joined #RubyOnRails
[19:52:50] Sephyros: i found the answer :D thanks anyway, used User.find_each(role_ids: [1,3])
[19:52:53] shinnya: has joined #RubyOnRails
[19:52:57] slash_nick: I'd try to make sure that lookup is enabled, and if it is enabled and still not working, file a ticket requesting support for that feature ... https://github.com/rails-api/active_model_serializers/blob/master/test/support/serialization_testing.rb#L34-L40
[19:53:46] myntcake: has joined #RubyOnRails
[19:53:57] unreal: has joined #RubyOnRails
[19:54:00] dudo: can you pass the model to the serializer, or vice verse?
[19:54:04] Sephyros: damn i got enum... but i want an activerecord relation =/
[19:54:07] dudo: s/verse/versa
[19:54:27] dudo: Sephyros
[19:54:54] dudo: User.joins(:roles).where(roles: {id: [1,3]})
[19:55:56] wldcordeiro: has joined #RubyOnRails
[19:56:24] nurey: has joined #RubyOnRails
[19:56:26] DoctorMonocular: hey, how can I add an arbitrary class to an input element using simple_form? I need to do one off classes sometimes, but I can't figure out the option
[19:56:52] DoctorMonocular: all the result are about custom controls, I don't want that, I just want to attach an arbitrary class to the input tag from my view
[19:57:27] Sephyros: worked... but something is strange... got only 8 results, expected 29 AND some of these 8 values are repeated... but i will try some variations :D
[19:58:03] dudo: joins only returns users that have roles
[19:58:20] dudo: User.includes(:roles).where(roles: {id: [1,3]}).uniq
[19:58:23] dudo: try that
[19:58:28] mustmodify: has left #RubyOnRails: ()
[19:59:00] jscheel: has joined #RubyOnRails
[19:59:18] Sephyros: nah... well, thanks anyway, i try more tomorrow... work time ended :D
[19:59:20] Sephyros: lets go home
[20:02:26] solars: has joined #RubyOnRails
[20:04:04] bronson: has joined #RubyOnRails
[20:04:15] dirtibirdi: has joined #RubyOnRails
[20:04:31] chouhoul_: has joined #RubyOnRails
[20:05:18] arup_r: ok, my brain is not working any more.. can you see why the error https://gist.github.com/aruprakshit/d84f7b498a32f15ddaed ?
[20:06:10] drbayer: has joined #RubyOnRails
[20:06:12] dudo: on line 10
[20:06:19] chouhoul_: has joined #RubyOnRails
[20:06:33] dudo: <span class:"glyphicon glyphicon-plus-sign">
[20:06:39] arup_r: why.. that is plain html..
[20:07:33] dudo: might consider using link_to_if as well
[20:07:39] drbayer_: has joined #RubyOnRails
[20:07:59] dudo: and just add { } after it (so it doesn't show up at all if false)
[20:08:02] arup_r: dudo: no. link_to_if will not work in my case
[20:08:16] arup_r: I will use content_tag :span, class: """
[20:08:57] maxdoubt: i’m totally lost on this timestamp issue… when i run tests, its creating records 4 hours ahead of the time i’m setting using Timecop ?!?
[20:11:43] ace05: has joined #RubyOnRails
[20:11:56] Radar: maxdoubt: !code
[20:11:56] helpa: maxdoubt: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[20:11:59] Radar: GOOD MORNING
[20:12:18] dudo: viet nam!
[20:13:13] pawnbox: has joined #RubyOnRails
[20:13:19] manfrin_: has joined #RubyOnRails
[20:14:17] ql6wlld: has joined #RubyOnRails
[20:15:25] dirtibirdi: has joined #RubyOnRails
[20:16:23] bga57: has joined #RubyOnRails
[20:16:27] maxdoubt: Radar, helpa: sorry - https://gist.github.com/maxdoubt/ce31753dec8fd086e471
[20:18:04] dudo: slash_nick: ActiveModel::SerializableResource.new(loan, serializer: Novatraq::LoanSerializer)
[20:18:34] dudo: you can explicitly pass the serializer... easy enough. I was hoping you could define that on the serializer (or the model, for that matter)
[20:18:38] dudo: all good, though
[20:18:56] slash_nick: right, glad it's supported... it's definitely a foreseeable use case
[20:19:04] tvw: has joined #RubyOnRails
[20:19:28] trxtr: has joined #RubyOnRails
[20:19:42] chipotle: has joined #RubyOnRails
[20:21:09] flashpoint9: has joined #RubyOnRails
[20:21:44] benlieb: has joined #RubyOnRails
[20:21:53] ace05: has joined #RubyOnRails
[20:21:55] qejk: has joined #RubyOnRails
[20:22:28] Radar: https://gist.github.com/maxdoubt/ce31753dec8fd086e471#file-gistfile1-txt-L33-L34
[20:22:32] Radar: maxdoubt: ^ this should probs be Time.current
[20:22:41] Radar: maxdoubt: as should this: https://gist.github.com/maxdoubt/ce31753dec8fd086e471#file-gistfile1-txt-L18
[20:23:30] maxdoubt: Radar: k, i’ll try modifying… appreciate any insights, seriously confused between rails and the db at this point
[20:24:42] Papierkorb: Does devise work with Rails5 already?
[20:26:01] flashpoint9: has joined #RubyOnRails
[20:27:01] maesitos: has joined #RubyOnRails
[20:27:51] cnr_roxx: has joined #RubyOnRails
[20:28:08] netzfisch: has joined #RubyOnRails
[20:30:31] nurey: has joined #RubyOnRails
[20:30:51] yellow5: has joined #RubyOnRails
[20:31:53] Pazician: has joined #RubyOnRails
[20:32:23] tubbo: Papierkorb: !try (i'm curious as well)
[20:32:23] helpa: Papierkorb: Why don't you try it and find out for yourself?
[20:32:59] Papierkorb: tubbo: never used devise before, so I figured that if it doesn't work, either I messed up, or rails, which brings me to the beginning ;)
[20:33:44] FooMunki: has joined #RubyOnRails
[20:34:56] tubbo: in that case i suppose i'd set up devise on a 4.2 app, then upgrade that to a 5.0 app
[20:34:59] tubbo: Papierkorb: ^
[20:35:10] tubbo: make sure it boots and works before trying the upgrade
[20:35:30] maxdoubt: Radar: a more accurate version of what i’m trying to test - https://gist.github.com/maxdoubt/aa083d810708d60c7ec5 - switching to Time.current doesn’t appear to fix anything
[20:36:55] Dbugger: Guys, really, I need help. I have no idea what my app does not work in production... can someone tell me why I get an error on the server?
[20:37:28] tubbo: dbugger: well something that jumps out at me immediately... #1 i think your shit might be weak, and #2, you're probably doing it wrong.
[20:37:28] Radar: maxdoubt: then I don't know, sorry. I would need to see this happening for myself on my own machine.
[20:37:37] Radar: tubbo: not helping?
[20:37:40] Radar: dbugger: !rule0
[20:37:40] helpa: dbugger: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[20:38:02] maxdoubt: Radar: yeah, i hear ya, thanks for looking at it though
[20:38:09] tubbo: dbugger: if you could provide a gist to the error backtrace that would be helpful
[20:38:09] Dbugger: Radar, tubbo, the problem is that I have nothing! Logs show nothing, error page shows nothing but "Error". I have no idea where to look at....
[20:38:43] Dbugger: tubbo, what stacktrace? All I get is a "We're sorry, but something went wrong. If you are the application owner check the logs for more information." but the logs are empty!
[20:39:10] Radar: dbugger: Hire a consultant to look at it with you
[20:39:16] Radar: dbugger: looking at logs/production.log?
[20:39:25] fox_mulder_cp: ooh. We had to euthanize the dog :(
[20:39:27] tubbo: dbugger: hmm, what happens when you just run `bundle exec rails server` on the prod server?
[20:39:45] Dbugger: Radar, that file is 0 bytes
[20:39:49] Radar: dbugger: great
[20:40:00] trosborn: has joined #RubyOnRails
[20:40:03] Radar: dbugger: hard for us to debug with no other info than "it's not working"
[20:40:19] m0rph: has joined #RubyOnRails
[20:40:28] Dbugger: tubbo, if I do that... the built in server starts
[20:40:35] baweaver: has joined #RubyOnRails
[20:40:46] tubbo: dbugger: that's good, so can you browse to http://your.production.domain:3000 and see the site?
[20:40:47] Dbugger: Radar, I know. I understand it, and Im sorry, but really, I have no idea what other info I could show you
[20:40:52] Dbugger: tubbo, let me see
[20:41:16] wviana: has joined #RubyOnRails
[20:41:39] Dbugger: tubbo, in that case I get a "This webpage is not available"...
[20:41:51] tubbo: i don't know what that error is
[20:41:54] Dbugger: tubbo, is the built-in webserver reachable outside the network?
[20:42:06] Dbugger: tubbo, I think that is just Chrome's 404 default page
[20:42:07] tubbo: dbugger: depends on how you configured your production server
[20:42:36] Dbugger: the configuration is exactly the one in this tutorial: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-puma-and-nginx-on-ubuntu-14-04
[20:42:36] stannard: has joined #RubyOnRails
[20:42:43] tubbo: dbugger: try `curl`ing it from the prod server, `curl http://localhost:3000`. it should render the HTML content of your home page.
[20:42:50] Dbugger: tubbo, ok, let me try
[20:42:59] wviana: Hi there, every time that I try to access localhost:3000/500 I get an We're sorry, but something went wrong. I tried to read the ./log/development.log but There is nothing there. Even when looking into the rails s console nothing happens when trying to access the /500. Any tips ?
[20:43:04] Dbugger: but you want me to do it from the server? or locally?
[20:43:20] tubbo: dbugger: but just so you know, a big red flag is that `rails server` initiates "the built-in server", which is webrick. that's not supposed to happen if you're using rails 4+ and puma.
[20:43:35] trosborn: Hi Rails fam. I am having trouble passing attributes to a self joined model. I think because the model belongs to both itself and another model, I need to use a polymorphic relationship. Can anyone take a look at this error code and code for me? Thanks. https://gist.github.com/trosborn/fe11256fe692457c0826
[20:43:47] tubbo: dbugger: i want you to run the curl command from the prod server. just want to see if the rails server will serve requests.
[20:43:51] tubbo: like, directly
[20:43:55] tubbo: before adding nginx into the mix
[20:44:13] fox_mulder_cp: trosborn: i some months ago make a recursive relations :)
[20:44:15] Dbugger: tubbo, when I run "curl localhost:3000" on the production server, it works
[20:44:44] Dbugger: tubbo, sorry, I mispoke. It started puma, not the built-in server. you are right
[20:45:11] s1|verfox: has joined #RubyOnRails
[20:45:29] tubbo: dbugger: ok great. sounds like an nginx configuration problem, nginx can't connect to puma over a local unix (or tcp) socket and therefore can't proxy_pass to the rails app for dynamic requests.
[20:46:11] Dbugger: tubbo, ok... any idea how I could find out what is wrong? (kinda weird, since it has been working for months...)
[20:46:41] tubbo: dbugger: i'd check the nginx error logs
[20:46:44] trosborn: fox_mulder_cp: cool, could you maybe take a lot at my error and see if a self join will fix it?
[20:47:06] Dbugger: tubbo, those are empty too...
[20:47:06] dirtibirdi: has joined #RubyOnRails
[20:47:22] tubbo: dbugger: oh sorry, it could also be some kind of weird permissions issue
[20:47:59] Dbugger: dbugger, the log files in /var/log/nginx/ have 0 bytes...
[20:48:06] Dbugger: tubbo, the log files in /var/log/nginx/ have 0 bytes...
[20:48:26] Dbugger: tubbo, I see... any idea where it could be..?
[20:49:03] chendry: has joined #RubyOnRails
[20:49:04] baweaver: has joined #RubyOnRails
[20:49:37] fox_mulder_cp: trosborn: http://stackoverflow.com/questions/8236796/writing-associations-for-a-recursive-relationship
[20:49:39] B4daBing73: has joined #RubyOnRails
[20:49:45] Dbugger: tubbo, /etc/nginx/ has everything set to "root:root" Do you think it should be www-data:www-data?
[20:49:53] tubbo: dbugger: no idea
[20:50:12] tubbo: dbugger: but i know that it's not rails' problem :) perhaps #nginx might be able to help, as they've dealt with these pitfalls a lot more frequently than I have
[20:50:42] n008f4g_: has joined #RubyOnRails
[20:50:44] tubbo: but when you told me that `curl localhost:3000` works from the production server, that's how i know that rails is working it's just not proxy_passing correctly or something
[20:50:55] Dbugger: tubbo, you think that if nginx is really the part that is not working? After all... I do get to see the Rails error page..
[20:50:59] tubbo: dbugger: nginx not having permission to read/write log files might also be the culprit here.
[20:51:14] tubbo: it definitely should have logs somewhere
[20:51:24] jscheel: has joined #RubyOnRails
[20:52:20] Dbugger: tubbo, you mean that nginx does not have permission to write in /var/log?
[20:52:28] tubbo: dbugger: that's a possibility, yeah
[20:52:37] tubbo: i know i've dealt with that before
[20:52:57] tubbo: or else, maybe the rails server doesn't have access?
[20:53:08] trosborn: fox_mulder_cp: Thanks!
[20:53:08] wviana: Hello, where do I get this error log ? "We're sorry, but somethin went wrong"
[20:53:11] wviana: Hi there, every time that I try to access localhost:3000/500 I get an We're sorry, but something went wrong. I tried to read the ./log/development.log but There is nothing there. Even when looking into the rails s console nothing happens when trying to access the /500. Any tips ?
[20:53:13] arup_r: has joined #RubyOnRails
[20:53:18] Dbugger: tubbo, "/var/log/nginx/access.log" and "/var/log/nginx/error.log" belong to "www-data:adm"
[20:53:29] Dbugger: so it should have permission...
[20:54:10] tubbo: wviana: there's no error, you're literally visiting the 500.html page :P
[20:54:32] tubbo: wviana: go to localhost:3000/404 and tell me what you get :)
[20:54:33] wviana: tubbo: :o , I would never get it. hahaha
[20:55:47] pvertenten: has joined #RubyOnRails
[20:55:52] wviana: tubbo: Any suggestion ? Is there some way to get the static pages before try the controller ?
[20:55:53] jmignault: has joined #RubyOnRails
[20:55:55] alex88: has joined #RubyOnRails
[20:56:10] tubbo: wviana: no.
[20:56:23] tubbo: wviana: my suggestion is to not make your route named '/500' or '/404' :P
[20:56:52] kuroro: has joined #RubyOnRails
[20:56:55] kuroro: has left #RubyOnRails: ()
[20:57:43] Dbugger: tubbo, it is also not normal that access.log is empty, even though I get an Rails error, no?
[20:57:51] wviana: tubbo: what about to delete the 404, 422 and 500 .html ?
[20:57:52] rubyonrailed: I just moved a class out of my active record models, and now delayed_job `handle_asynchronously` is not working. Has anyone had a problem with this before? https://gist.github.com/JasonMannon/2a871edf822c145c56f2
[20:57:57] arup_r: wviana: with a controller also you can set up the static pages
[20:58:26] tubbo: dbugger: that is correct.
[20:58:42] tubbo: dbugger: at the very least, your logs should have _something_ in them. that is, unless nginx is logging elsewhere :)
[20:58:51] arup_r: oh, I jumped into the middle, sorry. nvm, you may ignore me..
[20:59:02] robbyoconnor: has joined #RubyOnRails
[20:59:12] tubbo: rubyonrailed: yeah, you need to include the module that implements handle_asynchronously on ActiveRecord::Base, which is usually included by default.
[20:59:19] tubbo: rubyonrailed: iirc it's `include Delayed::Extensions` or something
[20:59:28] Radar: rubyonrailed: !didntwork
[20:59:28] helpa: rubyonrailed: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[21:00:42] stannard: has joined #RubyOnRails
[21:01:25] Rodya_: has joined #RubyOnRails
[21:01:43] shanemcd: has joined #RubyOnRails
[21:02:03] josephkokenge: has joined #RubyOnRails
[21:03:16] jenrzzz: has joined #RubyOnRails
[21:05:12] stannard: has joined #RubyOnRails
[21:06:11] srinidhi: has joined #RubyOnRails
[21:06:26] Radar: wviana: Why do you want /404 and /500, etc?
[21:07:11] flashpoint9: has joined #RubyOnRails
[21:07:25] joshkovach: has joined #RubyOnRails
[21:13:12] quazimodo: has joined #RubyOnRails
[21:16:00] FernandoBasso: has joined #RubyOnRails
[21:17:17] jgpawletko: has joined #RubyOnRails
[21:18:02] n008f4g_: has joined #RubyOnRails
[21:19:18] jenrzzz: has joined #RubyOnRails
[21:20:05] sloggerkhan: has joined #RubyOnRails
[21:20:32] mrbubbles: has joined #RubyOnRails
[21:20:47] goodcodeguy: has joined #RubyOnRails
[21:20:50] snowy: has joined #RubyOnRails
[21:21:19] RockLee: has joined #RubyOnRails
[21:21:37] rickmasta: has joined #RubyOnRails
[21:24:29] shanemcd: has joined #RubyOnRails
[21:24:51] djbkd: has joined #RubyOnRails
[21:27:11] allcentury: has joined #RubyOnRails
[21:27:16] ericmeds: has joined #RubyOnRails
[21:28:16] B1n4r10: has joined #RubyOnRails
[21:29:13] flopsec-: has joined #RubyOnRails
[21:33:16] trosborn: Hi Rails fam. I am having trouble with an unknown attributes error. Could anyone take a look? https://gist.github.com/trosborn/fe11256fe692457c0826
[21:35:33] delgiudices: has joined #RubyOnRails
[21:35:57] meoblast001: has joined #RubyOnRails
[21:37:16] arup_r: you forgot to add one for sides_attributes
[21:37:22] arup_r: trosborn: ^^ that's all
[21:37:45] maxdoubt: Radar: figured out my timestamp issue… DB is not UTC, and I was missing this - config.active_record.default_timezone = :local - gaaah!
[21:37:46] shanemcd: has joined #RubyOnRails
[21:37:53] Radar: maxdoubt: that'll do it.
[21:38:27] quazimodo: has joined #RubyOnRails
[21:39:33] trosborn: arup_r: Thanks for the assistance! Could you clarify what you mean that I “forgot to add one”? I’m still fairly new to this stuff ha
[21:40:10] arup_r: you are missing accepts_nested_attributes_for :sides, reject_if: :all_blank, allow_destroy: true
[21:40:12] arup_r: trosborn: ^^
[21:40:18] trosborn: haha thanks
[21:40:49] arup_r: well.. bye all. i HAVE to sleep
[21:40:55] trosborn: good night :)
[21:41:06] arup_r: trosborn: cya.
[21:41:28] johnflux: has joined #RubyOnRails
[21:42:20] someish: has joined #RubyOnRails
[21:44:05] delgiudices: has joined #RubyOnRails
[21:48:40] waseem__: has left #RubyOnRails: ()
[21:48:58] waseem__: has joined #RubyOnRails
[21:49:14] watersoul: has joined #RubyOnRails
[21:49:40] shanemcd: has joined #RubyOnRails
[21:50:15] benlieb: has joined #RubyOnRails
[21:51:58] fryguy: hrmm, does passenger's version of ruby need to match the apps?
[21:52:09] bronson: has joined #RubyOnRails
[21:52:23] moei: has joined #RubyOnRails
[21:52:47] fryguy: i'm trying to write a chef recipe to facilitate deploying passenger via rbenv, but different apps will have different ruby versions and so i know the location of the rbenv file, but I don't know the location of where passenger ends up.
[21:54:09] htmldrum: has joined #RubyOnRails
[21:54:15] cnk: fryguy: the ruby passenger uses for itself can be different than the rubies it spins up to handle various Rails apps
[21:55:03] ikarius: anyone here who's thoroughly familiar with authentication/authorization mechanisms?
[21:55:12] Radar: ikarius: !used
[21:55:12] helpa: ikarius: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[21:55:46] ikarius: I'm grappling with the right approach for a front-end/back-end app architecture.
[21:56:01] fryguy: cnk: ok, that's sort of what I thought. so the PassengerRuby directive in apache passenger.conf can be any version of ruby that successfully runs passenger?
[21:57:03] ikarius: as it's more than a couple of lines to describe, I've done a 1-page writeup with my current assumptions and questions here: https://docs.google.com/document/d/1k-c95loi3Wk68oTWcKH12nD1GnZFl6GiSmpjlZ0sjT4/edit?usp=sharing
[21:57:54] AntiSpamMeta: has joined #RubyOnRails
[21:59:29] cnk: ikarius: I would check out https://github.com/XingFramework/xing-backend - it is angular instead of ember but the LRD folks did a pretty good job of the authentication integration between API and front end
[22:00:36] nettoweb: has joined #RubyOnRails
[22:00:43] ikarius: cnk: ok, I can look at that.
[22:00:47] Devalo: has joined #RubyOnRails
[22:02:01] jfelchner: has joined #RubyOnRails
[22:03:49] underplank: has joined #RubyOnRails
[22:04:34] jenrzzz: has joined #RubyOnRails
[22:04:49] wethu: has joined #RubyOnRails
[22:04:57] sloggerkhan: I'm having trouble getting the flash to work in a controller that uses ActionController::API
[22:05:55] trinaldi: has joined #RubyOnRails
[22:07:20] Scriptonaut: has joined #RubyOnRails
[22:08:14] kenpoint: has joined #RubyOnRails
[22:08:45] underplank_: has joined #RubyOnRails
[22:09:04] Scriptonaut: does anyone know how to stub in current rspec? I want to do this in a before: controller.stub!(:require_http_autorization_token => true)
[22:09:09] Scriptonaut: but stub! isn't a method apparently
[22:09:14] snowy: has joined #RubyOnRails
[22:11:16] sloggerkhan: Ah, solved my problem.
[22:11:49] Dbugger: Can someone please tell me why I get this? https://gist.github.com/enriquemorenotent/f2a9935aab1acc010050
[22:12:04] tlaxkit: has joined #RubyOnRails
[22:12:20] baweaver: Scriptonaut: allow(controller).to receive(:require_http_authorization_token).and_return(true)
[22:13:18] baweaver: dbugger: probably managed to chmod your rails directory, or you used sudo for something on rbenv.
[22:13:27] rakm: has joined #RubyOnRails
[22:13:32] Scriptonaut: Thanks baweaver.
[22:13:34] Dbugger: baweaver, how can I fix it?
[22:13:56] chipotle: has joined #RubyOnRails
[22:14:02] baweaver: have you used sudo and have you touched chmod?
[22:14:47] Dbugger: baweaver, I do not think so, but I will check again later
[22:14:50] Dbugger: gotta go now, sorry
[22:15:46] hahuang65: has joined #RubyOnRails
[22:17:14] uglybandersnatch: has joined #RubyOnRails
[22:24:37] mary5030_: has joined #RubyOnRails
[22:26:04] KensoDev: has joined #RubyOnRails
[22:27:40] _bogus_: is there a way to set validators for a specific method only? for ex, to have a flag "complete" in the model, and a create method which saves everything in the db allowing blank fields but sets the complete flag to false, and a create_final method which validates everything and doesn't allows blank fields, and if it's all valid sets the complete flag to true
[22:27:58] alphaatom: has joined #RubyOnRails
[22:28:00] maesitos: has joined #RubyOnRails
[22:28:01] _bogus_: (the method in the controller i guess)
[22:29:09] Frem: has joined #RubyOnRails
[22:29:27] Radar: _bogus_: I've done that with Reform. I've had a first step using one Reform::Form object which doesn't validate anything, and then a second step which uses a different Reform::Form to have the validations.
[22:30:39] DenysLins: has joined #RubyOnRails
[22:31:20] DenysLins: has left #RubyOnRails: ()
[22:32:38] Pazician: has joined #RubyOnRails
[22:32:46] ayoros: has joined #RubyOnRails
[22:34:13] rasalghul: has joined #RubyOnRails
[22:34:55] jhack: has joined #RubyOnRails
[22:36:24] Jasaka: has joined #RubyOnRails
[22:36:33] manuelmartinez: has joined #RubyOnRails
[22:38:35] intrigueD: has joined #RubyOnRails
[22:39:07] enitiz: has joined #RubyOnRails
[22:39:22] marr: has joined #RubyOnRails
[22:40:45] quazimodo: has joined #RubyOnRails
[22:45:45] Trynemjoel: has joined #RubyOnRails
[22:46:05] Surt_Q: has joined #RubyOnRails
[22:49:40] Rodya_: has joined #RubyOnRails
[22:49:46] shanemcd: has joined #RubyOnRails
[22:50:21] wethu: has joined #RubyOnRails
[22:51:07] defsdoor: has joined #RubyOnRails
[22:51:40] trosborn: has joined #RubyOnRails
[22:51:40] moei: has joined #RubyOnRails
[22:53:21] baweaver: has joined #RubyOnRails
[22:53:31] hangelo: has joined #RubyOnRails
[22:53:47] theblang: has joined #RubyOnRails
[22:54:19] ppinkert_: has joined #RubyOnRails
[22:57:30] hiljusti: has joined #RubyOnRails
[22:58:50] one_zero: has joined #RubyOnRails
[22:59:52] IrishGringo: has joined #RubyOnRails
[23:01:23] smathy: has joined #RubyOnRails
[23:02:23] Devalo: has joined #RubyOnRails
[23:02:54] uglybandersnatch: has joined #RubyOnRails
[23:03:35] shanemcd: has joined #RubyOnRails
[23:04:28] kies^: has joined #RubyOnRails
[23:05:29] n008f4g_: has joined #RubyOnRails
[23:06:02] baweaver: has joined #RubyOnRails
[23:07:02] josephkokenge: has joined #RubyOnRails
[23:07:34] rainerborene: has joined #RubyOnRails
[23:08:23] rainerborene: has left #RubyOnRails: ()
[23:08:48] robbyoconnor: has joined #RubyOnRails
[23:08:48] quazimod1: has joined #RubyOnRails
[23:08:48] quazimod2: has joined #RubyOnRails
[23:09:14] augcesar: has joined #RubyOnRails
[23:09:54] augcesar: has joined #RubyOnRails
[23:11:24] mices: Trying to display the contents of data-description when a full image is displayed in bluimp-image-gallery https://gist.github.com/mices/f9516cb3ea9da3f3c690
[23:14:00] underplank: has joined #RubyOnRails
[23:19:32] rubyonrails778: has joined #RubyOnRails
[23:21:55] Rodya_: has joined #RubyOnRails
[23:22:29] superlou: has joined #RubyOnRails
[23:25:03] ppinkerton: has joined #RubyOnRails
[23:26:55] gr3yR0n1n: has joined #RubyOnRails
[23:28:46] underplank: has joined #RubyOnRails
[23:29:33] zmartAzz: has joined #RubyOnRails
[23:31:13] fmcgeough: has joined #RubyOnRails
[23:32:15] duderono_: has joined #RubyOnRails
[23:32:57] rafaelfranca: has joined #RubyOnRails
[23:33:11] uglybandersnatch: has joined #RubyOnRails
[23:34:15] Nuck: Anyone have suggestions for gems/techniques for migrating legacy crap to a modern rails app? Dealing with an ancient, heavily-modded Wordpress MU deploy
[23:35:08] ppinkerton: has joined #RubyOnRails
[23:35:17] Nuck: I need to move the data from that old MySQL server to whatever we pick to back our Rails app (I'm personally gunning for Postgres)
[23:35:24] duderono_: has joined #RubyOnRails
[23:37:14] null__: has joined #RubyOnRails
[23:37:14] null__: has joined #RubyOnRails
[23:37:25] korzybski: has joined #RubyOnRails
[23:38:07] pvertenten: has left #RubyOnRails: ()
[23:40:00] rickmasta: has joined #RubyOnRails
[23:40:04] TheMoonMaster: has joined #RubyOnRails
[23:40:45] sonOfRa: has joined #RubyOnRails
[23:43:12] n008f4g_: has joined #RubyOnRails
[23:46:00] Maletor: has joined #RubyOnRails
[23:47:07] duderono_: has joined #RubyOnRails
[23:47:56] _3by8: has joined #RubyOnRails
[23:48:13] jenrzzz: has joined #RubyOnRails
[23:48:21] nurey: has joined #RubyOnRails
[23:48:32] chouhoulis: has joined #RubyOnRails
[23:49:21] _3by8: Radar: there's not a Kindle version of your book on Amazon and it's not cheaper than the Manning website either but I have a question because I'm thinking about buying another Manning book from Amazon. Do you know if I were to buy the print version of your book from Amazon if I'd get the eBook as well? It says I do in the description but I don't know if that was just pulled directly from the Manning website or what.
[23:49:50] Radar: _3by8: Yes you would. Inside the cover is a code that you can use to get the ebook.
[23:51:05] _3by8: Radar: sweet, thanks.
[23:54:40] flashpoint9: has joined #RubyOnRails
[23:54:59] chouhoulis: has joined #RubyOnRails
[23:55:52] mauro_oto_: has joined #RubyOnRails
[23:58:50] Cohedrin: has joined #RubyOnRails