« Back to channel list

#RubyOnRails - 12 May 2018

« Back 1 day Forward 1 day »
[00:06:18] prahal: has joined #RubyOnRails
[00:06:28] dogweather: has joined #RubyOnRails
[00:19:50] dogweather: has joined #RubyOnRails
[00:20:55] cagomez: has joined #RubyOnRails
[00:23:48] mikecmpbll: has joined #RubyOnRails
[00:28:09] cagomez: has joined #RubyOnRails
[00:38:22] prahal: has joined #RubyOnRails
[00:41:20] quazimodo: has joined #RubyOnRails
[00:52:29] anoob: has joined #RubyOnRails
[00:54:33] anoob: I have this route: `get '/:id', to: 'foo#bar', constraints: { id: /\d+/ }` and it works great. except for /404 and /500 (static error pages) for example. how can i handle it? if there is a record with id 404 i want to display the record, else, i want to display the 404 static page ...
[01:18:20] tdy: has joined #RubyOnRails
[01:23:31] cagomez: has joined #RubyOnRails
[01:24:21] Jameser: has joined #RubyOnRails
[01:27:09] Jameser: has joined #RubyOnRails
[01:39:18] darkhanb: has joined #RubyOnRails
[01:47:21] alfiemax: has joined #RubyOnRails
[01:51:19] kapil___: has joined #RubyOnRails
[02:01:10] Technodrome: has joined #RubyOnRails
[02:17:15] Jameser: has joined #RubyOnRails
[02:28:09] _aeris_: has joined #RubyOnRails
[02:47:15] Jameser: has joined #RubyOnRails
[02:48:20] cschneid_: has joined #RubyOnRails
[02:51:41] alfiemax: has joined #RubyOnRails
[02:55:10] alfiemax_: has joined #RubyOnRails
[02:57:51] sevenseacat: has joined #RubyOnRails
[03:11:58] Cyrus: has joined #RubyOnRails
[03:16:40] Dimik: has joined #RubyOnRails
[03:18:04] big_reggie: has joined #RubyOnRails
[03:18:13] big_reggie: is there a way to tell which status code an exception will render in production?
[03:18:41] big_reggie: besides slugging through the code for each exception
[03:18:49] big_reggie: i tried looking for any documentation and not having any luck
[04:11:21] shynoob: has joined #RubyOnRails
[04:12:55] shynoob: has joined #RubyOnRails
[04:14:48] shynoob: has joined #RubyOnRails
[04:16:12] shynoob: what's the best linux distro to run on server for rails deployment
[04:28:24] roamingdog: has joined #RubyOnRails
[04:29:03] papajo: has joined #RubyOnRails
[04:39:30] Technodrome: has joined #RubyOnRails
[04:39:34] Jameser: has joined #RubyOnRails
[04:51:13] tacoboy: has joined #RubyOnRails
[05:03:34] segy: has joined #RubyOnRails
[05:04:48] Jameser: has joined #RubyOnRails
[05:14:37] quazimod1: has joined #RubyOnRails
[05:14:45] quazimod1: here'sa new one
[05:15:06] quazimod1: sharing redis between sidekiq and rails caching
[05:17:04] quazimod1: what are our thoughts, all good?
[05:18:24] quazimod1: or do i need to namespace things
[05:24:19] big_reggie: has joined #RubyOnRails
[05:29:28] roamingdog: has joined #RubyOnRails
[05:46:05] Jameser: has joined #RubyOnRails
[05:47:07] qnaal: has joined #RubyOnRails
[06:10:57] Saukk: has joined #RubyOnRails
[06:29:35] Jameser: has joined #RubyOnRails
[06:56:08] blackmesa: has joined #RubyOnRails
[06:57:32] agent_white: has joined #RubyOnRails
[06:57:47] armyriad: has joined #RubyOnRails
[07:00:51] vedu_: has joined #RubyOnRails
[07:03:03] apeiros: has joined #RubyOnRails
[07:20:08] ariejan: has joined #RubyOnRails
[07:26:37] dionysus69: has joined #RubyOnRails
[07:44:41] quazimodo: has joined #RubyOnRails
[07:47:06] blitz: has joined #RubyOnRails
[07:47:33] andrew9184: has joined #RubyOnRails
[07:55:50] drale2k_: has joined #RubyOnRails
[08:03:05] qnaal: has joined #RubyOnRails
[08:05:12] marr: has joined #RubyOnRails
[08:07:35] ur5us: has joined #RubyOnRails
[08:08:47] ur5us: has joined #RubyOnRails
[08:09:23] apparition: has joined #RubyOnRails
[08:44:37] conta: has joined #RubyOnRails
[08:50:40] ur5us: has joined #RubyOnRails
[08:52:05] mikecmpbll: has joined #RubyOnRails
[08:55:23] Technodrome: has joined #RubyOnRails
[09:07:00] DTZUZO_: has joined #RubyOnRails
[09:11:46] qnaal: has joined #RubyOnRails
[09:13:10] ellcs: has joined #RubyOnRails
[09:17:53] dachi: has joined #RubyOnRails
[09:21:13] dachi: Hi. I have one question. In my controller I'm serving image files from mail attachments. https://pastebin.com/11jsshJ9
[09:21:24] dachi: If I visit those routes with browser then all is ok
[09:21:43] dachi: But when I have multiple <img src=""/> with different routes, they sometimes show same pictures
[09:21:55] dachi: Do you know why might this be happening?
[09:26:20] dachi: * routes are all different like /messages/:id/inline/:attachment_id
[09:27:09] dachi: I won't require adding `&${+new Date()}` for example.
[09:38:08] roamingdog: has joined #RubyOnRails
[10:01:52] sameerynho: has joined #RubyOnRails
[10:05:47] jnollette: has joined #RubyOnRails
[10:10:32] Radar: shynoGOOD EVENING
[10:37:25] apeiros: moin Radar, oy sevenseacat
[10:43:07] ariejan: has joined #RubyOnRails
[10:45:32] schneider: has joined #RubyOnRails
[10:51:15] ur5us: has joined #RubyOnRails
[10:53:25] drale2k_: has joined #RubyOnRails
[11:04:26] mices: has joined #RubyOnRails
[11:04:33] mices: i'm submitting from show post view to transactions controller post method by using an ajax request but when the create action in transactions controller tries to redirect the log says redirecting but the page doesn't redirect
[11:09:33] arup_r: has joined #RubyOnRails
[11:11:29] ellcs: has joined #RubyOnRails
[11:13:24] ellcs: has left #RubyOnRails: ()
[11:29:04] ariejan: has joined #RubyOnRails
[11:46:40] gheegh: has joined #RubyOnRails
[11:47:58] segy: has joined #RubyOnRails
[11:52:17] GodFather: has joined #RubyOnRails
[11:57:56] samosaphile: has joined #RubyOnRails
[12:12:44] jane_booty_doe: has joined #RubyOnRails
[12:22:14] cagomez: has joined #RubyOnRails
[12:22:52] GodFather: has joined #RubyOnRails
[12:32:47] qnaal: has joined #RubyOnRails
[12:33:03] jottr: has joined #RubyOnRails
[12:35:22] dachi: has joined #RubyOnRails
[12:35:44] dachi: I've been dealing with this for for a while.. Could anyone help? https://stackoverflow.com/questions/50305089/wrong-image-sometimes-same-is-displayed-when-serving-them-over-route?noredirect=1#comment87628522_50305089
[12:36:00] dachi: Same thing implemented with Nodejs works...
[12:37:52] za1b1tsu_: has joined #RubyOnRails
[12:37:57] dachi: I'm using Rails 5.2
[12:42:15] arup_r: dachi: I just read it.. still not get the problem.. :)
[12:42:44] dachi: arup_r: thanks
[12:42:54] arup_r: Are you requesting image blob over api?
[12:43:51] dachi: Filename is in @message, @message is set on set_message action that runs in before_action :inline
[12:44:07] dachi: I'm then reading file data and outputting it
[12:44:49] dachi: I have tried render plain: File.read, IO.binread etc, I have tried send_file, send_data..
[12:45:04] dachi: All of these behave similarly. Everything is ok if I view files in separate tabs
[12:45:07] dachi: Images are shown.
[12:45:24] dachi: But when I use <img src="...1" /> <img src="...2" />
[12:45:51] dachi: Then they're not displayed correctly. Sometimes they change order, sometimes they appear as one and the same.
[12:45:58] dachi: I just don't understand why this happens...
[12:46:28] dachi: I even thought there was something wrong with my local browser environment
[12:46:50] arup_r: Hm.. Did you see network tab if server sent correct data?
[12:46:58] dachi: So I checked this with similar static file server implementation with node.js and it was ok
[12:47:05] dachi: In network tab it's not correct either.
[12:47:16] dachi: It's displayed wrongly, but when I right click and click on 'Open in new tab
[12:47:21] dachi: then there's correct.
[12:47:28] dachi: Same thing happens in Firefox as well..
[12:47:46] dachi: I have tried adding ?time= to src urls too..
[12:52:02] ur5us: has joined #RubyOnRails
[12:53:02] DTZUZO_: has joined #RubyOnRails
[13:01:25] vedu_: has joined #RubyOnRails
[13:05:39] Jameser: has joined #RubyOnRails
[13:14:34] dachi: has joined #RubyOnRails
[13:15:06] dachi: I solved my problem.
[13:15:17] dachi: Previously I have written a custom rack middleware
[13:15:25] dachi: And that middleware was causing problem to this.
[13:15:37] dachi: Thanks everyone who tried to help and sorry.
[13:17:39] gambl0re: has joined #RubyOnRails
[13:22:55] anoob: has joined #RubyOnRails
[13:24:39] jottr: has joined #RubyOnRails
[13:27:22] quazimodo: has joined #RubyOnRails
[13:28:52] Voxxit: has joined #RubyOnRails
[13:31:04] webdestroya: has joined #RubyOnRails
[13:36:52] alfiemax: has joined #RubyOnRails
[13:38:59] prahal: has joined #RubyOnRails
[13:39:54] prahal: has joined #RubyOnRails
[13:41:02] DoubleMalt: has joined #RubyOnRails
[13:54:15] roamingdog: has joined #RubyOnRails
[13:55:35] Saukk: has joined #RubyOnRails
[13:57:44] drale2k_: has joined #RubyOnRails
[14:01:22] jottr: has joined #RubyOnRails
[14:01:47] anoob: I'm not sure how to handle this problem with my dynamic routes clashing with rails static pages (/404, /500 ...): https://stackoverflow.com/q/50302027/1906809
[14:02:56] gheegh: has joined #RubyOnRails
[14:08:16] nickjj: has joined #RubyOnRails
[14:08:45] andywww: has joined #RubyOnRails
[14:09:20] apeiros: has joined #RubyOnRails
[14:15:20] apparition: has joined #RubyOnRails
[14:21:57] wilornel: has joined #RubyOnRails
[14:25:09] ellcs: has joined #RubyOnRails
[14:28:44] Dimik: has joined #RubyOnRails
[14:39:33] alfiemax: has joined #RubyOnRails
[14:45:48] DoubleMalt: has joined #RubyOnRails
[14:56:04] qnaal: has joined #RubyOnRails
[15:08:39] za1b1tsu_: has joined #RubyOnRails
[15:17:06] ariejan: has joined #RubyOnRails
[15:17:09] nickjj: has joined #RubyOnRails
[15:24:31] gheegh: has joined #RubyOnRails
[15:25:55] nickjj: has joined #RubyOnRails
[15:32:24] qnaal: has joined #RubyOnRails
[15:33:58] vedu_: has joined #RubyOnRails
[15:40:22] za1b1tsu_: has joined #RubyOnRails
[15:40:43] Dimik: has joined #RubyOnRails
[15:52:41] gheegh: has joined #RubyOnRails
[15:53:46] Technodrome: has joined #RubyOnRails
[15:56:03] gheegh: has joined #RubyOnRails
[15:59:29] conta: has joined #RubyOnRails
[16:03:22] cagomez: has joined #RubyOnRails
[16:15:54] za1b1tsu_: has joined #RubyOnRails
[16:20:11] gheegh: has joined #RubyOnRails
[16:28:33] alfiemax: has joined #RubyOnRails
[16:41:15] gheegh: has joined #RubyOnRails
[16:45:14] dionysus69: has joined #RubyOnRails
[16:47:28] vedu_: has joined #RubyOnRails
[16:47:58] orbyt_: has joined #RubyOnRails
[16:49:23] conta: has joined #RubyOnRails
[16:55:07] alfiemax: has joined #RubyOnRails
[17:07:21] conta: has joined #RubyOnRails
[17:13:10] conta: has joined #RubyOnRails
[17:18:19] ariejan: has joined #RubyOnRails
[17:21:22] conta: has joined #RubyOnRails
[17:25:02] conta: has joined #RubyOnRails
[17:28:42] alfiemax: has joined #RubyOnRails
[17:31:42] gheegh: has joined #RubyOnRails
[17:31:57] za1b1tsu_: has joined #RubyOnRails
[17:33:26] conta: has joined #RubyOnRails
[17:35:15] conta: has joined #RubyOnRails
[17:38:00] gheegh: has joined #RubyOnRails
[17:39:13] alfiemax_: has joined #RubyOnRails
[17:47:06] prahal: has joined #RubyOnRails
[17:49:40] conta: has joined #RubyOnRails
[17:55:31] conta: has joined #RubyOnRails
[17:55:51] arup_r: has joined #RubyOnRails
[17:57:57] gheegh: has joined #RubyOnRails
[18:03:48] za1b1tsu_: has joined #RubyOnRails
[18:03:54] conta: has joined #RubyOnRails
[18:04:28] vedu_: has joined #RubyOnRails
[18:07:28] ariejan: has joined #RubyOnRails
[18:08:03] Gizmokid2005: has joined #RubyOnRails
[18:13:56] brnard: has joined #RubyOnRails
[18:14:53] brnard: Somebody happens to now how it is possible to set a default value for the create action in admin_rails for a has_many :through association?
[18:17:40] arup_r: has joined #RubyOnRails
[18:21:00] gheegh: has joined #RubyOnRails
[18:26:08] andywww: has joined #RubyOnRails
[18:44:09] drale2k_: has joined #RubyOnRails
[18:45:14] dionysus69: has joined #RubyOnRails
[18:46:34] cagomez: has joined #RubyOnRails
[18:48:29] cagomez: has joined #RubyOnRails
[18:55:52] vedu_: has joined #RubyOnRails
[19:04:32] gheegh: has joined #RubyOnRails
[19:05:28] tomaw: has joined #RubyOnRails
[19:08:03] cagomez: has joined #RubyOnRails
[19:11:05] kies^: has joined #RubyOnRails
[19:23:43] conta: has joined #RubyOnRails
[19:45:23] gambl0re: has joined #RubyOnRails
[19:50:03] DoubleMalt: has joined #RubyOnRails
[19:52:28] ellcs: has joined #RubyOnRails
[19:59:21] ariejan: has joined #RubyOnRails
[20:31:48] eckhardt: has joined #RubyOnRails
[20:33:51] uks: has joined #RubyOnRails
[20:47:15] dipnlik: has joined #RubyOnRails
[20:53:14] orbyt_: has joined #RubyOnRails
[20:55:47] ariejan: has joined #RubyOnRails
[21:18:35] prahal: has joined #RubyOnRails
[21:19:20] prahal: has joined #RubyOnRails
[21:20:44] kapil___: has joined #RubyOnRails
[21:26:07] mices: has joined #RubyOnRails
[21:27:28] dviola: has joined #RubyOnRails
[21:29:04] mices: i sent a post request by ajax from a script embedded in an html.erb page (posts/show.html.erb) to the transactions controller which creates a new transaction and redirects to transactions/show/:id, the log says redirected but the page doesn't change
[21:37:45] apeiros: mices: because ajax doesn't care about a redirect in a response
[21:37:50] apeiros: you have to handle that in your js code
[21:38:18] mices: why can't i respond html to an ajax request
[21:38:37] apeiros: did I say you can't?
[21:39:04] apeiros: the point is: your script handles the response, not the browser directly. hence your script has to make happen what you want to happen.
[21:39:04] mices: so i have to say i want an html response in my request?
[21:39:57] mices: i imagine the script expects it own container to be the dom element the response fills
[21:40:07] mices: by responding js
[21:40:21] apeiros: the script expects nothing. you write the script. you make the expectations. it's literally *your code*
[21:40:22] mices: and i'm doing something weird by not responding js?
[21:40:34] GodFather: has joined #RubyOnRails
[21:40:52] mices: the script makes a successful post to the controller
[21:41:34] apeiros: yes. and the controller responds according to your controller code. the browser gets that response and does nothing with it except passing it along to *your script* again. and *your script* has to decide what to do with the response.
[21:42:17] apeiros: that's like the main point of ajax.
[21:43:10] apeiros: it's entirely up to you whether you want that controller to respond with json and process the json in your client side script. or whether you want your controller to return fully rendered html which you use in some way in your script.
[21:44:18] apeiros: and if you want to respond with a redirect, the redirect information is in the response headers.
[21:45:22] apeiros: (though nothing stops you from sending an url in a json response and use that in your client side code)
[21:49:43] mices: it seems i should google responding to ajax requests
[21:52:13] tdy: has joined #RubyOnRails
[21:53:10] weaksauce: has joined #RubyOnRails
[21:53:33] orbyt_: has joined #RubyOnRails
[22:11:58] gambl0re: has joined #RubyOnRails
[22:12:37] jnollette: has joined #RubyOnRails
[22:16:50] Technodrome: has joined #RubyOnRails
[22:20:50] roamingdog: has joined #RubyOnRails
[22:24:57] ellcs: has joined #RubyOnRails
[22:33:47] uksio: has joined #RubyOnRails
[22:40:27] tdy: has joined #RubyOnRails
[23:01:56] Technodrome: has joined #RubyOnRails
[23:05:02] cagomez: has joined #RubyOnRails
[23:19:35] prahal: has joined #RubyOnRails
[23:20:33] prahal: has joined #RubyOnRails
[23:29:26] Technodrome: has joined #RubyOnRails
[23:49:46] ur5us: has joined #RubyOnRails
[23:52:01] andrew9184: has joined #RubyOnRails