« Back to channel list

#RubyOnRails - 30 March 2017

« Back 1 day Forward 1 day »
[00:05:25] s2013: has joined #RubyOnRails
[00:07:47] cam27: has joined #RubyOnRails
[00:08:02] Derperperd: has joined #RubyOnRails
[00:10:22] alibby1: has joined #RubyOnRails
[00:11:22] Rodya_: has joined #RubyOnRails
[00:11:56] Ericx2x: has joined #RubyOnRails
[00:12:51] rakm: has joined #RubyOnRails
[00:17:26] planigan: has joined #RubyOnRails
[00:19:57] Rodya_: has joined #RubyOnRails
[00:20:57] brendan6: has joined #RubyOnRails
[00:28:05] Darmani: has joined #RubyOnRails
[00:29:04] Darmani: Hi everyone! My flash messages are persisting across pages for some reason. I suspect it has something to do with Turbolinks but I'm not sure.
[00:29:05] Darmani: https://gist.github.com/mfifth/1fa38196fc5d89955c99134d0dcf11b2
[00:30:22] mrgreenfur: has joined #RubyOnRails
[00:30:57] Radar: Darmani: Hello again.
[00:31:11] Darmani: Radar: Long time no see ^.^
[00:31:12] Radar: Darmani: Can you show us the code of where you're setting these messages?
[00:31:50] Darmani: Radar: https://gist.github.com/mfifth/1fa38196fc5d89955c99134d0dcf11b2#file-order_products_controller-rb
[00:32:20] Radar: Hm, you're doing a redirect, so that's good. That flash message should disappear on the next request.
[00:32:23] Radar: I don't know hy it would be persisting.
[00:32:33] erlend: has joined #RubyOnRails
[00:33:41] Darmani: Could it possibly be because of this? https://gist.github.com/mfifth/1fa38196fc5d89955c99134d0dcf11b2#file-app-html-erb-L4
[00:34:11] Radar: No idea. I don't use Tubolinks.
[00:36:20] r3vDev: has joined #RubyOnRails
[00:41:04] planigan: has joined #RubyOnRails
[00:41:49] bungoman: has joined #RubyOnRails
[00:42:39] mrgreenfur: Anyone wrangled with the ‘x-frame-options’ header?
[00:42:51] mrgreenfur: I had it turned off nicely in dev , but in production I can’ tseem to turn it off
[00:43:26] Radar: mrgreenfur: How did you turn it off in development?
[00:43:38] Radar: Should be a matter of removing it from config.action_dispatch.default_headers.
[00:43:51] mrgreenfur: I added a controller concern, then did an after_action on some views to delete hte value
[00:44:12] mrgreenfur: I’ve also tried that, but per chrome network tab, it’s sending both ALLOWALL and DENY
[00:44:12] Radar: (I know this because I learned it from the book I wrote: https://leanpub.com/ddr)
[00:44:22] Radar: mrgreenfur: Which version of Rails?
[00:44:39] Radar: Oh. I thought it sent SAMEORIGIN?
[00:44:56] mrgreenfur: I thought so too!
[00:45:03] mrgreenfur: I wonder if some other settings are makign it more “secure"
[00:45:12] mrgreenfur: I am using this now: config.action_dispatch.default_headers = {
[00:45:12] mrgreenfur: 'X-Frame-Options' => 'ALLLOWALL'
[00:45:20] mrgreenfur: which doesn’t delete the header, just adds another it seems
[00:45:24] mrgreenfur: maybe i need to match case with rails
[00:45:29] mrgreenfur: evne though headers aren’t case snsitive
[00:45:35] Radar: config.action_dispatch.default_headers = {
[00:45:35] Radar: 'X-Frame-Options' => 'SAMEORIGIN',
[00:45:42] Radar: That is how Rails defines it. Seems to match what you're doing.
[00:45:48] Radar: Interest piqued.
[00:46:05] mrgreenfur: Maybe chome is annoyingly caching, but i’ve tried hard refreshing and an incog window
[00:46:20] Radar: Ok, I have a new Rails app here and I see "X-Frame-Options: SAMEORIGIN". I'll try setting it to ALLOWALL via action_dispatch.
[00:46:27] Radar: Do you realise that your override has 3 Ls for Allow?
[00:46:42] mrgreenfur: I DID NOT REALIZE THAT
[00:46:46] matthewd: AFAIK we never set DENY, so that would seem to be coming from somewhere else
[00:47:18] mrgreenfur: I’ve searched my code a few times couldn’t find it either. Maybe there’s a plugin interferring
[00:47:38] matthewd: secure_headers?
[00:47:43] Radar: mrgreenfur: https://gist.github.com/radar/a083bff55ac197d99fe7dd0af3658bd6
[00:47:44] mrgreenfur: x-frame-options:DENY
[00:47:45] mrgreenfur: x-frame-options:ALLOWALL
[00:47:48] Radar: Works on my machine,.
[00:48:03] Radar: matthewd: TIL about secure_headers
[00:48:16] mrgreenfur: Radar: thanks for confirmation that it’s not rails!
[00:48:31] Radar: mrgreenfur: All good :)
[00:49:19] mrgreenfur: I was using this: “response.headers.delete "x-frame-options”
[00:49:29] mrgreenfur: now i’m trying a proverbial sledgehammer
[00:53:16] mrgreenfur: just redeployed, same hting:
[00:53:17] mrgreenfur: x-frame-options:ALLOWALL
[00:53:17] mrgreenfur: x-frame-options:DENY
[00:53:45] mrgreenfur: firefox agrees: X-Frame-Options:"ALLOWALL, DENY"
[00:53:48] mrgreenfur: the game is afoot!
[00:55:23] mrgreenfur: I’ll never get hose hours back
[00:55:25] mrgreenfur: nginx config: add_header X-Frame-Options DENY;
[00:55:41] mrgreenfur: thanks for the help Radar & matthewd
[00:56:22] mikecmpbll: argggghghhhhuewafeha.
[00:57:05] mrgreenfur: pretty much!
[00:57:11] uxp: has joined #RubyOnRails
[00:58:35] mrgreenfur: when in doubt blame ops
[00:58:48] planigan: has joined #RubyOnRails
[00:59:17] jhfisc: has joined #RubyOnRails
[01:00:28] ahrs: has joined #RubyOnRails
[01:12:04] lupine: has joined #RubyOnRails
[01:14:18] Lyubo1: has joined #RubyOnRails
[01:19:06] gambl0re: has joined #RubyOnRails
[01:19:42] jdm: has joined #RubyOnRails
[01:21:18] sevenseacat: has joined #RubyOnRails
[01:28:04] chouhoulis: has joined #RubyOnRails
[01:33:28] drale2k: has joined #RubyOnRails
[01:34:42] mochiyoda_: has joined #RubyOnRails
[01:42:41] mochiyoda_: has joined #RubyOnRails
[01:47:52] Radar: mrgreenfur: Glad you were able to figure it out
[01:50:07] aajjbb: has joined #RubyOnRails
[01:53:55] Jasaka|NA: has joined #RubyOnRails
[01:55:39] hipertracker: has joined #RubyOnRails
[01:56:05] KnownSyntax: has joined #RubyOnRails
[01:57:22] bzb: has joined #RubyOnRails
[01:57:41] Trynemjoel: has joined #RubyOnRails
[01:58:15] Technodrome: has joined #RubyOnRails
[02:00:50] s2013: has joined #RubyOnRails
[02:03:11] Trynemjoel: has joined #RubyOnRails
[02:04:21] libastral: has joined #RubyOnRails
[02:05:57] chrisgopher: has joined #RubyOnRails
[02:06:33] nyaa: has joined #RubyOnRails
[02:11:28] rakm: has joined #RubyOnRails
[02:11:52] nyaa: has joined #RubyOnRails
[02:18:44] Didac: has joined #RubyOnRails
[02:26:20] tdy: has joined #RubyOnRails
[02:28:18] hakash: has joined #RubyOnRails
[02:31:40] unmanbearpig: has joined #RubyOnRails
[02:32:05] hndk: has joined #RubyOnRails
[02:44:26] jenrzzz: has joined #RubyOnRails
[02:44:26] jenrzzz: has joined #RubyOnRails
[02:54:22] unmanbearpig: has joined #RubyOnRails
[03:00:21] irishfromua: has joined #RubyOnRails
[03:00:29] davedo321: has joined #RubyOnRails
[03:01:56] mazeinmaze: has joined #RubyOnRails
[03:02:19] nyaa: has joined #RubyOnRails
[03:06:11] brendan6: has joined #RubyOnRails
[03:06:49] nOwz: has joined #RubyOnRails
[03:08:16] jdm: has joined #RubyOnRails
[03:09:16] Trynemjoel: has joined #RubyOnRails
[03:15:09] s2013: has joined #RubyOnRails
[03:15:34] alan_w: has joined #RubyOnRails
[03:17:05] fl4sh_: has joined #RubyOnRails
[03:20:20] LiquidInsect: has joined #RubyOnRails
[03:26:03] fulcan: has joined #RubyOnRails
[03:31:07] planigan: has joined #RubyOnRails
[03:35:06] brendan6: has joined #RubyOnRails
[03:35:45] benlieb: has joined #RubyOnRails
[03:35:46] jerme_: has left #RubyOnRails: ()
[03:45:24] xall: has joined #RubyOnRails
[03:46:35] darutoko: has joined #RubyOnRails
[03:46:41] mazeinmaze_: has joined #RubyOnRails
[03:51:26] nyaa: has joined #RubyOnRails
[04:09:08] irishfromua: has joined #RubyOnRails
[04:11:27] nyanz: has joined #RubyOnRails
[04:23:10] nyaa: has joined #RubyOnRails
[04:24:41] patarr: has joined #RubyOnRails
[04:27:43] djbkd: has joined #RubyOnRails
[04:40:33] djinni`: has joined #RubyOnRails
[04:41:02] dustinm`: has joined #RubyOnRails
[04:43:56] gthank: has joined #RubyOnRails
[04:49:09] adavia: has joined #RubyOnRails
[04:50:02] jenn_: has joined #RubyOnRails
[04:50:39] jusa: has joined #RubyOnRails
[04:51:12] agent_white: has joined #RubyOnRails
[05:07:27] nOwz: has joined #RubyOnRails
[05:07:33] rakm: has joined #RubyOnRails
[05:09:59] itsgokul: has joined #RubyOnRails
[05:11:15] libastral: has joined #RubyOnRails
[05:12:12] eforbes: has joined #RubyOnRails
[05:12:22] Robtop__: has joined #RubyOnRails
[05:15:54] cydrobolt_: has joined #RubyOnRails
[05:16:32] hfp_work: has joined #RubyOnRails
[05:17:10] staticfox: has joined #RubyOnRails
[05:17:35] jdm: has joined #RubyOnRails
[05:20:25] jenrzzz: has joined #RubyOnRails
[05:20:31] robnester: has joined #RubyOnRails
[05:23:18] Jameser: has joined #RubyOnRails
[05:24:15] adavia: damn filter
[05:34:17] shamanime: has joined #RubyOnRails
[05:34:32] webnanners: has joined #RubyOnRails
[05:34:35] machuga: has joined #RubyOnRails
[05:36:29] bodie_: has joined #RubyOnRails
[05:36:36] jdm_: has joined #RubyOnRails
[05:41:32] rakm: has joined #RubyOnRails
[05:44:21] brent__: has joined #RubyOnRails
[05:45:59] urkle: has joined #RubyOnRails
[05:47:26] Anne: has joined #RubyOnRails
[05:53:07] djbkd: has joined #RubyOnRails
[05:56:01] sypheren: has joined #RubyOnRails
[05:57:46] tofutoon: has joined #RubyOnRails
[05:59:36] Anne: Anyone around with experience in Doorkeeper?
[06:12:57] alibby1: has joined #RubyOnRails
[06:17:53] itsgokul: has joined #RubyOnRails
[06:19:18] Anne: I'm trying to remove a validation (redirect_uri) which comes build-in in a gem (Doorkeeper). How could I accomplish this, any tips?
[06:21:28] Duckily: has joined #RubyOnRails
[06:24:53] drale2k: has joined #RubyOnRails
[06:26:04] patarr: has joined #RubyOnRails
[06:28:38] unmanbearpig: has joined #RubyOnRails
[06:28:49] User4587_: has joined #RubyOnRails
[06:31:19] jeyraof^mbpr: has joined #RubyOnRails
[06:33:03] chrisarcand: has joined #RubyOnRails
[06:33:24] tw1sted: has joined #RubyOnRails
[06:34:15] Haydos: has joined #RubyOnRails
[06:34:15] Haydos: has joined #RubyOnRails
[06:42:23] dionysus69: has joined #RubyOnRails
[06:48:51] aganov: has joined #RubyOnRails
[06:49:49] nOwz: has joined #RubyOnRails
[06:50:24] zero1one0: has joined #RubyOnRails
[06:51:33] conta: has joined #RubyOnRails
[06:54:10] drale2k: has joined #RubyOnRails
[06:54:29] djbkd: has joined #RubyOnRails
[06:56:19] brendan6: has joined #RubyOnRails
[06:58:35] MasterAsia: Ann_, still need help?
[06:58:43] Anne: Would be nice :D
[06:58:48] MasterAsia: what is your question
[06:59:14] Anne: Well Doorkeeper uses a redirect_uri validation, https etc. I know this is a OAuth2 standard, but I don't want it.
[06:59:49] Anne: Now I found force_ssl_in_redirect_uri false in the docs, but that still requires http. I want to be able to fill in 'asdf' so to speak.
[07:06:59] arBmind: has joined #RubyOnRails
[07:09:53] Anne: @masterasia: got some advice?
[07:11:10] MasterAsia: sec looking into it
[07:12:06] MasterAsia: you're going to need to tell me more about doorkeeper
[07:12:14] MasterAsia: I'm not sure what you mean by redirect_uri
[07:13:46] drale2k: has joined #RubyOnRails
[07:16:57] Anne: https://github.com/doorkeeper-gem/doorkeeper/blob/master/app/validators/redirect_uri_validator.rb
[07:17:05] tofutoon: has left #RubyOnRails: ()
[07:17:06] drale2k: has joined #RubyOnRails
[07:17:33] Anne: The redirect_uri is basically the webpage where-to the user gets redirected after he logs in with his credentials.
[07:17:45] byteflam1: has joined #RubyOnRails
[07:18:52] Anne: and where you POST to persist the OAuth token
[07:19:42] marr: has joined #RubyOnRails
[07:22:12] tbuehlmann: has joined #RubyOnRails
[07:23:56] drale2k: has joined #RubyOnRails
[07:27:49] netzfisch: has joined #RubyOnRails
[07:28:02] jane_booty_doe: has joined #RubyOnRails
[07:30:08] mark_66: has joined #RubyOnRails
[07:32:22] doublemalt_: has joined #RubyOnRails
[07:35:59] snickers: has joined #RubyOnRails
[07:36:34] Andr3as: tbuehlmann: morning... i've thought a while about it and still dont quite get it really.. however, i just fiddled around with it, for a while and came up with this (sort of) approach https://gist.github.com/awunder/a4c55b661694a6ee2edff6d5ed23c72d
[07:36:44] Andr3as: which at least doesnt crash ;)
[07:37:25] Andr3as: however, it has a flaw which is, it multiplies the actionfield's achievements - proly through that block
[07:37:48] zpe: has joined #RubyOnRails
[07:38:29] Andr3as: i probably need to be able to call this once, for a particualr actionfield..
[07:38:37] sevenseacat: has joined #RubyOnRails
[07:38:49] Andr3as: you maybe have another hint?
[07:53:27] jsrn_: has joined #RubyOnRails
[07:54:37] shinnya: has joined #RubyOnRails
[07:56:11] mikecmpbll: has joined #RubyOnRails
[07:59:47] donnib: has joined #RubyOnRails
[08:00:18] donnib: i have this <%= link_to 'Destroy', survey, method: :delete, data: { confirm: 'Are you sure?' } %> how can i add an argument that i am passing to the delete ? i want to clear the data and not delete
[08:00:56] donnib: I mean i want to make <%= link_to 'Clear data', survey, method: :delete, data: { confirm: 'Are you sure?' } %> but somewhere i need to tell that this is a clear and not a destpry anymore
[08:02:19] Andr3as: you could remove that delete method and pass in a parameter with "params:{clear: true}" or so
[08:03:06] Pumukel: has joined #RubyOnRails
[08:03:55] donnib: Andr3as: i still need it but i can keep that method and add another one in this file ? https://bitbucket.org/nmuldoon/moodapp2/src/072da1ff37c2020f0f50dffd2e12dcfd1321fc8a/app/controllers/surveys_controller.rb?at=master&fileviewer=file-view-default#surveys_controller.rb-81
[08:04:30] donnib: I am pretty new to this so i am not exactly sure if it's ok to make a new method in the controller above and call that ?
[08:04:45] tvw: has joined #RubyOnRails
[08:04:50] Andr3as: i thought you dont wanna delete it, but only clear it?
[08:04:51] handicraftsman: has joined #RubyOnRails
[08:05:12] donnib: I still want the delete, i just want an additional method that can also clear data without delete
[08:05:34] Andr3as: as a side note, that votes.destroy thing is proly better a "dependent: :destroy" in your model at the "has_many :votes"
[08:05:41] tbuehlmann: Andr3as: have to fight my own war against nested attributes and fields_for right now, sorry :)
[08:06:06] Andr3as: like "has_many :votes, dependent: :destroy" - this will take care of deleting related votes if the survey was deleted
[08:06:45] donnib: Andr3as: now that you mention it, what i want to accomplish is to be able to reset the votes, the only way that can happen now is by deleting the survey
[08:07:26] Andr3as: ah, so a survey has many votes and what you wanna do is get rid of them al..?
[08:07:48] donnib: and what i am trying to do is clear the votes for the survey without removing the survey itself
[08:08:13] Andr3as: i'd create a new route and map it to a new action "clear_votes" or similar
[08:08:29] Andr3as: inside your surveys controller
[08:09:44] donnib: uhhh, sounds fancy, i have no idea what routes are and how they work, i'll have to read
[08:10:03] Andr3as: http://guides.rubyonrails.org/routing.html
[08:10:20] Andr3as: first example
[08:10:20] Andr3as: get '/patients/:id', to: 'patients#show'
[08:10:55] donnib: ok so where does the new action live in ? in the surveys controller ?
[08:11:14] Andr3as: if you'd make a rout like
[08:11:14] Andr3as: get '/surveys/:id/clear', to: 'surveys#clear_votes'
[08:11:18] blackmesa: has joined #RubyOnRails
[08:12:14] Andr3as: and create a clear_votes method inside the surveys controller, you have the surveys id as a param
[08:14:17] Andr3as: and its a bit of an unusual approach you're using for setting the @survey... why do you have that where clause? isnt the survey id unique?
[08:15:11] sevenseacat: Andr3as: so people can only show/edit their own surveys.
[08:15:40] Anne: @sevensecat: Can't you do something like current_user.surveys?
[08:15:51] Anne: instead of @survey = Survey.where(:user_id => @current_user).find(params[:id])
[08:15:56] sevenseacat: that would work also.
[08:16:09] Andr3as: sevenseacat: i see.. you might have a look at pundit
[08:16:20] Andr3as: if you need a little more authorization
[08:16:33] Andr3as: if this is all you'd need, i guess its fine as it is
[08:17:10] Andr3as: tbuehlmann: ok, no worries.. thank you for your help so far
[08:26:24] patarr: has joined #RubyOnRails
[08:28:26] donnib: Andr3as: i didn't write the initial code but it's correct that each user have surveys.
[08:28:29] arBmind: has joined #RubyOnRails
[08:28:53] Andr3as: sure, i didnt argue that ;)
[08:29:13] unmanbearpig: has joined #RubyOnRails
[08:29:13] phikes: has joined #RubyOnRails
[08:31:00] donnib: i'll try to see if i can add that route and the method, i am sure that it's going to give me some hard work ;)
[08:34:55] mikecmpbll: has joined #RubyOnRails
[08:37:08] antgel: has joined #RubyOnRails
[08:38:54] djbkd: has joined #RubyOnRails
[08:40:49] donnib: Andr3as: now if i want to call clear_votes how do i do that within this <%= link_to 'Clear votes', survey, method: :delete, data: { confirm: 'Are you sure?' } %> do i write : <%= link_to 'Destroy', survey, method: :clear_votes, data: { confirm: 'Are you sure?' } %> ?
[08:41:18] Andr3as: donnib: you have set the route?
[08:41:42] donnib: Andr3as: yes exactly as you specified it above
[08:42:04] Andr3as: so, look at http://127.0.0.1:3000/rails/info/routes for that route
[08:43:05] Andr3as: and link to it..
[08:43:21] Andr3as: its proly clear_vouts_path or so
[08:43:29] Andr3as: *clear_votes_path
[08:44:20] donnib: for some reason the link does not work for me, i did replace it with my ip
[08:44:44] donnib: No route matches [GET] "/rails/info/routes"
[08:45:21] Andr3as: what rails versions are you at?
[08:45:46] Andr3as: alternatively use "rake routes"
[08:47:07] ErhardtMundt: how do I access the body for a POST request with application/x-www-form-urlencoded content type?
[08:48:26] ReBa_: has joined #RubyOnRails
[08:49:33] donnib: Andr3as: so i get GET /surveys/:id/clear(.:format) surveys#clear_votes
[08:50:24] Andr3as: i see.. lets add a ", as: 'clear_votes'" at the end of that route to give it a proper name
[08:51:12] donnib: so i need to change the route ?
[08:52:35] donnib: clear_votes GET /surveys/:id/clear(.:format) surveys#clear_votes
[08:52:43] quazimodo: has joined #RubyOnRails
[08:53:25] Andr3as: aight, so your link would be "clear_votes_path(survey)"
[08:53:31] Andr3as: remove that method
[08:53:45] srinidhi: has joined #RubyOnRails
[08:54:03] Andr3as: more exactly ", method: :clear_votes"
[08:54:21] donnib: so now i am back to add something like this but point to clear_votes : <%= link_to 'Clear votes', survey, method: :clear_votes, data: { confirm: 'Are you sure?' } %>
[08:55:20] djbkd: has joined #RubyOnRails
[08:57:56] donnib: <%= link_to 'Clear votes', clear_votes_path(survey), data: { confirm: 'Are you sure?' } %> ?
[08:58:21] Andr3as: that looks good to me...
[08:58:41] wethu: has joined #RubyOnRails
[09:02:52] donnib: the method inside the controller clear_votes i guess i need to give it the argument like clear_votes(id) then use id to find the survey then i can do @survey.votes.destroy_all ?
[09:03:28] phikes: this is in the params, i.e. `params[:id]`
[09:03:42] Andr3as: no, you can set it with the help of params
[09:03:42] phikes: you don't specify parameters for the controller methods itself
[09:03:49] donnib: ah i see so nee
[09:03:56] donnib: ah i see so need for that
[09:04:12] dionysus69: has joined #RubyOnRails
[09:05:27] dminuoso: Mmm, is there a way to have AMS normalize the output?
[09:05:33] dminuoso: So that I dont have to do it client side with normalizr?
[09:06:40] _Sypheren: has joined #RubyOnRails
[09:07:19] _Sypheren_: has joined #RubyOnRails
[09:10:53] donnib: so i made the method def clear_votes and inside it i do @survey = Survey.where(:user_id => @current_user).find(params[:id]) and i can see that Clear votes link points to http://localhost:3000/surveys/4/clear but i get a crash Template is missing Missing template surveys/clear_votes, application/clear_votes
[09:11:51] djbkd: has joined #RubyOnRails
[09:12:23] Andr3as: yeah, from now on its liek everything else.. either render an html page or make that link a remote call
[09:13:02] Andr3as: or you redirect to where you came from
[09:13:12] lxsameer: has joined #RubyOnRails
[09:14:00] donnib: id should stay on the same page and refresh it
[09:17:10] dionysus70: has joined #RubyOnRails
[09:18:13] Andr3as: so you either redirect to that page again or do a "remote: true" on that link and manage the refresh with some js magic
[09:18:13] mazeinmaze_: has joined #RubyOnRails
[09:21:36] xpl0iter: has joined #RubyOnRails
[09:23:23] marr: has joined #RubyOnRails
[09:28:21] djbkd: has joined #RubyOnRails
[09:29:16] hexkey[m]: has joined #RubyOnRails
[09:30:02] workmad3: has joined #RubyOnRails
[09:38:11] drale2k: has joined #RubyOnRails
[09:44:56] igunublue[m]: has joined #RubyOnRails
[09:44:56] WinterFox[m]: has joined #RubyOnRails
[09:44:56] velu_aon[m]: has joined #RubyOnRails
[09:44:57] braidn[m]: has joined #RubyOnRails
[09:44:57] mirkobenedetti[m: has joined #RubyOnRails
[09:44:57] thulsa_legume[m]: has joined #RubyOnRails
[09:45:03] lukas_[m]: has joined #RubyOnRails
[09:45:03] vonagam[m]: has joined #RubyOnRails
[09:45:33] djbkd: has joined #RubyOnRails
[09:48:06] hipertracker: has joined #RubyOnRails
[09:50:05] wethu: has joined #RubyOnRails
[09:52:33] tedwing: has joined #RubyOnRails
[09:55:25] Terens: why running popen3('openssl aes-256-cbc -d -a') do
[09:55:39] Terens: enter aes-256-cbc decryption password: is not captured ?
[10:01:16] djbkd: has joined #RubyOnRails
[10:01:25] brent__: has joined #RubyOnRails
[10:11:44] Prira: has joined #RubyOnRails
[10:17:37] roshanavand: has joined #RubyOnRails
[10:18:11] djbkd: has joined #RubyOnRails
[10:18:21] ferr1: has joined #RubyOnRails
[10:18:55] doublemalt__: has joined #RubyOnRails
[10:21:45] jusa: has joined #RubyOnRails
[10:27:19] patarr: has joined #RubyOnRails
[10:29:42] unmanbearpig: has joined #RubyOnRails
[10:34:43] djbkd: has joined #RubyOnRails
[10:35:39] adlerdias__: has joined #RubyOnRails
[10:41:39] Olipro: has joined #RubyOnRails
[10:45:03] Guest94912: has joined #RubyOnRails
[10:45:40] drale2k: has joined #RubyOnRails
[10:46:17] Guest94912: I had create two method on my controller publish and unpublish. I add the methods on my route but I have a problem. Only one can work.
[10:46:28] Guest94912: post 'posts/:id', to: 'posts#unpublish', as: 'unpublish' post 'posts/:id',to: 'posts#publish', as: 'publish'
[10:46:44] patarr: has joined #RubyOnRails
[10:47:55] nyaa: has joined #RubyOnRails
[10:48:30] wethu: has joined #RubyOnRails
[10:49:12] workmad3: Guest94912: if you want to treat them as separate actions, they can't have the same url
[10:49:31] workmad3: (well, same url & method)
[10:49:54] Guest94912: What can i do ?
[10:51:33] djbkd: has joined #RubyOnRails
[10:51:46] itsgokul: has joined #RubyOnRails
[10:53:04] mrgreenfur: has joined #RubyOnRails
[10:54:00] mrgreenfur: Radar: In case you’re curious (for your book?), ‘ALLOWALL’ isn’t a valid x-frame-options value and chrome will still block the content. The header needs to be removed, which in rails is case sensitive, so you have to match how the defaults added it.
[10:56:17] xpl0iter: Hi I would like to know whether to use nginx with puma or just puma in my production server?
[10:57:45] workmad3: xpl0iter: I'd normally suggest using nginx, as it allows you to do things like serve assets from nginx rather than taking up ruby request processes, load balance between multiple app servers (potentially on different physical servers), etc.
[10:59:15] workmad3: xpl0iter: so even though puma is capable of doing the request buffering that nginx or similar is required for with other servers (like unicorn), it's still advantageous to have in place... it also gives you a barrier in the form of layered security, so someone would likely need to find a path through nginx in order to exploit your puma server if a security vulnerability was discovered that was
[10:59:21] workmad3: exploitable with a direct communication
[11:00:26] xpl0iter: workmad3: thats great to know. Do you have any place where I can read about this stuff?
[11:01:09] pLaTo0n: has joined #RubyOnRails
[11:01:24] workmad3: nothing in particular no... general internets :P
[11:01:33] xpl0iter: Also I read in digital ocean that puma is not designed to be accessed by users directly. https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-puma-and-nginx-on-ubuntu-14-04
[11:01:59] xpl0iter: workmad3: So are they wrong?
[11:03:52] workmad3: xpl0iter: well, heroku has a different view :) https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#slow-clients
[11:04:03] workmad3: but heroku sticks everything behind a router, so they're dealing with a different scenario...
[11:04:43] workmad3: but puma can handle request buffering in a better fashion than unicorn or similar, and can handle SSL connections, so it's more suitable for direct use than unicorn
[11:05:58] workmad3: but still... it's generally advised to put your app servers behind something like nginx, so you may as well follow that advice :)
[11:05:59] Ergo: has joined #RubyOnRails
[11:06:28] xpl0iter: workmad3: thanks a lot mate. Really appreciate it.
[11:07:41] djbkd: has joined #RubyOnRails
[11:19:15] brendan6: has joined #RubyOnRails
[11:20:20] Andr3as: can i somehow pass 2 parameters into dom_id?
[11:20:49] Andr3as: i have a matrix table and need an id that represents a column + row intersection
[11:24:24] handicraftsman: has joined #RubyOnRails
[11:24:28] djbkd: has joined #RubyOnRails
[11:24:48] gloscombe: has joined #RubyOnRails
[11:28:03] mbuf: has joined #RubyOnRails
[11:28:42] mbuf: Is it possible to byte-compile Ruby code in a Rails project before deployment? What options are available if we do not want to give the source to a customer?
[11:31:58] jane_booty_doe: has joined #RubyOnRails
[11:33:31] dionysus69: has joined #RubyOnRails
[11:39:29] pmunt: has joined #RubyOnRails
[11:40:01] ldnunes: has joined #RubyOnRails
[11:40:22] MADRUGA: has joined #RubyOnRails
[11:41:15] djbkd: has joined #RubyOnRails
[11:43:03] pmunt: hi everyone, im totally bored so if i can help anyone that would make my day
[11:43:47] pmunt: im in australia though so my day will end in about an hour.
[11:48:21] kristofferR: has joined #RubyOnRails
[11:50:07] HoierM: has joined #RubyOnRails
[11:51:05] defswork: has joined #RubyOnRails
[11:56:50] flopsec: has joined #RubyOnRails
[11:57:13] Sidoniuns: has joined #RubyOnRails
[11:57:19] djbkd: has joined #RubyOnRails
[11:58:51] DrYockel: has joined #RubyOnRails
[11:59:05] quazimodo: has joined #RubyOnRails
[11:59:43] hipertracker_: has joined #RubyOnRails
[12:00:08] unmanbearpig: has joined #RubyOnRails
[12:01:13] hipertracker_: has joined #RubyOnRails
[12:01:45] hndk: has joined #RubyOnRails
[12:06:38] mark_66: has joined #RubyOnRails
[12:08:48] qwker: has joined #RubyOnRails
[12:09:06] qwker: I'm trying to add a confirm popup on a link_to but it does not work. <%= link_to 'Request approval', send_approval_url, data: { confirm: "Request approval for #{@application.name}?" }, class: 'button small' %> Any tips?
[12:10:08] nyaa: has joined #RubyOnRails
[12:11:09] qwker: I basically want to show the confirm message before the it sends the user to `send_approval_url`
[12:12:33] unreal: has joined #RubyOnRails
[12:12:35] Sidoniuns: qwker, when you click to link, what's happen?
[12:12:54] Sidoniuns: show some error message in JS console?
[12:13:31] qwker: @sidoniuns it does it's thing, sends the user to the URL. But I want to ask the user if he's "sure to open this url" etc. Currently it does not open the confirm popup
[12:13:50] djbkd: has joined #RubyOnRails
[12:13:52] fernandomm: has joined #RubyOnRails
[12:14:08] qwker: No error in the JS console
[12:14:09] phikes: https://github.com/rails/jquery-ujs
[12:14:22] Pumukel: has joined #RubyOnRails
[12:14:31] phikes: do you have `//= require jquery-ujs` and the same for jquery in your application.js
[12:14:51] Sidoniuns: @qwker what's is the version of rails?
[12:15:20] Pumukel: has joined #RubyOnRails
[12:17:14] brent__: has joined #RubyOnRails
[12:17:26] Sidoniuns: @qwkr do you have jquery-rails gem in your Gemfile and put the required mentioned by @phikes in your application.js?
[12:18:00] chouhoulis: has joined #RubyOnRails
[12:18:59] qwker: Ah, no. But I get couldn't find file 'jquery-ujs' if I do
[12:19:06] qwker: I have it in my Gemfile
[12:19:09] loechel: has joined #RubyOnRails
[12:19:43] loechel: has joined #RubyOnRails
[12:20:22] buckrockwell: has joined #RubyOnRails
[12:20:51] pmunt: qwker, if your javascript is running properly then you require jquery_ujs
[12:21:00] pmunt: that was pasted from a rails 4.2 app
[12:21:13] pmunt: in application.js
[12:22:11] pmunt: basically if your not seeing a window to confirm, its the javascript pipeline
[12:27:11] zpe: has joined #RubyOnRails
[12:29:54] djbkd: has joined #RubyOnRails
[12:32:38] jusa: has joined #RubyOnRails
[12:34:33] hipertracker: has joined #RubyOnRails
[12:39:50] qwker: If I want to logout a user from it's session. Should it be delete '/logout', to: 'sessions#destroy', as: 'developer_logout' or destroy '/logout', to: 'sessions#destroy', as: 'developer_logout'?
[12:40:31] pmunt: qwker: your using devise?
[12:40:49] chouhoulis: has joined #RubyOnRails
[12:42:21] brendan6: has joined #RubyOnRails
[12:43:39] hipertracker: has joined #RubyOnRails
[12:44:03] pmunt: http://guides.rubyonrails.org/routing.html
[12:44:17] brent__: has joined #RubyOnRails
[12:44:31] pmunt: delete looks like the way to go
[12:45:18] qwker: On what section did you find that?
[12:46:20] djbkd: has joined #RubyOnRails
[12:46:37] Guest96: has joined #RubyOnRails
[12:46:41] tbuehlmann: Andr3as: no, that's not possible. you can however just write your own helper method
[12:48:49] pmunt: qwker: Within the block of member routes, each route name specifies the HTTP verb will be recognized. You can use get, patch, put, post, or delete here . If you don't have multiple member routes, you can also pass :on to a route, eliminating the block:
[12:49:47] ReBa_: I'm unable to render my xml in a model: https://gist.github.com/RemiBa/3577d1a8898bfa6bb647a6657228dc15 - How do I get the Builder to be required inside that model?
[12:51:03] ReBa_: nvm: http://stackoverflow.com/questions/7425457/nameerror-uninitialized-constant-activerecordassociationsbuilderxmlmarkup solved it...
[12:57:50] quazimodo: has joined #RubyOnRails
[12:59:21] Andr3as: tbuehlmann: yeah, just took a shower and came back with that thought in mind - thanks, thoug :)
[12:59:34] jose_leeto: has joined #RubyOnRails
[13:02:46] djbkd: has joined #RubyOnRails
[13:04:44] Or1on: has joined #RubyOnRails
[13:04:57] xhoy: if i have h1 = {a: nil} ; h2 = {a: {a: 1, b:2}} it doesn't merge a: since its nil? i guesse?
[13:05:40] xhoy: any think i can do to prevent that?
[13:07:58] dminuoso: I was just writing a haml template, and I realized repitition. So I intuitively started a new line at the top: - renderTable = (data) -> { return...
[13:08:10] dminuoso: tbuehlmann: Help me!
[13:08:23] dminuoso: I cant even write proper Ruby syntax anymore.
[13:09:40] dminuoso: Though honestly, is this possible?
[13:10:09] xhoy: hahahah :)
[13:10:24] pmunt: dminusos: i wanna give you a high five, i get on here once every couple of months and see your still here, helping people. its inspiring
[13:10:42] xhoy: pmunt: no highfive for tbuehlmann :)
[13:11:05] nyaa: has joined #RubyOnRails
[13:13:56] pmunt: high five for you tbuehlmann too, i reallly am curious though
[13:14:33] pmunt: i love helping people and have a day job, what are yours?
[13:14:44] dminuoso: Heck yeah it works!
[13:14:45] tbuehlmann: I like those two things as well
[13:15:33] tedwing: has joined #RubyOnRails
[13:17:52] dminuoso: tbuehlmann: https://gist.github.com/dminuoso/fa670dde58d6fa1e4d538dc670260870
[13:17:55] dminuoso: Look at this amazing!
[13:18:42] dminuoso: Kind of.. It almost kind of works.
[13:18:47] dminuoso: It does really weird things.
[13:18:56] dminuoso: Like what the heck :|
[13:19:14] dminuoso: This is so strange
[13:19:39] djbkd: has joined #RubyOnRails
[13:19:48] tbuehlmann: so we don't use partials anymore?
[13:20:12] dminuoso: tbuehlmann: Im dead sick of creating separate files when its not a separation of concerns or for reusability.
[13:20:25] dminuoso: Though I have found a way to capture the proc using a helper method
[13:20:56] dminuoso: Adding my very first helper file ever.
[13:21:23] pmunt: its a fair point but implications are deep
[13:22:48] dminuoso: https://gist.github.com/dminuoso/fa670dde58d6fa1e4d538dc670260870
[13:22:51] dminuoso: Works! Hooray.
[13:22:54] dminuoso: pmunt: Such as?
[13:25:42] pmunt: oh shit, im being put on the spot by someone i actually respect. i guess im just thinking of things in a 'temporal' coupling
[13:26:50] sagax: has joined #RubyOnRails
[13:27:20] GodFather: has joined #RubyOnRails
[13:27:25] ramortegui: has joined #RubyOnRails
[13:28:48] unmanbearpig: has joined #RubyOnRails
[13:30:22] pupsicle: has joined #RubyOnRails
[13:31:33] maesitos: has joined #RubyOnRails
[13:31:51] dminuoso: pmunt: Where is the temporal coupling?
[13:32:43] dminuoso: pmunt: This is just called decomposition.
[13:32:52] maesitos: Hello Can anybody help me with a rails Monkey Patch? I'm not able to get it to work https://pastebin.com/raw/b2dkGze0
[13:33:25] maesitos: that file is being required in "initializers/corextension.rb"
[13:33:38] dminuoso: maesitos: You dont need to .send :prepend
[13:33:42] fryguy: maesitos: prepend probably isn't what you want
[13:33:45] dminuoso: maesitos: you can just call it
[13:33:53] dminuoso: fryguy: Why not?
[13:33:58] dminuoso: fryguy: It's the go-to solution for monkey patches.
[13:34:18] dminuoso: maesitos: Please define "not being able to get it to work"
[13:34:19] fryguy: well, maesitos what's the problem
[13:34:26] helpa: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[13:34:31] maesitos: dminuoso: if I just call it it's says I'm calling a private method, I'm using an old ruby
[13:34:50] maesitos: fryguy: what would I need then instead of prepend
[13:34:55] dminuoso: maesitos: Mmm, weird. Well okay.
[13:35:00] dminuoso: maesitos: No prepend is perfectly fine.
[13:35:16] djbkd: has joined #RubyOnRails
[13:35:21] dminuoso: maesitos: So please read helpa's factoid and do as I asked.
[13:35:37] matthewd: prepending into a module after it's been included elsewhere isn't going to work so well
[13:35:59] maesitos: dminuoso: then why ruby isn't using my monkepathed method
[13:36:01] maloik: has joined #RubyOnRails
[13:36:04] dminuoso: maesitos: Why not? It invalidates method caches
[13:36:18] dminuoso: matthewd I mean
[13:37:03] maloik: What do people generally do to prevent being spammed with error notifications for "string contains null byte"? It seems we get a lot of "hack attempts" and what not, and simply silencing these errors doesn't seem like the smart thing to do. Is there another way to deal with them?
[13:37:32] dminuoso: maloik: You start by identifying the cause for this.
[13:37:38] dminuoso: maloik: Are you receiging UTF-16 input?
[13:37:48] matthewd: dminuoso: Because it doesn't work. A module's hierarchy is only copied at the time it's included.
[13:37:53] romeoh: has joined #RubyOnRails
[13:38:48] brendan6: has joined #RubyOnRails
[13:39:03] dminuoso: matthewd: Interesting, I did not know this.
[13:39:12] maesitos: dminuoso: how can I make that to work, I'm a but puzzled
[13:40:21] maloik: dminuoso doesn't look like it. You can probably reproduce using this: `curl http://localhost:5000/%5Cetc%5Chosts%00`
[13:40:33] maloik: that is almost a literal request we received
[13:40:50] maloik: the %00 at the end is the (in this case very obvious) null byte
[13:41:10] maloik: I bet if you have a rails app running 4.2 it'll break as well
[13:42:54] brendan6: has joined #RubyOnRails
[13:43:44] brendan6: has joined #RubyOnRails
[13:47:10] maesitos: fryguy: I want the monkey patched method to take action but Rails doesn't use it
[13:49:05] jdm: has joined #RubyOnRails
[13:51:44] djbkd: has joined #RubyOnRails
[13:51:53] maesitos: dminuoso: what I meant with get it to work is that if I call the monkey-patched method, rails doesn't use the new method
[13:52:20] xall: has joined #RubyOnRails
[13:53:55] dminuoso: maesitos: Yeah the reason is because of matthewd pointed out.
[13:54:25] quazimodo: has joined #RubyOnRails
[13:54:26] dminuoso: maesitos: Prepend it into the class that uses it, rather than where its defined on.
[13:54:28] maesitos: dminuoso: it's the same if I use include... it doesn't work either
[13:56:13] drale2k: has joined #RubyOnRails
[13:56:16] maesitos: dminuoso: but I'd like the monkey patch to take effect globally
[13:57:48] drale2k: has joined #RubyOnRails
[14:00:18] maesitos: ok I think I understood what you mean
[14:00:45] maesitos: not really ahah
[14:02:06] quazimodo: has joined #RubyOnRails
[14:03:22] bawsky: has joined #RubyOnRails
[14:04:04] benlieb: has joined #RubyOnRails
[14:04:26] maesitos: dminuoso: Ok I see, so I used prepend in "initializers/corextension.rb" right after requiring the module file
[14:07:00] maesitos: dminuoso: but still, Rails is not using the new ActionController method
[14:08:11] djbkd: has joined #RubyOnRails
[14:10:56] snickers: has joined #RubyOnRails
[14:11:34] harfangk: has joined #RubyOnRails
[14:21:44] nOwz: has joined #RubyOnRails
[14:23:04] nOwz: i've got something like that in my model:
[14:23:06] nOwz: https://www.pastiebin.com/58dd14b8ac8b8
[14:23:18] nOwz: I would like to make it works for end_at and start_at
[14:23:30] nOwz: i tried [:end_at, :start_at] but did not works
[14:23:34] nOwz: someone have an idea ?
[14:25:04] djbkd: has joined #RubyOnRails
[14:26:39] agent_white: has joined #RubyOnRails
[14:27:14] pLaTo0n: has joined #RubyOnRails
[14:28:01] tenderlove: has joined #RubyOnRails
[14:28:45] tenderlo_: has joined #RubyOnRails
[14:31:59] agent_white: Mornin' folks
[14:38:12] maesitos: matthewd: I now understand you when you mean 'prepending into a module after it's been included elsewhere isn't going to work so well', how can I then make sure I prepend into the module before it's included
[14:38:57] Technodrome: has joined #RubyOnRails
[14:40:41] djbkd: has joined #RubyOnRails
[14:41:01] Didac: has joined #RubyOnRails
[14:42:11] ferr1: has joined #RubyOnRails
[14:48:16] rogue_koder: has joined #RubyOnRails
[14:50:10] dminuoso: maesitos: You cant.
[14:50:17] dminuoso: maesitos: But you can prepend into the module/class itself.
[14:51:00] maesitos: dminuoso: mmmm but I need to include into the module before it's included elsewhere
[14:51:29] dminuoso: maesitos: !xy
[14:51:29] helpa: maesitos: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[14:54:13] maesitos: dminuoso: I don't think I'm trying to find an specific solution, in fact I just answered to a guy that had the exact same problem but I answered with a very basic response http://stackoverflow.com/questions/40356669/how-to-monkey-patch-an-actionview-module-via-prepend/43121344#43121344
[14:55:03] maesitos: dminuoso: the thing is I don't know how to solve that in Rails!
[14:55:34] dminuoso: maesitos: If you want to patch deep core rails modules, it smells like xy a lot.
[14:55:45] dminuoso: Monkey patching is bad and you should feel bad for doing it.
[14:56:04] dminuoso: maesitos: The real solution is to fork the given library, make your modifications and use that fork.
[14:56:10] dminuoso: Or to tell us what you are trying to accomplish.
[14:56:13] maesitos: dminuoso: ActionSupport disagrees
[14:56:34] dminuoso: maesitos: Active(!)Support is (mostly) non-intrusive though.
[14:56:53] dminuoso: It does not alter the behavior but rather just give fancy extensions.
[14:57:10] maesitos: I'm just trying to monkey patch ActionController::Redirecting.force_sll with no luck
[14:57:12] djbkd: has joined #RubyOnRails
[14:57:53] dminuoso: maesitos: What behavior are you trying to enforce?
[14:58:40] mrgreenfur: has joined #RubyOnRails
[14:59:19] maesitos: if I force SSL without specifying the domain it uses APP::Application.config.action_controller.default_url_options[:host]
[14:59:48] maesitos: but my app is being served in two different domains
[15:00:18] maesitos: so if I force_ssl in domain2.com it goes to https//domain1.com
[15:00:59] dminuoso: maesitos: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/ssl.rb
[15:01:03] dminuoso: maesitos: Copy this and write your own middleware.
[15:01:06] dminuoso: Based on this code.
[15:01:12] dminuoso: And alter it to have the behavior you want it to have.
[15:01:25] dminuoso: And use that middleware.
[15:01:36] dminuoso: (Instead of ActionDispatch::SSL)
[15:01:58] dminuoso: Suddenly you can implement your custom behavior without monkey patching core rails classes/modules. ;-)
[15:02:53] dminuoso: maesitos: Though that middleware looks like it actually uses request.host. What Rails version are you using?
[15:03:45] maesitos: I need to think
[15:03:51] maesitos: the domain of the middle ware
[15:03:58] maesitos: dones't seem like a good place for me
[15:04:04] dminuoso: maesitos: I have no idea whether rails 3.2 even does this with middleware.
[15:04:12] maesitos: as the middleware should know about the logic if my bussines
[15:04:17] dminuoso: Besides, 3.2 is end-of-life.
[15:04:23] maesitos: *shouldn't know
[15:04:54] maesitos: dminuoso: yeah I'd need to rewrite te app but that's going to take time
[15:06:09] dminuoso: maesitos: 3.2 has been end of life for about a year now. You will not get any security fixes or updates. Even this channel will be reluctant to help you with issues.
[15:06:36] maesitos: dminuoso: don't be that closed minded
[15:06:49] maesitos: dminuoso: it takes time to redo an app and that's money in my bussines
[15:07:26] maesitos: dminuoso: we'll keep that version for a while till it makes sense to stop and re-do the app
[15:08:47] nyaa: has joined #RubyOnRails
[15:08:56] dminuoso: maesitos: Good luck then.
[15:09:18] maesitos: dminuoso: yeah but the monkey patching is probably the same for ruby 4
[15:10:27] s2013: has joined #RubyOnRails
[15:10:32] dminuoso: maesitos: The idea of the fix is still the same.
[15:10:58] maesitos: http://stackoverflow.com/questions/40356669/how-to-monkey-patch-an-actionview-module-via-prepend/43121344#43121344
[15:11:47] DLSteve: has joined #RubyOnRails
[15:13:42] djbkd: has joined #RubyOnRails
[15:14:11] maesitos: dminuoso: read the last question, I think mine is a ruby question more than a rails one so It's not a question for an specific problem I have
[15:14:14] mustmodify: has joined #RubyOnRails
[15:14:29] mustmodify: I'm setting up a server for a hackathon. Sorry for the laziness but trying to get stuff done quickly.
[15:14:49] mustmodify: gem 'pg' won't bundle, and seems to suggest I need to install it with sudo.
[15:14:53] mustmodify: Is that really necessary?
[15:15:07] mustmodify: Seems like a good way to get into a weird unknown state.
[15:15:12] mustmodify: I'm using chruby
[15:15:53] mustmodify: Ohhh... wow, compound issues.
[15:16:03] mustmodify: Seems like I don't have the dev package installed.
[15:16:48] sunya7a: What method to update params on my model do I use if i need things such as dependent destroy to trigger?
[15:19:22] patarr: has joined #RubyOnRails
[15:19:24] slash_nick: has joined #RubyOnRails
[15:20:36] slash_nick: ACTION waves
[15:20:47] mustmodify: sunya7a: what?
[15:21:02] mustmodify: @sunya7a_: what?
[15:23:51] LateralOctober: has joined #RubyOnRails
[15:29:40] djbkd: has joined #RubyOnRails
[15:30:22] akshat: has joined #RubyOnRails
[15:32:02] sunya7a: mustmodify: sry if i wasn't clear. I should have started with this: does model.update trigger all callbacks that are associated with my model. I read that update_all will update the fields (columns in table) without instantiating the model so callbacks aren't triggered...does #update behave the same?
[15:32:30] ResidentBiscuit: has joined #RubyOnRails
[15:33:29] choke: has joined #RubyOnRails
[15:33:33] brent__: has joined #RubyOnRails
[15:34:51] tofutoon: has joined #RubyOnRails
[15:35:02] tofutoon: has left #RubyOnRails: ()
[15:38:49] xall: has joined #RubyOnRails
[15:38:58] lxsameer: has joined #RubyOnRails
[15:48:11] hipertracker: has joined #RubyOnRails
[15:49:51] pupsicle: sunya7a: update will run the callbacks
[15:50:12] djbkd: has joined #RubyOnRails
[15:51:05] stripedbananas: has joined #RubyOnRails
[15:51:15] dminuoso: That moment when you start implementing the flux pattern with ActiveRecord...
[15:51:22] dminuoso: Its hilariously amazing!
[15:51:43] dminuoso: Things like "issue tracking" like a regular bug tracker is so simple to implement.
[15:51:55] dminuoso: In particular because you can even undo events!
[15:53:34] djbkd: has joined #RubyOnRails
[15:55:57] stripedbananas: "For major security issues, the current release series, the next most recent one, and the last additional major series will receive patches and new versions. This is currently 5.0.x and 4.2.x." http://rubyonrails.org/security/ Does that mean that when 5.1 is released that 4.2 will still receive major security updates? That seems like the most likel
[15:55:57] stripedbananas: y reading but the page does not define what a "series" is.
[15:56:03] rakm: has joined #RubyOnRails
[15:57:26] brent__: has joined #RubyOnRails
[15:57:46] mustmodify: Anyone have experience emitting geojson from a postgres geometry?
[15:59:20] [Butch]: has joined #RubyOnRails
[16:00:08] LateralOctober: has joined #RubyOnRails
[16:04:55] doublemalt__: has joined #RubyOnRails
[16:06:16] chouhoul_: has joined #RubyOnRails
[16:06:21] GodFather: has joined #RubyOnRails
[16:07:44] dminuoso: stripedbananas: A series is just that, something with a wildcard in the version number.
[16:10:38] FCser: has joined #RubyOnRails
[16:12:49] fcser_: has joined #RubyOnRails
[16:14:49] xall: has joined #RubyOnRails
[16:17:17] MittelDank: has joined #RubyOnRails
[16:18:32] dminuoso: stripedbananas: Though matthewd might know more.
[16:19:25] nyaa: has joined #RubyOnRails
[16:19:30] NoGodDamnIdea: has joined #RubyOnRails
[16:19:30] NoGodDamnIdea: has joined #RubyOnRails
[16:22:14] gusrub: has joined #RubyOnRails
[16:23:58] King_Rex: has joined #RubyOnRails
[16:24:24] tenderlove: has joined #RubyOnRails
[16:24:51] slash_nick: stripedbananas: kind of reads like when 5.1 is released, it'll be 5.1, 5.0, and 4.2... and when/if 5.2 comes out, it'd be 5.2, 5.1, and 4.2. no idea if i'm interpreting it right, but i think i'm reading it like you are
[16:25:39] Pumukel: has joined #RubyOnRails
[16:26:29] Pumukel: has joined #RubyOnRails
[16:26:35] polishdub: has joined #RubyOnRails
[16:27:14] Pumukel: has joined #RubyOnRails
[16:27:45] Pumukel: has joined #RubyOnRails
[16:31:01] adavia: has joined #RubyOnRails
[16:34:23] bawsky: has joined #RubyOnRails
[16:36:00] Spami: has joined #RubyOnRails
[16:36:27] nap: has joined #RubyOnRails
[16:41:03] drale2k: has joined #RubyOnRails
[16:42:13] Spami: has joined #RubyOnRails
[16:44:43] handicraftsman: has joined #RubyOnRails
[16:44:43] handicraftsman: has joined #RubyOnRails
[16:44:50] tenderlove: has joined #RubyOnRails
[16:46:53] bga57: has joined #RubyOnRails
[16:47:54] stripedbananas: slash_nick: yeah I think you're right. This page goes into more detail. http://guides.rubyonrails.org/maintenance_policy.html
[16:48:12] stripedbananas: I wish there were more examples so there was no room for confusion. For obvious reasons I don't want to be blindsided by a misreading of the policy.
[16:48:27] jsrn_: has joined #RubyOnRails
[16:58:03] AndrewIsHere: has joined #RubyOnRails
[16:59:30] Or1on: has joined #RubyOnRails
[17:03:15] pankaj: has joined #RubyOnRails
[17:03:41] _djbkd: has joined #RubyOnRails
[17:05:14] tenderlove: has joined #RubyOnRails
[17:10:36] phikes: has joined #RubyOnRails
[17:11:50] xall: has joined #RubyOnRails
[17:11:50] cagomez: has joined #RubyOnRails
[17:12:42] hndk: has joined #RubyOnRails
[17:13:44] cd-rum: has joined #RubyOnRails
[17:14:27] ger0: has joined #RubyOnRails
[17:15:56] AndroUser: has joined #RubyOnRails
[17:18:35] willardg: has joined #RubyOnRails
[17:23:30] prestorium: has joined #RubyOnRails
[17:25:36] tenderlove: has joined #RubyOnRails
[17:27:13] romeoh: has joined #RubyOnRails
[17:28:40] buckrockwell: has joined #RubyOnRails
[17:31:57] Duckily: has joined #RubyOnRails
[17:33:12] gusrub: has joined #RubyOnRails
[17:33:35] jusa: has joined #RubyOnRails
[17:33:50] maesitos: has left #RubyOnRails: ()
[17:37:23] jlebrech: has joined #RubyOnRails
[17:38:59] tenderlove: has joined #RubyOnRails
[17:41:03] doublemalt__: has joined #RubyOnRails
[17:43:29] pankaj: has joined #RubyOnRails
[17:47:45] pankaj: has left #RubyOnRails: ()
[17:47:57] pankaj: has joined #RubyOnRails
[17:54:11] sc0ty_: has joined #RubyOnRails
[17:54:12] joaomdmoura___: has joined #RubyOnRails
[17:54:25] RubyNewbey______: has joined #RubyOnRails
[17:54:37] dnyy_: has joined #RubyOnRails
[17:54:42] patarr: In the case I have a "validates ..." in my ActiveRecord model, can I call this manually from elsewhere? Not just at object creation/persistence time?
[17:54:55] jxf_: has joined #RubyOnRails
[17:55:27] mustmodify: I swear I'm better than this but I'm doing something stupid.
[17:55:27] mustmodify: assesor_parcel_path(@assesor_parcel, format: :json)
[17:55:40] mustmodify: ends in ,json instead of .json.
[17:55:55] mustmodify: What stupid thing am I doing? I'm at a hackathon. The clock must be messing with my head.
[17:56:06] Travis-42_: has joined #RubyOnRails
[17:56:24] srinidhi: has joined #RubyOnRails
[17:57:04] bios__: has joined #RubyOnRails
[17:57:05] hndk: has joined #RubyOnRails
[17:57:53] dminuoso: patarr: just interrogate the object with .valid? to run its validations.
[17:58:09] dminuoso: patarr: After doing so you can check for object.errors to obtain the error messages.
[17:58:27] Ratler_: has joined #RubyOnRails
[17:59:36] gusrub: has joined #RubyOnRails
[17:59:58] jhass: has joined #RubyOnRails
[18:00:08] ghormoon: has joined #RubyOnRails
[18:00:12] hexkey[m]: has joined #RubyOnRails
[18:02:07] nOwz: has joined #RubyOnRails
[18:02:09] hipertracker: has joined #RubyOnRails
[18:02:28] Paradox: has joined #RubyOnRails
[18:08:45] DoctorMonocular: has joined #RubyOnRails
[18:15:46] tomasm-: has joined #RubyOnRails
[18:20:21] Rodya_: has joined #RubyOnRails
[18:21:20] buckrockwell: has joined #RubyOnRails
[18:24:23] buckrockwell: has joined #RubyOnRails
[18:31:46] pankaj: has joined #RubyOnRails
[18:33:37] DoctorMonocular: has joined #RubyOnRails
[18:40:09] tenderlove: has joined #RubyOnRails
[18:40:37] tenderlo_: has joined #RubyOnRails
[18:41:50] defsdoor: has joined #RubyOnRails
[18:44:44] hahuang65: has joined #RubyOnRails
[18:47:41] patarr: Honestly some of the most confusing docs ive ever read: https://www.relishapp.com/rspec/rspec-core/v/2-5/docs/helper-methods/let-and-let
[18:47:53] patarr: So does let reset its value every test or not?
[18:48:09] patarr: dminuoso: awesome. .valid is what i was looking for!
[18:48:20] dminuoso: patarr: Which part if confusing about it?
[18:48:44] dminuoso: patarr: An example is an it {} block. So inside the it block the value stays memoized.
[18:48:48] patarr: "The value will be cached across multiple calls in the same example but not across examples" wat?!
[18:49:19] dminuoso: patarr: use "example" synonymously with "it {}"
[18:49:26] patarr: Meaning that I can always expect a fresh copy of what was generated in the lambda in a different/new "it"?
[18:49:38] patarr: Ah okay. It's starting to make sense to me.
[18:49:45] dminuoso: patarr: let is just memoization.
[18:49:53] dminuoso: But only inside an example
[18:50:32] meoblast001: has joined #RubyOnRails
[19:00:32] mikecmpbll: has joined #RubyOnRails
[19:01:33] patarr1: has joined #RubyOnRails
[19:02:50] naprimer: has joined #RubyOnRails
[19:04:53] hipertracker: has joined #RubyOnRails
[19:05:35] DoctorMonocular: has joined #RubyOnRails
[19:06:12] hahuang61: has joined #RubyOnRails
[19:09:14] hahuang65: has joined #RubyOnRails
[19:10:19] phikes: has joined #RubyOnRails
[19:14:14] hahuang61: has joined #RubyOnRails
[19:14:19] jdm: has joined #RubyOnRails
[19:19:47] patarr: has joined #RubyOnRails
[19:22:08] codezomb: has joined #RubyOnRails
[19:23:24] Duckily: has joined #RubyOnRails
[19:24:35] tvw: has joined #RubyOnRails
[19:28:11] cagomez: has joined #RubyOnRails
[19:28:40] pLaTo0n: has joined #RubyOnRails
[19:35:44] cagomez: has joined #RubyOnRails
[19:35:52] jlebrech: has joined #RubyOnRails
[19:39:32] DarkBushido: has joined #RubyOnRails
[19:39:33] DarkBushido: has joined #RubyOnRails
[19:42:52] drale2k: has joined #RubyOnRails
[19:43:29] patarr: has joined #RubyOnRails
[19:43:52] FCser: Hmm trying to add seed / test data to my db but keep getting undefined method delete_all for 100:Fixnum... I don't want to delete any data though I just want to add some customer records using Populate / Faker ( example seeds.rb file: https://gist.github.com/anonymous/06df9b84f42554248f8b939cf3ceeba5 ) I must be misunderstanding something...?
[19:47:41] buckrockwell: has joined #RubyOnRails
[19:48:58] cagomez: has joined #RubyOnRails
[19:49:20] lessless: has joined #RubyOnRails
[19:49:29] lessless: has left #RubyOnRails: ()
[19:53:41] knight33: has joined #RubyOnRails
[19:55:22] jlpeters: has joined #RubyOnRails
[19:55:27] vayan: has joined #RubyOnRails
[19:55:31] mattwc: has joined #RubyOnRails
[19:56:00] shwoodard_: has joined #RubyOnRails
[19:58:09] Rodya_: has joined #RubyOnRails
[20:02:59] nOwz: has joined #RubyOnRails
[20:05:24] Destru: has joined #RubyOnRails
[20:12:09] dionysus69: has joined #RubyOnRails
[20:12:19] hipertracker: has joined #RubyOnRails
[20:13:42] cydrobolt: has joined #RubyOnRails
[20:13:43] cydrobolt: has joined #RubyOnRails
[20:14:19] drale2k_: has joined #RubyOnRails
[20:20:04] FCser: Ok think I figured it out - just don't use Populator and do 100.times do etc.
[20:22:34] chouhoulis: has joined #RubyOnRails
[20:24:59] cd-rum: has joined #RubyOnRails
[20:25:07] benlieb: has joined #RubyOnRails
[20:28:53] CGibsonmm: has joined #RubyOnRails
[20:29:14] Nicmavr: has joined #RubyOnRails
[20:29:15] gremax: has joined #RubyOnRails
[20:33:33] CGibsonmm: Having an issue with returning events to a calendar style view
[20:33:41] CGibsonmm: https://gist.github.com/cgibsonmm/0473c2372002756473528840c92228df
[20:36:32] CGibsonmm: i am taking my code from the railscast #213.
[20:41:26] svkurowski: has joined #RubyOnRails
[20:41:30] arBmind: has joined #RubyOnRails
[20:43:43] pankaj: has joined #RubyOnRails
[20:45:13] pankaj: Hello Guys. Is anybody there>
[20:46:59] pankaj: Hello Guys. Is anybody there?
[20:47:33] hoodow: has joined #RubyOnRails
[20:47:33] hoodow: has joined #RubyOnRails
[20:48:09] Lyubo1: has joined #RubyOnRails
[20:48:17] et09: has joined #RubyOnRails
[20:48:31] et09: i have two joins, @bookstore.books and @customer.books. how do i find the intersection?
[20:49:39] pankaj: Hello. Can I get some help from geeks out there?
[20:49:44] jusa: has joined #RubyOnRails
[20:49:59] FCser: cgibsonmm: Just guessing... Maye something with date formatting? No errors in logs? Maybe this is relevant http://stackoverflow.com/questions/13231629/working-with-group-by-on-a-created-at-field-in-ruby-on-rails
[20:50:08] ResidentBiscuit: Don't ask to ask
[20:50:46] CGibsonmm: Thanks i will take a look
[20:51:43] pankaj: I created a model with its table having a column name 'last-name'. Later I wanted to rename it to 'last_name'. I choosed the hard way i.e. created migration for it; but I got error.
[20:51:57] FCser: et09: has_many through ?
[20:52:21] et09: n/m, thanks
[20:52:40] pankaj: All my syntax was correct. I think that rails has problem with '-' type of characters in models.
[20:52:44] Spami: has joined #RubyOnRails
[20:52:44] Spami: has joined #RubyOnRails
[20:52:52] bennyzr: has joined #RubyOnRails
[20:54:45] bennyzr: Hi, How would I combine existing has_many records with built records in the cotroller. When calling the has_many relation in a nested form the built records get wiped out.
[20:55:46] FCser: pankaj: - look at the error log? This migration has worked for me to fix a column name https://gist.github.com/anonymous/e776cdb69690b9383f4af4712f21e4de
[20:56:13] FCser: well in my case it was last_same to last_name
[20:56:33] FCser: so maybe the '-' is causing a problem somehow
[20:57:38] pankaj: fcser: I tried a lot struggling with it.
[20:58:11] pankaj: fcser: I also did the same thing but it always reported an error.
[20:58:28] FCser: pankaj what is the error?
[20:59:09] pankaj: fcser: Please wait
[21:00:53] FCser: pankaj: It may be that you need to do :'last-name'
[21:00:59] FCser: http://stackoverflow.com/questions/8482024/how-to-escape-a-dash-in-a-ruby-symbol
[21:01:03] FCser: escape the hyphen
[21:01:18] FCser: my example should have had that
[21:01:33] NoGodDamnIdea: has joined #RubyOnRails
[21:01:34] NoGodDamnIdea: has joined #RubyOnRails
[21:03:36] pankaj: fcser: I came to know something special. It was not an error in rails. I tried the same in mysql. It gave error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-password to hashed_password varchar(30)' at line 1
[21:04:21] Jayson_Virissimo: has joined #RubyOnRails
[21:04:53] pankaj: fcser: I also escaped the '-'. But same errror again.
[21:05:31] FCser: pankaj: hmm maybe try posting a gist of your migration code. I'm not sure at the moment then.
[21:05:54] pankaj: fcser: OK
[21:09:04] pankaj: http://dpaste.com/07GFXA3
[21:09:17] fernandomm: has joined #RubyOnRails
[21:12:05] amperry: has joined #RubyOnRails
[21:12:12] jenrzzz: has joined #RubyOnRails
[21:12:12] jenrzzz: has joined #RubyOnRails
[21:13:06] hahuang61: has joined #RubyOnRails
[21:14:10] knight33: has joined #RubyOnRails
[21:15:10] amperry: hi folks, I've got a problem using the zeus gem, psql, and 'zeus dbconsole'. Some results, when paged, seem to lock up, but if I go into the psql terminal client directly and issue the same query, it doesn't. Has anyone encountered this?
[21:15:23] amperry: I'm not sure if my problem is related to this or not: https://github.com/burke/zeus/issues/177
[21:15:45] tfitts: has joined #RubyOnRails
[21:16:31] jdm: has joined #RubyOnRails
[21:16:52] Jayson_Virissimo: has joined #RubyOnRails
[21:16:58] FCser: pankaj: did you generate a migration to rename the User table hashed-password to hashed_password?
[21:17:14] pankaj: fcser: Yes
[21:17:21] FCser: rename_column :users, :'hashed-password', :hashed_password
[21:17:24] FCser: and run the migration
[21:17:43] FCser: and update any references to 'hashed-password'
[21:17:50] Jayson_V_: has joined #RubyOnRails
[21:17:54] cd-rum: has joined #RubyOnRails
[21:18:18] pankaj: fcser: OK
[21:18:31] FCser: otherwise maybe retrace your steps and check out the docs a bit more http://guides.rubyonrails.org/active_record_migrations.html#changing-columns
[21:21:43] pankaj: fcser: The problem is not with 'rename_to'. It is with '-' in it
[21:22:08] workmad3: has joined #RubyOnRails
[21:28:18] drale2k: has joined #RubyOnRails
[21:29:12] davedo321: has joined #RubyOnRails
[21:29:21] ecnalyr: has joined #RubyOnRails
[21:31:39] FCser: pankaj: did you see this link ? http://stackoverflow.com/questions/8482024/how-to-escape-a-dash-in-a-ruby-symbol
[21:32:16] drale2k: has joined #RubyOnRails
[21:32:55] pankaj: Yes, it worked out. Thanks very much
[21:33:00] Radar: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/railtie.rb#L19-L24
[21:33:14] FCser: great pankaj good to hear
[21:33:20] Radar: Why does Active Record contain configuration for Action Dispatch?
[21:33:27] Radar: imo this is a huge over-reach
[21:34:12] pankaj: Thanks very much. I learned something new this day
[21:34:22] FCser: pankaj: me too :)
[21:34:33] Radar: although playing devil's advocate: I can see why it is done. It'll return decent responses for exceptions that are raised in controllers.
[21:34:41] Radar: But then you're kinda using exceptions as flow control :\
[21:36:47] chouhoulis: has joined #RubyOnRails
[21:43:49] jdm: has joined #RubyOnRails
[21:44:17] bastilian: has left #RubyOnRails: ()
[21:47:51] Vircung: has joined #RubyOnRails
[21:47:52] mlitwiniuk: has joined #RubyOnRails
[21:49:58] mjuhl: has joined #RubyOnRails
[21:49:58] cagomez: has joined #RubyOnRails
[21:50:31] tanuki: has joined #RubyOnRails
[21:53:21] drale2k: has joined #RubyOnRails
[22:00:35] adavia: This might sound odd but can i overwrite an activerecord association param?
[22:03:27] Radar: adavia: why?
[22:06:07] adavia: Radar: lets say i want to filter question.answers by a question_id param im sending via GET
[22:06:30] Radar: adavia: uh
[22:06:34] Radar: question = Question.find(params[:id])
[22:06:36] Radar: question.answers?
[22:07:30] adavia: Radar: ok that makes sense haha
[22:07:48] Radar: adavia: This is talked about in Rails 4 in Action, Chapter 5.
[22:08:15] Radar: And in the Rails getting started guide. R4IA uses projects + tickets, getting started guide uses posts + comments. Same principle.
[22:08:46] adavia: Radar: Nice! Thanks
[22:08:47] alibby2: has joined #RubyOnRails
[22:10:10] alibby1: has joined #RubyOnRails
[22:11:34] centrx: has joined #RubyOnRails
[22:11:38] tanuki: has joined #RubyOnRails
[22:11:41] knight33: has joined #RubyOnRails
[22:11:44] cjk101010: has joined #RubyOnRails
[22:14:17] tanuki: has joined #RubyOnRails
[22:16:21] Didac: has joined #RubyOnRails
[22:17:13] brendan^^: has joined #RubyOnRails
[22:18:48] DoctorMonocular: has joined #RubyOnRails
[22:27:42] uks: has joined #RubyOnRails
[22:30:33] davedo321: has joined #RubyOnRails
[22:41:34] DoctorMonocular: has joined #RubyOnRails
[22:43:34] Spami: has joined #RubyOnRails
[22:46:21] patarr: has joined #RubyOnRails
[22:50:40] jusa: has joined #RubyOnRails
[22:54:49] knight33: has joined #RubyOnRails
[22:56:03] mrgreenfur: has joined #RubyOnRails
[22:57:00] cagomez: has joined #RubyOnRails
[22:58:05] username1: has joined #RubyOnRails
[22:58:45] username1: im trying to render a partial using "render :partial => "my_partial.js"" with no success
[22:58:59] username1: rails isnt complaining but the js isnt loaded
[22:59:32] edgr: has joined #RubyOnRails
[23:01:02] hipertracker: has joined #RubyOnRails
[23:04:42] rakm: has joined #RubyOnRails
[23:14:33] patarr: has joined #RubyOnRails
[23:18:56] quazimodo: has joined #RubyOnRails
[23:20:09] alan_w: has joined #RubyOnRails
[23:21:12] benlieb: has joined #RubyOnRails
[23:23:57] patarr: has joined #RubyOnRails
[23:25:34] davedo321: has joined #RubyOnRails
[23:26:01] Didac: has joined #RubyOnRails
[23:32:48] Spami: has joined #RubyOnRails
[23:33:22] patarr: has joined #RubyOnRails
[23:42:45] patarr: has joined #RubyOnRails
[23:49:16] jaequery: has joined #RubyOnRails
[23:51:54] patarr: has joined #RubyOnRails
[23:52:20] hipertracker: has joined #RubyOnRails
[23:57:43] amperry: is there a way, in a form, to pass the parameters of an associated model without, e.g., using '<% f.fields_for ... %>'? I have a form that's trying to emulate a legacy application where I would have to call fields_for multiple times for the same association because of where they are on the existing form.