« Back to channel list

#RubyOnRails - 27 March 2018

« Back 1 day Forward 1 day »
[00:10:24] harryv: has joined #RubyOnRails
[00:11:53] jobewan: has joined #RubyOnRails
[00:22:05] harryv: has joined #RubyOnRails
[00:24:21] alfiemax: has joined #RubyOnRails
[00:34:19] riotjones: has joined #RubyOnRails
[00:50:07] jobewan: has joined #RubyOnRails
[00:54:32] harryv: has joined #RubyOnRails
[00:59:04] harrycs: has joined #RubyOnRails
[01:08:00] xpl0iter: has joined #RubyOnRails
[01:08:23] riotjones: has joined #RubyOnRails
[01:15:01] darkhanb: has joined #RubyOnRails
[01:16:56] alfiemax: has joined #RubyOnRails
[01:17:37] jobewan: has joined #RubyOnRails
[01:27:49] Radar: has joined #RubyOnRails
[01:39:59] workmad3: has joined #RubyOnRails
[01:43:47] Dimik: has joined #RubyOnRails
[01:43:56] riotjones: has joined #RubyOnRails
[01:46:22] cagomez: has joined #RubyOnRails
[02:01:09] ivanskie: has joined #RubyOnRails
[02:08:06] duderonomy: has joined #RubyOnRails
[02:09:21] ivanskie: am I using ActsAsTaggableOn right, if when i do Model.tagged_with("<tag>") returns an active record reloation in the console?
[02:14:48] riotjones: has joined #RubyOnRails
[02:17:50] kapil___: has joined #RubyOnRails
[02:36:31] jane_booty_doe: has joined #RubyOnRails
[02:38:14] kn-928: has joined #RubyOnRails
[02:39:04] harrycs: has joined #RubyOnRails
[02:48:14] riotjones: has joined #RubyOnRails
[02:49:43] harryv: has joined #RubyOnRails
[02:52:21] harryk_: has joined #RubyOnRails
[02:55:43] harryv: has joined #RubyOnRails
[03:03:53] harryk_: has joined #RubyOnRails
[03:08:48] LenPayne: has joined #RubyOnRails
[03:15:04] Saukk: has joined #RubyOnRails
[03:22:14] harryv: has joined #RubyOnRails
[03:25:41] riotjones: has joined #RubyOnRails
[03:38:16] ivanskie: has joined #RubyOnRails
[03:39:59] workmad3: has joined #RubyOnRails
[03:46:21] harryk_: has joined #RubyOnRails
[03:46:34] apeiros: has joined #RubyOnRails
[03:49:13] harrycs: has joined #RubyOnRails
[03:54:00] darkhanb: has joined #RubyOnRails
[03:56:01] GJdan: has joined #RubyOnRails
[03:59:20] riotjones: has joined #RubyOnRails
[04:00:00] orbyt_: has joined #RubyOnRails
[04:03:50] eckhardt: has joined #RubyOnRails
[04:07:14] darkhanb: has joined #RubyOnRails
[04:14:33] ivanskie: working on an app and running into a head scratcher situation.
[04:15:28] ivanskie: have pre-set tags. basically they are not modifiable by user. have a model that when an object is created it is assigned some tags.
[04:15:40] ivanskie: oh and there are several categories of tags.
[04:16:11] ivanskie: then we need to list these objects by most relevant result.
[04:16:30] ivanskie: acts_as_taggable_on seems like a dead end, and not the right solution.
[04:16:49] ivanskie: can anyone suggest a good solution to try?
[04:17:21] ivanskie: should we do a search instead?
[04:25:14] trautwein: has joined #RubyOnRails
[04:27:40] zacts: has joined #RubyOnRails
[04:31:04] riotjones: has joined #RubyOnRails
[04:49:00] jane_booty_doe: has joined #RubyOnRails
[05:11:02] reber: has joined #RubyOnRails
[05:38:27] riotjones: has joined #RubyOnRails
[05:39:59] workmad3: has joined #RubyOnRails
[05:45:55] wethu: has joined #RubyOnRails
[05:54:43] DrYockel: has joined #RubyOnRails
[05:57:31] za1b1tsu: has joined #RubyOnRails
[06:10:36] jcarl43: has joined #RubyOnRails
[06:13:37] KeyJoo: has joined #RubyOnRails
[06:14:37] riotjones: has joined #RubyOnRails
[06:21:01] kapil___: has joined #RubyOnRails
[06:21:08] conta: has joined #RubyOnRails
[06:22:40] marr: has joined #RubyOnRails
[06:30:30] shpoont_: has joined #RubyOnRails
[06:37:44] workmad3: has joined #RubyOnRails
[06:42:44] timdotrb: has joined #RubyOnRails
[06:49:27] timdotrb: has joined #RubyOnRails
[06:53:18] riotjones: has joined #RubyOnRails
[06:56:31] srinidhi: has joined #RubyOnRails
[06:57:46] timdotrb_: has joined #RubyOnRails
[07:07:38] dionysus69: has joined #RubyOnRails
[07:13:07] timdotrb_: has joined #RubyOnRails
[07:14:32] srinidhi: has joined #RubyOnRails
[07:24:39] schneider: has joined #RubyOnRails
[07:35:41] morfin: has joined #RubyOnRails
[07:45:44] uks: has joined #RubyOnRails
[07:49:25] uksio: has joined #RubyOnRails
[07:55:16] srinidhi: has joined #RubyOnRails
[08:03:24] za1b1tsu: has joined #RubyOnRails
[08:03:33] riotjones: has joined #RubyOnRails
[08:07:45] cagomez: has joined #RubyOnRails
[08:12:23] alfiemax: has joined #RubyOnRails
[08:18:49] KeyJoo: has joined #RubyOnRails
[08:21:09] DrYockel: has joined #RubyOnRails
[08:23:49] riotjones: has joined #RubyOnRails
[08:33:51] xpl0iter: has joined #RubyOnRails
[08:50:02] riotjones: has joined #RubyOnRails
[08:56:04] jottr: has joined #RubyOnRails
[09:02:09] srinidhi: has joined #RubyOnRails
[09:11:13] rikkipitt: has joined #RubyOnRails
[09:50:33] ferr: has joined #RubyOnRails
[10:01:03] wethu: has joined #RubyOnRails
[10:07:00] zwliew: has joined #RubyOnRails
[10:07:50] za1b1tsu_: has joined #RubyOnRails
[10:16:25] ur5us: has joined #RubyOnRails
[10:25:50] jottr: has joined #RubyOnRails
[10:41:18] workmad3: has joined #RubyOnRails
[10:43:52] Fernando-Basso: has joined #RubyOnRails
[10:50:24] wethu: has joined #RubyOnRails
[10:50:41] apparition: has joined #RubyOnRails
[10:53:28] srinidhi: has joined #RubyOnRails
[10:53:30] defsdoor: has joined #RubyOnRails
[10:58:22] rikkipitt: hey folks, anyone know how to test validate_presence_of has_many_attached in rails 5.2?
[11:06:14] shpoont_: has joined #RubyOnRails
[11:18:28] KeyJoo: has joined #RubyOnRails
[11:25:33] quazimodo: has joined #RubyOnRails
[11:29:18] Ergo: has joined #RubyOnRails
[11:54:36] Cavallari: has joined #RubyOnRails
[11:59:11] srinidhi: has joined #RubyOnRails
[12:17:27] ur5us: has joined #RubyOnRails
[12:18:07] shpoont_: has joined #RubyOnRails
[12:18:45] wethu: has joined #RubyOnRails
[12:23:52] ferr: has left #RubyOnRails: ("WeeChat 2.1")
[12:37:54] nme13: has joined #RubyOnRails
[12:39:24] nme13: please I need help, for some reason my views can't access @variables defined in controller (it worked well till now)
[12:40:58] nme13: + same code works well in rails console
[13:00:50] schneider: has joined #RubyOnRails
[13:01:00] nme13: deleted the for ... end
[13:01:16] nme13: then pasted it at the same place...
[13:01:19] nme13: it works now...
[13:01:36] nme13: seems ruby as some sort of unexplainable bugs...
[13:02:07] nme13: somebody can explain that ?
[13:04:59] rikkipitt: has joined #RubyOnRails
[13:26:12] kn-928: has joined #RubyOnRails
[13:32:17] DrYockel: has joined #RubyOnRails
[13:38:33] Sylario: has joined #RubyOnRails
[13:40:55] conta: has joined #RubyOnRails
[13:43:34] MrCrackPotBuilde: has joined #RubyOnRails
[13:44:45] defsdoor: has joined #RubyOnRails
[13:49:33] agent_white: Explain the unexplainable? That's inexplicable.
[13:58:28] za1b1tsu: has joined #RubyOnRails
[14:02:41] dviola: has joined #RubyOnRails
[14:08:50] orbyt_: has joined #RubyOnRails
[14:18:07] ur5us: has joined #RubyOnRails
[14:18:28] SteenJobs: has joined #RubyOnRails
[14:19:31] spohnz: has joined #RubyOnRails
[14:28:38] dionysus69: has joined #RubyOnRails
[14:31:52] Omnilord: has joined #RubyOnRails
[14:33:02] defsdoor: has joined #RubyOnRails
[14:37:46] tdelam: has joined #RubyOnRails
[14:41:23] harrycs: has joined #RubyOnRails
[14:48:26] Saukk: has joined #RubyOnRails
[15:03:15] jottr: has joined #RubyOnRails
[15:03:18] elcms: has joined #RubyOnRails
[15:05:06] za1b1tsu: has joined #RubyOnRails
[15:07:15] DrYockel: has joined #RubyOnRails
[15:09:37] jottr: has joined #RubyOnRails
[15:13:35] lxsameer: has joined #RubyOnRails
[15:20:31] mugurel: has joined #RubyOnRails
[15:21:05] mugurel: Anonymous survey - your help is greatly appreciated Hello everyone, I'd like to have a better idea (that's up to date and real, not possibly fake data) of how much Web Developers / Programmers in different parts of the world are paid. If anyone has 20 - 60 seconds to spare and fill the anonymous survey, it will be very helpful. You will find the survey here: https://goo.gl/forms/gzNw7PWc3h9hWnTL2 After I get enough answers I
[15:23:56] jottr: has joined #RubyOnRails
[15:29:50] jottr: has joined #RubyOnRails
[15:32:44] SteenJobs: has joined #RubyOnRails
[15:33:22] nme13: has joined #RubyOnRails
[15:34:50] schneider: has joined #RubyOnRails
[15:36:31] nme13: is it possible to make an activerecord query like this : where("field1 = A OR field2 = A ORDER BY created_at ASC")
[15:40:28] jottr: has joined #RubyOnRails
[15:42:26] troys: has joined #RubyOnRails
[15:44:29] Omnilord: nme13, it should be find. If you need to pass in a parameter, you can do this: .where("field1 = :param1 OR field2 = :param1 ORDER BY created_at ASC", param1: 'A')
[15:49:45] cagomez: has joined #RubyOnRails
[15:49:49] harryv: has joined #RubyOnRails
[15:50:46] cagomez: has joined #RubyOnRails
[15:51:54] harryk_: has joined #RubyOnRails
[15:52:36] SteenJobs: has joined #RubyOnRails
[15:55:12] jcarl43: has joined #RubyOnRails
[15:55:13] [Butch]: has joined #RubyOnRails
[15:55:25] jottr: has joined #RubyOnRails
[15:55:41] kapil___: has joined #RubyOnRails
[15:56:54] cagomez: if I do User.preload(:account).select('user.*, accounts.id').joins('inner join accounts ON accounts.user_id=user.id').where("accounts.status='some_status'"). does the Preload() respect the WHERE conditions?
[15:57:26] cagomez: And, if I do `select(`some_table.*`, does I even need to preload? I thought a joined table already does the preloading
[15:59:33] Omnilord: cagomez, you might be interested in https://apidock.com/rails/ActiveRecord/QueryMethods/includes
[16:01:43] Omnilord: This might be better documentation: http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
[16:01:53] jottr: has joined #RubyOnRails
[16:10:57] one_zero: has joined #RubyOnRails
[16:11:50] jottr: has joined #RubyOnRails
[16:14:24] jcarl43: has joined #RubyOnRails
[16:17:58] darkhanb: has joined #RubyOnRails
[16:18:50] ur5us: has joined #RubyOnRails
[16:19:25] conta: has joined #RubyOnRails
[16:20:11] spohnz: Morning all, I have a question that someone might have a good idea on me solving. I have a bug_tracker.comments field. It occurred to me that possibly more than one user will want to make a comment. Without having to create a new table or field, can I append to the comments with a delimeter and save with current_user.username concatenated with it?
[16:21:56] apeiros: has joined #RubyOnRails
[16:21:58] jottr: has joined #RubyOnRails
[16:22:33] DylanJ: spohnz: you can of course do that, but it's goofy. instead create a comments model with a relationshup to the bug_tracker model (assuming a bug_tracker is like, a single bug).
[16:28:31] spohnz: ill have to go with the goofy answer if you have one
[16:29:57] spohnz: I will correct it when the next sprint comes up for the bug page
[16:30:23] spohnz: as it is now, there are only 3 devs so this will work
[16:30:29] spohnz: *for now*
[16:30:44] Omnilord: If you are using PostgreSQL, you can make the field an array, then you have less delimiting to parse.
[16:31:21] spohnz: we are, and thank you that was a good idea
[16:33:54] nme13: has joined #RubyOnRails
[16:34:16] nme13: is there a way to sort this by date ??????? >
[16:34:18] nme13: {2=>Fri, 19 Jan 2018 17:57:23 UTC +00:00, 1=>Tue, 27 Mar 2018 15:00:11 UTC +00:00, 4=>Fri, 19 Jan 2018 13:47:23 UTC +00:00}
[16:35:07] mjolnird: has joined #RubyOnRails
[16:35:43] MrPunkin: has joined #RubyOnRails
[16:36:08] jottr: has joined #RubyOnRails
[16:38:55] SteenJobs: has joined #RubyOnRails
[16:39:34] MrPunkin: Can anyone tell me what a Rails 5 way to have a delete button within the same form as an edit form? I can obviously move the button outside the form and re-style the page to account for that, but there must be some way around this where I can have a button that generates a delete request with valid authenticity_token right?
[16:40:25] schneider: has joined #RubyOnRails
[16:46:15] elcms: has joined #RubyOnRails
[16:47:02] jottr: has joined #RubyOnRails
[16:54:20] mustmodify: has joined #RubyOnRails
[16:54:35] mustmodify: I transitioned a heavily-used site to a new server.
[16:54:48] mustmodify: Where heavily used ~ 200 RPM
[16:55:26] mustmodify: Site works great, but the whenever jobs aren't firing because cron doesn't have the right environment... chruby being one.
[16:55:48] mustmodify: I tried to create a script at script/env-init that would call chruby, set environmental variables, etc...
[16:56:51] dionysus69: has joined #RubyOnRails
[17:17:40] Cache_Money: has joined #RubyOnRails
[17:23:06] FrostCandy: has joined #RubyOnRails
[17:24:52] FrostCandy: so i run a o = Table.where(:id => 1), then o.field = "hi", then o.save. I get an error undefined method field= for table::ActiveRecord_Reltion
[17:25:24] FrostCandy: whats wrong with assinging o.field = a string? my database has the field , should work
[17:25:53] FrostCandy: if i inspect o, it shows field nil
[17:26:01] FrostCandy: because nothing is in it yet of course
[17:31:50] jottr: has joined #RubyOnRails
[17:33:27] FrostCandy: oh thats intersting adding a [0] or .first to my where call is probably whats going on here.
[17:33:57] FrostCandy: yup, should have guessed where would return an array.
[17:34:22] cagomez: I have an existing integer column on a model. It is a primary key for another table, but it was never created as a Foreign Key. How do do I make the column a foreign key? can I use add_foreign_key?
[17:36:19] jcarl43: has joined #RubyOnRails
[17:41:18] jottr: has joined #RubyOnRails
[17:49:13] mustmodify: has left #RubyOnRails: ()
[17:51:34] sameerynho: has joined #RubyOnRails
[17:57:15] alfiemax: has joined #RubyOnRails
[18:00:00] jottr: has joined #RubyOnRails
[18:03:54] woohoou: has joined #RubyOnRails
[18:06:27] Avon: has joined #RubyOnRails
[18:07:32] jottr: has joined #RubyOnRails
[18:11:46] spohnz: has joined #RubyOnRails
[18:15:29] elcms: has joined #RubyOnRails
[18:16:45] ur5us: has joined #RubyOnRails
[18:20:43] jottr: has joined #RubyOnRails
[18:20:48] spohnz: if in my users table, if I have a users.admin boolean set to false, how can I exclude a dropdown in my view?
[18:30:54] dionysus69: has joined #RubyOnRails
[18:33:34] jottr: has joined #RubyOnRails
[18:37:04] peterhil: has joined #RubyOnRails
[18:43:33] rikkipitt: has joined #RubyOnRails
[18:47:39] jottr: has joined #RubyOnRails
[18:48:00] kapil___: has joined #RubyOnRails
[18:51:43] alfiemax: has joined #RubyOnRails
[18:57:59] alfiemax: has joined #RubyOnRails
[18:59:59] jottr: has joined #RubyOnRails
[19:03:27] srinidhi: has joined #RubyOnRails
[19:05:09] SteenJobs: has joined #RubyOnRails
[19:12:51] gambl0re: has joined #RubyOnRails
[19:18:22] rikkipitt: has joined #RubyOnRails
[19:19:41] cagomez: has joined #RubyOnRails
[19:23:13] jottr: has joined #RubyOnRails
[19:24:55] moei: has joined #RubyOnRails
[19:27:16] riotjoe: has joined #RubyOnRails
[19:27:58] safetypin: has joined #RubyOnRails
[19:29:58] jottr: has joined #RubyOnRails
[19:30:49] duderonomy: has joined #RubyOnRails
[19:36:39] Cavallari: has joined #RubyOnRails
[19:37:57] reber: has joined #RubyOnRails
[19:40:28] jottr: has joined #RubyOnRails
[19:42:24] cagomez: has joined #RubyOnRails
[19:43:31] duderonomy: has joined #RubyOnRails
[19:45:17] alfiemax: has joined #RubyOnRails
[19:49:24] elcms: has joined #RubyOnRails
[19:56:13] cagomez: has joined #RubyOnRails
[19:56:15] moei: has joined #RubyOnRails
[19:58:14] alfiemax: has joined #RubyOnRails
[19:59:56] darkhanb: has joined #RubyOnRails
[20:05:42] darkhanb: has joined #RubyOnRails
[20:13:03] cschneid: has joined #RubyOnRails
[20:15:19] gambl0re: has joined #RubyOnRails
[20:18:17] Ryzokuken: has joined #RubyOnRails
[20:21:42] apeiros: has joined #RubyOnRails
[20:21:53] cagomez: has joined #RubyOnRails
[20:22:31] acovrig: has joined #RubyOnRails
[20:23:17] acovrig: Has anyone gotten devise_token_auth to work? I can install it and things are fine until I try <% if user_signed_in? %> in my application.html.erb on a devise route (/users/sign_in)
[20:24:33] yoones: has joined #RubyOnRails
[20:26:24] yoones: Hi! I'm working on an app with the following config: `config.time_zone = 'UTC' ; config.active_record.default_timezone = :utc`. I'm in France, which means I can be either in GTM+1 or GTM+2 depending on the current date. How can I store in database a time field that would, all year-long, say "7:30pm" ?
[20:27:11] yoones: (say 7:30pm" not in UTC but GTM+1/2)
[20:28:48] waseem_: has joined #RubyOnRails
[20:38:12] jottr: has joined #RubyOnRails
[20:41:26] rikkipitt: has joined #RubyOnRails
[20:42:59] darkhanb: has joined #RubyOnRails
[20:49:36] apeiros: has joined #RubyOnRails
[20:50:50] Cache_Money: has joined #RubyOnRails
[20:56:46] daveomcd: has joined #RubyOnRails
[20:58:12] daveomcd: I'm working with Action Cable on my project, and in my development window that I run my server in I continually see lines saying saying it registered a connection. Or is now transmitting data. Should I see these on each new page reload/load ? Or should I only see it registering a connection once initially?
[21:05:36] Radar: GOOD MORNING
[21:08:09] Radar: yoones: you're probably after a "time with zone" field.
[21:08:21] Radar: yoones: see: https://www.postgresql.org/docs/10/static/datatype-datetime.html
[21:11:28] jottr: has joined #RubyOnRails
[21:18:44] fox_mulder_cp: how i can proper implement #each for my plain ruby object?
[21:20:26] havenwood: fox_mulder_cp: What's it going to be enumerating over?
[21:21:44] fox_mulder_cp: havenwood: my custom class instances in array.
[21:21:46] havenwood: fox_mulder_cp: def each; yield 42 end
[21:22:26] fox_mulder_cp: what can i pass to yield
[21:22:49] havenwood: fox_mulder_cp: This is probably a better question for the #ruby channel! ;-)
[21:28:12] harrycs: has joined #RubyOnRails
[21:30:00] harryv: has joined #RubyOnRails
[21:43:49] schneider: has joined #RubyOnRails
[21:45:05] SteenJobs: has joined #RubyOnRails
[21:46:05] rikkipitt: has joined #RubyOnRails
[21:48:33] jottr: has joined #RubyOnRails
[22:05:18] seejay: has joined #RubyOnRails
[22:05:54] seejay: hi I cloned a ruby app today and having some issue
[22:06:05] seejay: Webpacker can't find application.js in /home/ubuntu/workspace/public/packs/manifest.json. Possible causes:
[22:06:22] seejay: 1. You want to set webpacker.yml value of compile to true for your environment unless you are using the `webpack -w` or the webpack-dev-server. 2. webpack has not yet re-run to reflect updates. 3. You have misconfigured Webpacker's config/webpacker.yml file. 4. Your webpack configuration is not creating a manifest. Your manifest contains: { } ):
[22:08:31] tdy: has joined #RubyOnRails
[22:10:24] elcms: has joined #RubyOnRails
[22:19:19] gambl0re: has joined #RubyOnRails
[22:21:36] jottr: has joined #RubyOnRails
[22:33:54] elcms: has joined #RubyOnRails
[22:44:11] wethu: has joined #RubyOnRails
[22:49:53] SteenJobs: has joined #RubyOnRails
[22:54:34] SteenJobs: has joined #RubyOnRails
[23:03:03] Intii: has joined #RubyOnRails
[23:05:21] Intii: Hey all... I have a logic question that I'm not sure how to approach. In my app users have stored all appointment dates as PST. I want to convert them all to UTC to make it easier for people who are not based in the PST time zone. I went ahead and did an update on my DB to add 8 to each appointment's hour to convert it to UTC. Problem is, since we're -7 cause of DST, all the appointments are off by an hour
[23:05:30] Intii: What's the best approach to fix that issue?
[23:09:40] Intii: I figured, I could re-update the database and add 7 to each hour to get the right time NOW but what about when DST is over.. Will I have any issues then?
[23:14:09] duderonomy: has joined #RubyOnRails
[23:17:47] Intii: Or am I worrying about nothing?
[23:18:08] cschneid: has joined #RubyOnRails
[23:21:26] Intii: Would the best bet be to convert them to +8 hours of the current start time and then offset it by an hour if we are in DST? That way all appointment times are consistent.
[23:21:28] quazimodo: has joined #RubyOnRails
[23:29:03] cschneid: has joined #RubyOnRails
[23:53:10] thomasfedb: Trying to work out how best to expire my fragment caches when other data that affects their display is updated.
[23:53:36] morfin: has joined #RubyOnRails
[23:54:01] thomasfedb: e.g. User has many Badges. If I rename a badge, I need to rerender the user profile partial.
[23:54:29] thomasfedb: But it doesn't make sense to touch every user in the app when a badge gets updated
[23:56:03] cagomez: has joined #RubyOnRails
[23:57:00] jottr: has joined #RubyOnRails