« Back to channel list

#RubyOnRails - 19 April 2018

« Back 1 day Forward 1 day »
[00:00:02] uks: has joined #RubyOnRails
[00:00:35] mroutis: my `JSON::VERSION` is 2.1.0
[00:20:11] kapil___: has joined #RubyOnRails
[00:21:46] cagomez: has joined #RubyOnRails
[00:26:07] chouhoulis: has joined #RubyOnRails
[00:29:08] mroutis: has left #RubyOnRails: ()
[00:33:44] lupine: has joined #RubyOnRails
[00:38:44] fragamus: has joined #RubyOnRails
[00:46:07] jottr: has joined #RubyOnRails
[01:01:43] duderonomy: has joined #RubyOnRails
[01:22:45] linetrac1: has joined #RubyOnRails
[01:23:17] wethu: has joined #RubyOnRails
[01:26:58] uks: has joined #RubyOnRails
[01:34:39] jnollette: has joined #RubyOnRails
[01:40:14] lupine: has joined #RubyOnRails
[01:43:48] workmad3: has joined #RubyOnRails
[01:50:34] jcarl43: has joined #RubyOnRails
[01:52:14] lupine: has joined #RubyOnRails
[02:15:55] cagmz: has joined #RubyOnRails
[02:17:10] cagomez: has joined #RubyOnRails
[02:26:36] GodFather: has joined #RubyOnRails
[02:33:19] Saukk: has joined #RubyOnRails
[02:52:48] jottr: has joined #RubyOnRails
[03:06:25] chouhoulis: has joined #RubyOnRails
[03:15:47] orbyt_: has joined #RubyOnRails
[03:17:34] bobbobbins: has joined #RubyOnRails
[03:31:20] quazimodo: has joined #RubyOnRails
[03:42:58] workmad3: has joined #RubyOnRails
[04:07:32] schneider: has joined #RubyOnRails
[04:09:51] DTZUZO: has joined #RubyOnRails
[04:12:43] jottr: has joined #RubyOnRails
[04:42:24] Technodrome: has joined #RubyOnRails
[04:43:33] alfiemax: has joined #RubyOnRails
[04:59:15] samort7: has joined #RubyOnRails
[05:03:24] ur5us: has joined #RubyOnRails
[05:12:00] reber: has joined #RubyOnRails
[05:15:28] kapil___: has joined #RubyOnRails
[05:42:06] workmad3: has joined #RubyOnRails
[05:43:42] sidx64: has joined #RubyOnRails
[05:47:34] fragamus: has joined #RubyOnRails
[05:49:11] dionysus69: has joined #RubyOnRails
[05:56:51] schneider: has joined #RubyOnRails
[05:57:45] blitz: has joined #RubyOnRails
[06:04:38] timdotrb: has joined #RubyOnRails
[06:14:02] dionysus69: how would I pass raise error message back to controller and show it to user with redirect_to notice?
[06:14:18] jottr: has joined #RubyOnRails
[06:16:26] dionysus69: ok got it :D
[06:24:02] timdotrb: So this is weird.
[06:25:24] timdotrb: I have an active job which sends off a mailer. When I call perform_later, it fails to pass variables from the mailer to the mailer’s view. If I call perform_now, everything succeeds
[06:29:02] schneider: has joined #RubyOnRails
[06:36:17] Radar: timdotrb: Hi again.
[06:36:26] timdotrb: Radar: Howdy!
[06:36:39] Radar: timdotrb: Do you still have that gist?
[06:37:08] timdotrb: Radar: I do not, but I can recreate it easily enough
[06:37:12] Radar: Thank you :)
[06:37:22] Radar: I will be around for about the next 20 minutes and then I have to shoot home.
[06:37:34] timdotrb: Radar: have you ever run into such an issue? Where perform_later acts differently than perform_now ?
[06:37:47] Radar: But I want to confirm your Gist is the same problem before I go giving away information that is wrong.
[06:38:03] Radar: "Better to keep your mouth and let people think you're an idiot than to open it and remove all doubt" and all that
[06:38:29] sidx64_: has joined #RubyOnRails
[06:42:31] apeiros: has joined #RubyOnRails
[06:42:53] roshanavand: has joined #RubyOnRails
[06:43:15] timdotrb: Radar: https://gist.github.com/willc0de4food/92d061fa089bd1d41dc251225938ae24
[06:43:24] timdotrb: Radar: haha for sure
[06:43:47] timdotrb: The flyer mailer is called on line 30 of flyer_campaign_job.rb
[06:43:47] Radar: https://gist.github.com/willc0de4food/92d061fa089bd1d41dc251225938ae24#file-flyer_campaign_job-rb-L7
[06:43:47] sidx64: has joined #RubyOnRails
[06:43:50] Radar: Well this is wrong to start with
[06:43:53] roshanavand: has joined #RubyOnRails
[06:43:53] Radar: that should just be args.first ?
[06:44:06] Radar: I don't know what `self.arguments` would return.
[06:44:11] Radar: Maybe it's some sort of ActiveJob malarky.
[06:44:26] timdotrb: Ahh, good call
[06:45:10] timdotrb: Radar: makes me curious as to how it was working, lol. I previously had a bunch of logging and nil checking, but none of it seemed to be working
[06:47:07] quazimodo: has joined #RubyOnRails
[06:47:56] timdotrb: Radar: change to args didn’t change the outcome, still got the same error
[06:48:28] dminuoso: timdotrb: On an unrelated note: if you have something ERRENOUS, dont log it with info..
[06:49:11] trautwein: has joined #RubyOnRails
[06:49:46] Radar: timdotrb: I am not sure then what could be going wrong. It looks fine to me. I would probably need to toy around with the application locally to figure this one out.
[06:49:59] ariejan: has joined #RubyOnRails
[06:50:17] timdotrb: Radar: gotcha. Damns
[06:50:36] timdotrb: Radar: is there any reason why calling .perform_now would be bad vs perform_later ?
[06:50:46] timdotrb: Other than the fact that one of the jobs, I actually do need to perform later
[06:50:59] dminuoso: timdotrb: so did you prepare a testcase like I asked?
[06:51:31] roshanavand: has joined #RubyOnRails
[06:51:40] timdotrb: dminuoso: I did. Thought I worked out the problem, looks like I didn’t
[06:51:53] Radar: Some way of having this problem happen on my machine would mean that I could investigate and probably fix it
[06:53:00] timdotrb: Radar: the worst part is, it works locally for me. The problem only occurs on my production server
[06:53:26] Radar: https://gist.github.com/willc0de4food/92d061fa089bd1d41dc251225938ae24#file-flyer_mailer-rb-L7
[06:53:30] Radar: So what's different here on production?
[06:53:40] Radar: Is flyer.img_path returning something different, like an S3 path?
[06:54:53] timdotrb: I’m storing the flyer images in a non-web accessible path on the server
[06:55:05] timdotrb: So that path is the path to the file on the server
[06:55:27] Radar: Ok. and then attachments['flyer.jpg'].url should probably return a URL... relative... I am not sure what it returns.
[06:55:33] Radar: I haven't done any actionmailer things in a while.
[06:56:15] schneider: has joined #RubyOnRails
[06:57:13] timdotrb: The flyer image ends up appearing inline in the email that I receive
[06:57:41] timdotrb: I don’t see a way in the Mail app to view the original content of the email that was sent..
[06:58:44] timdotrb: Radar: https://gist.github.com/willc0de4food/e8364a7198617699f53c230d1fb2a84d
[06:59:06] Radar: https://gist.github.com/willc0de4food/e8364a7198617699f53c230d1fb2a84d#file-email-L147-L155
[06:59:23] Radar: Right, so the image is there... but I don't know what attachments['flyer.jpg'] is supposed to do
[06:59:31] Radar: Where did you hear / know that you could do that>?
[06:59:38] Radar: attachments['flyer.jpg'].url I mean
[06:59:52] timdotrb: I have no clue, random Googling :)
[07:00:12] timdotrb: Radar: https://stackoverflow.com/questions/4918414/what-is-the-right-way-to-embed-image-into-email-using-rails
[07:00:37] Radar: I can't help you without seeing the problem, sorry.
[07:00:52] timdotrb: Alrighty, thanks anyways! I appreciate it
[07:01:01] dminuoso: timdotrb: Please reduce to a testcase. Reduce all that stupid noise from your job, remove the view.
[07:01:42] timdotrb: dminuoso: this was the test case I made: https://gist.github.com/willc0de4food/8aeac6cb20c35f82df181ac25d6af8d6
[07:02:02] timdotrb: That’s pretty much the bare minimum for something to work
[07:02:42] dminuoso: timdotrb: So that job reproduces the problem?
[07:05:03] ariejan: has joined #RubyOnRails
[07:06:00] quazimodo: has joined #RubyOnRails
[07:07:05] timdotrb: Yes. I’ll create a new gist
[07:07:43] dminuoso: timdotrb: Please also remove extra log statements that are irrelevant to your problem.
[07:08:41] dminuoso: timdotrb: And also show us your Flyer model, as well as the controller code that somehow feeds flyers with images.
[07:08:49] _aeris_: has joined #RubyOnRails
[07:08:51] tbuehlmann: do you use that default_url_options method at all?
[07:14:18] sidx64_: has joined #RubyOnRails
[07:18:49] timdotrb: tbuehlmann: nope
[07:19:07] timdotrb: Thought something else in Rails required it
[07:19:53] timdotrb: I’m actually getting a new error in this test case. It’s failing at the url_for
[07:22:56] timdotrb: https://gist.github.com/willc0de4food/8817683bc3e9ad6a83aaeeb77a2918c3#file-flyer_test_job-rb-L14
[07:22:59] prahal: has joined #RubyOnRails
[07:25:37] timdotrb: dminuoso: Lol yea, the flyer model isn’t something you really want to sift through >.<
[07:25:51] timdotrb: I was not expecting that to produce a smiley.
[07:29:36] jottr: has joined #RubyOnRails
[07:34:25] dminuoso: timdotrb: Maybe start talking about what ends up in redis?
[07:34:44] dminuoso: timdotrb: Im guessing flyer.guid/list_agent.guid is nil
[07:34:54] dminuoso: timdotrb: Anyway. The point of a testcase is to not reduce beyond changing behavior.
[07:35:39] tbuehlmann: oh I see, you include Rails.application.routes.url_helpers, that's why you want that method
[07:36:53] tbuehlmann: I have some "why do you"s, but I guess this will not lead to solving your problem
[07:38:25] dminuoso: timdotrb: At any rate: I suspect that the pwd is different if you perform later.
[07:38:31] tbuehlmann: maybe one, though: why do you create these links in the job and not in the mailer or even the mailer view?
[07:38:58] dminuoso: timdotrb: If you just took a look at what attachments held you would see the problem.
[07:39:45] timdotrb: tbuehlmann: I was attempting to generate the URLs in the mailer views, but was running into the same issue; flyer.guid or list_agent.guid was nil
[07:39:58] tbuehlmann: why were they nil?
[07:40:21] timdotrb: I had a hypothesis that for some reason, some variable(s) weren’t making it to the mailer view
[07:40:34] timdotrb: I never found out why they were nil
[07:40:35] dminuoso: timdotrb: Stop with that hypothesis.
[07:41:16] timdotrb: None of the logging I was doing ended up making it to the console
[07:41:17] workmad3: has joined #RubyOnRails
[07:41:24] timdotrb: So I couldn’t see anything that was happening
[07:41:36] dminuoso: timdotrb: https://gist.github.com/willc0de4food/8817683bc3e9ad6a83aaeeb77a2918c3#file-flyer_mailer-rb-L5
[07:41:45] dminuoso: timdotrb: insert some code to observe what `attachments` is
[07:42:28] dminuoso: timdotrb: Also figure out why those things (guid/list_agent.guid) are nil
[07:42:36] srinidhi: has joined #RubyOnRails
[07:47:16] timdotrb: dminuoso: https://gist.github.com/willc0de4food/c139098b28b55a4d42ed3466c21d80d6
[07:48:30] prahal: has joined #RubyOnRails
[07:49:42] dminuoso: timdotrb: check your default url options.
[07:50:55] timdotrb: dminuoso: updated gist
[07:53:01] dminuoso: timdotrb: I dont know what to tell you. The default_url_options appear to be nil.
[07:53:23] dminuoso: timdotrb: https://gist.github.com/willc0de4food/c139098b28b55a4d42ed3466c21d80d6#file-flyer_test_job-rb-L21-L23
[07:53:26] dminuoso: are you sure about this?
[07:54:00] timdotrb: dminuoso: I read that as of Rails.. v4? For custom application config variables, you have to use Rails.configuration.x.name_of_var
[07:54:10] schneider: has joined #RubyOnRails
[07:54:16] dminuoso: timdotrb: Inspect it. I guarantee it's nil
[07:54:58] timdotrb: dminuoso: in a console, or Rails.logger it?
[07:55:17] timdotrb: Console returns the expected string, testing logger..
[07:56:32] timdotrb: dminuoso: you are correct, it is nil.
[07:58:17] dminuoso: timdotrb: did you restart the server (and spring) when making that change?
[07:59:08] timdotrb: dminuoso: I’ve had that variable set this entire time. I’ve done a touch tmp/restart.txt, service nginx restart and god restart resque
[07:59:47] dminuoso: ACTION ¯\_(ツ)_/¯
[08:04:16] dminuoso: timdotrb: Did you restart spring too?
[08:04:39] timdotrb: dminuoso: I’m not using spring
[08:04:39] dminuoso: timdotrb: Or wait. If you perform now, do you get that same error?
[08:05:29] timdotrb: dminuoso: nope, perform_now succeeds
[08:05:53] timdotrb: dminuoso: it’s just perform_later that fails
[08:06:11] dminuoso: Radar: How much fuckery is in AJ
[08:07:03] dminuoso: timdotrb: hop into a pry shell in that spot, and poke around. how does Rails.configuration look?
[08:08:50] timdotrb: dminuoso: can I use that in production?
[08:09:57] mikecmpbll: has joined #RubyOnRails
[08:10:29] dminuoso: I would not ;)
[08:10:49] dminuoso: I mean you can, use your own judgement
[08:10:49] timdotrb: Everything works as expected locally -_-
[08:11:06] dminuoso: timdotrb: just use print debugging then.
[08:14:25] timdotrb: dminuoso: https://gist.github.com/willc0de4food/6796a9f8fbcf9506e4f12c917a84628b
[08:15:00] timdotrb: dminuoso: I don’t see the custom application config variable that I created in there
[08:19:19] timdotrb: dminuoso: the weird part is, if the variable was undefined, I would’ve gotten such an error. I didn’t, I simply got nil. So the variable is defined, it’s just nil.
[08:20:32] dminuoso: timdotrb: Rails.configuration.x.anything gives a hash
[08:20:43] dminuoso: Well actually
[08:20:45] timdotrb: dminuoso: ahhh, fuckballs.
[08:20:46] dminuoso: an AS::OrderedOptions
[08:20:49] tbuehlmann: ActiveSupport::OrderedOptions even
[08:21:00] tbuehlmann: the x being a Rails::Application::Configuration::Custom
[08:21:02] dminuoso: timdotrb: Rails.configuration.x.anything.blah at least is guaranteed to be nil.
[08:22:01] dminuoso: The real question is why resque is not picking up that change.
[08:22:12] dminuoso: At this point Im presuming you didn't correctly restart everything
[08:22:38] timdotrb: Presently, this is the command I am executing: git pull origin testcase && touch tmp/restart.txt && sudo service nginx restart && god restart resque
[08:24:41] dminuoso: timdotrb: what does your Rakefile look like?
[08:24:57] timdotrb: I just told god to stop resque, but I still have 0 of 2 workers working..
[08:25:22] timdotrb: dminuoso: https://gist.github.com/willc0de4food/92c10d595b4d8402133ea5a5e1c59cb1
[08:25:57] srinidhi: has joined #RubyOnRails
[08:26:17] dminuoso: 10:24 timdotrb | I just told god to stop resque, but I still have 0 of 2 workers working..
[08:26:19] dminuoso: What do you mean
[08:26:30] timdotrb: dminuoso: god stop resque
[08:26:49] timdotrb: https://www.dropbox.com/s/rupp8a55wkdzdox/Screenshot%202018-04-19%2001.26.45.png?dl=0
[08:27:36] tbuehlmann: isn't that.. correct? I mean, you stopped it?
[08:27:44] dminuoso: tbuehlmann: check your god log
[08:27:56] dminuoso: err timdotrb.
[08:29:59] timdotrb: dminuoso: there’s quite a few Bundler::GemNotFound errors for rake 12.3.1
[08:30:33] timdotrb: gem list shows it installed: rake (12.3.1, 12.3.0)
[08:33:59] sidx64: has joined #RubyOnRails
[08:36:15] dminuoso: timdotrb: Well you kind of need to figure out whats going on there.
[08:36:32] dminuoso: But if `god` doesnt do its things, then its not surprising that things dont work if `resque` cant get restarted
[08:36:59] timdotrb: Let’s restart the server and see what happens xD
[09:01:59] alfiemax: has joined #RubyOnRails
[09:05:38] timdotrb: dminuoso: we found it
[09:06:57] timdotrb: dminuoso: I had to do a gem install on a couple different gems that were reported as missing in my resque_error.log, it’s now working. It seemed as though I had some old resque process running that was just hanging out or something
[09:07:38] marr: has joined #RubyOnRails
[09:07:42] tbuehlmann: what a ride, good you got that sorted out
[09:07:51] dminuoso: timdotrb: Let me guess - all your problems were caused by this?
[09:08:08] timdotrb: dminuoso: yep (rofl)
[09:08:19] dminuoso: timdotrb: See how making a testcase made this easier? :)
[09:08:50] timdotrb: dminuoso: yea, for sure.
[09:09:16] timdotrb: Thanks for all your help! dminuoso tbuehlmann Radar
[09:20:36] ariejan: has joined #RubyOnRails
[09:40:25] workmad3: has joined #RubyOnRails
[09:41:28] alfiemax: has joined #RubyOnRails
[09:42:54] dminuoso: tbuehlmann: how's cells going?
[09:43:22] tbuehlmann: haven't done anything with 'em since we talked
[10:00:54] ferr1: has joined #RubyOnRails
[10:01:02] ferr1: has left #RubyOnRails: ()
[10:20:39] workmad3: has joined #RubyOnRails
[10:21:01] Fernando-Basso: has joined #RubyOnRails
[10:23:05] schneider: has joined #RubyOnRails
[10:23:06] Radar: oh restarting resque fixed this?
[10:25:05] dminuoso: Radar: Once the testcase was produced it became obvious that the default_url_options that were introduced were not picked up.
[10:25:09] timdotrb: has joined #RubyOnRails
[10:25:56] timdotrb: has joined #RubyOnRails
[10:26:40] timdotrb: has joined #RubyOnRails
[10:50:44] apparition: has joined #RubyOnRails
[10:51:38] ellcs: has joined #RubyOnRails
[10:51:58] Ergo: has joined #RubyOnRails
[10:52:14] roshanavand: has joined #RubyOnRails
[10:52:37] kurko_: has joined #RubyOnRails
[10:56:42] dminuoso: If I have a has_many onto itself, how can I get another has_many through that relationship? https://gist.github.com/dminuoso/6e4676eba7ebf23768fd7213c6cb1a34
[10:58:34] dminuoso: This just forces some infinite recursion when trying to access recruits_posts
[11:00:07] prahal: has joined #RubyOnRails
[11:18:03] randohinn: has joined #RubyOnRails
[11:19:16] randohinn: Just made this Rake task for my application, only to discover migrate is not a method anymore... What's the easy fix here? https://paste.ubuntu.com/p/Yb26mNSFx8/
[11:35:55] Cavallari: has joined #RubyOnRails
[11:36:58] randohinn: Figured it out
[11:37:16] prahal: has joined #RubyOnRails
[11:43:32] supergeek: has joined #RubyOnRails
[11:50:29] apparition: has joined #RubyOnRails
[11:53:19] prahal: has left #RubyOnRails: ()
[12:04:13] dminuoso: Ah I just need to specify source of course..
[12:04:56] sidx64: has joined #RubyOnRails
[12:07:20] duderonomy: has joined #RubyOnRails
[12:07:45] jerematic: has joined #RubyOnRails
[12:12:21] tpendragon: has joined #RubyOnRails
[12:16:58] lord4163: has joined #RubyOnRails
[12:22:32] Cavallari1: has joined #RubyOnRails
[12:33:52] sidx64: has joined #RubyOnRails
[13:01:56] GodFather: has joined #RubyOnRails
[13:08:06] dminuoso: Completed 200 OK in 455ms (Views: 85.2ms | ActiveRecord: 10.1ms)
[13:08:08] dminuoso: I love you.
[13:11:20] tbuehlmann: it doesn't state it's the sum, doesn't it?
[13:11:26] MrCrackPotBuilde: has joined #RubyOnRails
[13:12:06] MrCrackPotBuilde: has joined #RubyOnRails
[13:12:51] MrCrackPotBuilde: has joined #RubyOnRails
[13:13:32] MrCrackPotBuilde: has joined #RubyOnRails
[13:21:03] kn-928: has joined #RubyOnRails
[13:21:31] Andr3as: anyone ever tried to use Roo to parse csv / xlsx files? i have a text file which essentially is a tab delimited csv but with a txt extension.. i though this should still work but roo throws me an error "key not found: :txt"
[13:21:49] Andr3as: is there a way to make roo still open that file?
[13:22:15] fragamus: has joined #RubyOnRails
[13:23:37] kn-928: has joined #RubyOnRails
[13:24:08] duderonomy: has joined #RubyOnRails
[13:26:18] kn-928: has joined #RubyOnRails
[13:32:23] zacts: has joined #RubyOnRails
[13:34:14] dminuoso: tbuehlmann: Have you seen how instrumentation works?
[13:34:49] tbuehlmann: you mean rails instrumentation?
[13:38:13] dminuoso: tbuehlmann: The beauty here is, it's definitely not in my controller.
[13:38:22] dminuoso: So if its not my controller, not in views and AR - then where is it? =)
[13:39:10] dminuoso: I mean I know to use rack-mini-profiler
[13:43:09] dminuoso: Haha this is brilliant. The problem only triggers with Firefox.
[13:43:29] dminuoso: My guess at this point is this magical weird bugged webpacker middleware
[13:43:40] dminuoso: It's the one thing that cant be measured because reasons
[13:44:06] ellcs: has joined #RubyOnRails
[13:46:17] Iarfen: has joined #RubyOnRails
[13:46:39] Iarfen: Ruby on Rails is not detecting postgresql what can be happening?
[13:48:19] fryguy: need to be way more specific than that!
[13:49:21] Iarfen: it doesn't finds the header libpq-fe.h
[13:51:34] fryguy: ok, and is it installed?
[13:51:58] apeiros__: has joined #RubyOnRails
[14:02:54] duderonomy: has joined #RubyOnRails
[14:03:04] cschneid_: has joined #RubyOnRails
[14:11:21] tbuehlmann: dminuoso: hah, great
[14:17:52] SteenJobs: has joined #RubyOnRails
[14:26:06] schneider: has joined #RubyOnRails
[14:40:05] chouhoulis: has joined #RubyOnRails
[14:53:52] roshanavand: has joined #RubyOnRails
[14:54:23] roshanavand: has joined #RubyOnRails
[14:55:34] roshanavand: has joined #RubyOnRails
[14:56:02] mauro1254: has joined #RubyOnRails
[14:56:08] apeiros: has joined #RubyOnRails
[14:58:46] mauro1254: Hi folks, I need to have certain data manageable/available from/to a dozen of apps. What dou you think about having a Rails API app and a mountable engine, is there an easier way to achieve that?
[15:01:45] dminuoso: mauro1254: Why not provide the data as a small service?
[15:01:59] dminuoso: Say some IPC mechanism. Maybe some plain simple serialization over unix domain sockets..
[15:04:53] mauro1254: dminuoso : data consists in entities (models) that I want to be available to all applications and that can be associated to application specific models.
[15:05:11] cschneid_: has joined #RubyOnRails
[15:05:35] dminuoso: mauro1254: Oh actually I misread that. That small rails API+mountable engine sounds fine.
[15:05:50] mauro1254: dminuoso : np
[15:06:21] dminuoso: mauro1254: I personally wouldn't go for an entire engine though. A simple library likely is enough.
[15:07:02] mauro1254: dminuoso : with a mountable engine I can manage (CRUD) entities in each application
[15:07:26] dminuoso: mauro1254: You dont need a mountable engine for that.
[15:07:36] dminuoso: Unless you need to re-expose that CRUD to the outside world.
[15:08:56] mauro1254: dminuoso : the fact is that I don't want to build the view layer ao dozen of times (forms for creation/editing, ecc)
[15:09:16] mauro1254: dminuoso : how ould you handle that without a mountable engine?
[15:09:51] dminuoso: mauro1254: I dont know what exactly you intend to do.
[15:09:51] dminuoso: mauro1254: When you say "manageable", do you mean from a developer or from a user point of view?
[15:10:14] mauro1254: dminuoso : sorry, from a user point of view.
[15:10:28] jerematic: has joined #RubyOnRails
[15:11:57] jerematic: has joined #RubyOnRails
[15:15:37] NoGodDamnIdea: has joined #RubyOnRails
[15:22:49] one_zero: has joined #RubyOnRails
[15:23:57] mauro1254: dminuoso : do you know an easier way to achieve that?
[15:39:31] roshanavand: has joined #RubyOnRails
[15:47:04] dionysus69: has joined #RubyOnRails
[15:56:05] jcarl43: has joined #RubyOnRails
[15:58:42] jerematic: has joined #RubyOnRails
[15:59:26] SteenJobs: has joined #RubyOnRails
[16:00:27] cagomez_: has joined #RubyOnRails
[16:03:47] workmad3: has joined #RubyOnRails
[16:06:09] Technodrome: has joined #RubyOnRails
[16:07:43] hypercore: has joined #RubyOnRails
[16:07:47] hypercore: has left #RubyOnRails: ()
[16:08:30] fragamus: has joined #RubyOnRails
[16:15:38] darkhanb: has joined #RubyOnRails
[16:15:53] uks: has joined #RubyOnRails
[16:28:03] pushcx: has joined #RubyOnRails
[16:29:26] pushcx: Is there a way to add to a scope's select clause rather than replace it? scope.select('foo as bar') without having to say .select('model.*, foo as bar')?
[16:36:24] orbyt_: has joined #RubyOnRails
[16:37:07] srinidhi: has joined #RubyOnRails
[16:41:25] SteenJobs: has joined #RubyOnRails
[16:50:06] Inside: has joined #RubyOnRails
[16:50:41] Inside: Heyo! I'm using activemodel's store functionality. The attributes used by the store are in an array.
[16:50:52] Inside: How do I pass that array to the controller's params.permit()?
[16:51:13] Inside: I've tried calling permit() multiple times, but apparently it only likes the last call.
[16:51:22] Inside: And calling permit() with an array doesn't work either.
[16:58:01] Inside: ahhh I think it does work calling it with an array - I just have an error past that
[17:00:02] Inside: yup yup.. I moved from an after_save callback to a before_save callback and something's causing recursion until the stack blows :|
[17:01:54] fragamus: has joined #RubyOnRails
[17:05:12] dionysus69: has joined #RubyOnRails
[17:06:10] timdotrb: has joined #RubyOnRails
[17:07:20] alfiemax: has joined #RubyOnRails
[17:15:25] Inside: moving from a before_save with a check for new_record? to after_create fixed it \o/
[17:29:11] kapil___: has joined #RubyOnRails
[17:35:30] atrius: has joined #RubyOnRails
[17:55:09] mikecmpbll: has joined #RubyOnRails
[17:56:49] unreal_: has joined #RubyOnRails
[17:57:40] alfiemax: has joined #RubyOnRails
[18:08:48] chouhoulis: has joined #RubyOnRails
[18:13:34] dgsan: has joined #RubyOnRails
[18:15:48] jerematic: has joined #RubyOnRails
[18:16:31] dgsan: mroutis: Thansk, I didn't see your message 'til today. I guess I have a version issue.
[18:18:00] duderonomy: has joined #RubyOnRails
[18:27:35] Trevoke`: has joined #RubyOnRails
[18:28:02] Trevoke`: Hey all, I lost track of how `Integer("5")` is implemented in Ruby. Is it just a global method `def Integer(x)` ?
[18:28:29] dminuoso: Trevoke`: Yes
[18:28:34] Trevoke`: dminuoso: Thanks
[18:28:35] dminuoso: Trevoke`: It's inside Kernel.
[18:28:47] dminuoso: Trevoke`: You can quickly check using method(:Integer).owner
[18:28:57] Trevoke`: Ah neat, thank you. Did not know about owner.
[18:30:58] Technodrome: has joined #RubyOnRails
[18:37:24] bungfish: has joined #RubyOnRails
[18:38:13] sameerynho: has joined #RubyOnRails
[18:38:50] SteenJobs: has joined #RubyOnRails
[18:47:02] Saukk: has joined #RubyOnRails
[18:49:10] duderonomy: has joined #RubyOnRails
[18:58:39] DrYockel: has joined #RubyOnRails
[19:14:05] Technodrome: has joined #RubyOnRails
[19:19:11] cagomez_: has joined #RubyOnRails
[19:25:30] mlt-: has joined #RubyOnRails
[19:27:58] mlt-: Is there a way to autoreload stuff if I modify ruby code in an underlying gem I use in my Rails app? I mean do I have to explicitly ask Guard to watch those files or is there an automagic way to restart server if any of the local gems changed?
[19:31:07] dionysus69: has joined #RubyOnRails
[19:35:48] cagomez_: has joined #RubyOnRails
[19:51:28] cagomez_: has joined #RubyOnRails
[19:52:34] alfiemax: has joined #RubyOnRails
[19:56:40] dustinm`: has joined #RubyOnRails
[19:57:22] orbyt_: has joined #RubyOnRails
[20:06:49] cagomez_: has joined #RubyOnRails
[20:07:50] sidx64: has joined #RubyOnRails
[20:10:07] sidx64_: has joined #RubyOnRails
[20:17:35] FLeiXiuS: has joined #RubyOnRails
[20:18:24] FLeiXiuS: What's the best approach for handling static files like user avatars and file attachments in prod? I want these to be behind my rails authentication. Tips for prod / dev?
[20:20:35] pushcx: has left #RubyOnRails: ()
[20:21:24] ellcs: has joined #RubyOnRails
[20:42:23] alfiemax: has joined #RubyOnRails
[20:45:07] roshanavand: has joined #RubyOnRails
[21:11:34] orbyt_: has joined #RubyOnRails
[21:14:33] mlt-: FLeiXiuS: https://apidock.com/rails/ActionController/Streaming/send_file ?
[21:15:36] FLeiXiuS: mlt-, I think I have 2 issues here. I want pictures to be secure with cancan and attachments to be handled by X-Send-File
[21:16:38] mlt-: why wouldn't you send pics the same way?
[21:17:08] FLeiXiuS: mlt-, I want to display them versus triggering a 'download'
[21:17:41] mlt-: Set :disposition to inline?
[21:17:55] sameerynho: has joined #RubyOnRails
[21:18:32] FLeiXiuS: mlt-, have my babies.
[21:18:38] FLeiXiuS: Thanks I think that's what I was confused about.
[21:19:08] FLeiXiuS: Now I have to create a controller method for displaying images and verifying perms.
[21:20:24] mlt-: are attachments way different than pictures? Can you handle them both the same way but keep a flag for disposition
[21:20:57] FLeiXiuS: Attachments can be photos in some cases. But I want to display user avatars for instance.
[21:21:00] mlt-: Since you do it for both pictures and attachments, I don't see much difference and need in another controller
[21:21:15] mlt-: call avatar as a special attachment
[21:21:27] mlt-: I mean just "file"
[21:21:48] FLeiXiuS: File meaning the Mime type?
[21:22:03] mlt-: I was about to suggest, but I don't think this will do it.
[21:22:11] mlt-: You said pictures can be attachments.
[21:22:17] mlt-: So you do need an extra flag
[21:22:30] FLeiXiuS: Pictures are attachments. Pictures can be download and displayed in some instances.
[21:22:37] mlt-: I mean just don't create 2 DB tables, 2 controllers, etc
[21:22:37] FLeiXiuS: I want that to be handled in PROD via Nginx.
[21:22:44] FLeiXiuS: Oh yah for sure!
[21:24:03] justrying: has joined #RubyOnRails
[21:30:57] jrochkind: has joined #RubyOnRails
[21:31:21] ur5us: has joined #RubyOnRails
[21:54:34] MoskitoHero: has joined #RubyOnRails
[21:54:37] tdy: has joined #RubyOnRails
[22:02:26] roshanavand: has joined #RubyOnRails
[22:08:39] Radar: GOOD MORNING
[22:12:12] cagomez_: has joined #RubyOnRails
[22:12:45] Technodrome: has joined #RubyOnRails
[22:15:17] cagomez_: has joined #RubyOnRails
[22:18:57] Radar: FLeiXiuS: My version of an answer to your question would be this: host them on S3, but make sure that they're only accessible via presigned URLs. Generate the URLs on your server.
[22:19:17] FLeiXiuS: Radar, Private offline network, no internet access.
[22:19:22] Radar: well fuckl
[22:19:56] Radar: You sunk my battleship.
[23:03:13] alfiemax: has joined #RubyOnRails
[23:06:45] wethu: has joined #RubyOnRails
[23:19:05] tejasmanohar: has joined #RubyOnRails
[23:30:03] jerematic: has joined #RubyOnRails
[23:32:06] orbyt_: has joined #RubyOnRails
[23:32:55] fragamus: has joined #RubyOnRails
[23:36:07] schneider: has joined #RubyOnRails
[23:39:16] duderonomy: has joined #RubyOnRails
[23:46:16] cagomez_: has joined #RubyOnRails
[23:48:36] jerematic: has joined #RubyOnRails
[23:52:29] cagomez__: has joined #RubyOnRails
[23:58:30] orbyt_: has joined #RubyOnRails
[23:58:51] uksio: has joined #RubyOnRails