« Back to channel list

#RubyOnRails - 27 July 2017

« Back 1 day Forward 1 day »
[00:02:23] jhfisc: has joined #RubyOnRails
[00:04:58] dionysus69: has joined #RubyOnRails
[00:14:14] jhfisc: has joined #RubyOnRails
[00:18:01] umaaji: has joined #RubyOnRails
[00:23:03] DoctorMonocular: has joined #RubyOnRails
[00:24:18] jhfisc: has joined #RubyOnRails
[00:27:49] ResidentBiscuit: has joined #RubyOnRails
[00:30:03] brent__: has joined #RubyOnRails
[00:34:45] ResidentBiscuit: has joined #RubyOnRails
[00:35:30] jhfisc: has joined #RubyOnRails
[00:36:57] brent__: has joined #RubyOnRails
[00:40:56] jhfisc: has joined #RubyOnRails
[00:44:16] cagomez: has joined #RubyOnRails
[00:44:39] Defenestrate: has joined #RubyOnRails
[00:48:18] jhfisc: has joined #RubyOnRails
[00:50:23] bronson: has joined #RubyOnRails
[00:51:13] jhfisc: has joined #RubyOnRails
[00:54:14] quazimodo: has joined #RubyOnRails
[00:54:22] quazimodo: I have a little security question
[00:54:25] quazimodo: https://gist.github.com/e9c3452948f13f5fb5f7105b0b1aff2d
[00:55:08] quazimodo: masquerade_as signs an admin in as another user, stop_masquerading returns a user back to admin if the admin_id exists in session
[00:55:55] quazimodo: I've done it this way because I presume that it's extremely difficult to maliciously set an admin_id, that it's equivalent to a user trying to set a normal user_id
[00:56:23] quazimodo: but I'd like a sanity check from someone else
[00:56:24] sevenseacat: has joined #RubyOnRails
[00:56:30] bronson: has joined #RubyOnRails
[01:01:52] jhfisc: has joined #RubyOnRails
[01:04:43] jhfisc: has joined #RubyOnRails
[01:08:12] jphase_: has joined #RubyOnRails
[01:09:32] jhass: has joined #RubyOnRails
[01:13:02] SteenJobs_: has joined #RubyOnRails
[01:19:18] cam27: has joined #RubyOnRails
[01:26:07] muzik: has joined #RubyOnRails
[01:29:10] brent__: has joined #RubyOnRails
[01:29:10] irishfromua: has joined #RubyOnRails
[01:30:18] duderonomy: has joined #RubyOnRails
[01:33:20] jhfisc: has joined #RubyOnRails
[01:39:15] jhfisc: has joined #RubyOnRails
[01:41:51] TinkerTyper: has joined #RubyOnRails
[01:47:14] jhfisc: has joined #RubyOnRails
[01:49:01] gusrub: has joined #RubyOnRails
[01:49:03] agent_white: has joined #RubyOnRails
[01:50:51] jhfisc: has joined #RubyOnRails
[01:54:28] Jameser: has joined #RubyOnRails
[01:56:41] Jameser: has joined #RubyOnRails
[02:01:44] umaaji: has joined #RubyOnRails
[02:05:35] Jameser: has joined #RubyOnRails
[02:12:29] jhfisc: has joined #RubyOnRails
[02:17:21] jhfisc: has joined #RubyOnRails
[02:19:56] npgm: has joined #RubyOnRails
[02:20:35] jhfisc: has joined #RubyOnRails
[02:26:45] ghormoon: has joined #RubyOnRails
[02:28:59] jhfisc: has joined #RubyOnRails
[02:35:16] jhfisc: has joined #RubyOnRails
[02:36:44] Chernobuk: has joined #RubyOnRails
[02:38:08] TinkerTyper: has joined #RubyOnRails
[02:43:09] jhfisc: has joined #RubyOnRails
[02:52:06] ahrs: has joined #RubyOnRails
[02:56:03] supervolting: has joined #RubyOnRails
[03:04:06] Jameser: has joined #RubyOnRails
[03:12:52] bronson: has joined #RubyOnRails
[03:14:01] tfitts: has joined #RubyOnRails
[03:25:40] McBride36: has left #RubyOnRails: ("Leaving")
[03:38:13] quazimodo: has joined #RubyOnRails
[03:38:19] guacamole: has joined #RubyOnRails
[03:41:01] guacamole: has joined #RubyOnRails
[03:42:29] Jameser: has joined #RubyOnRails
[03:52:27] Jameser: has joined #RubyOnRails
[03:59:49] guacamole: has joined #RubyOnRails
[04:05:43] dviola: has joined #RubyOnRails
[04:08:32] moei: has joined #RubyOnRails
[04:13:14] bronson: has joined #RubyOnRails
[04:31:28] juggler: has joined #RubyOnRails
[04:34:46] kies: has joined #RubyOnRails
[04:36:07] yunior_alayo: has joined #RubyOnRails
[04:40:48] jhfisc: has joined #RubyOnRails
[04:47:16] jhfisc: has joined #RubyOnRails
[04:53:17] jhfisc: has joined #RubyOnRails
[04:56:11] ahrs: has joined #RubyOnRails
[04:56:21] hndk: has joined #RubyOnRails
[04:59:17] jhfisc: has joined #RubyOnRails
[05:07:06] jhfisc: has joined #RubyOnRails
[05:12:15] umaaji: has joined #RubyOnRails
[05:13:11] jhfisc: has joined #RubyOnRails
[05:16:40] Jameser: has joined #RubyOnRails
[05:21:37] srinidhi: has joined #RubyOnRails
[05:24:17] ascarter: has joined #RubyOnRails
[05:30:14] ascarter_: has joined #RubyOnRails
[05:30:38] brent__: has joined #RubyOnRails
[05:31:18] jhfisc: has joined #RubyOnRails
[05:37:14] jhfisc: has joined #RubyOnRails
[05:44:17] jhfisc: has joined #RubyOnRails
[05:50:35] jhfisc: has joined #RubyOnRails
[05:52:55] Jameser: has joined #RubyOnRails
[05:56:06] marr: has joined #RubyOnRails
[05:59:26] jhfisc: has joined #RubyOnRails
[06:05:16] mtkd: has joined #RubyOnRails
[06:05:41] krmela: has joined #RubyOnRails
[06:06:18] jhfisc: has joined #RubyOnRails
[06:06:59] krmela: Good Morning there
[06:08:42] gwilkes: has joined #RubyOnRails
[06:09:44] roshanavand: has joined #RubyOnRails
[06:09:52] muzik: Yeellllloooooowww
[06:14:13] bronson: has joined #RubyOnRails
[06:15:58] ResidentBiscuit: has joined #RubyOnRails
[06:18:06] yunior_alayo: i'm having an error in a mailer
[06:18:23] yunior_alayo: when i call the mail method in the mailer
[06:18:41] yunior_alayo: wrong number of arguments (given 1, expected 0)
[06:21:14] jhfisc: has joined #RubyOnRails
[06:21:36] muzik: we would need to see the call, and the method receiving
[06:24:04] yunior_alayo: mail(to: "rondon.sarnik@gmail.com", subject: 'El usuario seleccionado ya no esta disponible')
[06:24:25] yunior_alayo: but i'm using send grid api
[06:24:26] jhfisc: has joined #RubyOnRails
[06:24:42] yunior_alayo: is it possible that there is another class called mail in sengrid gem
[06:25:17] yunior_alayo: and is being called instead of the mail method of the ActionMailer??
[06:25:43] muzik: Let me find my sendgrid calls
[06:25:48] muzik: and ill show you my setup
[06:27:57] muzik: mail( :to => "to_address@gmail.com", :from => @user.email,:subject => "Hi #{@user.email}")
[06:27:59] urkle: has joined #RubyOnRails
[06:28:35] rakm: has joined #RubyOnRails
[06:28:36] muzik: Can you paste your whole mailer class somewhere and show?
[06:28:47] muzik: I bet its that call, not the call to mail
[06:28:55] muzik: I had the same issue is how i know this :)
[06:29:28] conta: has joined #RubyOnRails
[06:30:57] yunior_alayo: yes but my mailer is just a test with only that line
[06:31:09] yunior_alayo: and i giving me always the same error
[06:31:37] muzik: did you recently upgrade the rails gem?
[06:31:53] jhfisc: has joined #RubyOnRails
[06:32:01] yunior_alayo: i'm using rails 5
[06:32:03] muzik: sorry mate, not sure then
[06:32:09] yunior_alayo: and a gem for sendgrid api
[06:37:28] jhfisc: has joined #RubyOnRails
[06:42:55] jhfisc: has joined #RubyOnRails
[06:48:45] rakm: if i want a route /authors/:author_id/latest_book, and I do `resources :authors { resource :latest_book, only: [:show] }`, the latest_book route points to LatestBooksController (plural). Is there a way to make the controller name singular, without specifying the controller option? I know the intention is that the controller _could_ have an index action, but really it's only ever going to have singular routes (like show)
[06:49:10] jhfisc: has joined #RubyOnRails
[06:49:38] rakm: I think i've tried all the combinations of resource/resources and :latest_book/:latest_books
[06:50:18] rakm: The one the comes closest is resources :latest_book, only: [:show], but that makes the route /authors/:author_id/:latest_book/:id
[06:50:27] rakm: and i don't need that last :id param
[06:55:21] jhfisc: has joined #RubyOnRails
[07:03:21] krmela: Good day there does anybody knows which is proper syntax for redirect_to :back in rails 5 https://gist.github.com/netmoleCBA/dc1dbab1e86d4e0d4ed28e651e3f174f
[07:11:37] jhfisc: has joined #RubyOnRails
[07:13:07] Tempesta: has joined #RubyOnRails
[07:13:11] Sylario: has joined #RubyOnRails
[07:14:59] high_fiver: has joined #RubyOnRails
[07:15:26] ResidentBiscuit: has joined #RubyOnRails
[07:18:05] high_fiver_: has joined #RubyOnRails
[07:18:14] jhfisc: has joined #RubyOnRails
[07:23:04] jhfisc: has joined #RubyOnRails
[07:25:18] AzaToth: has joined #RubyOnRails
[07:31:48] Quintasan: Does anyone have any idea why just setting a route and creating views works? I have only this https://gist.github.com/Quintasan/8b521d356172094b8ca2c5820b0d5952 in my Rails 5.1 project and somehow it work despite the method not being even defined in the controller
[07:35:55] Quintasan: >By default, controllers in Rails automatically render views with names that correspond to valid routes.
[07:35:55] tbuehlmann_: Quintasan: if there's no action, rails will assume there is an empty method for it
[07:36:15] muzik: I think this is a good thing
[07:36:23] sevenseacat: it's a crazy thing, but its a known thing
[07:36:23] Quintasan: I don't actually
[07:36:39] muzik: So you would be forced to write a blank controller/method?
[07:36:44] muzik: thats a good thing?
[07:37:46] muzik: ACTION is not sure why this even matters 
[07:37:51] jhfisc: has joined #RubyOnRails
[07:38:07] muzik: if it doesnt work people complain, if it works, people complain. I am complainging about people complaining...
[07:39:15] muzik: is there anyone in here is like, insanely good at giving foot massages?
[07:39:20] Quintasan: If you ask me then it makes putting login in your view sound like a good idea
[07:40:45] jhfisc: has joined #RubyOnRails
[07:47:41] jhfisc: has joined #RubyOnRails
[07:50:32] srinidhi: has joined #RubyOnRails
[07:50:47] muzik: Maybe your view doesnt need logic and its a static page
[07:51:07] sevenseacat: thats fine, it's one line in a controller to define the action.
[07:51:14] sevenseacat: and a whole lot less unnecessary magic
[07:52:50] pwnd_nsfw: logic in view is awful idea
[07:53:22] pwnd_nsfw: It myb just me, but I wouldn't even do like... form_for SomeModel.new
[07:55:56] jhfisc: has joined #RubyOnRails
[07:56:02] mikecmpbll: has joined #RubyOnRails
[07:59:11] xibalba: has joined #RubyOnRails
[08:01:07] jhfisc: has joined #RubyOnRails
[08:03:33] one_zero: has joined #RubyOnRails
[08:07:14] jhfisc: has joined #RubyOnRails
[08:09:42] Jameser: has joined #RubyOnRails
[08:12:05] jhfisc: has joined #RubyOnRails
[08:14:18] krmela: good day there i have question i have simple controller with index edit and update action in edit i am asign object and i wish in update save it sources is in https://gist.github.com/netmoleCBA/dc1dbab1e86d4e0d4ed28e651e3f174f can anybody tell me what is wrong
[08:15:09] bronson: has joined #RubyOnRails
[08:18:53] lessless_: has joined #RubyOnRails
[08:20:07] jhfisc: has joined #RubyOnRails
[08:23:56] Defenestrate: has joined #RubyOnRails
[08:25:46] jhfisc: has joined #RubyOnRails
[08:38:47] kapil___: has joined #RubyOnRails
[08:39:44] kapil___: hello , in my application, i want that when one drop down is selected, others are changed and some calculations to the form. can anybody help?
[08:39:53] michael_mbp: does anyone here use Siege (the tool that is) to get some insight into performance metrics?
[08:40:13] michael_mbp: if I simulate say 40-100 concurrent users, it looks like DB bottlenecking is an issue.
[08:51:04] rakm: has joined #RubyOnRails
[08:51:59] rakm: has joined #RubyOnRails
[08:52:43] rakm: has joined #RubyOnRails
[08:53:33] rakm: has joined #RubyOnRails
[08:54:18] rakm: has joined #RubyOnRails
[08:55:09] rakm: has joined #RubyOnRails
[08:55:57] uksio: has joined #RubyOnRails
[08:55:58] rakm: has joined #RubyOnRails
[09:11:40] jhfisc: has joined #RubyOnRails
[09:12:33] Ergo: has joined #RubyOnRails
[09:16:47] workmad3: has joined #RubyOnRails
[09:18:16] jhfisc: has joined #RubyOnRails
[09:23:18] Pumukel: has joined #RubyOnRails
[09:33:14] jackhum: has joined #RubyOnRails
[09:34:14] jackhum: has joined #RubyOnRails
[09:35:20] jackhum: has joined #RubyOnRails
[09:37:07] jackhum: has joined #RubyOnRails
[09:45:07] Radar: michael_mbp: what are you seeing?
[09:45:38] jhfisc: has joined #RubyOnRails
[09:46:58] Macaveli: has joined #RubyOnRails
[09:48:55] brent__: has joined #RubyOnRails
[09:50:07] krmela: Good Day there, i have question i cant figure out why my controller errors with ActionController::ParameterMissing - param is missing or the value is empty: order: source is on https://gist.github.com/netmoleCBA/42f4c9bf6c43e186bfdc76af5c738b9d
[09:53:27] jackhum: has joined #RubyOnRails
[09:57:55] ResidentBiscuit: has joined #RubyOnRails
[10:08:04] Jameser: has joined #RubyOnRails
[10:16:25] bronson: has joined #RubyOnRails
[10:17:28] SteenJobs_: has joined #RubyOnRails
[10:25:18] moeabdol: has joined #RubyOnRails
[10:25:50] moeabdol: has joined #RubyOnRails
[10:29:34] Jameser: has joined #RubyOnRails
[10:54:02] StoneWaves: has joined #RubyOnRails
[10:58:34] muzik: has joined #RubyOnRails
[11:13:54] Jameser: has joined #RubyOnRails
[11:29:41] Jameser: has joined #RubyOnRails
[11:29:50] quazimodo: has joined #RubyOnRails
[11:36:24] muzik: has joined #RubyOnRails
[11:37:40] ldnunes: has joined #RubyOnRails
[11:38:34] muzik: has joined #RubyOnRails
[11:42:32] jhfisc: has joined #RubyOnRails
[11:44:47] Macaveli: has joined #RubyOnRails
[11:46:06] muzik: has joined #RubyOnRails
[11:51:14] jhfisc: has joined #RubyOnRails
[11:53:05] dionysus69: has joined #RubyOnRails
[11:57:18] jhfisc: has joined #RubyOnRails
[12:12:43] SteenJobs_: has joined #RubyOnRails
[12:15:04] jackhum: has joined #RubyOnRails
[12:17:19] bronson: has joined #RubyOnRails
[12:24:38] dionysus69: has joined #RubyOnRails
[12:32:09] Macaveli: has joined #RubyOnRails
[12:40:47] sevenseacat: has joined #RubyOnRails
[12:49:35] nekomune: has joined #RubyOnRails
[12:49:48] jphase: has joined #RubyOnRails
[12:51:17] Abhijit: has joined #RubyOnRails
[12:51:32] Abhijit: how to use if condition on class assignment in HAML?
[12:51:49] mtkd: has joined #RubyOnRails
[12:57:15] berserk_ren: has joined #RubyOnRails
[13:02:03] rfoust: has joined #RubyOnRails
[13:02:24] quazimodo: has joined #RubyOnRails
[13:11:44] cam27: has joined #RubyOnRails
[13:18:01] aclark: has joined #RubyOnRails
[13:24:08] truenito: has joined #RubyOnRails
[13:30:04] kapil___: abhijit: gem install html2haml
[13:30:48] kapil___: want that when one drop down is selected, others are changed and some calculations to the form. can anybody help?
[13:37:05] muzik: Thats just some jquery event handlers
[13:37:28] muzik: Ill write up a quick example for you. One moment
[13:42:41] chouhoulis: has joined #RubyOnRails
[13:46:06] muzik: Here is the basic idea: https://codepen.io/anon/pen/VzLJPx?editors=1010
[13:46:23] muzik: When the first select is changed, the second select is emptied, and has new options appended to it
[13:47:40] GodFather: has joined #RubyOnRails
[13:51:17] jscheel: has joined #RubyOnRails
[13:53:47] apparition: has joined #RubyOnRails
[13:58:03] nickjj_: has joined #RubyOnRails
[13:58:55] jhfisc: has joined #RubyOnRails
[14:08:17] kapil___: I am trying to write controller function and ajax method..
[14:09:22] kapil___: is there any simple gem for that ? or other method. ?
[14:09:26] kapil___: https://stackoverflow.com/questions/20180903/filter-field-based-on-previous-field-selection
[14:09:27] muzik: Do you mean, when the user changes a select, pull down info from an ajax call, and load that data?
[14:10:15] muzik: Use my example above but with an ajax call
[14:10:43] jhfisc: has joined #RubyOnRails
[14:10:44] kapil___: how please explain.
[14:10:44] muzik: You might want to have both selects unselectable will you wait for the call back
[14:10:59] muzik: Do you know how to do an ajax call in javascript?
[14:11:41] kapil___: no i don't know that much, but i write some javascript from example.
[14:14:12] kapil___: wait i show my app on heroku
[14:16:45] Axy: has joined #RubyOnRails
[14:17:56] muzik: The new versino has a simple ajax example. you can see that you can have the function on success and failure: https://codepen.io/anon/pen/VzLJPx?editors=1010
[14:18:06] muzik: I will leave it up to you to glue it all together
[14:18:25] bronson: has joined #RubyOnRails
[14:18:55] kapil___: wait a sec please check:
[14:19:09] muzik: Dont paste here
[14:20:09] kapil___: https://afternoon-fjord-96330.herokuapp.com/design/styles/
[14:21:28] muzik: Yeap, so the new page has some selects. You just need to have the javascript at the bottom of the page, and use my example
[14:22:25] kapil___: when collection change--> category change then --> sub category change.
[14:23:26] kapil___: i can't understanding your code can u help me.?
[14:23:29] muzik: Yes, i have given you everything you need. To detect the change, the ajax call, and the callback
[14:24:12] adac: has joined #RubyOnRails
[14:24:29] kapil___: i dont know how to use it.!
[14:24:54] muzik: I am currently doing paid work. If you dont know the basics of ajax calls, you need to go and learn.
[14:25:24] adac: even though this ENV variable is on true, the logs do not go to STDOUT. https://gist.github.com/anonymous/1ff6b72d34fd772586be84504afb505e Not sure how to debug this actually. Do you have an idea?
[14:25:34] kapil___: can u help me to complete. i can pay you.
[14:26:06] jhfisc: has joined #RubyOnRails
[14:26:39] muzik: I am worth AUD$100 per hour
[14:27:50] ResidentBiscuit: has joined #RubyOnRails
[14:28:57] kapil___: please give me your mail.
[14:32:13] jhfisc: has joined #RubyOnRails
[14:36:26] mikecmpbll: has joined #RubyOnRails
[14:46:09] xall: has joined #RubyOnRails
[14:50:22] StoneWaves: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[15:00:16] guacamole: has joined #RubyOnRails
[15:02:02] wopi: has joined #RubyOnRails
[15:02:34] wopi: Hi, can somebody explain how a routing spec works ? I mean what kind of request is being made ? When I inspect the request.headers, instead of being an empty hash, it's nil
[15:03:54] adac: interesting it works when I set it to STDOUT instead of STDERR logger = ActiveSupport::Logger.new(STDERR)
[15:05:28] rgr: has joined #RubyOnRails
[15:15:19] bronson: has joined #RubyOnRails
[15:17:01] jarr0dsz: has joined #RubyOnRails
[15:17:21] jarr0dsz: hi everyone, im still having a frustrating issue with multiple databases and problems with rails AR
[15:17:48] jarr0dsz: the problem is that you can do an establish_connection but it changes the connection for the whole application and all its users that logged in ( devise )
[15:18:14] jarr0dsz: does anyone know how i could fix this problem ? reloading the correct db on every request fails since devise also stores its users in the table so sessions gets lost and things get ugly fast
[15:18:23] jarr0dsz: and havent found any solution so far on how to work around this
[15:18:32] cagomez: has joined #RubyOnRails
[15:19:05] jarr0dsz: ala its related to multitennant, but nothing much comesup on a google search ( yes i know apartment) but i just want to use custom 'solution' it should just be able to keep a db per user session instead of making the db connectoin global
[15:19:49] cagomez: has joined #RubyOnRails
[15:21:12] cagomez: has joined #RubyOnRails
[15:21:24] eelster: has joined #RubyOnRails
[15:24:33] jhfisc: has joined #RubyOnRails
[15:24:35] Sylario: I kind of remember there was a way to define establish connection per model
[15:25:21] Sylario: @jarr0dsz and for multitenancyu there is the... cannot remember the name, a way to do muktiple DB in one with pgsql
[15:25:46] jarr0dsz: i know there are some solutions out there, but i would like to fix this issue instead of implementing a whole new one
[15:26:07] jarr0dsz: it works great for everything from migrations to seeds i fixed everything up but cannot tackle this AR connection issue ;9
[15:27:04] Sylario: at worst, create a scope or function returning the Model.all established on the correct DB
[15:27:11] Sylario: for each model
[15:27:20] Sylario: alà Pundit scope
[15:28:21] jhfisc: has joined #RubyOnRails
[15:30:28] jarr0dsz: i have this method inside my model to connect to database X and subclass it but it fails on multiple user type logins with devise
[15:30:48] jarr0dsz: i have like so for example establish_connection DB_PROCESSOR
[15:30:59] jarr0dsz: where DB_.. is the config to the db as a constant
[15:31:14] Sylario: I suppose Devise make random DB schenannigans on his own
[15:32:19] Sylario: jarr0dsz: https://stackoverflow.com/questions/26574086/establish-a-connection-to-another-database-only-in-a-block
[15:33:07] jarr0dsz: ah that is something new that seems interesting sylario
[15:33:37] Sylario: try adding establish_connection in the user model
[15:33:53] jarr0dsz: so that only connects to the other db if i specific request it bu current def connection method wraps up the whole establish_connection method then just change the db
[15:34:03] jarr0dsz: but its 'global' for all users that are loggedin
[15:34:42] Sylario: you have one model across two DB?
[15:34:45] jarr0dsz: this would allow me to connect to any db, in code, but i think i need to request a 'switch'
[15:35:24] Sylario: ok, i do not know, but it seems to me to define establish_connection in the model, will make rails use the defined DB for the model
[15:35:46] Sylario: including request made by devise Itself
[15:36:20] brent__: has joined #RubyOnRails
[15:37:15] jarr0dsz: ok ill check that thank you sylario
[15:37:40] jarr0dsz: i have this processor.organisations and organisation.organisations (before . is the database after . is the table )
[15:38:03] jarr0dsz: then when using devise to login as organisation role it tries to connect to organisation.organisations db,table
[15:38:29] jarr0dsz: but if logged in at the same time as processor role and reloading the organisation role into a browser using the app it throws exception cannot find processor.organisations
[15:38:35] jarr0dsz: so somehow it just switches the db
[15:39:02] jarr0dsz: beside that im also lost my processor session then, it just disapears ( asssuming devise stores session data in the organisation db , it is switches so its lost ) which makes sense
[15:39:58] jhfisc: has joined #RubyOnRails
[15:40:15] Sylario: you have the same model on two DB?
[15:40:21] Sylario: it's over man
[15:43:18] jhfisc: has joined #RubyOnRails
[15:44:35] [Butch]: has joined #RubyOnRails
[15:49:50] sevenseacat: I seem to recall advising you strongly not to go down this path, a long time ago
[15:54:43] lessless: has joined #RubyOnRails
[15:54:56] jhfisc: has joined #RubyOnRails
[15:55:55] jarr0dsz: sevenseacat yes correct, but is there any solution to this?
[15:56:03] jarr0dsz: i can always switch but it has been a great learning
[15:56:36] jarr0dsz: it just seems strange that its not possible to have rails connect to 2 different db's on a per user session base , it seems also strange there is no real multitennant solution in rails by core team
[15:59:13] sevenseacat: you have weird definitions of 'strange'
[15:59:18] jhfisc: has joined #RubyOnRails
[16:15:17] jhfisc: has joined #RubyOnRails
[16:16:17] ome: has joined #RubyOnRails
[16:17:20] banisterfiend: has joined #RubyOnRails
[16:17:57] rakm: has joined #RubyOnRails
[16:18:27] S007: has joined #RubyOnRails
[16:19:53] Sylario: schemas works great for multitenancy
[16:20:59] Sylario: And I work on a big partially multitenancy app that use an id to discriminate (lot of cross tenants logic)
[16:25:54] aajjbb: has joined #RubyOnRails
[16:32:23] gusrub: has joined #RubyOnRails
[16:33:13] jhfisc: has joined #RubyOnRails
[16:34:54] cam27: has joined #RubyOnRails
[16:39:20] jscheel: sylario: I’ve got a followup to my question about association callbacks from yesterday. Since ActiveRecord adds a bunch of magic methods to has_many associations (e.g. collection=, collection_ids=, collection<<, etc), is there a way to hook into the changes after they are all finished? For example, if I do group.user_ids = [1,2,3,4], I don’t necessarily want to fire a callback each time, vs. firing it once after all of the users are a
[16:39:50] jscheel: granted, I know that a service object that manages this would clean that up, but it still feels like there are so many “magic” ways to add records to an association
[16:41:03] Sylario: jscheel build the relation object manually and save it with the function that does not invoke callback
[16:41:14] Sylario: I do not remember wich one it is, but it exists
[16:41:44] Sylario: as always, beware of the riskq
[16:41:57] banisterfiend: has joined #RubyOnRails
[16:46:17] jhfisc: has joined #RubyOnRails
[16:51:31] jhfisc: has joined #RubyOnRails
[16:52:49] rakm: ruby q: if i want to puts a string that contains \n characters, how can I get it to display \n instead of an actual line break?
[16:54:54] fohpi: has joined #RubyOnRails
[16:55:20] rakm: ahh, wrapping in %q works
[16:58:24] one_zero: has joined #RubyOnRails
[17:13:14] jhfisc: has joined #RubyOnRails
[17:16:55] duderonomy: has joined #RubyOnRails
[17:18:12] jhfisc: has joined #RubyOnRails
[17:23:11] chouhoulis: has joined #RubyOnRails
[17:23:27] jhfisc: has joined #RubyOnRails
[17:25:50] S007: has joined #RubyOnRails
[17:29:52] kies: has joined #RubyOnRails
[17:36:07] jhfisc: has joined #RubyOnRails
[17:39:16] jhass: has joined #RubyOnRails
[17:39:30] ResidentBiscuit: has joined #RubyOnRails
[17:42:10] jhfisc: has joined #RubyOnRails
[17:43:08] yunior_alayo: has joined #RubyOnRails
[17:44:39] fohpi: has joined #RubyOnRails
[17:46:16] jhfisc: has joined #RubyOnRails
[17:52:08] jhfisc: has joined #RubyOnRails
[17:55:13] dionysus69: so I have a minor setback, when validation fails and it renders new, "active" if current_page?(link_path) helper doesnt get executed and thus the class is not set
[17:56:06] dionysus69: even though render new redirects to the correct url. if I refresh helper sets class correctly. only not in case of validation failure
[17:59:39] dviola: has joined #RubyOnRails
[18:00:34] guacamole: has joined #RubyOnRails
[18:00:50] gusrub: has joined #RubyOnRails
[18:04:14] rakm: has joined #RubyOnRails
[18:04:39] gusrub: has joined #RubyOnRails
[18:05:10] alexday: has left #RubyOnRails: ("WeeChat 1.8")
[18:05:59] jhfisc: has joined #RubyOnRails
[18:11:29] bronson: has joined #RubyOnRails
[18:13:50] banisterfiend: has joined #RubyOnRails
[18:17:03] chouhoulis: has joined #RubyOnRails
[18:17:29] jhfisc: has joined #RubyOnRails
[18:18:09] tbuehlmann_: dionysus69: it's probably because you're on the create action and not the new action?
[18:19:26] dionysus69: oh maybe, didn't think about that, so upon submission current_path becomes create :S
[18:19:31] dionysus69: I ll check it out
[18:19:46] dtzuzu: has joined #RubyOnRails
[18:23:50] chouhoulis: has joined #RubyOnRails
[18:24:18] jhfisc: has joined #RubyOnRails
[18:24:35] jglauche: can someone have a look at this? I have both a CartController and a CheckoutController, in routes: resources :cart and resources :checkout
[18:24:57] jglauche: I use <%= form_for @cart do |f| %> with no problems.
[18:25:15] jglauche: but in checkout, if I do <%= form_for @checkout do |f| %>
[18:25:16] jglauche: undefined method `checkouts_path' for #<#<Class:0x007f2eb51dbe70>:0x007f2eb51d9710>
[18:25:19] jglauche: Did you mean? checkout_path
[18:25:55] jglauche: I must be obviously missing something.
[18:29:10] jhfisc: has joined #RubyOnRails
[18:32:08] jhfisc: has joined #RubyOnRails
[18:44:21] jhfisc: has joined #RubyOnRails
[18:48:01] tbuehlmann_: jglauche: why do you name your controllers singular?
[18:48:34] jglauche: tbuehlmann_: uhm, I have done that with every controller
[18:49:23] jglauche: and I assumed rails would complain (early) if it's wrong.
[18:49:27] jglauche: becuase I never can remember.
[18:49:45] jhfisc: has joined #RubyOnRails
[18:51:32] tbuehlmann_: can you gist your routes.rb?
[18:52:30] jglauche: tbuehlmann_: https://gist.github.com/Joaz/e5cd59c0d477b95914a589f977dcec1e
[18:53:55] tbuehlmann_: well, you normally use plural controller names and plural route names when using .resources
[18:54:30] tbuehlmann_: when you have singular routes, probably like cart, use singular route names (`resource :cart`) and plural controller names
[18:54:45] tbuehlmann_: basically always plural controller names
[18:55:06] jglauche: but why does it work on cart? "cart".pluralize -> carts
[18:55:42] jhfisc: has joined #RubyOnRails
[18:56:06] knight33: has joined #RubyOnRails
[19:01:14] jhfisc: has joined #RubyOnRails
[19:03:23] chouhoulis: has joined #RubyOnRails
[19:04:03] jhfisc: has joined #RubyOnRails
[19:09:30] jphase: has left #RubyOnRails: ()
[19:10:15] Dreamer3_: has joined #RubyOnRails
[19:11:42] bronson: has joined #RubyOnRails
[19:15:42] S007: has joined #RubyOnRails
[19:17:35] tbuehlmann_: jglauche: no idea
[19:21:43] jphase: has joined #RubyOnRails
[19:22:37] defsdoor: has joined #RubyOnRails
[19:23:10] jhfisc: has joined #RubyOnRails
[19:25:02] guacamole: has joined #RubyOnRails
[19:26:49] workmad3: has joined #RubyOnRails
[19:28:40] jhfisc: has joined #RubyOnRails
[19:31:02] cagomez: has joined #RubyOnRails
[19:34:21] cam27: I can’t find the method Devise made that puts the “signed in as ‘email’” in my header
[19:36:03] tbuehlmann_: cam27: search for the i18n translation in the project and then look it up in the code
[19:36:13] moeabdol1: has joined #RubyOnRails
[19:40:59] jhfisc: has joined #RubyOnRails
[19:44:58] srinidhi: has joined #RubyOnRails
[19:49:07] fcser_: has joined #RubyOnRails
[19:50:08] jhfisc: has joined #RubyOnRails
[19:56:18] lxsameer: has joined #RubyOnRails
[19:56:28] jhfisc: has joined #RubyOnRails
[19:58:31] cam27: Thank you tbuehlmann_ I ended up fidning it with grep -rnw '/path/to/somewhere/' -e 'pattern'
[19:58:53] cam27: I was in the file origionally and didn’t even see it....
[20:02:44] kies: has joined #RubyOnRails
[20:05:58] knight33: has joined #RubyOnRails
[20:09:49] Aherin: has joined #RubyOnRails
[20:13:53] dblessing: has joined #RubyOnRails
[20:19:47] dtzuzu: has joined #RubyOnRails
[20:29:24] jhfisc: has joined #RubyOnRails
[20:30:20] cagomez: has joined #RubyOnRails
[20:31:03] cagomez: has joined #RubyOnRails
[20:34:50] jhfisc: has joined #RubyOnRails
[20:36:56] dexter1: has joined #RubyOnRails
[20:38:53] dexter_: has joined #RubyOnRails
[20:41:29] HoierM: has joined #RubyOnRails
[20:52:48] cnk: has joined #RubyOnRails
[21:12:30] bronson: has joined #RubyOnRails
[21:16:36] shanecav: has joined #RubyOnRails
[21:17:12] Dreamer3_: has joined #RubyOnRails
[21:17:29] cagomez: has joined #RubyOnRails
[21:18:17] shanecav: I’d like to try out 5.1.3rc, but there’s a version incompatibility with another gem. Is there some way around this? I’d like to run test on the 5.1.3rc and the incompatible gem is required for testing.
[21:18:37] fryguy: shanecav: fork the gem
[21:19:12] shanecav: Cool. I though there was some easier way. I’ll do that then.
[21:20:51] cagomez: has joined #RubyOnRails
[21:31:41] shanecav: has left #RubyOnRails: ()
[21:37:43] Dreamer3_: has joined #RubyOnRails
[21:40:21] banisterfiend: has joined #RubyOnRails
[21:44:20] cagomez: how does Rails know which binstubs to generate using `./bin/rails app:update:bin'? I need a `bin/yarn` to be created, and it is, but it's followed by a `remove bin/yarn`
[21:47:28] brycesenz: has joined #RubyOnRails
[22:01:24] weaksauce: has joined #RubyOnRails
[22:05:08] jamal7: has joined #RubyOnRails
[22:06:39] ahrs: has joined #RubyOnRails
[22:09:13] jphase: has joined #RubyOnRails
[22:10:55] jrz: has joined #RubyOnRails
[22:25:13] ar1a: has joined #RubyOnRails
[22:27:25] jhfisc: has joined #RubyOnRails
[22:32:38] jhfisc: has joined #RubyOnRails
[22:37:02] knight33: has joined #RubyOnRails
[22:37:37] helpa-bot: has joined #RubyOnRails
[22:38:36] watersoul: has joined #RubyOnRails
[22:41:36] segy: has joined #RubyOnRails
[22:41:48] crankhar1er: has joined #RubyOnRails
[22:41:52] uxp: has joined #RubyOnRails
[22:42:03] unreal_: has joined #RubyOnRails
[22:42:09] guacamol1: has joined #RubyOnRails
[22:42:09] xhoy: has joined #RubyOnRails
[22:42:14] hive-mind: has joined #RubyOnRails
[22:42:22] gs: has joined #RubyOnRails
[22:42:22] tweeaks: has joined #RubyOnRails
[22:43:22] jrz: has joined #RubyOnRails
[22:43:50] sunrunner20: has joined #RubyOnRails
[22:44:13] helpa: has joined #RubyOnRails
[22:44:31] cam27: I guess this is wrong? it’s in a partial file that isn’t importing a css file, but I thought it would still work <li><%= current_user.email, style: "color: blue;" %></li>
[22:45:14] jhfisc: has joined #RubyOnRails
[22:45:22] havenwood: has joined #RubyOnRails
[22:45:41] brendan-: has joined #RubyOnRails
[22:47:50] shamanime: has joined #RubyOnRails
[22:48:21] MissionCritical: has joined #RubyOnRails
[22:49:51] quazimodo: has joined #RubyOnRails
[22:51:18] jhfisc: has joined #RubyOnRails
[22:52:46] planigan: has joined #RubyOnRails
[22:52:47] nekomune: has joined #RubyOnRails
[22:59:20] jscheel: has joined #RubyOnRails
[23:01:18] jhfisc: has joined #RubyOnRails
[23:07:07] fr33domlover: has joined #RubyOnRails
[23:07:41] fr33domlover: Hello! There's no SASS channel so asking here: Given a (non partial) sass file, how do I make a list of all the files it depends on? The naive method is to go over the imports recursively - is the correct or are there tricks to be aware of?
[23:11:38] fr33domlover: "Imports may contain #{} interpolation"
[23:11:50] fr33domlover: ok got my answer ^_^
[23:12:15] fr33domlover: has left #RubyOnRails: ()
[23:12:30] jhfisc: has joined #RubyOnRails
[23:13:44] bronson: has joined #RubyOnRails
[23:14:22] rgr: has joined #RubyOnRails
[23:17:46] SteenJobs_: has joined #RubyOnRails
[23:21:50] dionysus70: has joined #RubyOnRails
[23:22:45] cagomez: has joined #RubyOnRails
[23:23:25] jhfisc: has joined #RubyOnRails
[23:32:12] veex: has joined #RubyOnRails
[23:32:54] jhfisc: has joined #RubyOnRails
[23:41:02] brent__: has joined #RubyOnRails
[23:44:39] brent__: has joined #RubyOnRails