« Back to channel list

#RubyOnRails - 20 July 2017

« Back 1 day Forward 1 day »
[00:00:06] Radar: googleplex: fun
[00:00:26] googleplex: well to be honest if someone wouldnt mind helping me in hiring them since im reluctant with giving out info it is possible
[00:00:33] Radar: I could make that my twitter avatar for the day
[00:00:52] googleplex: i would suggest the 2nd image
[00:01:01] Radar: Yeah that's where the text is clearest.
[00:01:20] googleplex: the ferrari dino, lamborghini countach and a 1967 camaro built for the trans-am race circut
[00:01:24] Radar: So what you're looking for is a competent developer with probably 5+ years experience, with at least 1-2 of that being freelancing.
[00:01:36] googleplex: something like that
[00:02:03] Radar: You're looking therefore in the range of $100-250/hr for the work. Use the above XYZ formula to work out your quote.
[00:04:25] googleplex: well i have no idea how long something like this STARTING would take someone
[00:04:37] googleplex: because as of now its nothing fancy until later
[00:05:06] googleplex: because as of now the other just want that website with no fancy features if you get what im saying
[00:05:15] Radar: But of course get legal advice as Jason is saying that is the sensible thing.
[00:05:40] Radar: I said it would take me a month to do but I also have a tendency to underestimate things so take that with a grain of salt.
[00:05:49] googleplex: oh trust me ive been on everyone
[00:06:03] googleplex: im just project manager
[00:06:05] Jason: googleplex: if you genuinely have confidential ideas like you're saying, that's great
[00:06:06] santasquid: has joined #RubyOnRails
[00:06:11] Jason: googleplex: and i hope you're successful
[00:06:31] googleplex: and i have nobody that does rails and so im grasping at straws i dont wanna hire some dude in india for obvious reasons
[00:06:53] Jason: googleplex: but again, as i've said a few times now, NDAs can be difficult AND costly to enforce
[00:07:39] Jason: googleplex: you live in Oregon. I live in New Jersey. I sign your NDA. I breach and cause you damages of $2000. are you really going to sue me in NJ superior court? fly over here, stay at a hotel for ~15 days, and then possibly lose?
[00:08:25] Jason: tldr: i cause you damages of $1000, but it cost you $4000 to enforce the NDA, and you spend $4000 to get $1000 back
[00:08:28] gil_: has joined #RubyOnRails
[00:08:32] Jason: while risking you don't win at all
[00:08:43] googleplex: good point, some of the people i work with would purely to prove a point
[00:09:13] [SpLaT]: NDA Death spiral lol
[00:09:15] googleplex: but i get what your saying
[00:10:54] googleplex: jason example what would you charge to do what my project is as for now, if you were to do it in your free time
[00:11:55] googleplex: like is there enough for you to know about the projecct because im only asking for a base nothing special at the momeny
[00:12:06] googleplex: or would you need more?
[00:12:13] Jason: i'm learning rails, about a month in and 6 chapters into my book
[00:12:17] Jason: not new to programming in general
[00:13:12] Jason: i do freelance in other languages, i generally require a very specific list of what the client wants, and i split everything up and lay out a price for a finished project that meets all of their requirements
[00:14:27] googleplex: ah, yeah i need to find somoneone
[00:15:32] bronson: has joined #RubyOnRails
[00:15:57] banisterfiend: has joined #RubyOnRails
[00:17:34] googleplex: these guys want ruby on rails for whatever fucking reason
[00:23:17] jhfisc: has joined #RubyOnRails
[00:27:37] umaaji: has joined #RubyOnRails
[00:29:18] jhfisc: has joined #RubyOnRails
[00:30:19] chouhoulis: has joined #RubyOnRails
[00:30:20] SteenJobs_: has joined #RubyOnRails
[00:32:12] jhfisc: has joined #RubyOnRails
[00:36:03] fschuindt1: has joined #RubyOnRails
[00:40:10] epochwolf: has joined #RubyOnRails
[00:40:39] jhfisc: has joined #RubyOnRails
[00:43:37] rfoust: has joined #RubyOnRails
[00:45:38] sevenseacat: has joined #RubyOnRails
[00:53:38] bruno-: has joined #RubyOnRails
[00:55:17] jhfisc: has joined #RubyOnRails
[01:00:11] [SpLaT]: what would you rather use?
[01:01:17] jhfisc: has joined #RubyOnRails
[01:02:25] apparition: has joined #RubyOnRails
[01:04:50] quazimodo: has joined #RubyOnRails
[01:06:52] cam27: has joined #RubyOnRails
[01:14:20] irishfromua: has joined #RubyOnRails
[01:14:41] lacuna: has joined #RubyOnRails
[01:15:57] twilling: has joined #RubyOnRails
[01:16:23] bronson: has joined #RubyOnRails
[01:16:55] rakm: has joined #RubyOnRails
[01:29:11] quazimodo: has joined #RubyOnRails
[01:29:18] jhfisc: has joined #RubyOnRails
[01:31:47] brent__: has joined #RubyOnRails
[01:35:18] jhfisc: has joined #RubyOnRails
[01:41:15] jhfisc: has joined #RubyOnRails
[01:44:59] hotpancakes: has joined #RubyOnRails
[01:52:14] jhfisc: has joined #RubyOnRails
[01:54:38] hotpancakes: has joined #RubyOnRails
[01:58:04] jhfisc: has joined #RubyOnRails
[02:00:00] Jason: should migrations be snake_case?
[02:00:06] Jason: rails g migration add_part_to_products
[02:00:46] havenwood: Jason: "Pass the migration name, either CamelCased or under_scored..."
[02:01:05] havenwood: Jason: as you have it is perfect
[02:01:21] Jason: havenwood: where are you getting these conventions from?
[02:01:29] Jason: http://guides.rubyonrails.org/active_record_migrations.html shows CamelCase
[02:01:33] Jason: however every other guide i see is snake
[02:01:53] sevenseacat: try them and see what difference they make
[02:01:58] Jason: none, seemingly
[02:02:04] havenwood: Jason: rails g migration -h
[02:02:06] Jason: just trying to find a resource for the naming conventions
[02:02:26] Jason: havenwood: oh. huh. i didn't think about that.
[02:02:32] Jason: thank you, haha
[02:10:21] hotpancakes: has joined #RubyOnRails
[02:13:09] jhfisc: has joined #RubyOnRails
[02:14:15] Jameser: has joined #RubyOnRails
[02:14:44] tpendragon: has joined #RubyOnRails
[02:15:45] Faradome: has joined #RubyOnRails
[02:17:13] bronson: has joined #RubyOnRails
[02:17:45] Jason: lastly - it looks like cancan isn't an active project anymore
[02:17:52] Jason: does anyone have any recommendations for alternatives?
[02:17:54] sevenseacat: hasnt been for several years
[02:18:07] sevenseacat: cancancan is the maintained fork of it, but most folks recommend pundit these days
[02:18:10] havenwood: Jason: Pundit, CanCanCan, etc
[02:18:34] havenwood: yeah, we're using Pundit
[02:18:54] sevenseacat: so are we... rather interestingly, in some cases
[02:19:32] Jason: ACTION does research
[02:20:06] havenwood: i've heard folk speak well of the authority gem but it's currently unmaintained
[02:20:20] havenwood: https://github.com/nathanl/authority
[02:20:21] Jason: Pundit looks neat
[02:21:22] jhfisc: has joined #RubyOnRails
[02:21:41] Jason: i do like the simplicity of cancan, however
[02:23:22] twilling: has joined #RubyOnRails
[02:24:09] Jason: i'm finding https://github.com/CanCanCommunity/cancancan#strong-parameters confusing
[02:24:21] Jason: the update action looks identical to my scaffold
[02:24:31] Jason: but the section's language would seem to indicate i have to do something different
[02:25:21] Jason: the only difference i see is the section uses .update_attributes(), and my scaffold uses .update()
[02:26:27] jhfisc: has joined #RubyOnRails
[02:26:48] Jason: hmm. i don't understand that section. i have `model_params` at the bottom of my controller
[02:26:55] Jason: that was autogenerated by the scaffold
[02:26:59] Jason: i assume that's sufficent?
[02:27:18] Jason: oh, yeah, it is. `resource_params` (a generically named method you could specify in each controller)
[02:27:28] Jason: never mind :-P
[02:43:07] hotpancakes: has joined #RubyOnRails
[02:44:50] duderonomy: has joined #RubyOnRails
[02:55:21] jhfisc: has joined #RubyOnRails
[03:01:01] jhfisc: has joined #RubyOnRails
[03:07:16] jhfisc: has joined #RubyOnRails
[03:14:57] duderonomy: has joined #RubyOnRails
[03:15:21] googleplex: anyone want a folding rack?
[03:15:41] Rodya_: has joined #RubyOnRails
[03:18:27] bronson: has joined #RubyOnRails
[03:20:15] jhfisc: has joined #RubyOnRails
[03:22:44] fschuindt1: has joined #RubyOnRails
[03:31:06] jhfisc: has joined #RubyOnRails
[03:37:38] jhfisc: has joined #RubyOnRails
[03:42:04] Rodya_: has joined #RubyOnRails
[03:42:33] jhfisc: has joined #RubyOnRails
[03:45:50] andrew91841: has joined #RubyOnRails
[03:47:20] gwilkes: has joined #RubyOnRails
[03:51:04] jhfisc: has joined #RubyOnRails
[03:53:01] cam27: has joined #RubyOnRails
[03:56:44] ariedler: has joined #RubyOnRails
[04:00:00] gwilkes: has joined #RubyOnRails
[04:01:10] borodin: has joined #RubyOnRails
[04:02:55] jhfisc: has joined #RubyOnRails
[04:04:38] quazimodo: has joined #RubyOnRails
[04:09:16] jhfisc: has joined #RubyOnRails
[04:10:20] hotpancakes: has joined #RubyOnRails
[04:13:47] gwilkes: has joined #RubyOnRails
[04:15:16] jhfisc: has joined #RubyOnRails
[04:19:15] bronson: has joined #RubyOnRails
[04:23:04] cam27: has joined #RubyOnRails
[04:27:00] rakm: has joined #RubyOnRails
[04:27:40] jhfisc: has joined #RubyOnRails
[04:32:34] jhfisc: has joined #RubyOnRails
[04:33:28] ayonkhan: has joined #RubyOnRails
[04:42:27] gwilkes: has joined #RubyOnRails
[04:43:47] jhfisc: has joined #RubyOnRails
[04:48:42] bruno-: has joined #RubyOnRails
[04:58:38] jhfisc: has joined #RubyOnRails
[04:59:27] Rodya_: has joined #RubyOnRails
[04:59:55] fschuindt1: Does anyone nows a way in Capybara to send a Hash to automatically fill_in, select_in, etc forms based on this Hash key=>value pairs?
[05:02:17] jhfisc: has joined #RubyOnRails
[05:08:35] cam27: has joined #RubyOnRails
[05:12:35] Radar: fschuindt1: Do you have an example?
[05:14:42] andrew91841: has joined #RubyOnRails
[05:17:00] fschuindt1: Rada: I don't. But I made this: https://gist.github.com/fschuindt/b1a816c880effd80d54527babcf998c0 Does it helps?
[05:17:50] sevenseacat: I wouldn't try to do it automatically
[05:19:06] sevenseacat: because reading your test, I then have no idea what it's actually doing
[05:20:06] bronson: has joined #RubyOnRails
[05:20:18] Radar: Works well for text fields but then how about select fields?
[05:20:24] Radar: And really: are you saving lines? I think not.
[05:20:29] Radar: fill_in "Name", with: "John"
[05:20:35] Radar: fill_in "Email", with: "john@test.com"
[05:20:42] Radar: Those two lines are shorter than the 4 lines in your Gist.
[05:20:53] Radar: better to be explicit like this.
[05:21:01] matthewd: And when one of the fields is missing, the error will point at the right thing
[05:21:12] fschuindt1: yes, you're right
[05:21:30] fschuindt1: thank you Radar sevenseacat
[05:21:44] Radar: excellent point matthewd
[05:29:29] jhfisc: has joined #RubyOnRails
[05:37:23] kies: has joined #RubyOnRails
[05:41:16] jhfisc: has joined #RubyOnRails
[05:47:19] jhfisc: has joined #RubyOnRails
[05:50:41] jhfisc: has joined #RubyOnRails
[05:55:47] jhfisc: has joined #RubyOnRails
[05:58:42] ariedler: has joined #RubyOnRails
[06:01:16] jhfisc: has joined #RubyOnRails
[06:04:01] jhfisc: has joined #RubyOnRails
[06:05:19] roshanavand: has joined #RubyOnRails
[06:09:50] high_fiver: has joined #RubyOnRails
[06:11:07] jhfisc: has joined #RubyOnRails
[06:20:57] bronson: has joined #RubyOnRails
[06:22:45] Rodya_: has joined #RubyOnRails
[06:27:40] ascarter: has joined #RubyOnRails
[06:29:14] defsdoor: has joined #RubyOnRails
[06:29:16] p8m: has joined #RubyOnRails
[06:29:42] jhfisc: has joined #RubyOnRails
[06:40:05] jhfisc: has joined #RubyOnRails
[06:42:28] AzaToth: has joined #RubyOnRails
[06:45:17] jhfisc: has joined #RubyOnRails
[06:51:20] jhfisc: has joined #RubyOnRails
[06:56:07] juggler: has joined #RubyOnRails
[07:06:01] jhfisc: has joined #RubyOnRails
[07:11:55] jhfisc: has joined #RubyOnRails
[07:16:55] jhfisc: has joined #RubyOnRails
[07:18:35] hotpancakes: has joined #RubyOnRails
[07:21:16] jhfisc: has joined #RubyOnRails
[07:21:46] bronson: has joined #RubyOnRails
[07:23:59] jhfisc: has joined #RubyOnRails
[07:24:08] one_zero: has joined #RubyOnRails
[07:24:22] Rodya_: has joined #RubyOnRails
[07:27:09] ur5us: has joined #RubyOnRails
[07:29:16] jhfisc: has joined #RubyOnRails
[07:41:17] jhfisc: has joined #RubyOnRails
[07:47:17] jhfisc: has joined #RubyOnRails
[07:50:54] agent_white: has joined #RubyOnRails
[07:55:49] codelahoma: has joined #RubyOnRails
[07:57:30] jhfisc: has joined #RubyOnRails
[08:00:38] ariedler: has joined #RubyOnRails
[08:05:18] jhfisc: has joined #RubyOnRails
[08:05:22] bazzy: has joined #RubyOnRails
[08:11:13] jhfisc: has joined #RubyOnRails
[08:17:35] mikecmpbll: has joined #RubyOnRails
[08:22:38] bronson: has joined #RubyOnRails
[08:24:30] jhfisc: has joined #RubyOnRails
[08:25:05] Rodya_: has joined #RubyOnRails
[08:37:07] jhfisc: has joined #RubyOnRails
[08:38:22] brent__: has joined #RubyOnRails
[08:40:44] lxsameer: has joined #RubyOnRails
[08:41:52] doublemalt_: has joined #RubyOnRails
[08:45:13] marr: has joined #RubyOnRails
[08:45:20] one_zero: has joined #RubyOnRails
[08:49:17] jhfisc: has joined #RubyOnRails
[08:54:52] jhfisc: has joined #RubyOnRails
[09:01:15] jhfisc: has joined #RubyOnRails
[09:03:47] dionysus69: has joined #RubyOnRails
[09:08:12] jhfisc: has joined #RubyOnRails
[09:14:26] jhfisc: has joined #RubyOnRails
[09:23:52] bronson: has joined #RubyOnRails
[09:26:30] jhfisc: has joined #RubyOnRails
[09:27:09] Rodya_: has joined #RubyOnRails
[09:27:29] srinidhi: has joined #RubyOnRails
[09:29:55] ferr: has joined #RubyOnRails
[09:35:53] jammanbo: has joined #RubyOnRails
[09:37:06] jhfisc: has joined #RubyOnRails
[09:37:42] srinidhi: has joined #RubyOnRails
[09:38:10] jammanbo: I've upgraded Nokogiri from 1.6.8 to 1.8.0 and but on our prod servers I can't get the nokogiri shared library to build properly. Anyone else had trouble? It seems it's now dependent on libiconv but it can't find it. From ldd: `libiconv.so.2 => not found` (it's in /usr/local/lib though).
[09:49:17] jhfisc: has joined #RubyOnRails
[09:56:45] jhfisc: has joined #RubyOnRails
[09:57:46] dminuoso: jammanbo: Please gist the entire output from the build process.
[09:58:37] dminuoso: jammanbo: Also /usr/local is /usr/local ...
[09:58:52] jammanbo: There's no error during the build though dminuoso, it's runtime. I'll have to see if I can find the log.
[09:59:21] dminuoso: jammanbo: Yeah. Fix your LD_LIBRARY_PATH I guess ?
[10:00:42] dminuoso: Do not do this in a global bashrc, do it in one of your wrapper scripts.
[10:01:22] jammanbo: That was my guess, I did export it and try install again but no joy. Trying it again now.
[10:01:49] jammanbo: nokogiri will kill me one of these days
[10:02:36] ariedler: has joined #RubyOnRails
[10:03:17] jhfisc: has joined #RubyOnRails
[10:09:34] fschuindt2: has joined #RubyOnRails
[10:13:04] dminuoso: jammanbo: It's not a nokogiri problem.
[10:15:22] dminuoso: jammanbo: If you have non-standard library installations, you need to build nokogiri properly, or monkey patch things with LD_LIBRARY_PATH
[10:15:35] dminuoso: jammanbo: This is all well documented http://www.nokogiri.org/tutorials/installing_nokogiri.html
[10:18:43] hotpancakes: has joined #RubyOnRails
[10:24:41] bronson: has joined #RubyOnRails
[10:24:52] doublemalt_: has joined #RubyOnRails
[10:25:16] jhfisc: has joined #RubyOnRails
[10:28:04] Rodya_: has joined #RubyOnRails
[10:31:16] jhfisc: has joined #RubyOnRails
[10:31:19] jammanbo: FWIW, LD_LIBRARY_PATH didn't do it, and nor did --with-iconv-lib (via bundle config). Symlinking to the library from /usr/lib64 seems work.
[10:37:16] jhfisc: has joined #RubyOnRails
[10:47:13] jhfisc: has joined #RubyOnRails
[10:53:14] jhfisc: has joined #RubyOnRails
[10:53:32] apparition: has joined #RubyOnRails
[10:59:42] Ergo: has joined #RubyOnRails
[11:05:24] jhfisc: has joined #RubyOnRails
[11:09:20] jhfisc: has joined #RubyOnRails
[11:11:54] mikecmpb_: has joined #RubyOnRails
[11:14:21] apparition47: has joined #RubyOnRails
[11:15:17] jhfisc: has joined #RubyOnRails
[11:20:39] DoubleMalt: has joined #RubyOnRails
[11:21:18] jhfisc: has joined #RubyOnRails
[11:22:24] brent__: has joined #RubyOnRails
[11:24:02] jhfisc: has joined #RubyOnRails
[11:25:31] bronson: has joined #RubyOnRails
[11:28:35] Rodya_: has joined #RubyOnRails
[11:35:20] jhfisc: has joined #RubyOnRails
[11:41:15] jhfisc: has joined #RubyOnRails
[11:44:30] lessless: has joined #RubyOnRails
[11:51:50] lxsameer: has joined #RubyOnRails
[11:54:58] DoubleMalt: has joined #RubyOnRails
[11:54:59] dionysus69: has joined #RubyOnRails
[12:02:16] lacuna: has joined #RubyOnRails
[12:03:54] adlerdias: has joined #RubyOnRails
[12:04:37] ariedler: has joined #RubyOnRails
[12:05:52] srinidhi: has joined #RubyOnRails
[12:09:28] NoGodDamnIdea: has joined #RubyOnRails
[12:12:48] jhfisc: has joined #RubyOnRails
[12:16:48] sekmo: has joined #RubyOnRails
[12:17:14] ariedler: has joined #RubyOnRails
[12:18:30] sekmo: Hi all! Could I have some suggestions on how to improve this test? https://gist.github.com/sekmo/255497a9bbfeb20451857b943bb8d382
[12:18:32] jhfisc: has joined #RubyOnRails
[12:18:33] sekmo: (at the moment rspec whines `sign_in` is not available on an example group (e.g. a `describe` or `context` block)
[12:19:33] srinidhi: has joined #RubyOnRails
[12:19:51] srinidhi: has joined #RubyOnRails
[12:20:12] dminuoso: sekmo: use a before hook
[12:20:27] dminuoso: Or perhaps a context even.
[12:20:52] dminuoso: https://relishapp.com/rspec/rspec-core/docs/example-groups/shared-context
[12:20:54] dminuoso: https://relishapp.com/rspec/rspec-core/docs/hooks/before-and-after-hooks
[12:21:16] Jameser: has joined #RubyOnRails
[12:23:24] jhfisc: has joined #RubyOnRails
[12:23:39] sekmo: I used a context since I thought it was the exact place...
[12:24:54] tbuehlmann_: sign_in can only be used in before/after and it methods
[12:25:06] tbuehlmann_: maybe more, but not in describe/context
[12:26:41] bronson: has joined #RubyOnRails
[12:29:20] Rodya_: has joined #RubyOnRails
[12:30:32] sekmo: so does it make sense to have a context "when user is logged in" at all?
[12:31:47] jhfisc: has joined #RubyOnRails
[12:33:54] Jameser: has joined #RubyOnRails
[12:40:00] NoGodDamnIdea: has joined #RubyOnRails
[12:41:07] berenhap: has joined #RubyOnRails
[12:41:23] berenhap: Hey, I have a question about parameters. When I send a json object to my controller I get it two times in my parameters. It is an object with one key with the name servers and the value is an array. But i get a duplicate in the stdout with the key name as the controller name. Is this default behavior?
[12:43:02] tbuehlmann_: berenhap: for json requests this is the default, iirc
[12:43:21] sevenseacat: has joined #RubyOnRails
[12:43:38] tbuehlmann_: you can turn it off if you want: http://api.rubyonrails.org/classes/ActionController/ParamsWrapper/ClassMethods.html#method-i-wrap_parameters
[12:44:41] berenhap: Aaah okay, so it is default behavior, thanks!
[12:47:14] berenhap: tbuehlmann_: Can I disable this for certain controllers only?
[12:47:37] jarr0dsz: has joined #RubyOnRails
[12:47:52] jarr0dsz: hello everyone i have basically this issue: https://stackoverflow.com/questions/41628440/what-is-the-best-way-to-do-per-user-session-database-connections-in-rails and was wondering if there is a workaround
[12:48:35] jarr0dsz: im switching db, which is then systemwide, so on several different devise users it tries to connect to the same db
[12:48:51] jarr0dsz: i need a database connection from AR on a per-user /session based mechanism
[12:49:54] tbuehlmann_: berenhap: yep, just call the method only in the controller you want to change the behaviour
[12:52:14] berenhap: tbuehlmann_: The best place to set this option, is that in the before_filter?
[12:52:57] tbuehlmann_: you can just call it in your class, no need for a before_action
[12:54:17] berenhap: Of course, everything works fine now. Again, thanks
[12:57:42] jarr0dsz: nobody knows? is ar establish_connection only locally global and not in production?
[12:58:02] jarr0dsz: since doing a establish_connection seems to be for the whole application so for all users loggedin- since i have multiple user model this throws exceptions
[12:58:27] jarr0dsz: since for example organisation is logged in the db, is switched to a user db, because its systemwide and should only be for that user
[13:00:05] jarr0dsz: nobody knows?
[13:00:22] berenhap: jarr0dsz: Is this what you are looking for? https://github.com/influitive/apartment
[13:00:51] jarr0dsz: i have looked at it before, we have implemented a custom solution the only problem the db connections are not session based but globally
[13:01:17] jarr0dsz: and really cannot find anything on this very frustrating . establish_connection changes db for the whole app, is this fixable by using threading or something?
[13:02:53] jhfisc: has joined #RubyOnRails
[13:03:05] berenhap: Honestly I have no idea, maybe this global behavior can be overwritten somehow.
[13:07:32] sekmo: has joined #RubyOnRails
[13:09:15] jhfisc: has joined #RubyOnRails
[13:12:38] dminuoso: tbuehlmann_: Im currying all the things!
[13:12:59] dminuoso: Until my rails app is compilable by GHC.
[13:19:49] jhfisc: has joined #RubyOnRails
[13:20:05] eljimmy: has joined #RubyOnRails
[13:22:24] tbuehlmann_: garge hydron collidor?
[13:26:12] jhfisc: has joined #RubyOnRails
[13:27:12] bronson: has joined #RubyOnRails
[13:27:56] rfoust: has joined #RubyOnRails
[13:29:50] high_fiver: has joined #RubyOnRails
[13:30:03] jhfisc: has joined #RubyOnRails
[13:37:14] gambl0re: has joined #RubyOnRails
[13:38:53] gambl0re: has joined #RubyOnRails
[13:39:38] gambl0re: has joined #RubyOnRails
[13:40:35] gambl0re: has joined #RubyOnRails
[13:41:17] gambl0re: has joined #RubyOnRails
[13:43:11] jhfisc: has joined #RubyOnRails
[13:44:19] chouhoulis: has joined #RubyOnRails
[13:47:16] gambl0re: has joined #RubyOnRails
[13:48:59] gambl0re: has joined #RubyOnRails
[13:50:57] berenhap: I ran into another issue, I have wrap_parameters false inside my controller. But my parameters gets wrapped in a _json, is there a way to also disable this wrap?
[13:53:28] aajjbb: has joined #RubyOnRails
[13:54:23] hotpancakes: has joined #RubyOnRails
[13:57:35] Jameser: has joined #RubyOnRails
[13:58:38] jhfisc: has joined #RubyOnRails
[14:02:06] jhfisc: has joined #RubyOnRails
[14:07:00] GodFather: has joined #RubyOnRails
[14:10:13] chouhoulis: has joined #RubyOnRails
[14:11:21] theunraveler: has joined #RubyOnRails
[14:12:12] jhfisc: has joined #RubyOnRails
[14:14:37] ar1a: has joined #RubyOnRails
[14:15:19] jhfisc: has joined #RubyOnRails
[14:21:23] amritoit: has joined #RubyOnRails
[14:22:33] SteenJobs_: has joined #RubyOnRails
[14:28:01] bronson: has joined #RubyOnRails
[14:32:02] ciastek: has joined #RubyOnRails
[14:33:51] ciastek: has left #RubyOnRails: ()
[14:40:22] mikecmpbll: has joined #RubyOnRails
[14:40:53] ResidentBiscuit: has joined #RubyOnRails
[14:42:41] jhfisc: has joined #RubyOnRails
[14:45:58] jhfisc: has joined #RubyOnRails
[14:50:53] joeyk: Anyone know why I couldn't call delete on a model? At first I thought it was due to some weird associations, but even commenting out the has_many/belongs_to associations and trying to call delete on a record gives me a NoMethodError: undefined method `to_sym' fornil:NilClass, raised from active_record territory (not my code.)
[14:51:43] joeyk: I'm Litterally doing MyModel.first.delete
[14:51:49] joeyk: and it gives me that error :-/
[14:52:21] jhfisc: has joined #RubyOnRails
[14:55:08] lacuna: has joined #RubyOnRails
[14:59:31] SteenJobs_: has joined #RubyOnRails
[15:01:36] lacuna: has joined #RubyOnRails
[15:03:45] jhfisc: has joined #RubyOnRails
[15:04:04] cam27: has joined #RubyOnRails
[15:08:50] havenwood: joeyk: missing a primary key or something?
[15:09:51] havenwood: joeyk: What is?: MyModel.first.id
[15:11:48] joeyk: havenwood: lol, yeah, I just figured that out
[15:11:55] joeyk: havenwood: I didn't have self.primary_key = :...
[15:12:02] joeyk: so it was looking for 'id'
[15:12:10] joeyk: which doesn't exist in the table
[15:12:27] joeyk: at least, that's what I think was going on, because the issue got fixed as soon as I set the primary key
[15:21:42] jhfisc: has joined #RubyOnRails
[15:29:14] bronson: has joined #RubyOnRails
[15:29:47] dviola: has joined #RubyOnRails
[15:33:09] jhfisc: has joined #RubyOnRails
[15:37:14] jphase: has joined #RubyOnRails
[15:38:32] brent__: has joined #RubyOnRails
[15:39:19] jhfisc: has joined #RubyOnRails
[15:45:02] trooney: has joined #RubyOnRails
[15:45:07] trooney: ow can I define my own macro for callbacks? If I can define a
[15:45:10] trooney: 'after_foobar' callback, how can I add to the class the ability to
[15:45:20] trooney: how can I define my own macro for callbacks? If I can define a 'after_foobar' callback, how can I add to the class the ability to use 'after_foobar ->() { stuff }'?
[15:45:22] jhfisc: has joined #RubyOnRails
[15:46:27] irishfromua: has joined #RubyOnRails
[15:47:30] mikecmpbll: has joined #RubyOnRails
[15:53:34] bruno-: has joined #RubyOnRails
[15:59:07] apeiros: trooney: `after_action` is just a class method. i.e. all you have to do is define a class method `after_foobar`.
[15:59:21] apeiros: well, plus of course store the block somewhere and invoke it when foobar happens.
[16:02:46] mehwork: has joined #RubyOnRails
[16:05:41] mehwork: What do you guys do when it comes to create database migration files for postgres: 1) Create a single file just for "CREATE SCHEMA" statements or 2) put your CREATE SCHEMA statements in the same files as your CREATE TABLE migrations?
[16:06:18] mehwork: google found this article but it shows both ways but doesn't say which is better https://wwwtech.de/articles/2012/apr/postgresql-schemas-and-ruby-on-rails
[16:06:50] mehwork: I was thinking that having CREATE SCHEMA only once makes more sense from both a DRY perspective and to make sure the command isn't ran once for every create table
[16:15:46] gusrub: has joined #RubyOnRails
[16:20:08] high_fiver: has joined #RubyOnRails
[16:30:05] bronson: has joined #RubyOnRails
[16:32:08] mehwork: part of me thinks it shouldn't be in any migration file, since doing 'drop schema foo' could be quite dangerous
[16:33:33] Psy-Q: has joined #RubyOnRails
[16:35:41] VeryBewitching: has joined #RubyOnRails
[16:39:27] matthewd: has joined #RubyOnRails
[16:53:56] catbusters: has joined #RubyOnRails
[17:00:20] one_zero: has joined #RubyOnRails
[17:17:32] dionysus69: has joined #RubyOnRails
[17:20:21] dviola: has joined #RubyOnRails
[17:29:37] lacuna: has joined #RubyOnRails
[17:30:28] dviola: has joined #RubyOnRails
[17:30:53] bronson: has joined #RubyOnRails
[17:34:46] netzfisch: has joined #RubyOnRails
[17:35:18] kies: has joined #RubyOnRails
[17:36:29] aajjbb: has joined #RubyOnRails
[17:42:53] jhfisc: has joined #RubyOnRails
[17:47:17] jhfisc: has joined #RubyOnRails
[17:49:43] cam27: has joined #RubyOnRails
[17:51:41] duderonomy: has joined #RubyOnRails
[17:53:16] jhfisc: has joined #RubyOnRails
[17:53:17] rakm: has joined #RubyOnRails
[17:57:18] daveomcd: has joined #RubyOnRails
[17:58:31] mikecmpbll: has joined #RubyOnRails
[17:59:16] jhfisc: has joined #RubyOnRails
[18:01:14] daveomcd: If I'm using a callback such as "after_destroy" is it possible to reference an association of the object? For instance, if I have a User object, and a Incident object. If I put an after_destroy callback on Incident where it checks to see if any Incidents remain for that User after its deleted?
[18:02:20] jhfisc: has joined #RubyOnRails
[18:02:33] loincloth: has joined #RubyOnRails
[18:03:45] aajjbb: has joined #RubyOnRails
[18:04:16] loincloth: Has anyone used Thredded and loaded/rendered Topics outside the engine? I'm trying to make it work, but it's been a slog and it just feels like things aren't built to easily do that. But I wonder if I'm missing anything.
[18:11:45] jhfisc: has joined #RubyOnRails
[18:16:26] jhfisc: has joined #RubyOnRails
[18:17:23] gusrub: has joined #RubyOnRails
[18:21:16] jhfisc: has joined #RubyOnRails
[18:24:49] cagomez: has joined #RubyOnRails
[18:26:18] joeyk: is there a way to get a rails model to include the ROWID attribute?
[18:31:44] bronson: has joined #RubyOnRails
[18:34:14] Rodya_: has joined #RubyOnRails
[18:39:46] cagomez: is there scaffolding/generation for Rails API only projects?
[18:41:23] lxsameer: has joined #RubyOnRails
[18:46:01] hron84: has joined #RubyOnRails
[18:46:24] hron84: Hi! Is there any way to ask Haml to render an indented (pretty-printed) HTML output?
[18:48:07] hron84: Under Rails 5, Haml generates an unindented output in development env but I need an indented output anyway
[18:48:54] high_fiver: has joined #RubyOnRails
[18:49:41] stormbytes: has joined #RubyOnRails
[18:53:46] fryguy: hron84: are you sure this is set? http://haml.info/docs/yardoc/Haml/Options.html#ugly-instance_method
[18:54:53] loincloth: has left #RubyOnRails: ()
[18:56:55] hron84: fryguy: My problem is possibly this: https://github.com/haml/haml/pull/894
[18:57:15] hron84: so there is no way to add normal indentation to the html. However Chrome does not indent the source.
[18:57:20] hron84: in view source mode.
[18:58:17] high_fiver: has joined #RubyOnRails
[19:03:55] cagomez: has joined #RubyOnRails
[19:04:10] fryguy: hron84: are the console and web developer tools sufficient?
[19:05:38] hron84: fryguy: i personally hate WDT when I compare HTML codes, especially because the inspector very likes to insert imaginary elements to the code (via JS, via webkit, via different reasons). So it is technically not the same as view-source:page.html displays in chrome.
[19:06:04] hron84: I do not know Firefox's WDT in this topic, but I fear it does the same.
[19:06:18] hron84: s/compare/visually compare/
[19:10:22] KeyJoo: has joined #RubyOnRails
[19:16:49] lacuna: has joined #RubyOnRails
[19:17:54] srinidhi: has joined #RubyOnRails
[19:23:10] lacuna: has joined #RubyOnRails
[19:29:07] dionysus70: has joined #RubyOnRails
[19:32:32] bronson: has joined #RubyOnRails
[19:35:11] Rodya_: has joined #RubyOnRails
[19:56:47] netzfisch: has joined #RubyOnRails
[19:57:50] rory096: has joined #RubyOnRails
[20:06:32] hahuang65: has joined #RubyOnRails
[20:06:57] hahuang65: what's an easy way to do an inline onSuccess type thing for a form?
[20:14:32] brent__: has joined #RubyOnRails
[20:15:30] ar1a: has joined #RubyOnRails
[20:15:45] brent__: has joined #RubyOnRails
[20:16:24] Trynemjoel: has joined #RubyOnRails
[20:17:35] markalanevans: has joined #RubyOnRails
[20:23:17] Trynemjoel: has joined #RubyOnRails
[20:23:40] gambl0re: has joined #RubyOnRails
[20:35:41] Rodya_: has joined #RubyOnRails
[20:48:39] cagomez: has joined #RubyOnRails
[20:48:49] ur5us: has joined #RubyOnRails
[21:12:05] Jayson_Virissimo: has joined #RubyOnRails
[21:20:30] markalanevans: has joined #RubyOnRails
[21:23:05] Rodya_: has joined #RubyOnRails
[21:23:52] jhfisc: has joined #RubyOnRails
[21:30:06] jhfisc: has joined #RubyOnRails
[21:33:27] bronson: has joined #RubyOnRails
[21:37:55] jhfisc: has joined #RubyOnRails
[21:48:02] gusrub: has joined #RubyOnRails
[21:48:45] jhfisc: has joined #RubyOnRails
[21:54:21] jhfisc: has joined #RubyOnRails
[21:56:09] brent__: has joined #RubyOnRails
[21:57:56] tanuki: has joined #RubyOnRails
[21:59:56] jhfisc: has joined #RubyOnRails
[22:01:24] cagomez: say I have groups 'a' and 'b' with gems listed. if group 'a' is listed after, I should only be listing gems unique to 'a', right? no repeats from group 'a', 'b'?
[22:01:52] hahuang65: cagomez: show us a gemfile
[22:02:54] cagomez: hahuang65: I'd love some help, it's really messy https://hastebin.com/otulayipoc.rb
[22:03:41] hahuang65: cagomez: that doesn't look messy.
[22:03:51] hahuang65: and yes, you don't need to repeat a gem in any group
[22:03:59] hahuang65: if a group is a subset of another group, it'll always inherit
[22:04:11] cagomez: ok nice, thanks!
[22:06:21] markalanevans: has joined #RubyOnRails
[22:08:53] Trynemjoel: has joined #RubyOnRails
[22:11:16] jhfisc: has joined #RubyOnRails
[22:12:03] cam27: has joined #RubyOnRails
[22:14:27] codelahoma: has joined #RubyOnRails
[22:16:34] jhfisc: has joined #RubyOnRails
[22:18:12] SteenJobs: has joined #RubyOnRails
[22:22:10] jhfisc: has joined #RubyOnRails
[22:23:44] aperkins81: has joined #RubyOnRails
[22:25:19] jhfisc: has joined #RubyOnRails
[22:25:51] sevenseacat: has joined #RubyOnRails
[22:29:46] jhfisc: has joined #RubyOnRails
[22:32:51] cagomez: has joined #RubyOnRails
[22:34:45] bronson: has joined #RubyOnRails
[22:36:27] twilling: has joined #RubyOnRails
[22:37:16] jhfisc: has joined #RubyOnRails
[22:39:21] jphase: has joined #RubyOnRails
[22:41:39] Radar: GOOD MORNING
[22:43:17] jhfisc: has joined #RubyOnRails
[22:43:58] hahuang65: Guten tag to you Radar
[22:44:12] Radar: sevenseacat: you're up early
[22:44:23] Radar: hahuang65: du bist gut?
[22:44:23] clouder`grr: has joined #RubyOnRails
[22:44:52] hahuang65: Radar: guten
[22:49:16] jhfisc: has joined #RubyOnRails
[22:52:12] jhfisc: has joined #RubyOnRails
[22:58:17] hahuang65: hmm, is there an way to count the number of words in a given string, accounting for all punctuation and special delimiters
[22:58:37] fcser_: has joined #RubyOnRails
[23:07:38] markalanevans: has joined #RubyOnRails
[23:08:19] aperkins81: something like string.delete("^a-zA-Z0-9\s").split(' ').count ?
[23:09:17] cagomez: has joined #RubyOnRails
[23:09:21] hahuang65: yup, lol that's what I ended up with
[23:09:53] aperkins81: could prob remove the 0-9, copy/paste from existing code :P
[23:10:53] cagomez: has joined #RubyOnRails
[23:11:51] hahuang65: haha awesome
[23:19:40] Cache_Money: has joined #RubyOnRails
[23:21:33] cagomez: has joined #RubyOnRails
[23:23:19] jhfisc: has joined #RubyOnRails
[23:43:02] veex: has joined #RubyOnRails
[23:44:16] uks: has joined #RubyOnRails
[23:44:21] umaaji: has joined #RubyOnRails
[23:49:43] bronson: has joined #RubyOnRails