« Back to channel list

#RubyOnRails - 03 May 2016

« Back 1 day Forward 1 day »
[00:04:24] cagmz: has joined #RubyOnRails
[00:05:29] cagmz: I have a view that passes a keywords variable to my controller. I need to search a database for firstname, lastname, or email matches. how can i do this? I have first name working: https://bpaste.net/show/23ddcb83d717
[00:10:01] shinnya: has joined #RubyOnRails
[00:12:42] pawnbox: has joined #RubyOnRails
[00:12:50] levensailor: has joined #RubyOnRails
[00:13:07] xall: has joined #RubyOnRails
[00:13:12] stardiviner: has joined #RubyOnRails
[00:22:12] sleungcy: has joined #RubyOnRails
[00:22:27] drusepth: I'm trying to let users select an object (by id) for a has_many association by form and right now the params are passing through as "sibling" => "2" (instead of "sibling" => some_character_object), which blows up when I do update_attributes(content_params)... if I replace that "2" with the actual object it works, but surely that's not what needs to be done here -- is there a good way to convert from object ID to object in params before a mass update?
[00:22:42] drusepth: my controller code and the code I used to update the params before updating is at https://gist.github.com/drusepth/a811b9af701257e4a41fd2baea9c1825
[00:24:09] jenrzzz: has joined #RubyOnRails
[00:29:42] macsteps: has joined #RubyOnRails
[00:30:10] FooMunki: has joined #RubyOnRails
[00:30:23] smathy: has joined #RubyOnRails
[00:33:20] S_Waqas: has joined #RubyOnRails
[00:33:24] IrishGringo: has joined #RubyOnRails
[00:35:22] GodFather: has joined #RubyOnRails
[00:35:42] drusepth: ^: seems to work when I change form to submit ids as sibling_id instead of sibling, not sure if that's the best way to do it but it works <3
[00:42:55] Ropeney: has joined #RubyOnRails
[00:43:10] diegoaguilar: has joined #RubyOnRails
[00:44:49] idefine: has joined #RubyOnRails
[00:46:39] bronson: has joined #RubyOnRails
[00:47:58] Craigimus: has joined #RubyOnRails
[00:50:18] drusepth: has joined #RubyOnRails
[00:50:38] stannard: has joined #RubyOnRails
[00:52:52] stoodfarback: has joined #RubyOnRails
[00:53:03] dudepare: has joined #RubyOnRails
[00:54:30] Craigimus: has joined #RubyOnRails
[00:55:24] macsteps: has joined #RubyOnRails
[00:56:32] drusepth: has joined #RubyOnRails
[00:57:36] ur5us: has joined #RubyOnRails
[00:59:05] SeanLazer: has joined #RubyOnRails
[00:59:36] sleungcy: has joined #RubyOnRails
[01:01:36] moeabdol: has joined #RubyOnRails
[01:04:37] Craigimus: has joined #RubyOnRails
[01:05:58] jhack: has joined #RubyOnRails
[01:10:25] SeanLazer: has joined #RubyOnRails
[01:13:10] drusepth_: has joined #RubyOnRails
[01:13:57] kies: has joined #RubyOnRails
[01:14:58] drusepth: is there a way to get the dynamically generated id of an input field created from something like f.hidden_field :some_value?
[01:15:39] patrick_star: has joined #RubyOnRails
[01:15:47] Craigimus: has joined #RubyOnRails
[01:18:58] eljimador: has joined #RubyOnRails
[01:20:01] Devalo: has joined #RubyOnRails
[01:20:37] SeanLazer: has joined #RubyOnRails
[01:21:43] sevenseacat: has joined #RubyOnRails
[01:23:02] jenrzzz: has joined #RubyOnRails
[01:23:02] jenrzzz: has joined #RubyOnRails
[01:24:38] pawnbox: has joined #RubyOnRails
[01:25:37] JakFrist: has joined #RubyOnRails
[01:26:18] S_Waqas: has joined #RubyOnRails
[01:27:36] daveomcd__: has joined #RubyOnRails
[01:28:39] benlieb: has joined #RubyOnRails
[01:29:38] flashpoint9: has joined #RubyOnRails
[01:30:40] drusepth: has joined #RubyOnRails
[01:31:55] one_zero: has joined #RubyOnRails
[01:32:24] choke: has joined #RubyOnRails
[01:36:58] macsteps: has joined #RubyOnRails
[01:38:47] safetypin: has joined #RubyOnRails
[01:39:44] safetypin: has joined #RubyOnRails
[01:40:14] sleungcy: has joined #RubyOnRails
[01:46:01] chipotle: has joined #RubyOnRails
[01:50:27] GnuYawk: has joined #RubyOnRails
[01:50:30] GnuYawk: has joined #RubyOnRails
[01:51:31] Craigimus: has joined #RubyOnRails
[01:55:29] sevenseacat: has joined #RubyOnRails
[01:57:16] carlosd: has joined #RubyOnRails
[01:58:10] stannard: has joined #RubyOnRails
[01:59:18] weaksauce: drusepth it's all text... what are you trying to do? sounds like you are trying something dangerous with user submitted data
[02:01:36] sharkman: has joined #RubyOnRails
[02:01:43] sharkman: is anyone here a master with Mechanize
[02:02:36] IrishGringo: has joined #RubyOnRails
[02:02:49] bronson: has joined #RubyOnRails
[02:04:22] Ericx2x: has joined #RubyOnRails
[02:04:46] beilabs: has joined #RubyOnRails
[02:10:25] JakFrist: has joined #RubyOnRails
[02:11:05] benlieb: has joined #RubyOnRails
[02:13:57] Craigimus: has joined #RubyOnRails
[02:16:31] pawnbox: has joined #RubyOnRails
[02:17:35] Cohedrin_: has joined #RubyOnRails
[02:21:14] DefV: has joined #RubyOnRails
[02:21:45] pydave6367: has joined #RubyOnRails
[02:23:27] kgrz: has joined #RubyOnRails
[02:23:57] kgrz: has joined #RubyOnRails
[02:24:24] kgrz: has joined #RubyOnRails
[02:24:32] benlieb: has joined #RubyOnRails
[02:28:28] kgrz: has joined #RubyOnRails
[02:29:02] akshat: has joined #RubyOnRails
[02:30:16] htmldrum: has joined #RubyOnRails
[02:30:27] flashpoint9: has joined #RubyOnRails
[02:30:34] kgrz: has joined #RubyOnRails
[02:32:24] kgrz: has joined #RubyOnRails
[02:33:14] fedexo: has joined #RubyOnRails
[02:33:44] kgrz: has joined #RubyOnRails
[02:35:00] kgrz: has joined #RubyOnRails
[02:35:42] kgrz: has joined #RubyOnRails
[02:37:23] ismaelga: has joined #RubyOnRails
[02:38:22] macsteps: has joined #RubyOnRails
[02:39:06] adgtl: has joined #RubyOnRails
[02:42:55] Rixius: has joined #RubyOnRails
[02:44:20] SteenJobs: has joined #RubyOnRails
[02:44:57] sleungcy: has joined #RubyOnRails
[02:46:45] lxsameer: has joined #RubyOnRails
[02:46:46] lxsameer: has joined #RubyOnRails
[02:48:11] borodin: has joined #RubyOnRails
[02:49:45] moeabdol: has joined #RubyOnRails
[02:50:13] duderonomy: has joined #RubyOnRails
[02:50:40] webdestroya: has joined #RubyOnRails
[02:53:35] stardiviner: has joined #RubyOnRails
[02:54:18] dikaio: has joined #RubyOnRails
[02:58:55] tildes_: has joined #RubyOnRails
[03:01:32] berserk_ren: has joined #RubyOnRails
[03:05:44] tildes_: has joined #RubyOnRails
[03:12:22] sypheren: has joined #RubyOnRails
[03:13:01] pawnbox: has joined #RubyOnRails
[03:15:23] htmldrum: has joined #RubyOnRails
[03:15:25] Limix: has joined #RubyOnRails
[03:15:30] stannard: has joined #RubyOnRails
[03:15:31] agent_white: has joined #RubyOnRails
[03:15:52] braincrash: has joined #RubyOnRails
[03:18:31] Radar: hey agent_white
[03:23:58] yfeldblum: has joined #RubyOnRails
[03:32:01] ismaelga: has joined #RubyOnRails
[03:34:25] segy_: has joined #RubyOnRails
[03:35:51] _Tariq: has joined #RubyOnRails
[03:40:02] moeabdol: has joined #RubyOnRails
[03:40:55] segy_: has joined #RubyOnRails
[03:43:18] dikaio: has joined #RubyOnRails
[03:47:56] sleungcy: has joined #RubyOnRails
[03:49:02] pawnbox: has joined #RubyOnRails
[03:50:27] htmldrum: has joined #RubyOnRails
[03:50:32] tildes_: has joined #RubyOnRails
[03:51:47] S_Waqas: has joined #RubyOnRails
[03:54:09] macsteps: has joined #RubyOnRails
[03:55:27] troys: has joined #RubyOnRails
[03:56:14] pawnbox: has joined #RubyOnRails
[03:59:36] fschuindt: has joined #RubyOnRails
[04:03:00] Coldblackice: has joined #RubyOnRails
[04:04:08] Rodya_: has joined #RubyOnRails
[04:06:04] Spami: has joined #RubyOnRails
[04:09:30] kgrz: has joined #RubyOnRails
[04:09:53] Devalo: has joined #RubyOnRails
[04:10:13] JFlash: has joined #RubyOnRails
[04:10:36] JFlash: please help me . I need to create a reservation sistem
[04:11:03] JFlash: basically I will receive a start time and end time for a new reservation
[04:11:27] JFlash: and I have to compare it with existing reservations on the same day to check if that time slot doesnt conflict
[04:11:40] JFlash: how can I do this in Ruby/Rails?
[04:11:48] Technodrome: has joined #RubyOnRails
[04:12:02] sevenseacat: by breaking it down into smaller ideas, then building them one at a time
[04:12:05] jenrzzz: has joined #RubyOnRails
[04:12:05] jenrzzz: has joined #RubyOnRails
[04:12:11] JFlash: something like .before? or .after? or maybe there's a .between?
[04:12:27] JFlash: it's just this bit that I need help with, really
[04:12:48] sevenseacat: you likely want to check for any overlap of the times
[04:12:56] JFlash: comparing a given time range to other existing time ranges
[04:13:16] JFlash: but how do i do it? I'm new to Ruby
[04:13:20] sevenseacat: so look for any other reservations that have a start time or an end time between your start and end times
[04:13:40] JFlash: is there some kind of .overlap or .contains or .intersects that I can use?
[04:14:15] sevenseacat: if you had any kind of code we could look at, we could offer more help.
[04:14:45] emachnic: has joined #RubyOnRails
[04:15:23] JFlash: i see a lot of time overlap questions on Stackoverflow, so I'm a happy camper!
[04:16:44] Y_Ichiro: has joined #RubyOnRails
[04:17:17] JFlash: this is marked as a correct answer , however I dont have the slightest idea of what it means
[04:17:20] JFlash: overlap = showtimes.select{ |showtime| (start_time - showtime.end_time) * (showtime.start_time - end_time) > 0 }
[04:17:43] sevenseacat: thats also very inefficient
[04:17:46] sevenseacat: even if it is correct
[04:18:16] Ikri: has joined #RubyOnRails
[04:18:17] JFlash: but for education purposes , can you tell me roughly what it does
[04:18:21] sevenseacat: are you familiar with SQL? if so, break the overlap idea into different conditions, then write them
[04:18:41] JFlash: is doing a loop thru every row in the db to perform a check:
[04:19:11] raunicolae: has joined #RubyOnRails
[04:19:22] raunicolae: has left #RubyOnRails: ()
[04:19:32] JFlash: mind you, the query is per day only, which it means that there are only a dozen or so maximum records to check against
[04:19:33] epochwolf: has joined #RubyOnRails
[04:19:54] cschneid: has joined #RubyOnRails
[04:20:49] Fire-Dragon-DoL: has joined #RubyOnRails
[04:21:36] JFlash: this one looks better to me
[04:21:40] JFlash: return if Showtime.where('screen_id = ? AND (end_time > ? OR start_time < ?)', screen_id, start_time, end_time).none?
[04:21:41] JFlash: errors.add(:start_time, 'Times overlap another showtime on this screen
[04:22:29] sevenseacat: i dont think that does what you intend
[04:22:39] constantinexvi: has joined #RubyOnRails
[04:22:43] webdestroya: has joined #RubyOnRails
[04:23:12] sevenseacat: at least, it doesnt do what I presumed in my outline
[04:23:37] syndikate: has joined #RubyOnRails
[04:26:02] kgrz: has joined #RubyOnRails
[04:32:16] SparkMasterTape: has joined #RubyOnRails
[04:33:35] kgrz: has joined #RubyOnRails
[04:36:01] kgrz: has joined #RubyOnRails
[04:36:20] King_Rex: has joined #RubyOnRails
[04:37:15] sleungcy: has joined #RubyOnRails
[04:38:08] kgrz: has joined #RubyOnRails
[04:39:17] roadt_: has joined #RubyOnRails
[04:42:50] JFlash: has joined #RubyOnRails
[04:42:57] JFlash: sorry I got disconnected
[04:43:06] JFlash: did I loose anything?
[04:43:14] Radar: what was the last thing you saw?
[04:43:55] JFlash: last thing was admmiting to my pityful SQL skills
[04:44:17] dikaio: has joined #RubyOnRails
[04:44:59] JFlash: is Radar a history Bot or a human?
[04:45:06] JFlash: Radar: like... very, very basic :D
[04:45:21] S_Waqas: has joined #RubyOnRails
[04:45:30] Radar: JFlash: On the internet, men are men, women are men, and nobody knows that you're a cat.
[04:45:37] matt_d: JFlash: Radar is very much real.
[04:45:44] Radar: matt_d: [citation needed]
[04:45:49] JFlash: well bots are real too :P
[04:45:52] Dimik: has joined #RubyOnRails
[04:46:00] sevenseacat: meow... i mean, shit.
[04:46:13] matt_d: Radar: ha!
[04:46:28] Radar: Who can even say what consciousness is?
[04:46:39] Radar: JFlash: no, you didn't miss anything
[04:46:41] Radar: history is in the logs
[04:46:42] helpa: Check your logs. Namely everything in the log folder of your rails app and the error and access logs from Apache or whatever else you're using.
[04:46:45] Radar: No, not that one.
[04:47:25] JFlash: !irc_logs
[04:47:34] Radar: http://logs.ryanbigg.com/RubyOnRails
[04:47:46] JFlash: !wtf_just_happened
[04:49:04] lxsameer: has joined #RubyOnRails
[04:50:09] JFlash: there's actually an overlap? in Rails, btw
[04:50:41] JFlash: but it's probably for numeric ranges so it wouldn't help my case
[04:52:43] JFlash: appearently Postgres has extra goodies for time comparison, but this kind of stuff is way out of my league :P
[04:52:46] JFlash: http://faxon.org/2014/11/20/postgresql-indexing-overlaps-query-with-tsrange-for-scheduling
[04:54:04] tildes_: has joined #RubyOnRails
[04:55:07] duncannz: has joined #RubyOnRails
[04:55:44] duncannz: has joined #RubyOnRails
[04:56:24] duncannz: has joined #RubyOnRails
[04:58:04] KensoDev: has joined #RubyOnRails
[04:58:55] yfeldblum: has joined #RubyOnRails
[05:01:19] bernsie: has joined #RubyOnRails
[05:02:24] bernsie: has left #RubyOnRails: ()
[05:06:55] triptec_: has joined #RubyOnRails
[05:10:39] bernsie: has joined #RubyOnRails
[05:21:29] htmldrum: has joined #RubyOnRails
[05:22:18] PedramT: has joined #RubyOnRails
[05:22:50] PedramT: has joined #RubyOnRails
[05:26:13] duncannz: has joined #RubyOnRails
[05:26:38] safetypin: has joined #RubyOnRails
[05:29:16] dikaio: has joined #RubyOnRails
[05:35:40] beilabs: has joined #RubyOnRails
[05:40:13] Macaveli: has joined #RubyOnRails
[05:40:38] kgrz: has joined #RubyOnRails
[05:40:54] aghalarp: has joined #RubyOnRails
[05:44:10] pawnbox: has joined #RubyOnRails
[05:46:45] FLeiXiuS: has joined #RubyOnRails
[05:46:53] FLeiXiuS: has joined #RubyOnRails
[05:47:15] jenrzzz: has joined #RubyOnRails
[05:47:28] FLeiXiuS: When using javascript in an actions view, is that javascript loaded and execued at page load when turbolinks is enabled?
[05:47:42] FLeiXiuS: It doesnt appear to be... thats why I'm asking.
[05:48:58] FLeiXiuS: sevenseacat, Doh - let me check the cache.
[05:49:12] sevenseacat: if you want any more help, you might have to show some code :)
[05:49:43] jstransky: has joined #RubyOnRails
[05:52:33] moeabdol: has joined #RubyOnRails
[05:52:40] FLeiXiuS: sevenseacat, Yep twas my browser.
[05:53:30] DoctorMonocular: has joined #RubyOnRails
[05:55:02] macsteps: has joined #RubyOnRails
[05:55:18] blindMoe: has joined #RubyOnRails
[05:55:42] solars: has joined #RubyOnRails
[05:56:17] blindMoe: Can anyone recommend a gem to help deal with authenticating through oauth 1? I need to connect to a rest api that uses oauth 1 and am having a hard time finding a gem to help deal with the oauth 1 negotiation so I can authenticate
[05:57:55] sevenseacat: i use omniauth for all my oauth needs - usually through devise, but it also works standalone
[05:59:42] smoitra: has joined #RubyOnRails
[06:01:10] blindMoe: sevenseacat: you use omniauth to authenticate your app against others?
[06:02:05] sevenseacat: no... oauth is for verifying a user's identity
[06:02:27] sevenseacat: not an entire application
[06:02:45] blindMoe: yeah .. my app needs to connect to another api as a user ( it needs to connect to magento's rest api that uses oauth1 )
[06:03:35] sevenseacat: there isn't a magento omniauth strategy, so
[06:03:43] sevenseacat: you can write one!
[06:03:50] DoctorMonocular: has joined #RubyOnRails
[06:04:08] blindMoe: hehe I could
[06:04:21] sevenseacat: apart from https://rubygems.org/gems/omniauth-magento which looks quite old, but it might be worth starting from
[06:04:29] blindMoe: actually I think there is one.. but it seems like it is more geared towards allowing users of the magento system to be able to authenticate in your app through magneto
[06:04:44] FLeiXiuS: has joined #RubyOnRails
[06:04:46] blindMoe: I am sure could modify it.. was just hoping for a quicker solution since I am still new to RoR
[06:04:57] FLeiXiuS: has joined #RubyOnRails
[06:05:09] sevenseacat: thats... what oauth is, yes
[06:05:38] sevenseacat: so your app knows that the user is actually Person X in a different sytem
[06:06:36] blindMoe: well yeah .. I guess I could just modify it to basically hardcode my credentials in to the app instead of having an actual login form
[06:08:06] blindMoe: hhe my app needs to connect to a third party API with a username / pass that was essentially given to the app. Users will not be logging in to my app.. the app is essentially the user
[06:09:37] Macaveli: has joined #RubyOnRails
[06:10:19] FLeiXiuS: I'm trying to load AJAX content after the page loads. The correct pages are requested from webrick and I see the /url.js being called. In the browser I see the response coming back as OK. However, the success callback isnt being fired from the $.ajax https://gist.github.com/anonymous/c2992129625205a25fac8f523340fb09
[06:10:23] smoitra: has joined #RubyOnRails
[06:10:39] FLeiXiuS: I should mention that neither is the failed.
[06:10:41] Tref: has joined #RubyOnRails
[06:11:48] Tref: has anyone used Devise in conjunction with OpenID Connect?
[06:14:28] sevenseacat: FLeiXiuS: so whats in the response? because you havent posted your js response
[06:20:05] PedramT: has joined #RubyOnRails
[06:20:33] scepticulous: has joined #RubyOnRails
[06:20:48] duncannz: has joined #RubyOnRails
[06:24:00] agit0: has joined #RubyOnRails
[06:24:38] FLeiXiuS: sevenseacat, The response is the HTML in _index.html.erb
[06:25:01] FLeiXiuS: Im not understanding how the success callback is not firing for the $.ajax
[06:25:53] dikaio: has joined #RubyOnRails
[06:26:09] sevenseacat: you're making a request using a js format, your index.html.erb shouldnt be used
[06:26:14] sevenseacat: thats for a html format
[06:26:54] sevenseacat: can you show me the response?
[06:26:59] PedramT_: has joined #RubyOnRails
[06:27:12] sevenseacat: not just the content, but the headers etc. too?
[06:27:14] sleungcy: has joined #RubyOnRails
[06:27:19] FLeiXiuS: sevenseacat, it's rendering an html parital from the js.erb using escape_javascript(render blah )
[06:27:33] rodfersou: has joined #RubyOnRails
[06:27:35] sevenseacat: well this is fun.
[06:27:40] sevenseacat: show meeeeeeee
[06:27:55] FLeiXiuS: I got your girl ;-) one second.
[06:28:07] sevenseacat: I don't have a girl, but okay.
[06:29:24] FLeiXiuS: s/your/you doh!
[06:29:32] sevenseacat: can we get to the code now?
[06:30:03] FLeiXiuS: https://gist.github.com/anonymous/af2c6bf8f88f6f3804beb16e01365a23
[06:30:11] FLeiXiuS: sevenseacat, ^
[06:30:50] PedramT: has joined #RubyOnRails
[06:30:56] sevenseacat: how did you verify that the success callback wasn't being run?
[06:31:08] FLeiXiuS: alert('woohoo')
[06:31:15] FLeiXiuS: And console.logs
[06:31:27] sevenseacat: ACTION notes that none of that is in the actual shared code
[06:32:12] sevenseacat: so what *are* you seeing in your browser console?
[06:32:29] FLeiXiuS: Very true - but I promise it was verified. The success callback has an html replace which should overview everything.
[06:32:57] FLeiXiuS: The browser shows only the layout up until the <% yield %>
[06:33:19] sevenseacat: I can see that, but that doesn't mean shit if that selector isn't on your page, or some other reason
[06:33:22] FLeiXiuS: The <%= yield %> renders nothing until its loaded via the clients ajax. I'll insert a pretty spinnder once its loading.
[06:33:24] tetraktys: has joined #RubyOnRails
[06:33:32] sevenseacat: what... thats not what I asked at all
[06:33:50] FLeiXiuS: Very true, the selector is on the page.
[06:34:20] sevenseacat: can you please answer my question now?
[06:34:55] FLeiXiuS: In the console I see a 200 OK for the request and I see the 'Loading page...'
[06:35:09] FLeiXiuS: I added console.logs in the success - none of them are displayed.
[06:35:15] matt_d: FLeiXiuS: sevenseacat is trying to help you. it'll only help to answer the question(s).
[06:35:21] sevenseacat: you have no idea how frustrating this is.
[06:35:39] FLeiXiuS: Maybe I misread the question?
[06:36:15] sevenseacat: I cannot see what you are seeing. please show me what you are seeing.
[06:36:23] sevenseacat: and the code you are using to see it.
[06:37:20] FLeiXiuS: https://gist.github.com/anonymous/33eefe390d0d97955b0a572d60e16e3b
[06:37:24] sevenseacat: https://api.jquery.com/jquery.ajax/ also states that the name of the callback is `error`, not `fail`
[06:38:15] FLeiXiuS: error is deprecated, fail() is replacing it
[06:38:20] blindMoe: FLeiXiuS: good practive is to implement the 'complete' callback to ensure you are getting the response you expect
[06:38:54] sevenseacat: fail is a promise, not a callback
[06:39:07] blindMoe: also, if you are going to use .fail instead of .error you might as well use .done instead of .success
[06:39:10] blindMoe: sevenseacat: true
[06:39:28] sevenseacat: if you're using callback syntax, use callback names
[06:40:29] FLeiXiuS: Doh - that may be it.
[06:40:42] Pazician: has joined #RubyOnRails
[06:40:42] FLeiXiuS: I read that fail was replacing .error()
[06:40:47] FLeiXiuS: But maybe i read that wrong.
[06:40:58] sevenseacat: it replaced the error promise, yes
[06:41:01] sevenseacat: you're not using error()
[06:41:21] Pazician: has joined #RubyOnRails
[06:42:12] FLeiXiuS: So error callback is getting called.
[06:42:13] Pumukel: has joined #RubyOnRails
[06:42:20] sevenseacat: now you can fix it.
[06:43:14] FLeiXiuS: Hrm, how is error firing with a STATUS OK 200?
[06:43:17] renegadeandy: has joined #RubyOnRails
[06:43:26] FLeiXiuS: Object {readyState: 4, responseText: "<div>I am legend<\/div>", status: 200, statusText: "OK"}
[06:43:28] arBmind: has joined #RubyOnRails
[06:43:49] FLeiXiuS: When displaying the data from error: function(data)
[06:44:03] sevenseacat: show us the value of all the arguments to the error method
[06:44:09] sevenseacat: there should be three or four
[06:44:32] sevenseacat: though I suspect it's likely because your response isn't valid js
[06:44:54] sevenseacat: so it will probably ba a parsererror
[06:45:15] spijet: has joined #RubyOnRails
[06:46:17] ur5us: has joined #RubyOnRails
[06:46:22] tetraktys: has joined #RubyOnRails
[06:46:28] pawnbox: has joined #RubyOnRails
[06:46:38] FLeiXiuS: https://gist.github.com/anonymous/e5a1c1450409ca0b17437e7b5df66433
[06:46:58] FLeiXiuS: You're suggestion that its not valid JS sounds correct.
[06:47:23] sevenseacat: i dont know what that code is
[06:47:41] FLeiXiuS: That's the output from the error arguments in console
[06:48:00] sevenseacat: the error method gets three arguments - Type: Function( jqXHR jqXHR, String textStatus, String errorThrown )
[06:48:07] sevenseacat: what are those argument values
[06:48:13] spijet: Good afternoon people! I have a question regarding model relations: Do I have to specify "belongs_to" in one model (let's call it A) if model B will have "has_many" relation to A? In my particular case I'm going to have a model "Device" and a model "Datatype", every instance of Device should have some DataTypes associated with it.
[06:48:34] Technodrome: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[06:48:37] FLeiXiuS: OH - those args. Sorry I thought you meant the object arguments data response
[06:48:47] PedramT: has joined #RubyOnRails
[06:49:00] ur5us: has joined #RubyOnRails
[06:50:10] aganov: has joined #RubyOnRails
[06:50:13] FLeiXiuS: sevenseacat, and its a parse error. Doh.
[06:50:34] sevenseacat: spijet: you don't have to, but if you have a Datatype instance and you want to get the related Device, it would make sense to have an association going back the other way
[06:50:46] sevenseacat: and it doesnt cost you anything
[06:51:09] spijet: I'm pretty sure I need to add "has_many :datatypes" to Device model, but I'm not sure about what should I add to DataType.
[06:51:14] sevenseacat: FLeiXiuS: you can tell your ajax call you expect to get HTML back, i believe
[06:51:15] FLeiXiuS: sevenseacat, thanks for the patience. Figured the response could be whatever so long as the success: callback handled it. Turns out its required to be JS
[06:51:18] sevenseacat: spijet: belongs_to :device ?
[06:51:38] FLeiXiuS: sevenseacat, Looking at that now...
[06:51:44] sevenseacat: yeah the dataType option
[06:51:55] sevenseacat: why can I not link to specific options in these jquery docs
[06:52:09] spijet: sevenseacat: I don't think anyone would ever want to list devices by datasources used, but it may be useful in one or two conditions
[06:53:21] pyemkey: has joined #RubyOnRails
[06:54:08] FLeiXiuS: sevenseacat, Doh - datatype it was.
[06:54:20] spijet: sevenseacat: doesn't belongs_to imply that it's unique or something? My DataType model will hold some SNMP data descriptions (like Interface RX/TX, System Uptime etc), so many devices can refer to one datatype
[06:54:30] FLeiXiuS: sevenseacat, Thanks so much - I blame the fail (pun intended)
[06:54:52] sevenseacat: spijet: I don't know enough about what you're modelling, so I can't answer your app-specific questions
[06:54:57] sleungcy: has joined #RubyOnRails
[06:55:28] spijet: sevenseacat: the app is a humble attempt to re-create Collectd stats collector using Rails and Sidekiq
[06:55:31] AzaToth: has joined #RubyOnRails
[06:55:55] sevenseacat: it's pretty standard to have a belongs_to on the other side of a has_many, though
[06:56:16] aghalarp: has joined #RubyOnRails
[06:57:12] DoctorMonocular: has joined #RubyOnRails
[06:57:15] spijet: sevenseacat: so it'll use 2 models: one consists of devices which should be polled for stats and the other consists of data to be queried (so the operator wouldn't have to describe all data sources for every device manually and instead had a nice screen with some checkboxes)
[06:59:40] AimlessRAven: has joined #RubyOnRails
[06:59:56] tetraktys: has joined #RubyOnRails
[07:00:10] AimlessRAven: https://gist.github.com/anonymous/0c9594523d1aef8e86937cdfc3776997
[07:00:30] AimlessRAven: why when i update my user attributes in pry everything is work but here when i update invited_by_id && type
[07:03:17] artto: has joined #RubyOnRails
[07:04:27] comrad: has joined #RubyOnRails
[07:07:31] smoitra: has joined #RubyOnRails
[07:09:31] stardiviner: has joined #RubyOnRails
[07:11:21] yardenbar: has joined #RubyOnRails
[07:11:40] Macaveli: has joined #RubyOnRails
[07:12:24] etiago: has joined #RubyOnRails
[07:14:19] artto: has joined #RubyOnRails
[07:14:39] pyemkey: has joined #RubyOnRails
[07:15:45] xall: has joined #RubyOnRails
[07:16:09] edwinvdgraaf: has joined #RubyOnRails
[07:18:57] silcicada: has joined #RubyOnRails
[07:20:54] silcicada: has left #RubyOnRails: ()
[07:22:33] dikaio: has joined #RubyOnRails
[07:24:55] Tref: has joined #RubyOnRails
[07:25:24] smoitra: has joined #RubyOnRails
[07:28:30] Mia: has joined #RubyOnRails
[07:28:30] Mia: has joined #RubyOnRails
[07:30:53] PedramT: has joined #RubyOnRails
[07:32:19] DoubleMalt: has joined #RubyOnRails
[07:33:25] mloy: has joined #RubyOnRails
[07:33:27] antgel: has joined #RubyOnRails
[07:34:31] PedramT: has joined #RubyOnRails
[07:37:17] neanderslob: has joined #RubyOnRails
[07:37:20] pawnbox_: has joined #RubyOnRails
[07:37:42] ur5us: has joined #RubyOnRails
[07:37:44] PedramT: has joined #RubyOnRails
[07:38:51] PedramT: has joined #RubyOnRails
[07:40:46] xcesariox: has joined #RubyOnRails
[07:45:25] xall: has joined #RubyOnRails
[07:47:37] moeabdol: has joined #RubyOnRails
[07:50:19] spijet: sevenseacat: can has_and_belongs_to_many work in my case (where many devices have many datatypes)?
[07:50:53] sevenseacat: spijet: if there's no extra data belonging to the relationship between a device and a data type, sure.
[07:51:32] blindMoe: anyone having any suggestions for getting rid of the 'Net::HTTPRetriableError' 302 "Found error when working locally? I run into this when trying to use the OAuth gem
[07:51:33] emachnic: has joined #RubyOnRails
[07:51:50] spijet: sevenseacat: basically it should be "Device A has datatypes A,B,C; device B has datatypes A,C,D; device C has datatypes B,D,E" and nothing more
[07:52:28] sevenseacat: then if what I said is true, no reason why it shouldn't work.
[07:52:48] spijet: sevenseacat: ok, thanks, gonna try it out now :)
[07:53:03] User458764: has joined #RubyOnRails
[07:53:59] pyemkey: has joined #RubyOnRails
[07:55:11] helpa-bot: has joined #RubyOnRails
[07:55:23] Ergo: has joined #RubyOnRails
[07:57:38] helpa-bot: has joined #RubyOnRails
[07:57:46] hosh_: has joined #RubyOnRails
[07:57:55] c355E3B_: has joined #RubyOnRails
[07:58:02] mattwithoos_: has joined #RubyOnRails
[07:58:18] gmci: has joined #RubyOnRails
[07:58:18] Obi_obi_: has joined #RubyOnRails
[07:58:24] euphoriaa: has joined #RubyOnRails
[07:58:27] Coldblackice: has joined #RubyOnRails
[07:58:31] kumavis_: has joined #RubyOnRails
[07:58:34] jxf_: has joined #RubyOnRails
[07:58:35] gmci: has joined #RubyOnRails
[07:58:41] Quintasan: has joined #RubyOnRails
[07:58:41] Quintasan: has joined #RubyOnRails
[07:58:42] fn2187__: has joined #RubyOnRails
[07:58:46] borkdude: has joined #RubyOnRails
[07:58:47] neanderslob: has joined #RubyOnRails
[07:58:53] deavid: has joined #RubyOnRails
[07:59:03] hoylemd: has joined #RubyOnRails
[07:59:05] nibbo: has joined #RubyOnRails
[07:59:14] cschneid: has joined #RubyOnRails
[07:59:19] jtd: has joined #RubyOnRails
[07:59:21] kitallis: has joined #RubyOnRails
[07:59:21] epochwolf: has joined #RubyOnRails
[07:59:23] hfp: has joined #RubyOnRails
[08:00:07] helpa: has joined #RubyOnRails
[08:01:02] noodle: has joined #RubyOnRails
[08:01:11] lord4163: has joined #RubyOnRails
[08:01:18] AntiSpamMeta: has joined #RubyOnRails
[08:01:51] mark_66: has joined #RubyOnRails
[08:01:55] zel: has joined #RubyOnRails
[08:02:17] swgillespie: has joined #RubyOnRails
[08:02:22] SuppliedRelic: has joined #RubyOnRails
[08:02:59] pyemkey: has joined #RubyOnRails
[08:03:27] mikecmpbll: has joined #RubyOnRails
[08:04:09] sdn90: has joined #RubyOnRails
[08:05:04] xall: has joined #RubyOnRails
[08:05:44] Travis-42: has joined #RubyOnRails
[08:05:53] lipoqil: has joined #RubyOnRails
[08:05:54] jokke: has joined #RubyOnRails
[08:05:56] daemonwrangler: has joined #RubyOnRails
[08:06:10] roelof: has joined #RubyOnRails
[08:06:35] andrew9184: has joined #RubyOnRails
[08:07:00] roelof: I see this as output from webrick : https://gist.github.com/rwobben/20757bd9c53650acb411478ebdb79576
[08:07:14] roelof: but why do I see the index page again ??
[08:07:26] ELCALOR: has joined #RubyOnRails
[08:07:50] sevenseacat: not enough info to say.
[08:08:21] tvw: has joined #RubyOnRails
[08:08:23] Sylario: has joined #RubyOnRails
[08:08:34] roelof: sevenseacat: what info do you need more ? The contents of the controller and the _form.html.erb file ?
[08:08:51] sevenseacat: what did you do in your browser to generate that webrick log?
[08:08:56] pfg: has joined #RubyOnRails
[08:09:00] craysiii: has joined #RubyOnRails
[08:09:29] roelof: and I did goto the index page and clicked on the new project link
[08:09:29] sevenseacat: you didn't do that in your browser, no
[08:09:35] Expanse: has joined #RubyOnRails
[08:09:41] sevenseacat: so what is the code for that new project link?
[08:10:13] roelof: sevenseacat: <%= link_to "New Project", new_project_path, { :class=>"rk-menu__link" } %>
[08:10:22] zrl_: has joined #RubyOnRails
[08:10:34] sevenseacat: looks legit. and nothing happened in your browser when you clicked that link?
[08:10:42] dmcc: has joined #RubyOnRails
[08:11:25] darutoko: has joined #RubyOnRails
[08:11:41] roelof: the only things that changed is the link. See : https://ticketee-wissel.c9users.io/
[08:12:00] roelof: compared with : https://ticketee-wissel.c9users.io/projects/new
[08:12:14] jhill: has joined #RubyOnRails
[08:12:24] Caerus|Away: has joined #RubyOnRails
[08:12:35] sevenseacat: you've got something funky going on with js
[08:12:48] sevenseacat: actually no - that looks right
[08:13:09] sevenseacat: your project new page just... doesnt show a form for creating a new project
[08:13:20] sevenseacat: why? who knows
[08:13:24] roelof: yep, and I cannot figure out why
[08:13:39] sevenseacat: where are you telling it to render a form for creating a new project?
[08:14:01] gingray: has joined #RubyOnRails
[08:14:11] roelof: in new.html.erb : <h1>New Project</h1> <%= render "form", project: @project %>
[08:15:07] sevenseacat: so whats in that form partial?
[08:15:23] sevenseacat: actually, wait - that code is not in that view
[08:15:26] roelof: here you have the contents : https://gist.github.com/rwobben/193f324ad0a0f50bd845f5839c389dd9
[08:15:33] sevenseacat: because it does not appear on that URL
[08:16:00] roelof: correct, the code is the same with both views , namely the index page
[08:16:01] sevenseacat: did you save your file? :)
[08:16:09] sevenseacat: when you added that "New Project" heading to it
[08:16:26] roelof: yep, all files are saved
[08:16:33] unsated: has joined #RubyOnRails
[08:16:46] sevenseacat: then I think you're looking at the wrong view in your editor
[08:17:08] AimlessRAven: has joined #RubyOnRails
[08:17:12] roelof: sevenseacat: ???
[08:17:26] sevenseacat: whats the filename of that view that has the "New Project" heading?
[08:17:30] roelof: Im sure im lookng at the right one
[08:17:54] roelof: new.html.erb
[08:17:59] sevenseacat: whole filename, with path
[08:18:45] roelof: app/views/projects/new.html.erb
[08:19:11] sevenseacat: then something screwy is going on
[08:19:20] sevenseacat: try restarting your server and/or spring? :)
[08:19:30] sevenseacat: if thats even something you can do with cloud 9, i dont know
[08:19:35] dionysus69: has joined #RubyOnRails
[08:20:16] roelof: I can stop rails s and start again , NP
[08:20:23] matthias_: has joined #RubyOnRails
[08:20:54] stannard: has joined #RubyOnRails
[08:21:04] roelof: spring, I do not know how to stop or start
[08:23:12] roelof: oke, I did spring, stop, spring server and rails s , and the problem is still here
[08:24:01] sevenseacat: then you've got something weird going on that I can't diagnose, but I lean towards an unsaved view file.
[08:24:17] sevenseacat: is the repo pubnlic on github?
[08:24:29] roelof: no, but I can make it public
[08:26:59] pawnbox: has joined #RubyOnRails
[08:27:30] pyemkey: has joined #RubyOnRails
[08:27:49] roelof: sevenseacat: you can clone it here : https://rwobben@bitbucket.org/rwobben/ticketee.git
[08:27:54] maesitos: has joined #RubyOnRails
[08:28:38] artto: has joined #RubyOnRails
[08:30:46] sevenseacat: while I wait for that to clone, do your specs pass?
[08:32:22] sevenseacat: right, I see they don't
[08:33:02] roelof: nope, I have to change somethings because I change the layout
[08:33:15] sevenseacat: this looks like turbolinks being stupid
[08:33:56] sevenseacat: or not... what on earth
[08:34:10] smoitra: has joined #RubyOnRails
[08:36:05] bonswouar: has joined #RubyOnRails
[08:36:28] bronson: has joined #RubyOnRails
[08:36:58] roelof: sevenseacat: what do you mean with what on earth
[08:37:10] sevenseacat: what on earth is this code doing
[08:37:38] roelof: which code ?
[08:38:20] spijet: sevenseacat: Thank you, HABTM works well! :) Once I've fiddled enough with buggy JS on devices/:id/edit page (which strangely works only after refteshing the page) and polished some things here and there, it'll be ready for GitHub :)
[08:39:04] roelof: sevenseacat: I try to make this : http://themes-pixeden.com/landing/urku/blog.html with rails but It needs a custom template engine
[08:39:47] roelof: that resides in css._ae directory
[08:39:56] wldcordeiro: has joined #RubyOnRails
[08:39:57] roelof: that resides in css/_ae directory
[08:40:04] dgncn: has joined #RubyOnRails
[08:40:29] tetraktys: has joined #RubyOnRails
[08:41:30] sevenseacat: roelof: you've deleted the part of your application layout that actually renders the page
[08:41:39] sevenseacat: so it's just a static page
[08:41:57] roelof: stupid me. I was running to fast
[08:42:49] PedramT: has joined #RubyOnRails
[08:43:51] moep: has joined #RubyOnRails
[08:44:45] htmldrum: has joined #RubyOnRails
[08:44:53] smoitra: has joined #RubyOnRails
[08:44:54] sevenseacat: roelof: you need this line: https://bitbucket.org/rwobben/ticketee/src/0e0a6351f78ec235b54ac059aca5b3487cb93a0d/app/views/layouts/application.html.erb#application.html.erb-21
[08:45:25] roelof: sevenseacat: yes, I see it, Changed it and it seems to work
[08:47:14] xall: has joined #RubyOnRails
[08:47:55] pawnbox: has joined #RubyOnRails
[08:48:20] pyemkey: has joined #RubyOnRails
[08:51:03] yfeldblum: has joined #RubyOnRails
[08:51:37] smoitra: has joined #RubyOnRails
[08:52:18] blackhuey: has joined #RubyOnRails
[08:53:18] solars: hi, can anyone tell me how to localize e.g. a month name in a model?
[08:53:47] solars: ah nevermind, confused .t with .l :/
[08:54:03] ferr: has joined #RubyOnRails
[08:54:38] sevenseacat: roelof: you're welcome, i guess.
[08:55:26] roelof: thanks a lot, next time I know I have to look for something like this
[08:55:32] roelof: so lessons learned
[09:02:21] tetraktys: has joined #RubyOnRails
[09:02:27] xall: has joined #RubyOnRails
[09:03:42] n008f4g_: has joined #RubyOnRails
[09:03:57] logik-bomb: has joined #RubyOnRails
[09:04:30] Guest683: has joined #RubyOnRails
[09:04:44] dede: has joined #RubyOnRails
[09:05:00] logik-bomb: is anyone here using docker with rails? If so, are you using it for dev, prod or both? I've just started with it but it feels like an overhead during dev. Thanks
[09:07:19] workmad3: has joined #RubyOnRails
[09:07:36] beilabs: has joined #RubyOnRails
[09:08:28] pyemkey: has joined #RubyOnRails
[09:13:08] ferr: has joined #RubyOnRails
[09:13:43] alfie_max15: has joined #RubyOnRails
[09:14:21] alfie_max15: how can i round off a BigDecimal to 2 decimal places and make it of type float ?
[09:14:53] ferr: has joined #RubyOnRails
[09:15:00] alfie_max15: i have this : BigDecimal("7.1762").round(2).to_s.to_f
[09:15:10] alfie_max15: but is there any better way than that?
[09:15:55] tildes: alfie_max15: to_s is redundant
[09:16:19] alfie_max15: i'm unable to directly do `to_f`
[09:16:35] alfie_max15: oh, wait. that worked this time
[09:17:09] PedramT: has joined #RubyOnRails
[09:17:35] tildes: alfie_max15: you're welcome. what do you need the float for btw?
[09:17:46] blackmes1: has joined #RubyOnRails
[09:18:06] alfie_max15: i'm trying to pass an average value to a activerecord background job
[09:18:36] alfie_max15: so, i'm getting serialization error with BigDecimal, which is the result i initially get
[09:19:13] PedramT: has joined #RubyOnRails
[09:19:29] ferr: has joined #RubyOnRails
[09:19:29] alfie_max15: is there an alternative that you can suggest maybe ?
[09:20:30] ferr: has joined #RubyOnRails
[09:20:38] PedramT_: has joined #RubyOnRails
[09:21:59] pLaToOn: has joined #RubyOnRails
[09:24:37] FooMunki: has joined #RubyOnRails
[09:24:55] ferr: has joined #RubyOnRails
[09:26:14] arBmind: has joined #RubyOnRails
[09:26:40] ferr: has joined #RubyOnRails
[09:27:41] andywww: has joined #RubyOnRails
[09:33:00] macsteps: has joined #RubyOnRails
[09:33:44] ferr: has joined #RubyOnRails
[09:33:49] smoitra: has joined #RubyOnRails
[09:35:51] RegulationD: has joined #RubyOnRails
[09:43:29] Polysics: has joined #RubyOnRails
[09:43:31] tildes: has joined #RubyOnRails
[09:43:40] Polysics: hello! what's your favorite Elastic Search gem?
[09:43:43] pyemkey: has joined #RubyOnRails
[09:44:18] kailido: has joined #RubyOnRails
[09:45:25] kailido: hi, is it possible to have a link that redirects to a post and scroll to the location?
[09:45:36] r00tl3ss: has joined #RubyOnRails
[09:48:23] xcesariox: anyone there to help? i am getting undefined method `all' for nil:NilClass when i do @posts = @Post.all.order('created_at DESC')
[09:49:17] xcesariox: oh i solved it.
[09:49:21] xcesariox: need to use " "
[09:50:16] Polysics: not really :D
[09:50:25] Polysics: Post does not need the @
[09:50:35] Polysics: ' or " are no different in that case
[09:52:34] PaulePanter: Hi. How do you deploy your systems with systemd?
[09:52:42] PaulePanter: Do you use a systemd user session for the deploy user?
[09:52:49] PaulePanter: (Capistrano is used here.)
[09:52:55] PaulePanter: … with Puma application server.
[09:53:07] n008f4g_: has joined #RubyOnRails
[09:53:16] PaulePanter: The problem I am facing is, that systemctl restart can only be done as root.
[09:54:22] artto: has joined #RubyOnRails
[09:54:28] Polysics: is that very much Rails relateD?
[09:54:49] moeabdol: has joined #RubyOnRails
[09:55:08] Polysics: have you tried looking into foreman exporting into init scripts?
[09:55:13] Polysics: I hear that works very well
[09:58:09] ur5us: has joined #RubyOnRails
[10:01:02] PedramT: has joined #RubyOnRails
[10:02:08] smoitra: has joined #RubyOnRails
[10:06:09] pyemkey: has joined #RubyOnRails
[10:08:30] Macaveli: has joined #RubyOnRails
[10:11:26] srinidhi: has joined #RubyOnRails
[10:17:58] PedramT: has joined #RubyOnRails
[10:18:16] pyemkey: has joined #RubyOnRails
[10:19:08] roshanavand: has joined #RubyOnRails
[10:19:08] simmerdesigns: has joined #RubyOnRails
[10:19:35] bonswouar: has joined #RubyOnRails
[10:22:17] stannard: has joined #RubyOnRails
[10:23:30] Megamos: has joined #RubyOnRails
[10:35:59] thehardikjoshi: has joined #RubyOnRails
[10:36:26] maesitos: has joined #RubyOnRails
[10:37:05] bronson: has joined #RubyOnRails
[10:37:35] PedramT: has joined #RubyOnRails
[10:39:06] renegadeandy: has joined #RubyOnRails
[10:39:38] User458764: has joined #RubyOnRails
[10:40:39] alfie_max15: has joined #RubyOnRails
[10:40:48] pyemkey: has joined #RubyOnRails
[10:42:42] JMarCal: has joined #RubyOnRails
[10:50:57] tetraktys: has joined #RubyOnRails
[10:51:08] silentpo1t: has joined #RubyOnRails
[10:54:21] Mia: has joined #RubyOnRails
[10:57:14] tetraktys: has joined #RubyOnRails
[11:01:49] Megamos: has joined #RubyOnRails
[11:02:35] FooMunki: has joined #RubyOnRails
[11:02:38] adre: has joined #RubyOnRails
[11:03:14] PedramT: has joined #RubyOnRails
[11:04:43] kgrz: has joined #RubyOnRails
[11:07:47] roadt_: has joined #RubyOnRails
[11:10:40] moeabdol: has joined #RubyOnRails
[11:11:52] thehardikjoshi: has joined #RubyOnRails
[11:14:27] pyemkey: has joined #RubyOnRails
[11:17:29] jds: has joined #RubyOnRails
[11:17:54] GodFather: has joined #RubyOnRails
[11:18:00] bitsapien: has joined #RubyOnRails
[11:19:09] pawnbox: has joined #RubyOnRails
[11:20:44] pyemkey: has joined #RubyOnRails
[11:24:36] bitsapien: bitsapien:ekdoteen
[11:27:06] rbr: has joined #RubyOnRails
[11:28:02] chipotle: has joined #RubyOnRails
[11:29:41] pawnbox: has joined #RubyOnRails
[11:30:44] bitsapien: I'm trying to access a cookie set by another rails app on the same top level domain as another. Here is the code: https://gist.github.com/bitsapien/fdacb751531b15ceea5697aa5849d47a
[11:31:20] bitsapien: The cookie is encrypted and I'm unable gain access to it in the second app
[11:31:52] bitsapien: Is there something I'm doing wrong? Help.
[11:32:20] jds: Does anyone have capistrano set up to compile assets on a single box, then copy the results to others? I'm surprised I can't find anything about it on Google, but maybe I'm searching for the wrong things
[11:33:03] snowy: has joined #RubyOnRails
[11:34:01] pyemkey: has joined #RubyOnRails
[11:34:08] macsteps: has joined #RubyOnRails
[11:35:40] deur-_: bitsapien: If I'm not mistaken your cookies get encrypted with your app's secret key (config/secrets.yml)
[11:35:50] deur-_: bitsapien: So setting the same key in both apps might work out
[11:36:42] RegulationD: has joined #RubyOnRails
[11:41:17] King_Rex: has joined #RubyOnRails
[11:41:52] JakFrist: has joined #RubyOnRails
[11:42:40] pawnbox_: has joined #RubyOnRails
[11:43:28] PedramT: has joined #RubyOnRails
[11:43:53] User458764: has joined #RubyOnRails
[11:47:19] PedramT_: has joined #RubyOnRails
[11:49:02] PedramT: has joined #RubyOnRails
[11:53:49] pyemkey: has joined #RubyOnRails
[11:58:04] rbr: has joined #RubyOnRails
[12:02:45] ldnunes: has joined #RubyOnRails
[12:04:44] diegoviola: has joined #RubyOnRails
[12:05:23] pawnbox: has joined #RubyOnRails
[12:07:10] rickmasta: has joined #RubyOnRails
[12:07:34] n008f4g_: has joined #RubyOnRails
[12:07:46] hoodow: has joined #RubyOnRails
[12:08:44] pawnbox_: has joined #RubyOnRails
[12:12:23] diegoaguilar: has joined #RubyOnRails
[12:14:44] diego1: has joined #RubyOnRails
[12:15:06] PlasmaStar: has joined #RubyOnRails
[12:16:37] diego2: has joined #RubyOnRails
[12:16:43] diego2: has joined #RubyOnRails
[12:21:41] foucist: has joined #RubyOnRails
[12:22:45] ismaelga: has joined #RubyOnRails
[12:23:52] stannard: has joined #RubyOnRails
[12:26:14] gingray: has joined #RubyOnRails
[12:27:55] pyemkey: has joined #RubyOnRails
[12:28:26] Tref: has joined #RubyOnRails
[12:28:32] Omilun1: has joined #RubyOnRails
[12:28:49] jhill: has joined #RubyOnRails
[12:29:04] Omilun1: hello . i am using rails and i18n gem on it. but when i run rails server it has a SSLv2_method error . my os is Arch Linux
[12:29:13] sevenseacat: has joined #RubyOnRails
[12:31:03] snowy: has joined #RubyOnRails
[12:31:55] Tref: has anyone used Devise in conjunction with OpenID Connect?
[12:33:32] Craigimus: has joined #RubyOnRails
[12:34:12] pyemkey: has joined #RubyOnRails
[12:34:18] adre: has joined #RubyOnRails
[12:34:44] macsteps: has joined #RubyOnRails
[12:36:08] snowy: has joined #RubyOnRails
[12:38:05] beilabs: has joined #RubyOnRails
[12:38:59] bronson: has joined #RubyOnRails
[12:41:01] brendan-: has joined #RubyOnRails
[12:42:09] MaDErroR123: has joined #RubyOnRails
[12:42:12] flashpoint9: has joined #RubyOnRails
[12:42:41] gingray_: has joined #RubyOnRails
[12:45:10] matthias_: has joined #RubyOnRails
[12:45:38] soahccc: if someone wants a little riddle: Why does it break like that? When I change the map(&:id) to a pluck(:id) it works so thats my fix but I didn't get that at all... https://gist.github.com/2called-chaos/a7ce07a569ab1e91830d24ac445e5197
[12:45:39] adlerdias: has joined #RubyOnRails
[12:47:48] User458764: has joined #RubyOnRails
[12:47:48] rubyonrails203: has joined #RubyOnRails
[12:48:26] mvxlr: has joined #RubyOnRails
[12:48:47] _Tariq: has joined #RubyOnRails
[12:51:46] Ispira: has joined #RubyOnRails
[12:52:45] Omilun: has left #RubyOnRails: ()
[12:55:10] Malgorath: has joined #RubyOnRails
[12:55:32] tetraktys: has joined #RubyOnRails
[12:57:32] Megamos: has joined #RubyOnRails
[12:59:40] ramortegui: has joined #RubyOnRails
[13:00:13] norc: has joined #RubyOnRails
[13:01:09] norc: Hi. Is there any way to avoid the NodeJS dependency from Rails? Or does the asset pipeline rely on it completey?
[13:01:49] foucist: soahccc: what's target.tagged_with(any_roles, on: :roles, any: true) returning? i would expect that .map(&:id) returns an array, so it would look like target.where(id: [1,2,3])
[13:02:17] Hates_: norc: using the rubyracer gem should remove the dependency
[13:02:37] Hates_: norc: the dependency comes from execjs
[13:02:41] crystal77: has joined #RubyOnRails
[13:02:47] soahccc: foucist: they both return an array with the ids. I admit this query is kinda messy :) target is the collection and I ask for _all_ user ids which are tagged with these roles
[13:03:05] foucist: soahccc: it seems to work with target.tagged_with(any_roles.sample(3)+["fake_account"], on: :roles, any: true).map(&:id) but not target.tagged_with(any_roles, on: :roles, any: true) ?
[13:03:15] soahccc: so user.where(id: user.tagged_with(...).pluck(:id))
[13:03:21] foucist: so some issue with any_roles part perhaps
[13:03:35] sevenseacat: you can use any js runtime. nodejs is typically just the easiest.
[13:04:35] soahccc: foucist: I can put all roles we have together except the fake_user one. with sample() I just tried random variations and I found a case where it works and one where it doesn't (with map, it does with pluck)... It's weird :) any_roles is just a static array, it doesn't change between the examples
[13:04:45] aegis3121: has joined #RubyOnRails
[13:04:50] norc: Hates_: Ah, that would work for me, Ill give it a try thank you.
[13:05:52] norc: Hates_: My plan currently is to remove external dependencies so that my application can be deployed through capistrano to any target machine it can access. Not sure whether that is smart though. :)
[13:06:33] pyemkey: has joined #RubyOnRails
[13:06:35] norc: (The plan kind of fails when it comes to Ruby itself, but that is another story)
[13:07:01] snowy: has joined #RubyOnRails
[13:07:39] norc: sevenseacat: Also thank you for your response.
[13:07:54] JMarCal: has joined #RubyOnRails
[13:08:07] SeanLazer: has joined #RubyOnRails
[13:12:25] drbayer: has joined #RubyOnRails
[13:13:03] artto: has joined #RubyOnRails
[13:13:16] gambl0re: has joined #RubyOnRails
[13:13:17] gambl0re: has joined #RubyOnRails
[13:14:10] foucist: soahccc: .pluck is just grabbing one item, so it'd just be returning 1 id, not an array
[13:14:55] alfie_max15: foucist, i doubt that, pluck(:id) would return the id's of all the items in the collection in an array
[13:14:59] soahccc: foucist: We talking same pluck? http://apidock.com/rails/ActiveRecord/Calculations/pluck
[13:15:09] foucist: er, brainfart :P
[13:15:25] VeryBewitching: has joined #RubyOnRails
[13:15:37] roelof: has joined #RubyOnRails
[13:16:52] roelof: With simple form can I make a button like this : https://gist.github.com/rwobben/ccaf82756ce1127c01edeaa90cc23272 where the are classes and a span for the image ?
[13:17:10] tetraktys: has joined #RubyOnRails
[13:17:18] JakFrist: has joined #RubyOnRails
[13:18:05] JMarCal: has joined #RubyOnRails
[13:21:34] apeiros: foucist: you should use .select(:id) instead of .pluck(:id) or .map(:id). that allows rails to generate a query with a subquery instead of executing two queries.
[13:21:54] foucist: soahccc: ^
[13:22:27] Malgorath: I have a form that I use for edit and creating a record. I want to add a button for auto filling a datetime field on the update section(this is a todo list and I just want to be able to have finished button on it)
[13:22:34] apeiros: Foo.where(bar_id: Bar.select(:id)) --> SELECT "foos".* FROM "foos" WHERE "foos"."bar_id" IN (SELECT "bars"."id" FROM "bars")
[13:23:02] Malgorath: My question is, how should I go about putting it on the form without it showing up for the create or do I have to use 2 partials for this?
[13:23:34] alfie_max15: Malgorath, check if the object is a new record use -> new_record?
[13:24:00] Malgorath: alfie_max15: litterally todolist.new_record?
[13:24:21] alfie_max15: yeah, if it is, dont show the field, if it's not that means the form would be an update form
[13:24:27] soahccc: apeiros: thanks for the suggestion but unfortunately => "This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'"
[13:25:22] roamingdog: has joined #RubyOnRails
[13:26:22] appledroid: has joined #RubyOnRails
[13:27:07] appledroid: Hey all, anyone use xip.io with pow for rails and get intermittent "cannot find server", wait a few minutes and reload and it comes back up?
[13:29:39] PedramT: has joined #RubyOnRails
[13:29:46] ismaelga: has joined #RubyOnRails
[13:29:50] apeiros: soahccc: eeeew :D
[13:30:53] aegis3121: has joined #RubyOnRails
[13:31:38] gopz: has joined #RubyOnRails
[13:32:44] godzillaenlacasa: has joined #RubyOnRails
[13:33:53] S_Waqas: has joined #RubyOnRails
[13:34:35] KensoDev: has joined #RubyOnRails
[13:35:13] jordanm: has joined #RubyOnRails
[13:35:31] macsteps: has joined #RubyOnRails
[13:35:49] diego1: has joined #RubyOnRails
[13:36:15] diego1: has joined #RubyOnRails
[13:38:43] S_Waqas: has joined #RubyOnRails
[13:39:24] emachnic: has joined #RubyOnRails
[13:41:33] GodFather: has joined #RubyOnRails
[13:41:40] pyemkey: has joined #RubyOnRails
[13:41:40] Ergo: has joined #RubyOnRails
[13:42:30] hhee: has joined #RubyOnRails
[13:42:49] roelof: With simple form can I make a button like this : https://gist.github.com/rwobben/ccaf82756ce1127c01edeaa90cc23272 where the are classes and a span for the image ?
[13:43:28] pawnbox: has joined #RubyOnRails
[13:44:09] hinbody: has joined #RubyOnRails
[13:44:12] itsmeduncan: has joined #RubyOnRails
[13:44:49] diego1: has joined #RubyOnRails
[13:44:57] diego1: has joined #RubyOnRails
[13:45:29] sharkman: has joined #RubyOnRails
[13:46:10] JFlash: has joined #RubyOnRails
[13:46:48] pawnbox: has joined #RubyOnRails
[13:46:51] JFlash: hi, I'm learning RoR
[13:47:07] JFlash: can someone help me understand what this is doing?
[13:47:12] JFlash: def available_at
[13:47:13] JFlash: return super.to_datetime if super.respond_to?(:to_datetime)
[13:47:21] Malgorath: !paste Jflash
[13:47:53] JFlash: np, it's a two-liner
[13:48:24] JakFrist: has joined #RubyOnRails
[13:48:32] Hates_: JFlash: it's checking the method is available on the super class, then calling it if it is
[13:48:39] safetypin: has joined #RubyOnRails
[13:49:06] JFlash: and by 'the method' you mean to_datetime?
[13:51:34] mustmodify: has left #RubyOnRails: ()
[13:52:49] diegoviola: has joined #RubyOnRails
[13:52:59] JulienITARD: has joined #RubyOnRails
[13:53:16] diegoviola: has joined #RubyOnRails
[13:53:50] SPYGAME: has joined #RubyOnRails
[13:54:24] arup_r: has joined #RubyOnRails
[13:54:24] MissionCritical: has joined #RubyOnRails
[13:55:26] arup_r: Hi, I am trying to add `selected` to the <option> tag using erb, but I am doing it wrong. rendered html is having either "" or "selected" and that is why the value from UI is not showing as selected. https://gist.github.com/aruprakshit/5d51931d6c46b82851839fba67ce536b
[13:55:38] arup_r: What the actual code I should put there?
[13:56:26] arup_r: nvm, figured out
[13:56:44] alfie_max15: arup_r, how was it done?
[13:57:07] arup_r: My fix is: <option value="<%= county %>" <%= 'selected' if unit.reside_county == county %> >
[13:57:12] arup_r: I was doing it wrong.
[13:58:55] gopz: I'm trying to set up the Rails console so that I can easily see the output of ActionView methods, but I'm having some trouble. I have done the following, but it still can't seem to generate the submission url properly which is mainly what I'm interested in. https://gist.github.com/gopz/c77b3f21373307bd809eaaf92004eb77 (I'm using pry if that matters)
[14:01:07] alfie_max15: gopz, did you try `app.some_resource_path` ?
[14:02:31] gopz: yes, it results in the same error
[14:02:52] gopz: so apparently I just have to manually provide the url
[14:03:46] roelof: With simple form can I make a button like this : https://gist.github.com/rwobben/ccaf82756ce1127c01edeaa90cc23272 where the are classes and a span for the image ?
[14:04:21] roelof: or can I better use another form generator
[14:04:23] quazimodo: has joined #RubyOnRails
[14:04:57] JFlash: Hates_, thank you
[14:05:41] itsmeduncan: has joined #RubyOnRails
[14:05:47] alfie_max15: roelof, https://github.com/plataformatec/simple_form#buttons
[14:06:53] stannard: has joined #RubyOnRails
[14:07:53] mvxlr: so what's the modern stack for web apps Rails + React + Redux ?
[14:08:06] mvxlr: newbie // fast learner here...
[14:10:04] artto: has joined #RubyOnRails
[14:10:43] itsmeduncan: has joined #RubyOnRails
[14:11:03] roamingdog: has joined #RubyOnRails
[14:11:43] moeabdol: has joined #RubyOnRails
[14:11:55] akshat: has joined #RubyOnRails
[14:12:13] godzillaenlacasa: any suggestions/gems to convert a user saved 'schedule' to a cron job? Can't use whenever gem.
[14:12:37] Guest54109: has joined #RubyOnRails
[14:12:51] godzillaenlacasa: So, if a user selects to run a job every monday, it would convert accordingly to a crontab syntax
[14:13:14] roelof: alfie_max15: I have read that but I do not see how I can make a span within the a tag
[14:14:03] alfie_max15: look at the `<%= f.button :button do %>` syntax, you can have your span within the block
[14:15:25] snowy: has joined #RubyOnRails
[14:15:40] roamingdog: has joined #RubyOnRails
[14:15:51] roelof: ??? I do not want it within a block but within the <a> tag, or do we misunderstood each other now
[14:16:27] alfie_max15: ok, so f.button would generate a <button> tag
[14:16:49] alfie_max15: so, you want an <a> tag instead?
[14:17:08] alfie_max15: then use link_to, which has nothing to do with simple_form
[14:17:17] roelof: and this : <%= f.button :submit, "Custom Button Text", class: "my-button" %> makes <button class "mybutton" >
[14:17:55] alfie_max15: that would make -> <button class "mybutton" type="submit">
[14:17:58] maesitos: has joined #RubyOnRails
[14:18:55] roelof: alfie_max15: oke
[14:20:06] MarcoGL: has joined #RubyOnRails
[14:20:52] FooMunki: has joined #RubyOnRails
[14:22:04] rafalee: has joined #RubyOnRails
[14:22:16] dopamean_: has joined #RubyOnRails
[14:22:23] n008f4g_: has joined #RubyOnRails
[14:22:49] safetypin: has joined #RubyOnRails
[14:24:02] bronson: has joined #RubyOnRails
[14:25:21] roelof: alfie_max15: thanks for the help
[14:26:46] DoubleMalt: has joined #RubyOnRails
[14:26:49] smathy: has joined #RubyOnRails
[14:27:51] stannard: has joined #RubyOnRails
[14:28:17] stannard: has joined #RubyOnRails
[14:28:59] JFlash: hi, I want to use this gem:
[14:29:01] JFlash: https://github.com/jackc/tod
[14:29:17] pyemkey: has joined #RubyOnRails
[14:29:26] JFlash: it provides a TimeOfDay class, however
[14:30:02] JFlash: I still dont know how to store the data on the db (which column type to use)
[14:30:03] smathy: godzillaenlacasa, something here maybe: https://www.ruby-toolbox.com/categories/scheduling
[14:30:48] JFlash: smathy, nice
[14:31:44] smathy: JFlash, wasn't for you, hence the godzillaenlacasa prefix.
[14:31:55] gopz: <alfie_max15>, a belated thank you, it turns out the root problem was that I had failed to pluralize my resource in routes.rb :)
[14:32:15] godzillaenlacasa: @smathy thanks... the problem is that the user needs to be able to select something like 'every monday @ 9am', which gets saved to my DB as `* 9 * * MON`. Then when the user client makes the REST call, it will save to the remote host crontab
[14:32:16] smathy: JFlash, for youI think I'd use the string formats shown in the `parse` docs.
[14:32:39] godzillaenlacasa: @smathy so, I'm not saving the job on the server-side crontab, it's actually on the remote
[14:32:49] smathy: godzillaenlacasa, right, so there's no "from anything I say" to cron converter ;) I was showing you some cron and scheduling style tools.
[14:33:13] godzillaenlacasa: @smathy bummer... guess I'll have to roll my own. thanks for the input
[14:33:42] smathy: godzillaenlacasa, my suspicion is that you'll need to convert to the cron syntax yourself, but maybe something in those scheduling gems will be useful.
[14:33:57] IrishGringo: has joined #RubyOnRails
[14:34:00] godzillaenlacasa: @smathy right o... a reading I go!
[14:34:14] JFlash: smathy, what 'parse' docs?
[14:35:09] Limix: has joined #RubyOnRails
[14:35:29] mustmodify: has joined #RubyOnRails
[14:35:35] mustmodify: has left #RubyOnRails: ()
[14:36:07] Ispira: alright removed my broken install of ruby/rails from my server, and gonna try again
[14:36:56] Ispira: What is the "correct" (recommended) way to install Ruby/Rails on what _will_ be a production environment? (ubuntu 16.04 32-bit server)
[14:37:09] wolfravenous: has joined #RubyOnRails
[14:37:19] Ispira: there's...build from source, rvm, rbenv, probably 3 others I don't know of yet :s
[14:37:30] jhack: has joined #RubyOnRails
[14:37:44] wolfravenous: anyone got a link to a good Rails tutorial for a scheduling type application? I can’t see how to until I see how to and right now I am having a hard time seeing how to :) Thanks
[14:37:46] Ispira: every guide I look at uses a different method, and it's just confusing.
[14:38:51] safetypin: Ispira i ended using rbenv
[14:39:31] godzillaenlacasa: Funny... scheduling things seems to be the topic of the day
[14:39:33] hobodave: has joined #RubyOnRails
[14:42:07] JFlash: please, I need to know how to create a Postgres time column in rails
[14:42:35] JFlash: dos it support column_name:time in the scaffold generator?
[14:43:25] JFlash: nm, just found a list here: http://stackoverflow.com/questions/3260345/list-of-rails-model-types
[14:43:31] LastWhisper____: has joined #RubyOnRails
[14:44:05] wolfravenous: godzillaenlacasa: I think schedules are such a challenge for me(insert noob) because there are so many models all related somehow, right now I’m up to six models for a “study hall” app :(
[14:44:59] rickmasta: has joined #RubyOnRails
[14:45:23] godzillaenlacasa: @wolfravenous I hear ya.
[14:46:10] openstruct: has joined #RubyOnRails
[14:47:25] yellow5: has joined #RubyOnRails
[14:49:30] Ispira: safetypin: that's what I originally used, working well in a produciton-type environment for you?
[14:50:11] safetypin: i don't have a high-demand environment, but i don't have any complaints
[14:50:14] Ispira: I don't know <what> caused my issues, so I decided to just start fresh and take it slower as setting up ruby/rails is not as simple as say, PHP5.
[14:50:29] borodin: has joined #RubyOnRails
[14:51:02] arBmind1: has joined #RubyOnRails
[14:51:13] safetypin: Ispira: are you using apache?
[14:52:18] Ispira: that's what it was using yeah.
[14:52:59] Devalo: has joined #RubyOnRails
[14:53:18] havenwood: Ispira: Brightbox maintains up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
[14:53:43] havenwood: Ispira: Or for development: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
[14:54:09] Ispira: my dev will be done locally on OpenSUSE, the ubuntu box is the deployment environment
[14:54:36] Ispira: thanks for the link to brightbox.
[14:55:44] safetypin: i use chruby/ruby-build on my mac for dev.
[14:55:56] safetypin: that's been a good experience
[14:56:15] polishdub: has joined #RubyOnRails
[14:57:06] blackmes1: has joined #RubyOnRails
[14:57:24] akshat_: has joined #RubyOnRails
[14:57:25] IFrank00: has joined #RubyOnRails
[14:58:21] pawnbox: has joined #RubyOnRails
[15:00:25] maokomioko: has joined #RubyOnRails
[15:00:33] PedramT: has joined #RubyOnRails
[15:00:49] smathy: JFlash, the section of the docs you linked to showing the parse method.
[15:00:55] akshat: has joined #RubyOnRails
[15:01:17] smathy: JFlash, there's no built-in support in Rails for a time of day field, hence the gem's existence.
[15:01:27] aegis3121: has joined #RubyOnRails
[15:01:53] itsmeduncan: has joined #RubyOnRails
[15:03:24] JFlash: smathy, well there's support for column type 'time'
[15:03:41] JFlash: which is accepted by Postgres and maybe a few others
[15:05:58] PedramT: has joined #RubyOnRails
[15:06:03] itsmeduncan: has joined #RubyOnRails
[15:07:21] IFrank00: Hi I like to do a query where I get all the project with task that are schedule on the current month. On my Task model I have a method that query all the task that have schedule on the current month. My problem is how can I query All project and only get the lis of project with task schedule.
[15:07:22] IFrank00: https://gist.github.com/Frank004/c5b3330adf0995a75a7ccd9a8896209a
[15:08:50] pyemkey: has joined #RubyOnRails
[15:10:47] idefine: has joined #RubyOnRails
[15:11:30] kgrz: has joined #RubyOnRails
[15:11:54] crystal77: has joined #RubyOnRails
[15:12:39] drale2k: has joined #RubyOnRails
[15:12:42] diegoaguilar: has joined #RubyOnRails
[15:15:21] wolfravenous: has joined #RubyOnRails
[15:15:26] smathy: JFlash, right, but ruby has nothing to represent that, so it'll still be converted to a ruby Time instance, which includes the date. You can make it work, but just like the gem you were asking about, there's a lot of manual steps there.
[15:17:03] n008f4g_: has joined #RubyOnRails
[15:20:08] arup_r: has joined #RubyOnRails
[15:21:38] bronson: has joined #RubyOnRails
[15:21:47] Limix: has joined #RubyOnRails
[15:24:02] artto: has joined #RubyOnRails
[15:25:00] MaDErroR123: has joined #RubyOnRails
[15:26:25] smathy: IFrank00, Project.joins(:tasks).where( tasks: { id: Task.schedule_current_month }).uniq
[15:27:10] IFrank00: Yes that work
[15:28:08] IFrank00: @smathy thank you
[15:28:22] berserk_ren: has joined #RubyOnRails
[15:30:10] drbayer: has joined #RubyOnRails
[15:30:34] smathy: You're welcome IFrank00
[15:32:07] IFrank00: @smathy I was using the Hirb gem and did not see that the method just create a array and not a #<ActiveRecord::Relation []
[15:33:55] PedramT: has joined #RubyOnRails
[15:33:56] IFrank00: @smathy I thought that the methods were the same as the Scopes
[15:34:43] IFrank00: but they give me a different result
[15:35:52] macsteps: has joined #RubyOnRails
[15:36:32] rodfersou: has joined #RubyOnRails
[15:37:08] rbr: has joined #RubyOnRails
[15:38:19] smathy: IFrank00, any class method can be used the same way as a scope.
[15:38:31] MaDErroR123: has joined #RubyOnRails
[15:38:31] xcesariox: hi guys, i am encountering some issues, when usually you do `rails new application_name` you get a test folder
[15:38:43] xall: has joined #RubyOnRails
[15:38:45] xcesariox: but i don't see test folder and test_helper.rb at all, why? smathy
[15:39:06] xcesariox: smathy : i am using rails 4.2.6
[15:39:26] smathy: Why am I being called out here?
[15:39:36] Malgorath: I was wondering that to smathy
[15:40:27] xcesariox: eh, can anyone of you help me out? Malgorath / smathy
[15:40:37] xcesariox: sevencat ain't around to help.
[15:40:40] tubbo: smathy: i am using mac os x 10.10.5
[15:41:20] tubbo: xcesariox: when you mention us, it highlights and we get distracted from something we may be working on. we typically check back here pretty quickly, but just know that we'll definitely get to your issue.
[15:41:33] smathy: Wow Malgorath, see that, so generous to offer the opportunity to help to so many of us.
[15:41:40] xcesariox: tubbo : okay.
[15:41:41] jowiar: has joined #RubyOnRails
[15:42:03] smathy: xcesariox, I go even further than that, if you don't follow the protocol then I just don't help you at all.
[15:42:06] tubbo: xcesariox: do you have a ~/.railsrc file?
[15:42:23] xcesariox: tubbo : nope.
[15:42:33] xcesariox: tubbo : i need to manually create?
[15:42:41] xcesariox: tubbo : i thought rails generate test files itself
[15:42:43] dionysus69: has joined #RubyOnRails
[15:43:25] tubbo: xcesariox: it's definitely supposed to. by default, unless you run the command with the option `--skip-test-unit` (or `--skip-tests` in rails 5), it will generate test/test_helper.rb and a few other folders.
[15:43:26] rbr: has joined #RubyOnRails
[15:43:47] xcesariox: tubbo : nope i didn't even run any skips
[15:43:51] tubbo: xcesariox: what does `which rails` point to?
[15:44:11] xcesariox: tubbo : it says rails: aliased to _rails_command
[15:44:22] tubbo: the plot thickens!
[15:44:35] tubbo: i have a vision...i see...i see you are using oh-my-zsh
[15:45:12] tubbo: xcesariox: could you do me a favor and start a new shell, then type `rails new testapp` and see if the test/ folder gets generated?
[15:45:42] tubbo: frankly the oh-my-zsh _rails_command plugin is a bit outdated these days if you use Bundler and binstubs
[15:45:49] tubbo: bin/rails > _rails_command()
[15:46:04] tubbo: and in this case, i think it's trying to call some kind of weird script/rails command
[15:46:16] xcesariox: tubbo : https://gist.github.com/shaunstanislaus/7654002bc26daf4eadcac2d010ccaa66
[15:46:26] pyemkey: has joined #RubyOnRails
[15:46:32] tubbo: xcesariox: you liar. Using -d postgresql -T from /Users/shaunstanislaus/.railsrc
[15:46:42] xcesariox: tubbo : eh it auto call it.
[15:47:04] SeanLazer: has joined #RubyOnRails
[15:47:05] xcesariox: tubbo : i didn't type it myself. any idea how the hell is it that it runs this by its own without me typing? see gist.
[15:47:10] Spami: has joined #RubyOnRails
[15:47:36] tubbo: xcesariox: it's a means of configuring the default options for the `rails new` command. check out https://www.natashatherobot.com/how-to-configure-your-rails-defaults/
[15:48:11] Limix: has joined #RubyOnRails
[15:48:14] tubbo: xcesariox: you might have misunderstood me ;) the '~' in this case is a UNIX shorthand for your home directory, which on OS X for you is '/Users/shaunstanislaus'.
[15:48:42] tubbo: xcesariox: so when i asked if you had a ~/.railsrc, i really meant if you had a /Users/shaunstanislaus/.railsrc, but since i didn't know the username you had, i just said '~' :)
[15:49:00] xcesariox: tubbo : i subl ~/.railsrc and removed it.
[15:49:10] xcesariox: tubbo : let me see if it generates test
[15:49:10] bwlang: has joined #RubyOnRails
[15:49:31] smathy: ...you might have misunderstood, when I asked "do you have <some text here> file?" you should run: `ls <some text here>` before answering no.
[15:49:52] tubbo: otherwise i am totally within my right to call you a dirty, steeeeeenking liar
[15:50:25] MaDErroR123: has joined #RubyOnRails
[15:50:32] duderonomy: has joined #RubyOnRails
[15:51:07] bwlang: anybody know how to skip dumping the schema in a server migration? e.g. rake db:migrate skip_structure_dump=true (or something) .. i can’t do the dump on the server (wrong pg_dump version) and don’t need to anyway.
[15:51:57] smathy: bwlang, !g rails avoid schema dump
[15:51:58] DarkBushido: has joined #RubyOnRails
[15:51:59] DarkBushido: has joined #RubyOnRails
[15:52:38] duderonomy: has joined #RubyOnRails
[15:53:07] moeabdol: has joined #RubyOnRails
[15:53:21] xcesariox: tubbo : thanks bro.
[15:53:29] tubbo: xcesariox: no problem
[15:54:35] duderonomy: has joined #RubyOnRails
[15:56:07] The_Phoenix: has joined #RubyOnRails
[15:56:22] hhee: has joined #RubyOnRails
[15:56:31] davidw: has joined #RubyOnRails
[15:56:48] SteenJobs: has joined #RubyOnRails
[15:57:20] LastWhisper____: has joined #RubyOnRails
[15:57:29] Douglas_Hammy: has joined #RubyOnRails
[15:58:32] Coldblackice: has joined #RubyOnRails
[15:58:35] artto: has joined #RubyOnRails
[16:00:49] stannard: has joined #RubyOnRails
[16:01:19] idefine: has joined #RubyOnRails
[16:01:35] artto: has joined #RubyOnRails
[16:02:04] Douglas_Hammy: has left #RubyOnRails: ()
[16:06:04] RegulationD: has joined #RubyOnRails
[16:06:37] moeabdol: has joined #RubyOnRails
[16:10:49] stannard: has joined #RubyOnRails
[16:11:03] dikaio: has joined #RubyOnRails
[16:12:15] [Butch]: has joined #RubyOnRails
[16:12:26] JFlash: smathy, I agree, thank you
[16:15:14] beilabs: has joined #RubyOnRails
[16:16:01] xcesariox: tubbo : you there? another question here is, why am i having a failure when the expected results = the test i typed which is the same. https://gist.github.com/shaunstanislaus/64f2551b48f65170bd8c6aa83eeac298
[16:17:21] herenow: has joined #RubyOnRails
[16:17:22] tubbo: xcesariox: add the source for SayController to your gist
[16:18:05] xcesariox: tubbo : done
[16:18:08] xcesariox: tubbo : refresh
[16:19:02] tubbo: hah this is the weirdest tutorial ever
[16:19:16] tubbo: xcesariox: anyway why does it matter what the attribute case is?
[16:19:19] xcesariox: tubbo : i actually just found out the answer, but i wanna know why. the answer is it expects a Capital H in "{\"hello\":\"Rails!\"}"
[16:19:38] tubbo: xcesariox: obviously
[16:19:59] xcesariox: tubbo : if i use lower case, it has 1 failure, but if i use uppercase it passed the asserts without failure.
[16:20:07] xcesariox: tubbo : whats the obvious? i am not a pro here, sorry ):
[16:20:19] smathy: The obvious is that you're not a pro.
[16:20:26] xcesariox: smathy : good one.
[16:20:30] smathy: badum tish
[16:20:51] tubbo: xcesariox: you're not showing me the code that actually renders that bit of data, though. `render :json => @hello.to_json("Rails")` is delegating the response value to the to_json method of @hello, which you instantiated as Hello.new
[16:21:00] tubbo: xcesariox: so you need to add the Hello class definition to that gist too
[16:21:44] xcesariox: tubbo : you mean the hello.rb in the models?
[16:21:53] tubbo: xcesariox: if that's where Hello is defined, then yeah
[16:21:54] bronson: has joined #RubyOnRails
[16:21:57] smathy: xcesariox, why do you think the actual and expected are the same?
[16:22:09] dmz: has joined #RubyOnRails
[16:22:21] xcesariox: tubbo : wait , i am confuse. isn't there a standard place to defined a class?
[16:23:06] xcesariox: tubbo , smathy : updated => https://gist.github.com/shaunstanislaus/64f2551b48f65170bd8c6aa83eeac298
[16:23:45] tubbo: xcesariox: don't worry about that for now
[16:24:03] tubbo: xcesariox: as you can see, `return JSON.parse("{\"Hello\": \"#{text}!\"}")` has the attribute name capitalized. ("Hello")
[16:24:10] tubbo: so not sure what you were expecting out of your test..
[16:24:42] smathy: C'mon xcesariox, are you seriously asking why the controller returns a capital "Hello" in the JSON?
[16:25:01] roelof: has joined #RubyOnRails
[16:25:11] ericmeds: has joined #RubyOnRails
[16:25:15] xcesariox: smathy : no i was asking why they were expecting the same thing in the `rake test` results.
[16:25:23] roelof: Can I have a link instead of a submit button in a form ?
[16:25:29] xcesariox: smathy : i realize that it was casing issue.
[16:25:56] pawnbox: has joined #RubyOnRails
[16:26:10] tubbo: roelof: sure
[16:26:15] smathy: xcesariox, you read these two lines and think they're the same thing? https://gist.github.com/shaunstanislaus/64f2551b48f65170bd8c6aa83eeac298#file-results-sh-L15-L16
[16:26:16] xcesariox: tubbo : okay, i got it. so usually a test file has to be the same in the model?
[16:26:49] safetypin: has joined #RubyOnRails
[16:27:21] tubbo: xcesariox: not sure what you're asking
[16:27:47] xcesariox: tubbo : what i am asking is , usually how test works.
[16:28:04] roelof: oke, I have this form : https://gist.github.com/rwobben/bf3aa75590ec9e4ae178439ca8e408fd and wonder how I can make the span working in the link on line 7 - 9 , tubbo
[16:28:24] tubbo: xcesariox: yeah i mean if you hard-code a string as the return value of a method, then you test that the method returns a different string, then you will get a failing test.
[16:28:33] tubbo: xcesariox: there's no way that's what you were asking but that's the best i could do :P
[16:29:22] sneakerhax: has joined #RubyOnRails
[16:30:25] tubbo: roelof: oh do you want to use an image? you can use the following strategy if you're using form_for http://stackoverflow.com/a/6311312/433811
[16:30:50] tubbo: it's just f.submit :save, src: 'your.svg' (pretty sure SVGs work...)
[16:31:32] roelof: oke, the only thing I have to figure out is how to make the span work
[16:31:37] hobodave_: has joined #RubyOnRails
[16:31:38] roelof: but first dinner
[16:32:31] tubbo: roelof: shouldn't need the <span> if you're using an <input type="submit src="arrow.svg">
[16:32:33] IrishGringo: has joined #RubyOnRails
[16:32:39] stannard: has joined #RubyOnRails
[16:32:40] tubbo: although it is inline..
[16:33:18] macsteps: has joined #RubyOnRails
[16:33:38] djbkd: has joined #RubyOnRails
[16:34:25] djbkd: has joined #RubyOnRails
[16:34:43] S_Waqas: has joined #RubyOnRails
[16:35:09] Cache_Money: has joined #RubyOnRails
[16:35:12] pyemkey: has joined #RubyOnRails
[16:35:34] stannard: has joined #RubyOnRails
[16:36:14] stannard: has joined #RubyOnRails
[16:36:19] idefine: has joined #RubyOnRails
[16:36:30] wldcordeiro: has joined #RubyOnRails
[16:36:36] Disavowed: has joined #RubyOnRails
[16:38:31] smoitra: has joined #RubyOnRails
[16:39:11] ivanskie: has joined #RubyOnRails
[16:40:01] S_Waqas: has joined #RubyOnRails
[16:40:04] mikecmpbll: has joined #RubyOnRails
[16:41:42] silentpost: has joined #RubyOnRails
[16:41:48] benlieb: has joined #RubyOnRails
[16:41:49] mitt3ns: has joined #RubyOnRails
[16:41:52] snowy: has joined #RubyOnRails
[16:42:10] Logico: has joined #RubyOnRails
[16:43:13] drusepth: has joined #RubyOnRails
[16:43:17] herenow: has joined #RubyOnRails
[16:47:57] Cache_Money: has joined #RubyOnRails
[16:49:24] pyemkey: has joined #RubyOnRails
[16:50:02] disgrntld: has joined #RubyOnRails
[16:51:36] Pulp: has joined #RubyOnRails
[16:53:41] wolfravenous: has joined #RubyOnRails
[16:54:06] roelof: tubbo: I will try it.
[16:55:21] roelof: I hope I get the same result as here : http://themes-pixeden.com/landing/urku/contact.html
[16:58:17] aegis3121: has joined #RubyOnRails
[16:58:30] eljimmy: has joined #RubyOnRails
[17:02:12] tildes_: has joined #RubyOnRails
[17:03:40] PaulePanter: has joined #RubyOnRails
[17:04:10] Ebok: has joined #RubyOnRails
[17:04:37] bklane: has joined #RubyOnRails
[17:05:34] PaulePanter: Deploying an application with Capistrano 3.4 using Puma as the application server, I read the Sidekiq author’s post about using the init system and not letting Capistrano restart the application server https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/.
[17:05:50] PaulePanter: task :restart do run "initctl restart sidekiq"
[17:05:57] PaulePanter: is the example in the end.
[17:06:16] PaulePanter: systemd is used here, so I use `systemctl restart puma`.
[17:06:34] PaulePanter: But the capistrano user has to be allowed to run that privileged command.
[17:06:47] PaulePanter: I adapted sudo.
[17:07:08] PaulePanter: As that post in almost two years old, are there currently other best practices?
[17:07:11] bklane: I am having trouble with a AR query where I need to do distinct from a foreign key and off a sort: https://gist.github.com/barnett/88a924f839765ad5173770dca162b58d
[17:07:14] PaulePanter: Could you give me recommendations?
[17:09:18] diegoaguilar: has joined #RubyOnRails
[17:09:30] mikecmpbll: has joined #RubyOnRails
[17:09:31] tubbo: PaulePanter: well considering Capistrano is just acting as an SSH user, simply telling capistrano to issue a kill signal isn't bad.
[17:10:02] tubbo: you can just send a HUP signal to Puma to reload it without actually restarting the process. that's a way better alternative because it safely restarts all of its internal worker threads.
[17:11:17] PaulePanter: tubbo: Thank you for that hint.
[17:11:52] tubbo: PaulePanter: this is a better overview of all the signals Puma can receive https://github.com/puma/puma/blob/master/docs/signals.md
[17:11:56] qejk: has joined #RubyOnRails
[17:12:02] yellow5: has joined #RubyOnRails
[17:12:46] blackmes1: has joined #RubyOnRails
[17:13:03] openstruct: has joined #RubyOnRails
[17:13:51] pyemkey: has joined #RubyOnRails
[17:14:12] marr: has joined #RubyOnRails
[17:14:40] Megamos: has joined #RubyOnRails
[17:16:00] daveomcd: I'm trying to parse a website with capybara & nokogiri. However they've built it with angular js from what I can tell, and I'm not sure how to do it before it's had time to load. This following link has my code and the output, but I can see on the site using "inspect" that it's formatted how I'd expect, just not getting that when looking at my nokogiri variable -- https://gist.github.com/daveomcd/d65b8cda28f5f5645037ca82a2cd47
[17:16:41] choke: has joined #RubyOnRails
[17:16:42] roelof: chips. something is nor right here : <%= f.input :description, placeholder="Message ..." , wrapper_html:{cols="30" rows="4"} %>
[17:17:04] Cohedrin: has joined #RubyOnRails
[17:17:45] DragonPunch: has joined #RubyOnRails
[17:19:11] sbarg: has joined #RubyOnRails
[17:19:39] sbarg: has left #RubyOnRails: ()
[17:22:57] Megamos: has joined #RubyOnRails
[17:23:07] PaulePanter: tubbo: https://github.com/puma/puma/blob/master/docs/systemd.md just shows a “normal” service unit file, and further down says to use `systemd restart puma.service`.
[17:24:00] bronson: has joined #RubyOnRails
[17:24:04] tubbo: PaulePanter: i'm not going to be much help with systemd as i haven't ever used it
[17:24:18] tubbo: roelof: 'placeholder="Message ..."'
[17:24:52] chouhoul_: has joined #RubyOnRails
[17:25:18] jowiar: has joined #RubyOnRails
[17:25:19] salty_solution: has joined #RubyOnRails
[17:26:16] dionysus69: has joined #RubyOnRails
[17:28:02] salty_solution: any of you guys play with the new rails 5.0 goodness
[17:28:03] Devalo: has joined #RubyOnRails
[17:28:10] thorgi: is there a way to combine ActiveRecord::Relation of different model objects into 1 relation for further querying? E.g. all_apps = Type1Apps.all + Type2Apps.all, then later all_apps.where(condition), obviously the condition operates on attributes present in both models
[17:29:41] chipotle: has joined #RubyOnRails
[17:30:36] IFrank00: has joined #RubyOnRails
[17:31:10] tubbo: salty_solution: a littl ebit
[17:31:12] tubbo: little bit*
[17:31:29] salty_solution: How do you like it?
[17:32:50] DoctorMonocular: has joined #RubyOnRails
[17:34:10] PedramT: has joined #RubyOnRails
[17:34:13] Megamos: has joined #RubyOnRails
[17:34:34] dopie2: has joined #RubyOnRails
[17:34:42] SeanLazer: has joined #RubyOnRails
[17:35:16] smathy: thorgi, no.
[17:35:19] Disavowed: has joined #RubyOnRails
[17:35:21] yardenbar: has joined #RubyOnRails
[17:35:32] tubbo: salty_solution: it's pretty nice, i haven't had a chance to play with action_cable yet but so far so good
[17:36:12] PaulePanter: https://github.com/capistrano/capistrano uses `execute :service, "sidekiq restart"` as the example.
[17:36:18] PaulePanter: In https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/
[17:36:31] PaulePanter: `run "initctl restart sidekiq"` is used.
[17:36:36] PaulePanter: Is there a difference?
[17:36:43] gambl0re: has joined #RubyOnRails
[17:36:44] Maletor: has joined #RubyOnRails
[17:36:58] jlyndon: has joined #RubyOnRails
[17:36:59] lipoqil: has joined #RubyOnRails
[17:37:04] discounted: has joined #RubyOnRails
[17:37:20] Obi_obi_: has joined #RubyOnRails
[17:37:40] tubbo: i think it depends on your OS
[17:37:47] ELCALOR: has joined #RubyOnRails
[17:37:49] smathy: Yeah, one's using upstart.
[17:37:55] drusepth: if I have a Company model with a has_many :employees, through: :employments, is there a way to programmatically know what the "middle" model is that connects Company to Employees?
[17:37:57] tubbo: initctl is systemd?
[17:38:37] tubbo: i think you can also use `service restart` for init.d or whatever
[17:38:43] discounted: has joined #RubyOnRails
[17:38:48] tubbo: PaulePanter: fwiw i think that mperham article was written prior to the adoption of SystemD
[17:38:59] tubbo: or at least before debian started rolling it out..
[17:39:11] idefine: has joined #RubyOnRails
[17:39:11] tubbo: drusepth: yeah, it's Employment
[17:39:18] smathy: sysvinit ftw
[17:39:19] tubbo: drusepth: you specify that in the `through:` option
[17:39:19] chouhoulis: has joined #RubyOnRails
[17:39:41] smathy: I mean even the name upstart is derogatory, says it all.
[17:40:01] drusepth: tubbo: but can you find that out only given the Company object/model and the field Employee?
[17:40:31] dmcc: has joined #RubyOnRails
[17:40:48] chouhoul_: has joined #RubyOnRails
[17:40:51] ornerymoose: has joined #RubyOnRails
[17:41:13] PaulePanter: tubbo, smathy: I mean more the difference between `run` and `execute`.
[17:41:25] ornerymoose: Hello, I’m confused as to why my partial object @chart_query is nil, can anyone offer some insight? https://gist.github.com/ornerymoose/5533377f964fa63d2e079b01a390b9bf
[17:41:42] drusepth: I have a nested attributes form for employees that works if I hard-code the Employments class in it, but I'd like to abstract that out so I can iterate over all the fields on the class without building a lookup service that ties editable relations to their "connecting" classes
[17:41:57] tubbo: drusepth: well if you break down the statement, it's really saying "define a has_many relation on this model called :employees, but figure out that data through the association :employments.
[17:42:07] tubbo: drusepth: you also have to specify has_many :employments prior to that has_many statement you wrote.
[17:43:20] dikaio: has joined #RubyOnRails
[17:43:37] tubbo: PaulePanter: well you could write his command like `execute :initctl, 'restart sidekiq'` in the modern Capistrano (SSHKit) DSL...but it ends up being the same thing either way.
[17:43:37] smathy: drusepth, see http://devdocs.io/rails~4.2/activerecord/reflection/classmethods#method-i-reflect_on_association
[17:43:56] thorgi: smathy: thanks, thought so, causes some code wet-ness, but not terrible I guess
[17:44:04] idefine: has joined #RubyOnRails
[17:44:17] drusepth: smathy: that's what I was looking for, thanks
[17:44:25] smathy: thorgi, yep, there are some `union` gems floating around somewhere, not sure of their quality.
[17:44:59] thorgi: smathy: ty, will search for them
[17:45:30] PaulePanter: tubbo: Ok, that answer my question. Thank you!
[17:45:35] jacobat: has joined #RubyOnRails
[17:45:45] PaulePanter: Reading through lib/capistrano/dsl.rb, I even found `sudo`.
[17:46:22] PaulePanter: `sudo "systemctl restart puma"` should be the “best” thing for me then.
[17:46:52] SeanLazer: has joined #RubyOnRails
[17:47:56] PaulePanter: But I couldn’t find yet, where `execute` is defined.
[17:48:00] bronson: has joined #RubyOnRails
[17:50:34] tubbo: kinda sucks you need sudo access just to deploy your app :)
[17:50:43] tubbo: i guess that's the way it was before anyway
[17:50:59] tubbo: just wish i could configure systemd to let 'webapp' control a given subset of processes
[17:51:05] wolfravenous: has joined #RubyOnRails
[17:51:22] PaulePanter: tubbo: visudo is your friend.
[17:51:35] tubbo: yeah i've been using sudoers but it would just be nicer if i didn't need sudo at all
[17:51:55] PaulePanter: deploy ALL=(root) NOPASS: /usr/bin/systemctl restart puma.service
[17:52:01] PaulePanter: … or something like it.
[17:52:32] xall: has joined #RubyOnRails
[17:52:40] alfie_max15: has joined #RubyOnRails
[17:52:42] PaulePanter: tubbo: I believe systemd already does too much, and prefer the one (small) program does one task very well.
[17:52:50] PaulePanter: But that’s always very subjective.
[17:53:03] dsimon: has joined #RubyOnRails
[17:53:09] PaulePanter: At least the folks recommended the sudo or polkit options.
[17:53:24] bklane: has joined #RubyOnRails
[17:54:39] dsimon: hey all; i'm having an issue with ordering on multiple layers of :through
[17:54:54] tubbo: yeah i guess i'm ok with systemd handling "process control" stuff like logging, managing processes, etc.
[17:55:05] tubbo: but i'm not sure why it branched off into doing login, d-bus, etc.
[17:55:07] tubbo: like what's the point?
[17:55:09] dsimon: so i have some models: let's say a Page has multiple Paragraphs, which have multiple Sentences, which have multiple Words
[17:55:30] tubbo: that said, "systemd" is really just a huge collection of processes, so in theory it still follows the UNIX Philosophy.
[17:55:34] roadt__: has joined #RubyOnRails
[17:56:00] dsimon: so on Page, i do: has_many :paragraphs; has_many :sentences, through: :paragraphs; has_many :words, through: sentences
[17:56:11] dsimon: then i can get all the words on a page with just page.words, which works great
[17:56:17] PaulePanter: tubbo: Yeah, that’s one point of view I could live with.
[17:56:27] roadt__: has joined #RubyOnRails
[17:56:47] dsimon: however: there is an ordering which is important. Paragraph, Sentence, and Word all have columns named sequence, and a default scope that orders them by sequence
[17:57:19] dsimon: but on the query generated by page.words, it applies those scopes from the bottom up, rather than the top down
[17:57:27] dsimon: that is: it orders it first by word sequence, then by sentence sequence, and so on
[17:57:45] roadt__: has joined #RubyOnRails
[17:58:11] dsimon: is this a bug? i feel like the opposite behavior would be expected, but otoh i can't find that documented anywhere explicitly so maybe i'm just too biased by my particular case
[17:58:19] tubbo: dsimon: what's the query generated?
[17:58:47] tubbo: at first glance it seems like you might just be leveraging some kind of server default in your database
[17:59:35] dsimon: SELECT `words`.* ... ORDER BY `words`.`sequence` ASC, `sentences`.`sequence` ASC, `paragraphs`.`sequence` ASC
[18:00:14] pyemkey: has joined #RubyOnRails
[18:00:28] tubbo: it probably applies the order() scopes in the order that they appear to ARel
[18:00:38] IFrank004: has joined #RubyOnRails
[18:00:46] tubbo: so if you're doing words.each it's gonna generate that query
[18:01:13] tubbo: why not forego each default_scope (which is going to cause you other problems down the line anyway) and just configure the order() portion yourself?
[18:01:25] dsimon: oh, what's wrong with default_scope?
[18:01:30] tubbo: dsimon: !default_scope
[18:01:30] helpa: dsimon: http://www.innovationontherun.com/activerecord-default_scope-is-an-anti-pattern/
[18:01:42] tubbo: dsimon: can cause some issues if you don't know how to use it correctly/what it actually is doing
[18:01:58] tubbo: basically the issue is similar to what you have, it's difficult to predict how your SQL query is going to get generated
[18:02:25] tubbo: it really should be called "unchangeable_scope"
[18:02:29] alfie_max15: has left #RubyOnRails: ("Ex-Chat")
[18:02:38] emachnic: has joined #RubyOnRails
[18:02:42] tubbo: i mean it MIGHT cause you problems :D
[18:03:00] tubbo: i'm not very good with computers so i don't know if it will
[18:03:00] dsimon: well, i'm familiar with it causing issues when it comes to WHERE stuff, but i thought I was safe with ORDER
[18:03:09] pipework: tubbo: It is changeable tho
[18:03:11] dsimon: i thought wrong it seems :-)
[18:03:34] dsimon: but let me move the orders to association scopes and see if the behavior changes
[18:03:36] pipework: dsimon: Default scope only should be applied when its use applies in all contexts.
[18:03:37] tubbo: pipework: hard_to_change_scope
[18:03:45] dsimon: stubborn_scope
[18:03:54] pipework: tubbo: easy_to_change_but_is_there_by_default_scope
[18:03:59] pipework: #unscoped amirite
[18:04:11] tubbo: yeab but doesn't unscoped get rid of everything?
[18:04:16] wolfravenous: has joined #RubyOnRails
[18:04:45] tubbo: so lets say you're starting with generic_collection_that_has_scopes_applied and you find out that you don't need the default_scope on that thing anymore. if you call .unscoped, it gets rid of ALL the scopes and you need to rebuild the whole query :(
[18:04:48] pipework: tubbo: Oh you want to remove just the default scope on a query object that contains other query bits?
[18:04:51] roelof: tubbo : the trick with img does not work with svg . I see no output and the link is on the wrong place
[18:05:03] tubbo: pipework: well like, hypothetically...if you wanted to do that...you wouldn't be able to easily.
[18:05:08] roelof: See : https://ticketee-wissel.c9users.io/projects/new
[18:05:27] tubbo: ticketee!
[18:05:57] roelof: I did use <% svg_inline %> to see other svg images
[18:06:31] tubbo: roelof: i see this in the dev tools console: `Failed to load resource: the server responded with a status of 404 (Not Found) https://ticketee-wissel.c9users.io/images/arrow.svg`
[18:06:54] tubbo: roelof: noticed that https://ticketee-wissel.c9users.io/assets/arrow.svg *does* exist, so i think you just need to replace the hard-coded text with <%= asset_path 'arrow.svg' %>
[18:06:58] zolt: has joined #RubyOnRails
[18:07:09] tubbo: give that a shot
[18:07:14] xcesariox: has joined #RubyOnRails
[18:07:26] pipework: tubbo: Egh, depends on whether the query object stores or can get references to the individual query criterion, or you might avoid using the object with the default scope on it by using its attributes in a different unscoped query rather than through the original object.
[18:07:59] Guest15533: has joined #RubyOnRails
[18:08:01] discounted: has joined #RubyOnRails
[18:08:03] flashpoint9: has joined #RubyOnRails
[18:08:14] bklane: has joined #RubyOnRails
[18:08:31] Pumukel: has joined #RubyOnRails
[18:08:42] roelof: tubbo: you mean this :<%= f.submit "Comment", :type => :image, :src => <%= asset_path 'arrow.svg' %>, wrapper_html: { class: "arrow-button arrow-button--right arrow-button--out"} %>
[18:08:51] roelof: I see then a syntax error
[18:09:23] tubbo: roelof: well you're already in an ERb tag, so you can do :src => asset_path('arrow.svg')
[18:09:37] tubbo: pipework: i'm talking about ARel here
[18:09:47] tubbo: pipework: not sure if arel does keep tabs on what scopes have been applied
[18:09:48] pipework: o = some_default_scoped_object; o.model_class.unscoped.rest_of_query_here(attributes.slice(*relephant_attributes))
[18:09:51] tubbo: (would be neat though)
[18:10:36] zolt: has left #RubyOnRails: ()
[18:10:38] tubbo: zolt: later
[18:11:26] pipework: tubbo: I avoid diving arel anymore.
[18:11:56] roelof: oke, I see now the -> but now the text is gone. I think that is why the orginal has that span
[18:12:30] drbayer: has joined #RubyOnRails
[18:12:48] Ebok: has joined #RubyOnRails
[18:13:04] roadt_: has joined #RubyOnRails
[18:13:54] habitullence: has joined #RubyOnRails
[18:14:28] dsimon: tubbo, ok, no longer using default_scope, instead i have explicit ordering being applied in lambdas in the non-through has_manys
[18:14:49] roelof: tubbo: see : https://ticketee-wissel.c9users.io/projects/new
[18:14:52] dsimon: however, it's still applying the orders from the bottom up :-\
[18:17:12] roelof: tubbo: I expect that this form cannot be made with rails :(
[18:17:24] pipework: It likely can.
[18:17:30] pipework: You just need to make a form builder of your own.
[18:17:33] pipework: !form_builder
[18:17:50] tildes_: has joined #RubyOnRails
[18:17:58] pipework: roelof: http://api.rubyonrails.org/classes/ActionView/Helpers/FormBuilder.html
[18:18:18] pipework: You can make your own!
[18:18:33] franK004: has joined #RubyOnRails
[18:18:37] pipework: It can really output whatever the hell you want, but the idea is you're outputting HTML relephant to a form.
[18:18:53] tubbo: roelof: i would not bet on that, considering that you're reading a rails tutorial book right now :P
[18:19:06] manfrin: has joined #RubyOnRails
[18:19:15] xardion: has joined #RubyOnRails
[18:19:30] hobodave: has joined #RubyOnRails
[18:19:38] roelof: the book is using bootstrap, im trying to make it work with my own layout
[18:19:44] pipework: tubbo: It's a troll book. You get 60% through and it says, "LOL this tech stack doesn't support that. Use node, you tool." and references you to another one of the author's books.
[18:19:53] roelof: and there I run into a lot of problems but I learn a lot
[18:20:02] pipework: roelof: that's one way to do it!
[18:20:13] pipework: But if you think rails can't output plaintext, you're nuts.
[18:20:27] roelof: otherwise it just copy/paste code and then I do not learn anything
[18:20:39] pipework: roelof: Don't copypaste.
[18:20:43] pipework: Never copypaste.
[18:21:01] roelof: exactly, that is why I tried in with my own layout
[18:21:09] pipework: The 'with my own layout' sounds like a bad idea.
[18:21:21] tubbo: roelof: what you're doing here isn't really rails-specific, it's more to do with a misunderstanding of CSS and HTML.
[18:21:25] pipework: If you can't type what's in the book successfully, why do you think you'd have much success typing something else?
[18:21:26] roelof: what I said earlier. , lot's of problems but I learn a lot
[18:21:36] tubbo: and even if it was, you could just write the <input> tag yourself
[18:21:51] pipework: I'd start by being successful with the first part, get it all working, then tear it back down and do my own thing.
[18:22:06] roelof: pipework: I can type exactly what the book says. I can do then 1 a 2 chapters a day but I doubt I learn a lot
[18:22:07] pipework: That way you can get through the whole book and have something you can poke at in its full implementation.
[18:22:25] tubbo: roelof: you learn a lot not by what the book is telling you to do, but by the areas of Rails it makes you explore.
[18:22:27] pipework: roelof: When I was starting rails, I was doing a book a day.
[18:22:43] tubbo: when i was starting rails, there was only one book :P
[18:22:45] pipework: I was typing the code, seeing it work right away.
[18:22:47] tubbo: and it sucked.
[18:23:00] pipework: Not tinkering until I had gotten through.
[18:23:12] greghoggard: has joined #RubyOnRails
[18:23:17] roelof: the rails part I not a problem. making it work with a custom layout is
[18:23:22] pipework: I came here less to ask questions originally, more to see what kinds of questions people were having.
[18:23:29] manfrin_: has joined #RubyOnRails
[18:23:36] pipework: roelof: Have you made it through the book?
[18:24:00] tubbo: roelof: yeah i would say you should learn the rules before you break them, and do the whole book tutorial. unless you think you're speeding through it, in which case just start coding i guess :) but it's easier to do your own customizations when what you're customizing isn't a moving target. i personally try to do what you're doing a lot and fail haha
[18:24:00] roelof: I did go to the part where the layout is being made
[18:24:52] pipework: It sounds like you're trying to build your first masterpiece while learning how to use the medium.
[18:25:15] dionysus69: has joined #RubyOnRails
[18:25:24] pipework: Take chances, make mistakes, get messy!
[18:26:27] roelof: and learn a lot :)
[18:26:48] roelof: if you do not make mistakes, you learn nothing is my oponion
[18:27:02] DoctorMonocular: has joined #RubyOnRails
[18:27:28] pipework: roelof: self-enrolling in the school of hard knocks, I see.
[18:28:29] epochwolf: pipework: the school of hard knocks doesn't include tech support from the people smart enough to avoid it.
[18:28:30] pipework: Whale, it seems like you're the expert here in whatever it is you think you're doing. :D
[18:28:42] epochwolf: pipework: my man. You're amazing.
[18:29:19] djbkd: has joined #RubyOnRails
[18:29:20] tubbo: MAH MAN https://www.youtube.com/watch?v=KpcmfjFN8OI
[18:29:40] Disavowed: has joined #RubyOnRails
[18:30:09] akshat_: has joined #RubyOnRails
[18:30:43] _djbkd: has joined #RubyOnRails
[18:30:46] pyemkey: has joined #RubyOnRails
[18:30:49] RegulationD: has joined #RubyOnRails
[18:30:51] roadt_: has joined #RubyOnRails
[18:31:15] idefine_: has joined #RubyOnRails
[18:31:41] roelof: Everything thanks, I will try some things and hopefully I get lucky. Otherwise I have to find another layout
[18:31:54] AoifeOToole: has joined #RubyOnRails
[18:32:03] greghoggard: i am trying to parse a json file into my db/seeds file but im not quite sure the right way to do this. This is the code i have so far
[18:32:04] greghoggard: https://gist.github.com/greghoggard/8b464be2eb6bdc680941733775236b3f
[18:33:07] roadt__: has joined #RubyOnRails
[18:35:09] replay: has joined #RubyOnRails
[18:35:41] benlieb: has joined #RubyOnRails
[18:36:14] jenrzzz: has joined #RubyOnRails
[18:36:17] dsimon: looks like a syntax issue to me
[18:36:45] dsimon: the parentheses with your arguments for creating a new Card aren't actually being passed to Card#create! because they're on a different line
[18:37:43] dsimon: this should work a little better: https://gist.github.com/DavidMikeSimon/fd9b451681bdd5fa08e97d2bc0e554b0
[18:37:49] dsimon: though there are ways to clean it up even further
[18:38:15] dalbuschat: has joined #RubyOnRails
[18:38:38] diegoaguilar: has joined #RubyOnRails
[18:38:58] dsimon: there's a more significant problem in that you're trying to assign arrays to string columns
[18:40:11] dsimon: you'll either need to turn that into associations, or serialize the array in some way within the model
[18:40:24] Gandalf: has joined #RubyOnRails
[18:40:54] greghoggard: https://gist.github.com/greghoggard/8b464be2eb6bdc680941733775236b3f
[18:41:25] greghoggard: so i changed it to use JSON parse but i get the error when assigning attributes, you must pass a hash as an arugment
[18:41:45] greghoggard: not sure where i should be passing the hashes at
[18:42:01] dsimon: so "stuff" probably isn't a hash
[18:42:07] pvertenten: has joined #RubyOnRails
[18:42:08] chouhoulis: has joined #RubyOnRails
[18:42:27] dsimon: to debug that, try a "puts stuff.inspect" in your block somewhere
[18:43:09] blackmes1: has joined #RubyOnRails
[18:43:25] greghoggard: it didnt print out anything
[18:43:26] pipework: greghoggard: `JSON.parse(File.read(Rails.root.join('db/LEA.json')), symbolize_names: true)` what does that output?
[18:43:42] pipework: You can run that in a rails console.
[18:43:47] Pumukel: has joined #RubyOnRails
[18:43:55] jstransky: has joined #RubyOnRails
[18:43:56] pipework: Or a runner if you output something somewhere.
[18:44:06] chouhoul_: has joined #RubyOnRails
[18:44:30] arBmind: has joined #RubyOnRails
[18:44:33] greghoggard: when i put that in the console it lists the entire json file
[18:44:58] dsimon: greghoggard, is the "puts" above the card creation line?
[18:45:00] pipework: greghoggard: I can't help you if you incorrectly misrepresent the result of commands I give you.
[18:45:06] pipework: Can you maybe just show us the actual result?
[18:45:16] dsimon: if it's below it, then the exception that create throws will prevent it from reaching that line
[18:45:24] pipework: You should at least correctly misrepresent the result as a picture. :P
[18:45:33] pipework: But preferably, gist it at gist.github.com
[18:45:50] alfie_max15: has joined #RubyOnRails
[18:46:20] yellow5: has joined #RubyOnRails
[18:46:37] alfie_max15: when i try to get the root_url, like -> `app.root_url` in my rails console, it's always returning "http://www.example.com/"
[18:46:51] greghoggard: https://gist.github.com/greghoggard/8b464be2eb6bdc680941733775236b3f
[18:47:19] alfie_max15: this happens, in my dev env, and also in heroku which is my production env.
[18:47:53] tanuki: has joined #RubyOnRails
[18:48:34] pipework: greghoggard: You see the problem, right?
[18:49:04] tanuki: Could someone suggest a synonym for "application" (in the "I want to get into your school/job/etc" sense) that won't make Rails pitch a hissy?
[18:49:18] greghoggard: i put the inspect right after the json parse line and it output "["name", "Limited Edition Alpha"]
[18:49:51] pipework: greghoggard: `that_json.each {|o| puts o.pp }`
[18:50:08] pyemkey: has joined #RubyOnRails
[18:50:16] pipework: #new taking an array of two strings sounds weird, yeah?
[18:50:24] pipework: Why are you iterating over the hash?
[18:50:26] pipework: It's not an array.
[18:50:44] yardenbar: has joined #RubyOnRails
[18:50:49] felltir: has joined #RubyOnRails
[18:51:01] dsimon: tanuki: Submission, RequestForConsideration, Petition
[18:51:28] Maletor: if you have a relation that actually uses the same table (same class name) but is called two different things, eager loading that is basically impossible right? like to eager load an assignee and an assignor, rails always generates two queries.
[18:51:56] dsimon: pipework, greghoggard: i don't see the "cards" key in the output you gisted, did you remove that from the json file?
[18:52:06] pipework: dsimon: He gisted a different file.
[18:52:35] pipework: And either way, iterating would be wrong for both.
[18:52:49] dsimon: oh, you're right
[18:52:54] dsimon: that's not even the same columns
[18:53:16] greghoggard: I removed the first line of the json file so that that key starts with cards
[18:53:28] pipework: greghoggard: [11:50:24 AM] <pipework> Why are you iterating over the hash?
[18:53:40] idefine: has joined #RubyOnRails
[18:53:40] greghoggard: what should i be doing instead?
[18:53:59] pipework: Maybe take a step back, I think you wrote more code than you were ready to handle.
[18:54:38] pipework: Start with JSON.parse(Rails.root.join('db/LEA.JSON'). Your gist showed a cards.json, but you've been referencing LEA.json otherwise
[18:55:01] tanuki: dsimon: Thanks. Submission should work (though I'll probably still say "Application" to the user)
[18:55:10] tanuki: I just can't brain today.
[18:55:26] pipework: greghoggard: Now, with LEA, you get a hash of attributes. Doesn't that hash look like it's the one you need to pass into a class's new or create class method?
[18:55:27] dsimon: you could also just do the c -> k thing that is used to get around "class"
[18:55:31] dsimon: Applikation
[18:55:54] pipework: tanuki: You can call it a class in the UI.
[18:56:22] dsimon: pipework, an "application" :-)
[18:57:05] pipework: dsimon: I was just pointing out that he's not precluded from using those words at the UI level.
[18:57:20] pipework: It just might not make for a great model and association name.
[18:57:38] RegulationD: has joined #RubyOnRails
[18:58:14] njero: has joined #RubyOnRails
[18:58:15] JakFrist: has joined #RubyOnRails
[18:58:33] drusepth: I have a ton of 5-line blocks setting up self-referential has_many (and inverse) relationships that I'd like to condense to a single line each (like https://gist.github.com/drusepth/2dba8e5420d20f11d268df7ddfbb97ee) -- would a concern be the best place to abstract that logic out of the model and set up the relations?
[18:59:01] wolfravenous: has joined #RubyOnRails
[18:59:55] dsimon: drusepth, possibly. if only happens in one model, you might be better off just executing a loop right there in the class
[18:59:56] pipework: drusepth: I'd actually consider an aggregate model called a family that you can relate through so that you only extend the models with a single relationship you can include via a module/concern
[18:59:57] greghoggard: thank you pipework and dsimon for your help
[19:00:19] Benny_: has joined #RubyOnRails
[19:00:25] dsimon: greghoggard, np, good luck :-)
[19:00:31] dsimon: and good hunting
[19:01:08] discounted: has joined #RubyOnRails
[19:01:43] drusepth: dsimon: it's in a bunch of models
[19:01:48] nickenchuggets: has joined #RubyOnRails
[19:01:58] dsimon: drusepth, yeah, then a concern is probably the way to go
[19:02:17] xall: has joined #RubyOnRails
[19:02:19] drusepth: pipework: I just picked a few related ones to make it less abstract, there is actually a family model that ties those specific ones together elsewhere
[19:02:27] pipework: drusepth: I'd suggest another model because that way you aren't littering all those models with a bunch of methods each time you add one to the concern.
[19:02:51] meoblast001: has joined #RubyOnRails
[19:02:54] pipework: That way the interface would be self.family.brothers or self.family.father(s)
[19:03:15] roadt__: has joined #RubyOnRails
[19:03:31] pipework: All methods exist on one class and all other related models that are familial get the smaller number of methods that include #family
[19:03:37] drusepth: can I set up the concern interface to just define a method for defining those relations, and leave it up to the class to implement that they have family, other_relations, etc
[19:03:38] emachnic: has joined #RubyOnRails
[19:04:07] drusepth: (rather than defining them in the concern and polluting any class I include it in)
[19:04:41] pipework: drusepth: I think so, yeah.
[19:05:28] drusepth: coolio, I think that'd be cleanest
[19:05:32] pipework: drusepth: It might need a bit more explanation before I could suggest something. You want a module/concern to include a DSL-like method for classes to include/extend so that they can define their relations in the familial sense?
[19:05:59] pyemkey: has joined #RubyOnRails
[19:06:17] drusepth: well, just so they can define that they have relation X through Y and set up the nested attributes + inverse relations instead of having those 5 boilerplate lines in the actual model for each
[19:06:55] pipework: drusepth: Oh I think I understand. Are you thinking more like class methods like has_daughter or something like that?
[19:07:22] drusepth: (e.g. relates :x, with: y) would set up has_many :xships; has_many :xs, through :xships; accepts_nested_attributes_for :xships; has_many :inverse_xships; etc
[19:07:43] tjohnson: has joined #RubyOnRails
[19:09:16] ericmeds: has joined #RubyOnRails
[19:09:16] d0nn1e: has joined #RubyOnRails
[19:09:23] pipework: drusepth: Oh I see!
[19:10:02] pipework: drusepth: Yeah, a concern that defines those class methods and optionally any instance ones you might need, would be a good way to go.
[19:10:10] drusepth: gotcha, thanks
[19:10:23] pipework: drusepth: Good thinking on that part, by the by.
[19:10:26] drusepth: working with a huge amount of data that users all have access to, trying to keep the code side as clean as possible :)
[19:11:00] ericmeds_: has joined #RubyOnRails
[19:11:06] pipework: It lowers the "action at a distance" factor by far too.
[19:11:37] pipework: Also is abstract enough to be configurable without necessarily needing to refactor the whole interface, and everything that uses it.
[19:12:01] drusepth: I had no idea you could just self.class_method; has_many :some_relation; end
[19:12:04] drusepth: that's cuh-razy
[19:12:23] tubbo: well think about it, it's just a class method calling another class method
[19:12:32] manfrin: has joined #RubyOnRails
[19:12:37] idefine: has joined #RubyOnRails
[19:12:48] tubbo: writing code in the class definition executes that code on the class level (actually the "eigenclass" but that's a whole 'nother can of worms)
[19:13:12] dsimon: i remember how weird it felt the first time i really grokked that ruby class definitions are *executed* like regular code :-)
[19:13:17] tubbo: this is the part of ruby i love, how easy it is to just change the syntax of the language if you understand how methods are scoped.
[19:13:34] Benny_: has left #RubyOnRails: ()
[19:13:35] dsimon: coming from C++ it was quite a shift
[19:13:47] discounted: has joined #RubyOnRails
[19:14:28] cbenny: has joined #RubyOnRails
[19:14:40] srinidhi: has joined #RubyOnRails
[19:15:31] yfeldblum: has joined #RubyOnRails
[19:16:22] drusepth: pipework: u da best https://gist.github.com/drusepth/3b519a41b718576a7f34a5ca6171343e :)
[19:16:47] drusepth: need to do something with that last :source val, but looks good -- thanks everyone :)
[19:17:11] cbenny: has left #RubyOnRails: ()
[19:17:11] pipework: The most important thing to understand in ruby for great masterful power is to know where `self` is and how to manipulate it.
[19:17:16] chouhoulis: has joined #RubyOnRails
[19:18:02] roadt_: has joined #RubyOnRails
[19:18:03] arup_r: has joined #RubyOnRails
[19:19:02] chipotle: has joined #RubyOnRails
[19:22:04] benlieb: has joined #RubyOnRails
[19:22:14] roadt__: has joined #RubyOnRails
[19:22:41] blackmes1: has joined #RubyOnRails
[19:26:11] maesitos_: has joined #RubyOnRails
[19:27:35] craysiii: has joined #RubyOnRails
[19:28:00] beilabs: has joined #RubyOnRails
[19:29:31] tildes_: has joined #RubyOnRails
[19:30:07] ericmeds: has joined #RubyOnRails
[19:30:13] craysiii: I am trying to deploy a Rails app through Jenkins CI. In my build script, https://gist.github.com/craysiii/260ebc3e9b2f0bf6d9798f1e004eb398, I set the env variable to production so it will use PostgreSQL, but when rake runs it always tries to use sqlite3, which is defined under development env. any ideas?
[19:32:25] helpa: has joined #RubyOnRails
[19:32:34] tubbo: craysiii: maybe try doing `bundle exec rake`?
[19:35:01] eljimmy: has joined #RubyOnRails
[19:35:04] aegis3121: has joined #RubyOnRails
[19:35:27] craysiii: tubbo, https://gist.github.com/craysiii/9300bd4a2f077e28643b422c2bbea393 result is the same
[19:36:13] snowy: has joined #RubyOnRails
[19:36:21] nickenchuggets: has joined #RubyOnRails
[19:36:22] nickenchuggets: has joined #RubyOnRails
[19:36:37] helpa-bot: has joined #RubyOnRails
[19:39:11] darutoko-: has joined #RubyOnRails
[19:39:25] helpa: has joined #RubyOnRails
[19:39:59] bbrowning_: has joined #RubyOnRails
[19:40:06] discounted: has joined #RubyOnRails
[19:40:21] FooMunki: has joined #RubyOnRails
[19:42:03] beilabs: has joined #RubyOnRails
[19:42:48] dsimon: `RAILS_ENV=production bundle exec rake`
[19:43:02] craysiii: i'll try it
[19:43:10] deur-: has joined #RubyOnRails
[19:43:15] dsimon: not sure how different jenkins scripts are from what i'd expect shell scripts to behavie like
[19:43:19] xall: has joined #RubyOnRails
[19:43:49] dsimon: googling reveals that people like to use jenkins plugins for setting environment variables? not sure
[19:43:59] craysiii: yeah I tried that as well
[19:44:12] craysiii: using this plugin called EnvInject
[19:44:21] craysiii: same result though..
[19:44:51] dsimon: if you set the environment to production on your local dev machine, does it try to connect to postgres there?
[19:46:10] King_Rex: has joined #RubyOnRails
[19:46:26] [Butch]: has joined #RubyOnRails
[19:48:14] roadt_: has joined #RubyOnRails
[19:48:17] akkmaxon: has joined #RubyOnRails
[19:49:27] akkmaxon: has joined #RubyOnRails
[19:50:52] craysiii: wow. I forgot to push my change to database.yml to my code repo
[19:50:59] craysiii: ill be back lol.
[19:51:09] mikecmpbll: has joined #RubyOnRails
[19:51:23] dsimon: CI is vindicated once again :-D
[19:51:36] funnel: has joined #RubyOnRails
[19:51:36] benlieb: has joined #RubyOnRails
[19:51:36] manfrin: has joined #RubyOnRails
[19:51:36] jenrzzz: has joined #RubyOnRails
[19:51:36] flashpoint9: has joined #RubyOnRails
[19:51:36] DragonPunch: has joined #RubyOnRails
[19:51:36] PaulePanter: has joined #RubyOnRails
[19:51:36] pawnbox: has joined #RubyOnRails
[19:51:36] bwlang: has joined #RubyOnRails
[19:51:37] borodin: has joined #RubyOnRails
[19:51:37] VeryBewitching: has joined #RubyOnRails
[19:51:37] adre: has joined #RubyOnRails
[19:51:37] Craigimus: has joined #RubyOnRails
[19:51:37] euphoriaa: has joined #RubyOnRails
[19:51:37] syndikate: has joined #RubyOnRails
[19:51:37] constantinexvi: has joined #RubyOnRails
[19:51:37] Rixius: has joined #RubyOnRails
[19:51:37] atrius: has joined #RubyOnRails
[19:51:37] hayden_: has joined #RubyOnRails
[19:51:37] FCser: has joined #RubyOnRails
[19:51:37] creature: has joined #RubyOnRails
[19:51:37] tw1sted: has joined #RubyOnRails
[19:51:37] hfp_work: has joined #RubyOnRails
[19:51:37] darrik: has joined #RubyOnRails
[19:51:37] djellemah_: has joined #RubyOnRails
[19:51:37] croberts: has joined #RubyOnRails
[19:51:37] JesseH2: has joined #RubyOnRails
[19:51:37] sung: has joined #RubyOnRails
[19:51:37] baweaver: has joined #RubyOnRails
[19:51:37] svkurowski: has joined #RubyOnRails
[19:51:37] enkristoffer: has joined #RubyOnRails
[19:51:38] lycaonian: has joined #RubyOnRails
[19:51:38] M-shine: has joined #RubyOnRails
[19:51:38] codelahoma: has joined #RubyOnRails
[19:51:38] wij32: has joined #RubyOnRails
[19:51:38] mattp_: has joined #RubyOnRails
[19:51:38] trollface: has joined #RubyOnRails
[19:51:38] tjvc: has joined #RubyOnRails
[19:51:38] Psy-Q: has joined #RubyOnRails
[19:51:38] Thai_: has joined #RubyOnRails
[19:51:38] mhenrixon: has joined #RubyOnRails
[19:51:38] Signum: has joined #RubyOnRails
[19:51:38] tweeeaks: has joined #RubyOnRails
[19:51:38] capin: has joined #RubyOnRails
[19:51:38] dopie: has joined #RubyOnRails
[19:51:38] jowiar: has joined #RubyOnRails
[19:51:38] macsteps: has joined #RubyOnRails
[19:51:38] chipotle: has joined #RubyOnRails
[19:51:38] chouhoulis: has joined #RubyOnRails
[19:51:38] d0nn1e: has joined #RubyOnRails
[19:51:38] RegulationD: has joined #RubyOnRails
[19:51:38] pvertenten: has joined #RubyOnRails
[19:51:38] diegoaguilar: has joined #RubyOnRails
[19:51:38] habitullence: has joined #RubyOnRails
[19:51:38] xcesariox: has joined #RubyOnRails
[19:51:38] jacobat: has joined #RubyOnRails
[19:51:39] ornerymoose: has joined #RubyOnRails
[19:51:39] Logico: has joined #RubyOnRails
[19:51:39] agent_white: has joined #RubyOnRails
[19:51:39] safetypin: has joined #RubyOnRails
[19:51:39] moeabdol: has joined #RubyOnRails
[19:51:39] SteenJobs: has joined #RubyOnRails
[19:51:39] davidw: has joined #RubyOnRails
[19:51:39] duderonomy: has joined #RubyOnRails
[19:51:39] godzillaenlacasa: has joined #RubyOnRails
[19:51:39] mvxlr: has joined #RubyOnRails
[19:51:39] Expanse: has joined #RubyOnRails
[19:51:39] pfg: has joined #RubyOnRails
[19:51:39] andrew9184: has joined #RubyOnRails
[19:51:39] gmas: has joined #RubyOnRails
[19:51:39] AzaToth: has joined #RubyOnRails
[19:51:39] Y_Ichiro: has joined #RubyOnRails
[19:51:39] reaVer: has joined #RubyOnRails
[19:51:39] GragHarker: has joined #RubyOnRails
[19:51:39] JoshL: has joined #RubyOnRails
[19:51:39] Gm4n: has joined #RubyOnRails
[19:51:39] fumduq-: has joined #RubyOnRails
[19:51:39] cabinB: has joined #RubyOnRails
[19:51:39] swistak35_: has joined #RubyOnRails
[19:51:40] mikeiniowa: has joined #RubyOnRails
[19:51:40] Guest35736: has joined #RubyOnRails
[19:51:40] bphogan: has joined #RubyOnRails
[19:51:40] maxx88: has joined #RubyOnRails
[19:51:40] ErhardtMundt_: has joined #RubyOnRails
[19:51:40] TheMoonMaster: has joined #RubyOnRails
[19:51:40] Puffball: has joined #RubyOnRails
[19:51:40] gavit: has joined #RubyOnRails
[19:51:40] ejnahc: has joined #RubyOnRails
[19:51:40] Gizmokid2005: has joined #RubyOnRails
[19:51:40] waseem_: has joined #RubyOnRails
[19:51:40] crankharder: has joined #RubyOnRails
[19:51:40] apeiros: has joined #RubyOnRails
[19:51:40] Papierkorb: has joined #RubyOnRails
[19:51:40] djgraham: has joined #RubyOnRails
[19:51:40] joelsmith: has joined #RubyOnRails
[19:51:40] brainslug: has joined #RubyOnRails
[19:51:53] craysiii: I'm liking Jenkins so far, i'll like it much more when i finally get a successful build :P
[19:52:00] craysiii: first time using it
[19:52:46] dsimon: i should try it again sometime
[19:53:08] dsimon: tried to set it up, couldn't really get any traction, ended up using travis magnum instead cause it just worked
[19:53:14] dsimon: but it would be nice to be able to control our own builds
[19:53:25] dsimon: and even use it for stuff other than just running tests
[19:53:40] craysiii: im mainly using it to move away from heroku
[19:54:00] idefine: has joined #RubyOnRails
[19:54:00] craysiii: and i've been wanting to learn about CI for a while
[19:54:20] idefine: has joined #RubyOnRails
[19:55:21] pyemkey: has joined #RubyOnRails
[19:55:28] Scriptonaut: has left #RubyOnRails: ()
[19:58:01] Majadon: has joined #RubyOnRails
[19:59:28] DoctorMonocular: has joined #RubyOnRails
[20:00:38] macsteps: has joined #RubyOnRails
[20:00:52] bronson: has joined #RubyOnRails
[20:00:56] drbayer: has joined #RubyOnRails
[20:00:57] funnel: has joined #RubyOnRails
[20:01:19] moei: has joined #RubyOnRails
[20:01:35] craysiii: i got a different error, yay!
[20:02:16] tildes_: has joined #RubyOnRails
[20:02:52] rickmasta: has joined #RubyOnRails
[20:02:55] akshat: has joined #RubyOnRails
[20:03:29] FLeiXiuS: has joined #RubyOnRails
[20:03:37] FLeiXiuS: has joined #RubyOnRails
[20:04:05] FLeiXiuS: When using SAML, are you always redirected to the IDPs login?
[20:04:28] djbkd: has joined #RubyOnRails
[20:05:27] arup_r: any idea why my view tests failed when I run them all at once, but passes when run them 1 by 1? https://gist.github.com/aruprakshit/f2cceb10994236f3a79a6a6e23a85725
[20:06:39] roadt__: has joined #RubyOnRails
[20:08:59] godzillaenlacasa: if I have an integer for a month (like 3) what's the best way to convert it to the month name (March)?
[20:09:30] godzillaenlacasa: i was trying `month.strftime("%B")` but that's not working
[20:09:38] godzillaenlacasa: month = 3 in this case
[20:09:59] havenwood: Date::MONTHNAMES[3] #=> "March"
[20:10:28] godzillaenlacasa: @havenwood ah, just tried that as you typed it I guess! Thanks for confirming
[20:10:33] djbkd: has joined #RubyOnRails
[20:10:43] khatterkhatter: has joined #RubyOnRails
[20:11:24] havenwood: godzillaenlacasa: Or ABBR_MONTHNAMES for "Mar"
[20:11:34] godzillaenlacasa: @havenwood nice!
[20:13:17] SeanLazer: has joined #RubyOnRails
[20:13:54] pyemkey: has joined #RubyOnRails
[20:13:59] khatterkhatter: has left #RubyOnRails: ()
[20:14:06] LastWhisper____: has joined #RubyOnRails
[20:14:39] Craigimus: has joined #RubyOnRails
[20:17:59] DoctorMonocular: has joined #RubyOnRails
[20:18:18] godzillaenlacasa: @havenwood one more... while I can concatente the hour/min integers for time (4) (0) into a string, is there a rails method to convert it to a readable time like 4:00 ?
[20:18:29] jowiar: has joined #RubyOnRails
[20:19:25] adaedra: You could just `"%02d:%02d" % [hour, minute]` if all you want to format
[20:19:30] GodFather: has joined #RubyOnRails
[20:20:33] adaedra: Otherwise, you can use a Time/DateTime and use #change to make it use your values if you want a more complex object
[20:20:42] alfie_max15: has left #RubyOnRails: ("Ex-Chat")
[20:21:03] havenwood: or "#{hour.to_s.rjust(2, '0')}:#{minute.to_s.rjust(2, '0')}"
[20:21:30] havenwood: adaedra: yours is prettier
[20:21:46] adaedra: shorter, but a bit harder to see what is happening imo.
[20:21:46] roadt_: has joined #RubyOnRails
[20:21:56] godzillaenlacasa: @adaedra yup, works like a charm! Thanks
[20:22:14] adaedra: Last solution would be to use Time.new
[20:22:38] maesitos: has joined #RubyOnRails
[20:24:13] maxz: has joined #RubyOnRails
[20:24:31] markhkim: has joined #RubyOnRails
[20:26:33] der-landgraf: has joined #RubyOnRails
[20:26:57] akshat_: has joined #RubyOnRails
[20:28:10] markhkim: has joined #RubyOnRails
[20:29:13] markhkim: has joined #RubyOnRails
[20:29:14] markhkim: has joined #RubyOnRails
[20:32:09] discounted: has joined #RubyOnRails
[20:32:32] jonathanwallace1: has joined #RubyOnRails
[20:32:38] Craigimus: has joined #RubyOnRails
[20:32:43] Megamos: has joined #RubyOnRails
[20:34:55] Disavowed: has left #RubyOnRails: ()
[20:36:01] macsteps: has joined #RubyOnRails
[20:36:16] kuroro: has left #RubyOnRails: ()
[20:37:46] salty_solution: has joined #RubyOnRails
[20:38:18] aegis3121: has joined #RubyOnRails
[20:39:13] scepticulous: has joined #RubyOnRails
[20:39:29] pyemkey: has joined #RubyOnRails
[20:40:30] markhkim: has joined #RubyOnRails
[20:40:30] markhkim: has joined #RubyOnRails
[20:41:42] DevastatingDave: has joined #RubyOnRails
[20:42:26] macsteps: has joined #RubyOnRails
[20:43:39] DoctorMonocular: has joined #RubyOnRails
[20:45:25] SteenJobs: has joined #RubyOnRails
[20:47:31] MarcoGL: has joined #RubyOnRails
[20:49:19] baweaver: https://imagetragick.com/ - ImageMagick CVE, update your stuff people.
[20:49:22] discounted: has joined #RubyOnRails
[20:52:12] DoubleMalt: has joined #RubyOnRails
[20:52:21] chandlerbing: has joined #RubyOnRails
[20:55:01] macsteps: has joined #RubyOnRails
[20:56:37] roadt__: has joined #RubyOnRails
[20:58:21] chopin: has joined #RubyOnRails
[20:58:50] discounted: has joined #RubyOnRails
[20:59:10] pipework: baweaver: if you wanted to really save a some cash, just find the $0.88USD/year domains. :D
[20:59:42] manfrin: has joined #RubyOnRails
[20:59:47] shark: has joined #RubyOnRails
[21:02:26] ur5us: has joined #RubyOnRails
[21:03:19] zave: has joined #RubyOnRails
[21:04:21] workmad3: has joined #RubyOnRails
[21:05:15] SteenJobs: has joined #RubyOnRails
[21:05:43] DoubleMalt: has joined #RubyOnRails
[21:05:54] maesitos: has joined #RubyOnRails
[21:07:34] Megamos: has joined #RubyOnRails
[21:11:33] xall: has joined #RubyOnRails
[21:15:03] tubbo: arup_r: i think it's because you're not starting with a clean slate and some other test is screwing with your state.
[21:15:23] tubbo: arup_r: i see DatabaseCleaner is using the :truncation strategy
[21:15:46] tubbo: personally i've never needed to use DatabaseCleaner because by default, tests are running in a transaction that will eventually be ROLLBACKed
[21:16:01] pipework: But transactions don't work with all kinds of tests.
[21:16:06] dikaio: has joined #RubyOnRails
[21:16:07] arup_r: yeah, so `truncation` should drop everything..
[21:16:22] arup_r: i am still don't know what is going on
[21:16:23] pipework: arup_r: But also makes parallel tests sometimes a parallul
[21:17:41] pawnbox: has joined #RubyOnRails
[21:20:02] Cache_Money: I installed capistrano v3.5, but when it forced me to use Harrow I tried to use v3.3 but it's still asking me to try Harrow. Any idea how to get around this?
[21:20:33] maxz: has joined #RubyOnRails
[21:21:00] wldcordeiro: has joined #RubyOnRails
[21:22:16] tubbo: Cache_Money: try 3.4? https://github.com/capistrano/capistrano/blob/v3.4.1/capistrano.gemspec
[21:22:28] hobodave: has joined #RubyOnRails
[21:24:14] Cache_Money: tubbo: I placed gem 'capistrano', '~> 3.4' in my Gemfile and then ran `bundle install` but it still says `Using capistrano 3.5.0`
[21:24:24] tubbo: oh you have to run bundle update capistrano
[21:24:30] Cache_Money: what command do I run to use v3.4?
[21:25:03] IFrank00: has joined #RubyOnRails
[21:26:02] djbkd: has joined #RubyOnRails
[21:26:07] Cache_Money: tubbo: I ran that command but it's still using v3.5. When I do `gem list` I see `capistrano (3.5.0, 3.4.0, 3.1.0)`
[21:26:44] tubbo: maybe setting it to the actual version '3.4.1' will work?
[21:26:49] htmldrum: has joined #RubyOnRails
[21:26:56] tubbo: also, run `bundle clean` to remove old gems that you aren't using anymore
[21:27:29] Cache_Money: should I use '~> 3.4.1' or just '3.4.1'?
[21:27:34] dgncn: has joined #RubyOnRails
[21:27:56] tubbo: just '3.4.1'
[21:29:54] pipework: `bundle show capistrano`
[21:30:04] pipework: when using bundler, it's often best to use bundler.
[21:32:16] djbkd: has joined #RubyOnRails
[21:35:25] Devalo: has joined #RubyOnRails
[21:35:31] patrick99e99: has joined #RubyOnRails
[21:35:32] DoctorMonocular: has joined #RubyOnRails
[21:36:10] patrick99e99: Hey everyone.. I am seeing that if I do: curl -i -H 'X-Forwarded-Host: foobar.com' http://my-rails-app.com .. I see the location change to htt[://foobar.com
[21:36:39] patrick99e99: does anyone know of the correct way to fix this so that it will not change the domain?
[21:37:56] moei: has joined #RubyOnRails
[21:39:50] Cache_Money: pipework: gotcha. Thanks!
[21:40:34] yfeldblum: has joined #RubyOnRails
[21:41:27] pyemkey: has joined #RubyOnRails
[21:42:26] artto: has joined #RubyOnRails
[21:44:45] IrishGringo: has joined #RubyOnRails
[21:46:50] manfrin_: has joined #RubyOnRails
[21:47:21] dopamean1: has joined #RubyOnRails
[21:48:28] dopamean1: has joined #RubyOnRails
[21:48:43] smathy: patrick99e99, where is the domain changing?
[21:49:06] smathy: You mean in a location header returned from your app?
[21:49:40] StaticVoid: has joined #RubyOnRails
[21:49:49] Infinite_182: has joined #RubyOnRails
[21:49:59] dopie: has joined #RubyOnRails
[21:50:59] patrick99e99: yeah.. it looks like i can redirect to some bogus location
[21:52:22] patrick99e99: smathy: https://gist.github.com/patrick99e99/045c2d49a07dda9acf667749d33d1be7
[21:52:36] drusepth: has joined #RubyOnRails
[21:52:56] patrick99e99: I see Location: https://evil.com/sign_in
[21:52:56] smathy: patrick99e99, I don't know why you'd expect something different with XFH?
[21:53:16] Infinite_182: Hello all. I'm trying to put a collection_select into a view, this works: http://pastebin.com/HxNgM81C , but I also need to match it with last_name attribute. Is there a way to stuff them both into the same dropdown picker? i tried doing a first_name + ' ' + last_name and it didn't like that very much
[21:53:38] patrick99e99: smathy: well not sure what I expect.. I was just alerted that this is a vulnerability...
[21:53:51] Cache_Money: On my production server I have bundle v2.2.2 and v2.3.0 (rbenv whence bundle). What the appropriate way to remove v2.2.2 from my server?
[21:54:15] flashpoint9: has joined #RubyOnRails
[21:54:23] patrick99e99: smathy: does this have to be configued on the apache /nginx level to prevent redirects to bogus places?
[21:54:52] smathy: patrick99e99, I'd imagine yes that it's something the httpd does.
[21:56:14] LastWhisper____: when you guys are working on a new view, just ironing out the look/etc, do you have any suggestions on how to set that up? The current view I'm working on depends on this annoying work flow and it takes a lot of time to get to it just to refresh and see the changes. Does anyone hack around creating a new action or something?
[21:56:19] smathy: patrick99e99, not sure what vulnerability you think it is, or what vulnerability you think you can avoid if you ignore it. The `Host` header is equally susceptible to spoofing.
[21:56:31] Infinite_182: Hello all. I'm trying to put a collection_select into a view, this works: http://pastie.org/10823019 , but I also need to match it with last_name attribute. Is there a way to stuff them both into the collection_select?
[21:56:45] pipework: LastWhisper____: Render the view without a layout to play with the view itself.
[21:58:09] snowy: has joined #RubyOnRails
[21:58:09] smathy: Cache_Money, gem help
[21:58:17] LastWhisper____: pipework can you be a little more granular? do that where?
[21:58:46] pipework: LastWhisper____: anywhere with a renderer. In the controller you were already working with, wherever.
[21:58:54] pipework: LastWhisper____: probably in the controller action/
[22:00:00] hobodave: has joined #RubyOnRails
[22:00:40] maesitos: has joined #RubyOnRails
[22:01:10] Infinite_182: anyone know if you can put two attributes added together into the same collection_select?
[22:01:16] craysiii: if im using nginx for a rails app with puma, should i be using proxy_pass or fastcgi_pass?
[22:01:24] bronson: has joined #RubyOnRails
[22:01:25] timdotrb: has joined #RubyOnRails
[22:01:35] timdotrb: Afternoon, all
[22:02:34] smathy: Infinite_182, you mean like the `name_with_initial` example in the docs? http://devdocs.io/rails~4.2/actionview/helpers/formoptionshelper#method-i-collection_select
[22:03:19] timdotrb: I’m running Ubuntu 16.04 and install Phusion Passenger from the repository as their website only lists packages for 12.04 and 14.04, however I’m getting an error when trying to access my app: cannot load such file -- phusion_passenger
[22:03:38] timdotrb: Is there some additional work that needs to be done after installing from the repo?
[22:04:18] djbkd: has joined #RubyOnRails
[22:04:25] Infinite_182: smathy you're the shit, sorry i'm really new to this and didn't even realize you'de put something in the model to do this
[22:04:49] Infinite_182: that's exactly what I was looking for
[22:04:58] smathy: Infinite_182, you're welcome.
[22:05:25] silentpo1t: has joined #RubyOnRails
[22:05:47] dikaio: has joined #RubyOnRails
[22:07:14] flashpoint9: has joined #RubyOnRails
[22:07:53] spectra: has joined #RubyOnRails
[22:10:38] patrick99e99: smathy: hmm yeah.. im not sure either... we have a security organization and they just freaked out and said this is a vulnerability that needs to be fixed.. so im trying to understand it
[22:11:47] nibbo: has joined #RubyOnRails
[22:13:36] Limix: has joined #RubyOnRails
[22:14:25] workmad3: has joined #RubyOnRails
[22:16:03] safetypin: has joined #RubyOnRails
[22:18:20] smathy: patrick99e99, ok, sounds like they're overreacting, and it's SSL anyway so meh.
[22:19:10] bronson: has joined #RubyOnRails
[22:19:41] ornerymoose: has joined #RubyOnRails
[22:19:49] SteenJobs: has joined #RubyOnRails
[22:20:05] timdotrb: Update: are there known issues with nokogiri and Ubuntu 16.04? I believe that’s where the issue is coming from
[22:20:36] superlou: has joined #RubyOnRails
[22:21:08] timdotrb: I’m getting the error “incompatible library version”
[22:22:27] pipework: patrick99e99: Don't understand it, just update your packages and read the notes about the disclosure.
[22:23:43] idefine: has joined #RubyOnRails
[22:24:29] Infinite_182: What is the easiest way for a noob like me to have two fields that i select from a collection_select calculate the "quote_total" and auto fill it in. I've been reading this needs to be done with ajax or jquery somehow because the model isn't aware of previous field selections without the form being submitted. uh.... advice?
[22:25:33] Infinite_182: something along the lines of *tough guy voice* "The beach is zat away."
[22:28:19] mikecmpbll: has joined #RubyOnRails
[22:29:09] pipework: Infinite_182: Whale, you have three choices here. Client, server, and a mix.
[22:29:27] chouhoul_: has joined #RubyOnRails
[22:29:36] pipework: You don't need to use JS if you want to submit the values to the server.
[22:29:54] macsteps: has joined #RubyOnRails
[22:30:03] Infinite_182: yeah, the value will be stored
[22:30:05] pipework: If you want to use JS to either do a calculation client-side, or update a value somehow on the client based on data you can send to the client, then you can do that.
[22:30:27] Infinite_182: yeah i want to do that, it's one of the requirements to have some dynamic stuff in my code
[22:30:41] pipework: However, if you can't send the data to the client for them to be able to do the calculation on their side, then you might want to use JS to make an AJAX query to send the data to the server.
[22:31:25] Infinite_182: this is an internal employee-use form so it's ok if they see stuff
[22:31:45] Infinite_182: i am learning!
[22:32:23] Infinite_182: so that's how you would go about protecting the client from seeing everything in the object but still getting what they want.. an AJAX query. interesting
[22:33:12] Infinite_182: does JS need to go in a special place, (the JS folder in assets) or do i put it in the model to use in this form?
[22:33:22] pipework: Infinite_182: The ajax query solves two things in this instance. the first is no page refresh, the second is to take the state of the form values and send it to the server.
[22:33:56] blackhuey: has joined #RubyOnRails
[22:34:10] foucist: has left #RubyOnRails: ()
[22:35:04] timdotrb: Infinite_182: js cannot go in the model
[22:35:57] Infinite_182: i was asking too many questions without getting back to google. i'm reading more now. thanks you both
[22:36:09] gambl0re: has joined #RubyOnRails
[22:36:09] gambl0re: has joined #RubyOnRails
[22:36:49] crystal77: has joined #RubyOnRails
[22:36:52] pipework: More correctly, JS doesn't belong in rails models, by and large.
[22:37:31] crystal77: I'm not seeing any tutorial/docs on how this "just" works in routs: get 'static_pages/home', where it matches controller/action
[22:37:55] crystal77: Most routes I've seen look like this: get "/pages/:page" => "pages#show"
[22:38:34] pipework: crystal77: bundle exec rake routes after adding the route, yeah?
[22:39:11] crystal77: Yeah it works, but I wanted to understand the why.
[22:39:19] crystal77: Why don't I need the hashrocket?
[22:39:34] safetypin: has joined #RubyOnRails
[22:41:02] pipework: crystal77: Because ruby 1.9
[22:42:08] adgtl: has joined #RubyOnRails
[22:42:11] macsteps: has joined #RubyOnRails
[22:46:05] idefine: has joined #RubyOnRails
[22:51:46] draynium: has joined #RubyOnRails
[22:52:18] urbanmonk: has joined #RubyOnRails
[22:53:03] skolman_: has joined #RubyOnRails
[22:53:04] hinbody: has joined #RubyOnRails
[22:53:44] skolman_: I have a question about assigning a ruby object to a JS variable in the erb file
[22:54:04] skolman_: can you someone help me with that?
[23:01:41] pipework: skolman_: !ask
[23:01:41] helpa: skolman_: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[23:01:54] pipework: show us some code and your question in a gist.
[23:05:13] pvertenten: has joined #RubyOnRails
[23:05:19] timdotrb: Anyone have any clue how to fix this error? I’ve tried multiple versions of nokogiri, as well as using system libs when I compile: https://gist.github.com/willc0de4food/5b949787aced5cbf388466a9b794fb6a
[23:05:21] skolman_: sorry, will type out the whole question
[23:05:25] jpterry: has joined #RubyOnRails
[23:05:47] csmb: has joined #RubyOnRails
[23:06:23] chopin: has joined #RubyOnRails
[23:07:21] manfrin: has joined #RubyOnRails
[23:08:08] DragonPunch: has joined #RubyOnRails
[23:09:24] jhack: has joined #RubyOnRails
[23:11:30] skolman_: Here is a link to the code: https://gist.github.com/sabman83/0b687b05e5fb71e96581d1b8d9d885ac . I have a Ruby object current_user which has a token property. I want to assign that value to a javascript variable as a string.
[23:11:47] n008f4g_: has joined #RubyOnRails
[23:11:59] skolman_: the above code throws an error Uncaught SyntaxError: Unexpected token ILLEGAL
[23:12:20] xall: has joined #RubyOnRails
[23:12:34] skolman_: it is obviously parsing the value as a variable name
[23:12:49] skolman_: how do I assign it as a string to the JS variable
[23:13:01] beilabs: has joined #RubyOnRails
[23:13:24] _Tariq: has joined #RubyOnRails
[23:18:33] chouhoulis: has joined #RubyOnRails
[23:19:51] chouhoulis: has joined #RubyOnRails
[23:20:03] dopamean_: has joined #RubyOnRails
[23:20:45] Infinite_182: has joined #RubyOnRails
[23:23:38] dalbusch1t: has joined #RubyOnRails
[23:26:08] mrichman: has joined #RubyOnRails
[23:26:37] mrichman: Where does the default content in a Rails 5 app come from (the "Yay! You’re on Rails!" stuff)?
[23:27:31] robbyoconnor: has joined #RubyOnRails
[23:28:05] mikecmpbll: has joined #RubyOnRails
[23:28:31] itsmeduncan: has joined #RubyOnRails
[23:28:44] Infinite_187: has joined #RubyOnRails
[23:30:13] pipework: mrichman: Look in your logs for the served file.
[23:30:41] mrichman: pipework: duh. got it. thanks! :)
[23:33:02] dikaio: has joined #RubyOnRails
[23:33:56] Limix: has joined #RubyOnRails
[23:34:15] xall: has joined #RubyOnRails
[23:34:29] benlieb: has joined #RubyOnRails
[23:34:35] macsteps: has joined #RubyOnRails
[23:37:03] Devalo: has joined #RubyOnRails
[23:40:08] sbarg1: has joined #RubyOnRails
[23:43:07] deur-_: has joined #RubyOnRails
[23:43:31] pyemkey: has joined #RubyOnRails
[23:44:45] crystal77: has joined #RubyOnRails
[23:44:53] emachnic: has joined #RubyOnRails
[23:45:28] emachnic: has joined #RubyOnRails
[23:45:42] hahuang65: has joined #RubyOnRails
[23:46:42] manfrin: has joined #RubyOnRails
[23:51:46] idefine: has joined #RubyOnRails
[23:54:30] idefine_: has joined #RubyOnRails
[23:55:08] whoughton: has joined #RubyOnRails
[23:55:57] chipotle: has joined #RubyOnRails
[23:57:26] aloneintheworld: has joined #RubyOnRails
[23:58:50] whoughton: hey all, looking for some ActiveRecord join insertion help
[23:58:53] idefine__: has joined #RubyOnRails
[23:58:56] whoughton: given these models: https://gist.github.com/whoughton/22f5443a6de4a1e2feb0a2d25c7e5236
[23:59:26] idefine: has joined #RubyOnRails
[23:59:30] whoughton: I was expecting to be able to do a User.first.assignments << Assignments.first
[23:59:42] whoughton: but I get back a NoMethodError: undefined method `reject!' for nil:NilClass