« Back to channel list

#RubyOnRails - 31 March 2017

« Back 1 day Forward 1 day »
[00:04:36] nOwz: has joined #RubyOnRails
[00:04:36] amperry: although I think I may just have to tell them to suck it up.
[00:08:20] uks: has joined #RubyOnRails
[00:11:11] patarr: has joined #RubyOnRails
[00:24:21] davedo321: has joined #RubyOnRails
[00:26:10] rakm: has joined #RubyOnRails
[00:27:48] patarr: has joined #RubyOnRails
[00:34:54] Jasaka: has joined #RubyOnRails
[00:39:56] matthewd: Radar: *the ActiveRecord Railtie
[00:41:40] Nicmavr: has joined #RubyOnRails
[00:44:03] patarr: has joined #RubyOnRails
[00:46:23] sevenseacat: has joined #RubyOnRails
[00:49:11] irishfromua: has joined #RubyOnRails
[00:49:40] superlou: has joined #RubyOnRails
[00:52:49] Rodya_: has joined #RubyOnRails
[00:56:56] benlieb: has joined #RubyOnRails
[00:57:00] patarr: has joined #RubyOnRails
[01:02:57] patarr: has joined #RubyOnRails
[01:04:56] alibby: has joined #RubyOnRails
[01:15:45] patarr: has joined #RubyOnRails
[01:16:37] juggler: has joined #RubyOnRails
[01:17:11] nahtnam: has joined #RubyOnRails
[01:17:43] tomasm-: has joined #RubyOnRails
[01:22:22] keerthana: has joined #RubyOnRails
[01:26:04] hndk: has joined #RubyOnRails
[01:26:57] petrol_gas: has joined #RubyOnRails
[01:28:21] mustmodify: has left #RubyOnRails: ()
[01:28:43] petrol_gas: I have a question the answer is probably simple but having trouble googling it
[01:29:01] petrol_gas: When I run rails s, WEBrick starts, but the output is not colored
[01:29:15] petrol_gas: is there a config for this?
[01:33:29] harfangk: has joined #RubyOnRails
[01:35:44] petrol_gas: colorize_logging is set to true
[01:36:11] patarr: has joined #RubyOnRails
[01:37:45] petrol_gas: but setting it to false has no effect
[01:39:23] petrol_gas: colorize gem also has no effect
[01:39:29] petrol_gas: So it must not be a rails thing
[01:39:51] sevenseacat: is it shell-related? what shell are you using?
[01:55:41] Rodya_: has joined #RubyOnRails
[01:56:28] patarr: has joined #RubyOnRails
[02:05:26] nOwz: has joined #RubyOnRails
[02:06:12] davedo321: has joined #RubyOnRails
[02:07:38] libastral: has joined #RubyOnRails
[02:09:24] DoctorMonocular: has joined #RubyOnRails
[02:11:10] edgr: has joined #RubyOnRails
[02:11:44] Jameser: has joined #RubyOnRails
[02:15:02] sunya7a: Hi, I have a problem with how has many through associations are updating each other, in particular the entries in the join model. controller and models: https://gist.github.com/anonymous/8d4438f455978991770cc3d4edc3837d. The before_destroy callback in the degreeholdership model is never called. I suspect it's because of how #update in the controller updates the join model entries (I stepped through the activemodel code and it leads to a call to
[02:17:22] sunya7a: pupsicle: Thank you for your reply earlier. My problem is with #update seemingly not running the callbacks for associated models. Do you know of another method that would do so?
[02:26:52] Rodya_: has joined #RubyOnRails
[02:34:03] approaching236: has joined #RubyOnRails
[02:34:30] jeyraof^mbpr: has joined #RubyOnRails
[02:43:29] nyaa: has joined #RubyOnRails
[02:44:32] approaching236: has joined #RubyOnRails
[02:47:47] nyanz: has joined #RubyOnRails
[02:57:31] knight33: has joined #RubyOnRails
[03:07:38] mochiyoda: has joined #RubyOnRails
[03:17:40] brendan6: has joined #RubyOnRails
[03:27:40] nyaa: has joined #RubyOnRails
[03:31:18] nyanz: has joined #RubyOnRails
[03:57:09] tamouse__: has joined #RubyOnRails
[04:02:46] Rodya_: has joined #RubyOnRails
[04:06:01] xall: has joined #RubyOnRails
[04:06:18] nOwz: has joined #RubyOnRails
[04:13:27] djbkd: has joined #RubyOnRails
[04:13:59] _djbkd: has joined #RubyOnRails
[04:15:06] irishfromua: has joined #RubyOnRails
[04:20:36] itsgokul: has joined #RubyOnRails
[04:25:27] benlieb: has joined #RubyOnRails
[04:44:56] darutoko: has joined #RubyOnRails
[04:57:14] jscheel: has joined #RubyOnRails
[04:57:25] drale2k: has joined #RubyOnRails
[04:59:11] username1: has joined #RubyOnRails
[05:04:53] Rodya_: has joined #RubyOnRails
[05:08:14] bungoman: has joined #RubyOnRails
[05:10:09] drale2k: has joined #RubyOnRails
[05:11:04] Pumukel: has joined #RubyOnRails
[05:14:06] srinidhi: has joined #RubyOnRails
[05:33:14] benlieb: has joined #RubyOnRails
[05:33:50] djbkd: has joined #RubyOnRails
[05:41:34] zero1one0: has joined #RubyOnRails
[05:44:09] zero1one0: has joined #RubyOnRails
[05:50:08] Duckily: has joined #RubyOnRails
[05:50:29] dionysus69: has joined #RubyOnRails
[06:01:38] drale2k: has joined #RubyOnRails
[06:05:36] jusa: has joined #RubyOnRails
[06:05:41] Rodya_: has joined #RubyOnRails
[06:07:10] nOwz: has joined #RubyOnRails
[06:09:07] drale2k: has joined #RubyOnRails
[06:22:52] aganov: has joined #RubyOnRails
[06:26:33] Andr3as: i have a matrix view (a table) and need to check against certain conditions to decide what button to render.. this works fine but as i have more than 20 columns and possibly 80+ rows, its gotta be a lotta db queries to execute for those checks.. so i'd like to load the data into a hash or something... anyone has some experience whats the best thing to do?
[06:26:57] patarr: has joined #RubyOnRails
[06:29:43] Aherin: has joined #RubyOnRails
[06:30:47] AzaToth: has joined #RubyOnRails
[06:32:55] jenrzzz: has joined #RubyOnRails
[06:35:29] conta: has joined #RubyOnRails
[06:36:01] Ratler: has joined #RubyOnRails
[06:47:57] phikes: has joined #RubyOnRails
[06:49:04] nOwz: has joined #RubyOnRails
[06:49:56] djbkd: has joined #RubyOnRails
[06:53:15] jscheel: has joined #RubyOnRails
[06:54:36] donnib: has joined #RubyOnRails
[06:54:42] fmartingr: has joined #RubyOnRails
[06:54:57] ReBa_: has joined #RubyOnRails
[06:56:59] WinterBluFox: has joined #RubyOnRails
[07:02:34] frojnd: has joined #RubyOnRails
[07:06:55] frojnd: I'm trying to send email form console and I can't seem to send email or something goes wrong. I've tested locally with sendmail and it's working. But with rails app I'm not able to send. This is my config/environments/development.rb file: https://gist.github.com/frojnd/399b2b33477d978e8aadf24c385efe11 Here is my app/mailers/notification_mailer.rb file:
[07:07:00] frojnd: https://gist.github.com/frojnd/db97e7bf99ffd693a5ba3ae28c633ba6 And I try to send email like this: NotificationMailer.notify("frojnd@gmail.com", "frojnd@gmail.com", "message")
[07:07:26] frojnd: Response I get: NotificationMailer#notify: processed outbound mail in 1.6ms => #<ActionMailer::MessageDelivery:0x3fd05b6a67e0> But no email I got :(
[07:07:50] frojnd: when I do it with sendmail it sends it right away
[07:08:14] frojnd: Please help, I need to test my app with email notifications
[07:08:15] sevenseacat: doesn't look like you're calling .deliver on the mailer object you get back
[07:08:43] frojnd: sevenseacat: thank you!
[07:08:50] Yzguy: has joined #RubyOnRails
[07:10:01] frojnd: that was it lol
[07:10:21] jlebrech: has joined #RubyOnRails
[07:11:07] frojnd: sevenseacat: mailer has an option to send mails straight away and delayed with sidekiq
[07:11:36] byteflame: has joined #RubyOnRails
[07:11:37] frojnd: do you know how can I achieve that? sidekiq is already running
[07:11:52] sevenseacat: you'd want either deliver_now or deliver_later
[07:13:20] mazeinmaze_: has joined #RubyOnRails
[07:13:34] frojnd: so NotificationMailer.notify("frojnd@gmail.com", "frojnd@gmail.com", "message").deliver_later and that's it?
[07:18:38] brendan6: has joined #RubyOnRails
[07:19:16] AnoHito_: has joined #RubyOnRails
[07:19:46] frojnd: deliver_later is slow :) still didn't get email
[07:20:50] pLaTo0n: has joined #RubyOnRails
[07:21:17] sevenseacat: have you configured activejob correctly to use sidekiq?
[07:21:33] jaequery: has joined #RubyOnRails
[07:21:55] frojnd: sevenseacat: no
[07:22:11] frojnd: sevenseacat: I mean I don't know
[07:23:11] frojnd: sevenseacat: It should be beause app has pdf generation that uses sidekiq
[07:23:23] sevenseacat: thats not related to activejob, is it?
[07:24:06] nOwz: has joined #RubyOnRails
[07:24:22] sevenseacat: http://guides.rubyonrails.org/active_job_basics.html#setting-the-backend
[07:24:44] snickers: has joined #RubyOnRails
[07:25:15] sevenseacat: http://guides.rubyonrails.org/action_mailer_basics.html#walkthrough-to-generating-a-mailer see section 2.1.4
[07:27:09] frojnd: thank you will read that
[07:27:29] jhfisc: has joined #RubyOnRails
[07:30:14] sevenseacat: if you can't get it sorted out, you might need to provide some more information other than 'i didnt get the mail'
[07:33:07] jusa: has joined #RubyOnRails
[07:33:09] drale2k: has joined #RubyOnRails
[07:38:21] gloscombe: has joined #RubyOnRails
[07:39:44] quazimodo: has joined #RubyOnRails
[07:42:19] arBmind: has joined #RubyOnRails
[07:42:25] Andr3as: if come a little further.. am using an array and the member? method if one set is included
[07:42:48] Andr3as: however, i've another use for this and might need a little help... see https://gist.github.com/awunder/eef12724111481a44cecb5d9e65ea1d6
[07:43:37] Andr3as: thats a 2dim array and each entry has 3 values.. if i'd need to check if only 2 of them are there... is there something built into ruby?
[07:51:45] AnoHito: has joined #RubyOnRails
[07:54:23] kernelPaniq: has joined #RubyOnRails
[07:56:21] LateralOctober: has joined #RubyOnRails
[08:02:53] Depili: has joined #RubyOnRails
[08:07:06] Rodya_: has joined #RubyOnRails
[08:11:59] jscheel: has joined #RubyOnRails
[08:12:13] kevinfagan: has joined #RubyOnRails
[08:19:25] drale2k: has joined #RubyOnRails
[08:23:22] tvw: has joined #RubyOnRails
[08:27:45] patarr: has joined #RubyOnRails
[08:29:52] marr: has joined #RubyOnRails
[08:32:08] mikecmpbll: has joined #RubyOnRails
[08:46:39] gloscombe: has joined #RubyOnRails
[08:46:54] tetraktys: has joined #RubyOnRails
[08:49:24] Jameser`: has joined #RubyOnRails
[08:50:32] wethu: has joined #RubyOnRails
[08:51:13] r3vDev: has joined #RubyOnRails
[08:51:59] hipertracker: has joined #RubyOnRails
[08:53:11] lxsameer: has joined #RubyOnRails
[08:56:31] r3vDev: has joined #RubyOnRails
[08:57:34] djbkd: has joined #RubyOnRails
[08:57:42] AnoHito: has joined #RubyOnRails
[08:58:40] srinidhi: has joined #RubyOnRails
[09:01:02] pwnd_nsfw`: has joined #RubyOnRails
[09:01:21] nOwz: has joined #RubyOnRails
[09:02:20] tetraktys: hi guys, in the legacy project i'm working on right now there is an Order model, which belongs to a Buyer. Now I've implemented a GuestBuyer model (Order belongs to GuestBuyer), but I'm looking for a way to have order.buyer either reference a Buyer (if present) and to a GuestBuyer otherwise. How should I go about it?
[09:02:38] wethu: has joined #RubyOnRails
[09:05:47] spicerack: has joined #RubyOnRails
[09:06:58] _Sypheren: has joined #RubyOnRails
[09:07:13] haiming: has joined #RubyOnRails
[09:07:26] xpl0iter: has joined #RubyOnRails
[09:07:36] _Sypheren_: has joined #RubyOnRails
[09:14:29] arBmind: has joined #RubyOnRails
[09:14:43] haiming: has joined #RubyOnRails
[09:19:45] arBmind: has joined #RubyOnRails
[09:25:15] jenrzzz: has joined #RubyOnRails
[09:28:07] frojnd: sevenseacat: I don't know what's the problem with activejob and sidekiq. In my config/application.rb I have: config.active_job.queue_adapter = :sidekiq Also in config/environments/development.rb I have config.active_job.queue_adapter = :sidekiq when I run NotificationMailer.notify("frojnd@frojnd.com", "frojnd@frojnd.com", "message").deliver_later I get
[09:28:12] frojnd: https://gist.github.com/frojnd/c305b07f52a356f3dada70459b5cc672
[09:28:12] frojnd: Mail isn't sent
[09:28:28] frojnd: Or received
[09:29:34] nOwz: has joined #RubyOnRails
[09:30:23] sevenseacat: is sidekiq running?
[09:30:37] sevenseacat: what do your sidekiq logs say
[09:31:39] r3vDev: has joined #RubyOnRails
[09:32:20] frojnd: sevenseacat: sidekiq is running, last line I see is: 2017-03-31T09:32:02.202Z 39250 TID-ovi5n0lxk INFO: Starting processing, hit Ctrl-C to stop
[09:32:39] sevenseacat: ummm its not processing any jobs?
[09:33:09] frojnd: doesn't seem like it
[09:34:00] frojnd: Not sure what other config should I edit
[09:34:14] mikecmpbll: look on the sidekiq UI, is the job enqueued?
[09:34:18] jusa: has joined #RubyOnRails
[09:34:45] frojnd: mikecmpbll: sidekiq UI? I onll have cli
[09:34:52] mikecmpbll: myapp.dev/sidekiq
[09:35:04] sevenseacat: you'll have to configure the UI if you don't have it
[09:35:04] mikecmpbll: mount it in your routes first. check the docs.
[09:35:19] workmad3: has joined #RubyOnRails
[09:36:07] frojnd: but cli logs are neough... I mean can see nothing goes through when I send email
[09:36:38] tbuehlmann: frojnd: sidekiq only processes the default queue. mailers add jobs to the mailers queue
[09:36:54] srinidhi: has joined #RubyOnRails
[09:36:54] tbuehlmann: tell sidekiq to also process the mailers queue
[09:36:59] mikecmpbll: ah, is that a activejob thing? we had to configure a mailers queue manually
[09:37:01] sevenseacat: ah yes, the queues
[09:37:07] wethu: has joined #RubyOnRails
[09:38:20] xpl0iter_: has joined #RubyOnRails
[09:41:11] yaw: has joined #RubyOnRails
[09:41:30] frojnd: I am really confused
[09:41:31] frojnd: https://gist.github.com/maxivak/690e6c353f65a86a4af9
[09:42:00] frojnd: Configure Sidekiq part it says I have to put config.active_job.queue_adapter = :sidekiq under config/initializers/active_job.rb
[09:42:42] sevenseacat: https://gist.github.com/maxivak/690e6c353f65a86a4af9#configure-sidekiq-1 does your sidekiq.yml file have that?
[09:43:09] ReBa_: has joined #RubyOnRails
[09:43:59] frojnd: dont't even have sidekiq.yml file under config
[09:44:11] sevenseacat: great. create it.
[09:44:37] sevenseacat: your sidekiq isnt reading the mailers queue, only the default queue as tbuehlmann said
[09:45:38] frojnd: sevenseacat: also when I try to create onfig/initializers/active_job.rb and put config.active_job.queue_adapter = :sidekiq I get syntax error
[09:45:48] sevenseacat: put it back where it was before.
[09:47:15] frojnd: put what back?
[09:47:33] sevenseacat: you configured the queue adapter somewhere else before. put it back there.
[09:47:44] sevenseacat: config/application.rb you said
[09:47:53] frojnd: it is there
[09:48:02] sevenseacat: great, then you don't need the initializer
[09:48:09] frojnd: ok still not working
[09:48:42] sevenseacat: did you add the sidekiq.yml?
[09:49:33] frojnd: reloaded console
[09:49:36] sevenseacat: and restarted your server and sidekiq server?
[09:49:44] sevenseacat: sidekiq needs the new config
[09:49:49] frojnd: that's the case then
[09:51:54] handicraftsman: has joined #RubyOnRails
[09:52:00] frojnd: sevenseacat: thank you
[09:52:04] frojnd: it's working now
[09:52:09] urkle: has joined #RubyOnRails
[09:52:11] frojnd: I get some errors in sidekiq log :)
[09:53:23] hipertracker: has joined #RubyOnRails
[09:55:13] frojnd: How would I monitor when and if message was sent?
[09:55:15] frojnd: is that doable?
[09:55:18] frojnd: I mean email
[09:55:33] r3vDev: has joined #RubyOnRails
[09:55:36] frojnd: Also I would need to catch some errors if mail wasn't sent
[09:55:39] frojnd: what docs should I read?
[09:56:10] sevenseacat: if you want error notification there are plenty of services out there for that
[09:56:19] sevenseacat: I dont know what you want with the rest of it
[09:56:45] frojnd: oh u mean Appsignal
[09:56:57] frojnd: no I mean if email wasn't sent for a reason
[09:57:05] sevenseacat: for what reason?
[09:57:07] frojnd: or if it was I would like to get a callback somehow
[09:57:13] sevenseacat: thats not what sidekiq is for
[09:58:28] frojnd: http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration raise_delivery_errors
[09:59:20] Jameser: has joined #RubyOnRails
[10:02:19] mikecmpbll: i wrote a postfix log parser which fires callbacks to the app if emails bounce 😭
[10:07:51] drale2k: has joined #RubyOnRails
[10:08:43] Rodya_: has joined #RubyOnRails
[10:08:47] xall_: has joined #RubyOnRails
[10:15:42] srinidhi: has joined #RubyOnRails
[10:20:14] itsgokul: has joined #RubyOnRails
[10:20:44] pickle_: has joined #RubyOnRails
[10:24:33] pickle_: has joined #RubyOnRails
[10:27:56] ferr1: has joined #RubyOnRails
[10:28:38] patarr: has joined #RubyOnRails
[10:36:50] yaw: has joined #RubyOnRails
[10:46:24] jusa: has joined #RubyOnRails
[10:54:41] tvw: has joined #RubyOnRails
[10:58:23] Or1on: has joined #RubyOnRails
[10:59:24] djbkd: has joined #RubyOnRails
[11:04:50] pickle_: has joined #RubyOnRails
[11:07:13] HoierM: has joined #RubyOnRails
[11:07:31] xall: has joined #RubyOnRails
[11:09:17] KnownSyntax: has joined #RubyOnRails
[11:09:25] Rodya_: has joined #RubyOnRails
[11:10:19] arBmind1: has joined #RubyOnRails
[11:12:13] wethu: has joined #RubyOnRails
[11:13:57] username1: has joined #RubyOnRails
[11:17:39] pickle_: has joined #RubyOnRails
[11:18:56] donnib: any tried to use this library https://github.com/basecamp/local_time ?
[11:19:30] donnib: i am trying it but i don't see a difference in the time i see in the browser, it's still UTC time, i was expecting that the time would be local time of the client
[11:20:51] Ergo: has joined #RubyOnRails
[11:21:03] sevenseacat: what HTML gets rendered?
[11:21:19] donnib: <time data-format="%B %d, %Y %H:%M" data-local="time" datetime="2017-03-31T11:19:45Z">March 31, 2017 11:19</time>
[11:21:39] donnib: where it should say 13:19
[11:21:44] sevenseacat: looks legit. any JS errors on the page?
[11:22:51] donnib: not that i see, i am looking in Chrome -> Developer Tools -> Console
[11:24:31] sevenseacat: have it open when you load the page, see if any are on load?
[11:24:44] sevenseacat: seems odd that it doesnt ask you to include any js
[11:25:05] sevenseacat: oh, it does: https://github.com/basecamp/local_time#installation
[11:25:30] donnib: i did what it says, added the gem, ran bundle
[11:25:35] sevenseacat: added the js?
[11:25:41] donnib: maybe i should run bundle install
[11:25:46] sevenseacat: added the js?
[11:25:47] donnib: and not just bundle ?
[11:26:01] donnib: i added the //= require local_time
[11:26:11] donnib: do i need to add some specific files myself ?
[11:26:44] sevenseacat: is it at the top of the file as part of the manifest?
[11:27:06] pickle_: has joined #RubyOnRails
[11:27:26] donnib: the //=require local_time is at the bottom of the applicaiton.js file
[11:27:50] sevenseacat: put it at the top as part of the manifest
[11:27:56] sevenseacat: with all the other requires
[11:29:28] yaw: has joined #RubyOnRails
[11:29:47] donnib: got it, it was a typo in the //=require
[11:31:23] aajjbb: has joined #RubyOnRails
[11:31:48] arBmind: has joined #RubyOnRails
[11:31:57] alern: has joined #RubyOnRails
[11:33:05] alern: I'm trying to add a extra if statement in the AuthorizationsController from Doorkeeper. I'm using class Developer::AuthorizationsController < Doorkeeper::ApplicationsController to do so. But when I add a new method to add this if statement it doesn't go into it. Any idea's?
[11:33:17] alern: I have controllers authorizations: 'developer/authorizations' in my routes file.
[11:38:05] ldnunes: has joined #RubyOnRails
[11:41:47] pickle_: has joined #RubyOnRails
[11:45:30] Pumukel: has joined #RubyOnRails
[11:53:48] hipertracker: has joined #RubyOnRails
[11:55:12] pickle_: has joined #RubyOnRails
[11:55:12] SimpleIRC_VLBcT: has joined #RubyOnRails
[12:02:12] keegnotrub: has joined #RubyOnRails
[12:05:05] keegnotrub: has left #RubyOnRails: ()
[12:08:45] pickle_: has joined #RubyOnRails
[12:10:18] Rodya_: has joined #RubyOnRails
[12:12:45] Pumukel: has joined #RubyOnRails
[12:13:31] Pumukel: has joined #RubyOnRails
[12:25:45] buckrockwell: has joined #RubyOnRails
[12:28:03] Pumukel: has joined #RubyOnRails
[12:28:56] p8m: has joined #RubyOnRails
[12:29:30] patarr: has joined #RubyOnRails
[12:30:35] loechel: has joined #RubyOnRails
[12:32:38] Pumukel: has joined #RubyOnRails
[12:33:27] zpe: has joined #RubyOnRails
[12:38:52] pickle_: has joined #RubyOnRails
[12:42:16] xpl0iter: has joined #RubyOnRails
[12:43:34] aajjbb: has joined #RubyOnRails
[12:50:54] CGibsonmm: has joined #RubyOnRails
[12:53:10] davedo321: has joined #RubyOnRails
[12:54:01] quazimodo: has joined #RubyOnRails
[12:54:35] Or1on: has joined #RubyOnRails
[12:56:55] syndikate: Hello people, I was trying to integrate devise with resque and followed the documentation -> I don't see the mails being moved to the queue. I just added the snippet of code found in their documentation.
[12:56:56] syndikate: https://github.com/plataformatec/devise#activejob-integration
[12:57:03] syndikate: Anybody aware of anything else that needs to be done?
[12:57:25] syndikate: PS: I already have queues and workers set up and have many other tasks being done via queues, so I can confirm the queue works fine
[13:00:13] fox_mulder_cp: syndikate: i intagrade it via routes
[13:02:42] knight33: has joined #RubyOnRails
[13:03:19] fox_mulder_cp: syndikate: https://gist.github.com/anonymous/f20119810381b4c5b61b09d7b1409806
[13:05:05] davedo321: has joined #RubyOnRails
[13:11:35] davedo321: has joined #RubyOnRails
[13:14:37] patarr: has joined #RubyOnRails
[13:24:12] syndikate: fox_mulder_cp, Isn't that snippet showing how to authenticate the mounting of resque server to my app? I have already done that.
[13:28:40] s2013: has joined #RubyOnRails
[13:30:04] pickle_: has joined #RubyOnRails
[13:31:54] romeoh: has joined #RubyOnRails
[13:32:12] fox_mulder_cp: syndikate: it's a securing resque web part via ACL from devise
[13:35:20] syndikate: fox_mulder_cp, got it. I have done it. Though my requirement is different..
[13:35:26] banisterfiend: has joined #RubyOnRails
[13:37:54] fox_mulder_cp: syndikate: ooh. sorry. i use devise + pundit, but u can use custom fields in devise user model, and make method like .is_operator?
[13:41:11] harfangk: has joined #RubyOnRails
[13:41:15] lord4163: has joined #RubyOnRails
[13:44:15] brendan6: has joined #RubyOnRails
[13:44:23] r3vDev: has joined #RubyOnRails
[13:46:04] s2013: has joined #RubyOnRails
[13:50:50] King_Rex: has joined #RubyOnRails
[13:51:54] yaw: has joined #RubyOnRails
[13:51:55] srinidhi: has joined #RubyOnRails
[13:52:12] davedo321: has joined #RubyOnRails
[13:52:58] Jameser: has joined #RubyOnRails
[13:53:48] davedo321: has joined #RubyOnRails
[13:56:46] dblessing: has joined #RubyOnRails
[13:57:32] ReBa_: Would you let some application variables & configurations be based upon url? You have example.com and example2.com that have the same code base, some different styling & most importantly: different database connections?
[13:58:06] ReBa_: Or would you consider that dangerous?
[13:58:29] phikes: has joined #RubyOnRails
[14:00:14] wethu: has joined #RubyOnRails
[14:01:08] davedo321: has joined #RubyOnRails
[14:04:57] fryguy: run 2 instances of your app
[14:06:26] ReBa_: fryguy: I'm considering that as best option, because 1. I have seperate scalability, if needed, 2. I can only have 1 staging per instance, which gives me less controll
[14:06:37] ReBa_: + easier to use with environment variables per instance
[14:07:04] spicerack: has joined #RubyOnRails
[14:11:17] mrgreenfur: has joined #RubyOnRails
[14:11:38] Rodya_: has joined #RubyOnRails
[14:12:10] planigan: has joined #RubyOnRails
[14:14:43] Rodya_: has joined #RubyOnRails
[14:17:04] tomasm-: has joined #RubyOnRails
[14:21:15] SteenJobs: has joined #RubyOnRails
[14:21:38] borodin: has joined #RubyOnRails
[14:24:56] CGibsonmm: has joined #RubyOnRails
[14:30:57] patarr: has joined #RubyOnRails
[14:31:03] adavia: has joined #RubyOnRails
[14:33:32] Donkoko: has joined #RubyOnRails
[14:36:49] ResidentBiscuit: has joined #RubyOnRails
[14:39:09] davedo321: has joined #RubyOnRails
[14:39:26] Rodya_: has joined #RubyOnRails
[14:43:06] davedo321: has joined #RubyOnRails
[14:44:06] r3vDev: has joined #RubyOnRails
[14:46:46] tvw: has joined #RubyOnRails
[14:58:27] r3vDev: has joined #RubyOnRails
[15:00:19] DLSteve: has joined #RubyOnRails
[15:02:59] SteenJobs_: has joined #RubyOnRails
[15:03:08] armando: has joined #RubyOnRails
[15:09:11] handicraftsman: has joined #RubyOnRails
[15:10:12] benlieb: has joined #RubyOnRails
[15:10:15] jeanlinux: has joined #RubyOnRails
[15:11:16] xall: has joined #RubyOnRails
[15:11:52] Jasaka: has joined #RubyOnRails
[15:12:39] mrgreenfur: has joined #RubyOnRails
[15:13:27] pickle_: has joined #RubyOnRails
[15:16:24] andywww: has joined #RubyOnRails
[15:16:54] K1NGREX: has joined #RubyOnRails
[15:17:16] andywww: how do you render a js.erb partial?
[15:17:26] andywww: seems like a stupid question but i can’t suss it out
[15:17:40] andywww: Missing partial companies/_script_for_graph, application/_script_for_graph with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in:
[15:18:44] mauro1254: has joined #RubyOnRails
[15:19:57] jusa: has joined #RubyOnRails
[15:21:32] s2013: has joined #RubyOnRails
[15:21:48] neruda: has joined #RubyOnRails
[15:22:37] polishdub: has joined #RubyOnRails
[15:23:20] neruda: devise question, do i need to put before_filter :authenticate_user! on every controller to protect against XSS/CSRF?
[15:23:39] neruda: using rails 4.2.2
[15:24:43] davedo321: has joined #RubyOnRails
[15:30:32] antgel: has joined #RubyOnRails
[15:32:54] davedo321: has joined #RubyOnRails
[15:33:31] bsmith: has joined #RubyOnRails
[15:34:53] davedo321: has joined #RubyOnRails
[15:37:13] snickers: has joined #RubyOnRails
[15:37:23] davedo321: has joined #RubyOnRails
[15:37:46] xixi_: neruda: its not really related to xss csrf
[15:38:07] xixi_: put that line if u want them to have to be authenicated
[15:40:03] DLSteve: has joined #RubyOnRails
[15:41:15] ResidentBiscuit: has joined #RubyOnRails
[15:43:52] loveablelobster: has joined #RubyOnRails
[15:45:08] hipertracker: has joined #RubyOnRails
[15:45:09] xixi_: neruda: protect_from_forgery with: :exception helps with csrf (application_controller.rb)
[15:45:30] [Butch]: has joined #RubyOnRails
[15:47:35] rakm: has joined #RubyOnRails
[15:51:10] r3vDev: has joined #RubyOnRails
[15:51:34] djbkd: has joined #RubyOnRails
[15:52:09] rocco88: has joined #RubyOnRails
[15:52:09] rocco88: has joined #RubyOnRails
[15:52:55] neruda: xixi_: thanks, my question is does that directive need to be on each controller?
[15:53:43] neruda: my thinking goes like this, if it was site-wide then it would be prob be in /app/config/initializers
[15:53:51] xixi_: not the one in application_controller, as the other controllers inherits it
[15:54:06] neruda: ah i forgot about the inheritance
[15:54:50] sunya7a: Hi all. I'm trying to create a new object (profile) which has a many through association. When I try to save the profile i get validation errors, because the association cannot link to the profile which does not yet have an ID
[15:54:55] sunya7a: how do i work around this?
[15:55:10] username1: has joined #RubyOnRails
[15:55:53] xixi_: neruda: if u want ppl to be authed for some stuff in a controller u can add only: [:destroy] etc
[15:58:18] visudo: has joined #RubyOnRails
[15:59:25] CGibsonmm: has joined #RubyOnRails
[16:03:52] fl4sh_: has joined #RubyOnRails
[16:08:13] CGibsonmm: has joined #RubyOnRails
[16:08:32] sunya7a: I found this which seems like this issue is automatically handled by activereocrd: http://stackoverflow.com/questions/18703036/when-will-activerecord-save-associations but it doesn't seem to be doing it in my case
[16:09:05] sunya7a: Here's code for referencee: https://gist.github.com/anonymous/796bc4b622bf54dff3be982962e3ef7b
[16:09:55] armyriad: has joined #RubyOnRails
[16:12:08] Andr3as: hmm... shouldnt the statement "'lock' if policy(:rollout).lock? " should return 'lock' if the policy returns true?
[16:12:54] zpe: has joined #RubyOnRails
[16:13:00] drale2k: has joined #RubyOnRails
[16:14:53] marcdel: has joined #RubyOnRails
[16:16:03] sunya7a: Andr3as: it should...what are you getting back?
[16:16:29] Yzguy: has joined #RubyOnRails
[16:16:36] Andr3as: sunya7a: it depends...
[16:16:40] NoGodDamnIdea: has joined #RubyOnRails
[16:16:40] NoGodDamnIdea: has joined #RubyOnRails
[16:17:13] Andr3as: i have a div: <div <% set_lockable_class %> id="<%= set_id(achievement, division) %>"> where set_lockable class should set "class='lockable'"
[16:17:18] Andr3as: but it does nothing
[16:18:07] Andr3as: however, when i put a "fail()" inside that helper method and evaluate the exact same statement inside the "better errors shell" it comes back with the correct return
[16:18:33] sunya7a: Andr3as: <% set_lockable_class %> should be <%= set_lockable_class %>
[16:18:47] Andr3as: how embarrassing
[16:18:50] sunya7a: Andr3as: otherwise it will just run the code and not print anything to your template
[16:19:01] Andr3as: yeah.. what a stupid mistake
[16:19:04] Andr3as: thanks sunya7a
[16:19:13] sunya7a: Andr3as: okay...no worries...gl
[16:21:07] SteenJobs: has joined #RubyOnRails
[16:23:52] gusrub: has joined #RubyOnRails
[16:25:00] xall: has joined #RubyOnRails
[16:25:25] CGibsonmm: has joined #RubyOnRails
[16:27:14] Jasaka|NA: has joined #RubyOnRails
[16:35:48] sunya7a: Hi again, I've found a workaround for my case, which is to set validate: false at has_many :degreeholderships. However based on http://guides.rubyonrails.org/association_basics.html#has-many-association-reference section 4.3.4 this seems unneccesary (unless I misunderstand)
[16:36:19] mustmodify: has joined #RubyOnRails
[16:36:37] mustmodify: Is there a way to tell Rails to do something other than using as_json to emit a collection?
[16:36:47] sunya7a: It says that if the parent object is unsaved (new_record?) then the child objects are not saved when added. all unsaved members of the association are automatically saved when parent object is saved.
[16:37:07] mustmodify: I have a collection of geometries and they must be wrapped differently than [1, 2, 3] as a group.
[16:37:10] jscheel: has joined #RubyOnRails
[16:37:15] sunya7a: mustmodify: yes...you can use other serializers
[16:37:52] Or1on: has joined #RubyOnRails
[16:38:41] Yzguy: Is there a better channel for rspec specific stuff?
[16:38:54] s2013: has joined #RubyOnRails
[16:39:11] Yzguy: #rspec, ha i should have just tried there first
[16:43:11] hipertracker: has joined #RubyOnRails
[16:44:47] mustmodify: has left #RubyOnRails: ()
[16:48:39] shinnya: has joined #RubyOnRails
[16:48:56] mrgreenfur: Anyone know how to fire JS in a template only once? E.g. after turbolinks loads once, but not on every time.
[16:49:04] mrgreenfur: binding to .on(turbolinks:load
[16:49:09] mrgreenfur: seems to fire every time afterwards
[16:52:33] jenrzzz: has joined #RubyOnRails
[16:59:34] mochiyoda: has joined #RubyOnRails
[17:00:00] pwnd_nsfw: has joined #RubyOnRails
[17:03:18] benlieb: has joined #RubyOnRails
[17:04:58] pLaTo0n: has joined #RubyOnRails
[17:05:59] dblessing: has joined #RubyOnRails
[17:06:27] gusrub: has joined #RubyOnRails
[17:07:24] Fernando-Basso: has joined #RubyOnRails
[17:15:08] djbkd: has joined #RubyOnRails
[17:18:01] quazimodo: has joined #RubyOnRails
[17:18:45] Sidoniuns: has joined #RubyOnRails
[17:20:31] Sidoniuns: has joined #RubyOnRails
[17:20:38] mustmodify: has joined #RubyOnRails
[17:21:15] mustmodify: POSTGRES has a 'sample set' command. Looks like this. I want to know if there's a way I can get a scope like this.
[17:21:35] mustmodify: "SELECT * FROM #{table_name} TABLESAMPLE BERNOULLI(#{percent}) "
[17:21:47] mustmodify: pretty sure I can't because it doesn't fit into one of the pre-existing bits.
[17:21:52] DrYockel: has joined #RubyOnRails
[17:22:32] rakm: has joined #RubyOnRails
[17:23:24] mustmodify: I can just do .group('string') and it will assume I typed the 'group by' command.
[17:23:55] rakm_: has joined #RubyOnRails
[17:26:35] mustmodify: hm... maybe that's JOIN that assumes that?
[17:36:15] SteenJobs: has joined #RubyOnRails
[17:36:31] s2013: has joined #RubyOnRails
[17:38:36] Fernando-Basso: has joined #RubyOnRails
[17:42:27] approaching236: has joined #RubyOnRails
[17:48:38] dionysus69: has joined #RubyOnRails
[17:50:16] duderonomy: has joined #RubyOnRails
[17:53:52] eyeris: has joined #RubyOnRails
[17:55:19] eyeris: Is there a way to use rails5 helpers with a path prefix that can be changed per request? There's the long-standing SCRIPT_NAME approach to hosting the app on a path prefix that the app doesn't know about but that's limited to a single prefix. I want the same routes exposed on two different roots.
[17:57:07] eyeris: I could add multiple routes in the app, but I'm hoping to expose it via two different reverse proxies, with more to come. I'd hate to have to add a route for each new reverse proxy I add to the mix.
[17:58:33] mustmodify: so I registered a custom mime_type :geojson but format.geojson { } isn't picking up.
[17:58:39] phikes: has joined #RubyOnRails
[17:58:48] mustmodify: In fact it's using html, the first thing! format.html {}...
[17:59:33] mustmodify: However, "Processing by CrimesController#index as GEOJSON"
[17:59:35] mustmodify: so it knows.
[18:01:52] gusrub: has joined #RubyOnRails
[18:06:45] jenrzzz: has joined #RubyOnRails
[18:06:45] jenrzzz: has joined #RubyOnRails
[18:07:18] Duckily: has joined #RubyOnRails
[18:07:19] duderono_: has joined #RubyOnRails
[18:07:52] srinidhi: has joined #RubyOnRails
[18:11:03] gusrub: has joined #RubyOnRails
[18:11:40] MittelDank: has joined #RubyOnRails
[18:22:18] Ericx2x: has joined #RubyOnRails
[18:24:14] Violentr: has joined #RubyOnRails
[18:26:27] Spami: has joined #RubyOnRails
[18:26:27] Spami: has joined #RubyOnRails
[18:27:11] r3vDev: has joined #RubyOnRails
[18:32:06] gusrub: has joined #RubyOnRails
[18:33:30] jusa: has joined #RubyOnRails
[18:37:32] giraffe: has joined #RubyOnRails
[18:37:58] randomindividual: has joined #RubyOnRails
[18:38:22] tpendragon: has joined #RubyOnRails
[18:43:13] Guest96: has joined #RubyOnRails
[18:43:40] Duckily: has joined #RubyOnRails
[18:43:42] gusrub: has joined #RubyOnRails
[18:45:00] mikecmpbll: has joined #RubyOnRails
[18:49:13] marr: has joined #RubyOnRails
[18:49:54] xall: has joined #RubyOnRails
[18:50:17] gusrub: has joined #RubyOnRails
[18:50:37] gusrub: has joined #RubyOnRails
[18:59:23] hipertracker: has joined #RubyOnRails
[19:01:46] Rodya_: has joined #RubyOnRails
[19:04:30] aiguu_: has joined #RubyOnRails
[19:05:01] aiguu_: Is it better to have foo.css.sass or foo.sass? If you include .css in the chain, does it run through anything extra in the asset pipeline?
[19:06:45] DoctorMonocular: has joined #RubyOnRails
[19:09:39] fernandomm: has joined #RubyOnRails
[19:10:21] mustmodify: has left #RubyOnRails: ()
[19:13:36] hipertracker: has joined #RubyOnRails
[19:24:47] xall: has joined #RubyOnRails
[19:27:00] jsrn_: has joined #RubyOnRails
[19:28:25] hipertracker: has joined #RubyOnRails
[19:30:18] Spami: has joined #RubyOnRails
[19:33:04] d5sx43: has joined #RubyOnRails
[19:42:33] iamdevnul: no, i think newer versions of rails will throw up deprecations for that actually
[19:52:39] defsdoor: has joined #RubyOnRails
[19:54:03] hipertracker: has joined #RubyOnRails
[19:57:48] username1: has joined #RubyOnRails
[20:01:21] Duckily: has joined #RubyOnRails
[20:08:44] futilegames: has joined #RubyOnRails
[20:08:52] Guest96_: has joined #RubyOnRails
[20:09:55] futilegames: has left #RubyOnRails: ()
[20:10:40] gambl0re: has joined #RubyOnRails
[20:11:03] rakm: has joined #RubyOnRails
[20:12:31] spicerack: has joined #RubyOnRails
[20:13:31] renegadeandy: Hi everyone. I am on rails 5.1.0 and am trying to use devise. When I do a rails db:reset it fails with the following error : https://gist.github.com/renegadeandy/07db59bd114fa7b24ab55cff1c6d31d7 But i cannot figure it out - can anybody help?
[20:15:03] Yzguy: has joined #RubyOnRails
[20:15:47] hahuang61: has joined #RubyOnRails
[20:27:32] tetraktys: has joined #RubyOnRails
[20:29:08] brandtam: has joined #RubyOnRails
[20:30:36] Yzguy: has joined #RubyOnRails
[20:31:10] pupsicle: has joined #RubyOnRails
[20:38:09] adavia: Lets say i have a model question that has_many answers and answer has_one answer_choice and answer_phone? How can i get all phone answers where question_id is x and choice is x?
[20:39:55] benlieb: has joined #RubyOnRails
[20:39:57] SteenJobs: has joined #RubyOnRails
[20:41:38] benlieb: has joined #RubyOnRails
[20:44:15] pupsicle: has joined #RubyOnRails
[21:05:50] jusa: has joined #RubyOnRails
[21:06:22] Spami: has joined #RubyOnRails
[21:06:22] Spami: has joined #RubyOnRails
[21:07:01] cnk: has joined #RubyOnRails
[21:07:27] meoblast001: has joined #RubyOnRails
[21:08:33] renegadeandy: adavia: i would do in two steps, but i think you can do .and now on a where call. SO get all your answers for the question, then get the answers where the answer choice is x
[21:10:42] NoGodDamnIdea: has joined #RubyOnRails
[21:10:57] NoGodDamnIdea: has joined #RubyOnRails
[21:13:07] renegadeandy: Can anyone help with this : http://stackoverflow.com/questions/43149577/rails-composer-devise-rails-will-not-let-me-complete-a-rails-dbreset
[21:13:29] adavia: renegadeandy: i have tried this but not bringing me what i need https://gist.github.com/adavia/8d9b69243e0bd6d365c078e567a8519a
[21:14:15] renegadeandy: adavia: show me your actual ruby code please
[21:14:46] tvw: has joined #RubyOnRails
[21:17:02] Spami: has joined #RubyOnRails
[21:17:03] Spami: has joined #RubyOnRails
[21:18:25] adavia: renegadeandy: https://gist.github.com/adavia/8d9b69243e0bd6d365c078e567a8519a
[21:19:26] superlou: has joined #RubyOnRails
[21:20:41] pwnd_nsfw: the more gems, the better, right guys?
[21:22:12] Spami: has joined #RubyOnRails
[21:23:00] adavia: pwnd_nsfw: for a better performance not really
[21:23:17] renegadeandy: adavia: i made a comment https://gist.github.com/adavia/8d9b69243e0bd6d365c078e567a8519a not sure if syntax is right
[21:23:19] renegadeandy: but the theory is there
[21:26:16] adavia: renegadeandy: you are just outputting answers where phone is x. Not really what i want
[21:27:40] renegadeandy: then replace phone x, with answer_choice then
[21:27:42] pwnd_nsfw: It won't send me to the moon?
[21:27:47] pwnd_nsfw: gem 'doge'?
[21:35:54] LateralOctober: has joined #RubyOnRails
[21:39:15] Yzguy: has joined #RubyOnRails
[21:40:14] lxsameer: has joined #RubyOnRails
[21:43:45] keerthana: has joined #RubyOnRails
[21:50:59] rubyonrails137: has joined #RubyOnRails
[21:54:59] lupine: has joined #RubyOnRails
[22:04:40] chouhoulis: has joined #RubyOnRails
[22:06:08] Spami: has joined #RubyOnRails
[22:07:49] Duckily: has joined #RubyOnRails
[22:08:11] zpe: has joined #RubyOnRails
[22:09:28] banisterfiend: has joined #RubyOnRails
[22:12:33] jenrzzz: has joined #RubyOnRails
[22:12:33] jenrzzz: has joined #RubyOnRails
[22:26:27] FoX_77: has joined #RubyOnRails
[22:26:31] mikecmpbll: has joined #RubyOnRails
[22:26:39] djbkd: has joined #RubyOnRails
[22:33:02] gusrub: has joined #RubyOnRails
[22:34:13] tfitts: has joined #RubyOnRails
[22:35:34] snickers: how should look route for get method where could be several different/alternate params?
[22:36:32] cnk: Depends on what you want the url ot look like
[22:37:19] cnk: you could have separate routes all going to the same controller action OR you could have one route and use get parameters of the form ?foo=x&bar=y
[22:37:48] snickers: to by honest I don't know what is the best practice, but I think about ?foo=x&bar=y
[22:38:52] snickers: I have to many combination to have separate action for each param combination
[22:39:29] Spami: has joined #RubyOnRails
[22:42:49] Rodya_: has joined #RubyOnRails
[22:45:56] cnk: I didn't actually say separate action - I said separate route. You can have more than one route to the same action
[22:46:07] cnk: but it sounds like that might not work very well if you ahve a lot of parameters
[22:46:44] cnk: and in particular, won't work well if you might need to combine parameters such as foo AND bar
[22:47:22] Jasaka: has joined #RubyOnRails
[22:47:28] davedo321: has joined #RubyOnRails
[22:48:36] gbaptista: has joined #RubyOnRails
[22:51:15] gbaptista: has joined #RubyOnRails
[22:53:11] snickers: yes, I know that I can have several route to one action, but there will be many parameters with different combination
[22:54:08] snickers: I know how to append this parameter to url, but I don't know If there should be something in route to inform about that
[22:58:54] CGibsonmm: has joined #RubyOnRails
[22:59:08] z3r0: has joined #RubyOnRails
[23:02:38] tercenya: has joined #RubyOnRails
[23:03:34] kristofferR: has joined #RubyOnRails
[23:06:39] jusa: has joined #RubyOnRails
[23:06:48] hahuang61: has joined #RubyOnRails
[23:08:29] davedo321: has joined #RubyOnRails
[23:15:31] username1: has joined #RubyOnRails
[23:16:07] davedo321: has joined #RubyOnRails
[23:20:47] Duckily: has joined #RubyOnRails
[23:21:17] akshat: has joined #RubyOnRails
[23:24:16] nahtnam: has joined #RubyOnRails
[23:27:11] davedo321: has joined #RubyOnRails
[23:27:20] Spami: has joined #RubyOnRails
[23:27:20] Spami: has joined #RubyOnRails
[23:28:52] leafs87: has joined #RubyOnRails
[23:29:08] davedo321: has joined #RubyOnRails
[23:29:53] kristofferR: has joined #RubyOnRails
[23:30:04] leafs87: has left #RubyOnRails: ()
[23:31:57] spicerack: has joined #RubyOnRails
[23:33:28] kristofferR: has joined #RubyOnRails
[23:35:30] duderonomy: has joined #RubyOnRails
[23:36:08] akshat: has joined #RubyOnRails
[23:41:14] ovaltine: has joined #RubyOnRails
[23:52:44] CGibsonmm: has joined #RubyOnRails