« Back to channel list

#RubyOnRails - 06 April 2017

« Back 1 day Forward 1 day »
[00:00:34] tildes: has joined #RubyOnRails
[00:01:15] uksio: has joined #RubyOnRails
[00:06:07] GodFather: has joined #RubyOnRails
[00:08:29] akshat: has joined #RubyOnRails
[00:14:17] FCser: has joined #RubyOnRails
[00:14:18] weaksauce: has joined #RubyOnRails
[00:19:08] bronson: has joined #RubyOnRails
[00:20:00] am55: has joined #RubyOnRails
[00:26:03] rakm: has joined #RubyOnRails
[00:26:52] babykosh: has joined #RubyOnRails
[00:32:26] Rodya_: has joined #RubyOnRails
[00:35:54] pwnd_nsfw`: has joined #RubyOnRails
[00:38:50] kiltzman: has joined #RubyOnRails
[00:46:50] shinnya: has joined #RubyOnRails
[00:51:13] byteflame: has joined #RubyOnRails
[00:58:31] bronson: has joined #RubyOnRails
[01:00:35] Rodya_: has joined #RubyOnRails
[01:08:01] nya: has joined #RubyOnRails
[01:08:09] jusa: has joined #RubyOnRails
[01:10:28] gusrub: has joined #RubyOnRails
[01:12:17] marcdel: has joined #RubyOnRails
[01:13:44] arBmind: has joined #RubyOnRails
[01:15:10] ahrs: has joined #RubyOnRails
[01:18:46] sevenseacat: has joined #RubyOnRails
[01:19:40] marcdel: has joined #RubyOnRails
[01:20:31] MasterAsia: has joined #RubyOnRails
[01:24:39] cschneid_: has joined #RubyOnRails
[01:25:44] cschneid_: has joined #RubyOnRails
[01:27:09] cschneid_: has joined #RubyOnRails
[01:28:06] romeoh: has joined #RubyOnRails
[01:30:49] jaequery_: has joined #RubyOnRails
[01:38:33] pwnd_nsfw: has joined #RubyOnRails
[01:41:05] Trynemjoel: has joined #RubyOnRails
[01:43:13] marcdel: has joined #RubyOnRails
[01:46:46] superlou: has joined #RubyOnRails
[01:49:05] duderonomy: has joined #RubyOnRails
[01:51:34] Trynemjoel: has joined #RubyOnRails
[01:54:47] bronson: has joined #RubyOnRails
[01:56:04] DoctorMonocular: has joined #RubyOnRails
[01:58:24] Trynemjoel: has joined #RubyOnRails
[02:05:35] nya: has joined #RubyOnRails
[02:06:11] libastral: has joined #RubyOnRails
[02:07:13] Jayson_Virissimo: has joined #RubyOnRails
[02:12:46] Rodya_: has joined #RubyOnRails
[02:14:10] neilfse: has joined #RubyOnRails
[02:18:16] rakm: has joined #RubyOnRails
[02:18:30] `: has joined #RubyOnRails
[02:20:24] sevenseacat: has joined #RubyOnRails
[02:20:45] harfangk: has joined #RubyOnRails
[02:21:13] Trynemjoel: has joined #RubyOnRails
[02:21:55] marcdel: has joined #RubyOnRails
[02:22:38] nahtnam: has joined #RubyOnRails
[02:26:07] Trynemjoel: has joined #RubyOnRails
[02:27:03] jenrzzz: has joined #RubyOnRails
[02:30:06] fox_mulder_cp: has joined #RubyOnRails
[02:33:47] spicerack: has joined #RubyOnRails
[02:39:36] byteflame: has joined #RubyOnRails
[02:41:32] jeyraof^mbpr: has joined #RubyOnRails
[02:44:49] knight33: has joined #RubyOnRails
[02:47:31] djbkd: has joined #RubyOnRails
[02:53:14] Trynemjoel: has joined #RubyOnRails
[02:55:43] username: has joined #RubyOnRails
[02:56:05] haiming: has joined #RubyOnRails
[02:56:07] mrgreenfur: has joined #RubyOnRails
[03:02:42] brendan-: has joined #RubyOnRails
[03:03:47] irishfromua: has joined #RubyOnRails
[03:04:38] quazimodo: has joined #RubyOnRails
[03:09:44] rogue_koder: has joined #RubyOnRails
[03:17:41] Trynemjoel: has joined #RubyOnRails
[03:23:09] patarr: has joined #RubyOnRails
[03:25:46] Trynemjoel: has joined #RubyOnRails
[03:33:43] Trynemjoel: has joined #RubyOnRails
[03:33:53] bbrowning_: has joined #RubyOnRails
[03:34:10] irishfromua: has joined #RubyOnRails
[03:38:37] bga57: has joined #RubyOnRails
[03:48:28] GodFather: has joined #RubyOnRails
[03:57:34] spicerack: has joined #RubyOnRails
[04:00:18] bawsky: has joined #RubyOnRails
[04:02:46] SteenJobs_: has joined #RubyOnRails
[04:03:02] cpruitt_: has joined #RubyOnRails
[04:03:44] rogue_koder: has joined #RubyOnRails
[04:05:40] lupine_: has joined #RubyOnRails
[04:06:16] quazimod1: has joined #RubyOnRails
[04:06:30] hive-mind: has joined #RubyOnRails
[04:06:39] hahuang62: has joined #RubyOnRails
[04:08:17] gusrub: has joined #RubyOnRails
[04:15:08] jhfisc: has joined #RubyOnRails
[04:26:16] xall: has joined #RubyOnRails
[04:33:41] hakash: has joined #RubyOnRails
[04:47:14] gusrub: has joined #RubyOnRails
[04:53:33] rogue_koder: has joined #RubyOnRails
[04:53:51] pulkit4tech: has joined #RubyOnRails
[04:59:56] antgel: has joined #RubyOnRails
[05:01:56] jgt: has joined #RubyOnRails
[05:02:50] Loy_Chan`: has joined #RubyOnRails
[05:11:46] nya: has joined #RubyOnRails
[05:23:55] patarr: has joined #RubyOnRails
[05:29:05] jfelchner: has joined #RubyOnRails
[05:29:31] rogue_koder: has joined #RubyOnRails
[05:31:50] pwnd_nsfw: has joined #RubyOnRails
[05:32:28] psethi: has joined #RubyOnRails
[05:33:19] Pumukel: has joined #RubyOnRails
[05:36:55] Coldblackice: has joined #RubyOnRails
[05:37:40] Pumukel: has joined #RubyOnRails
[05:37:47] loconator: has joined #RubyOnRails
[05:39:33] loconator: has joined #RubyOnRails
[05:42:49] loconator: has joined #RubyOnRails
[05:43:45] loconator: has joined #RubyOnRails
[05:43:53] loconator: has joined #RubyOnRails
[05:44:19] zero1one0: has joined #RubyOnRails
[05:44:23] pLaTo0n: has joined #RubyOnRails
[05:47:15] armyriad: has joined #RubyOnRails
[05:49:08] rogue_koder_: has joined #RubyOnRails
[06:09:03] aperkins81: has joined #RubyOnRails
[06:10:15] mazeinmaze_: has joined #RubyOnRails
[06:11:38] alexggordon: has joined #RubyOnRails
[06:15:41] sevenseacat: has joined #RubyOnRails
[06:21:38] Pumukel: has joined #RubyOnRails
[06:26:29] max_v: has joined #RubyOnRails
[06:31:26] Jameser: has joined #RubyOnRails
[06:35:28] conta: has joined #RubyOnRails
[06:40:21] bronson: has joined #RubyOnRails
[06:41:26] byteflame: has joined #RubyOnRails
[06:48:15] arBmind: has joined #RubyOnRails
[06:48:49] darutoko: has joined #RubyOnRails
[07:12:50] artto: has joined #RubyOnRails
[07:16:12] antgel: has joined #RubyOnRails
[07:16:50] xibalba: has joined #RubyOnRails
[07:19:45] Andr3as: morning everyone
[07:24:47] patarr: has joined #RubyOnRails
[07:27:54] xibalba: has joined #RubyOnRails
[07:28:02] mark_66: has joined #RubyOnRails
[07:28:19] dionysus69: has joined #RubyOnRails
[07:28:20] AzaToth: has joined #RubyOnRails
[07:31:36] aganov: has joined #RubyOnRails
[07:34:47] artto: has joined #RubyOnRails
[07:40:07] Andr3as: i am struggling with a bit of metaprogramming for a helper method name and each_with_index - here is my gist https://gist.github.com/awunder/e3b3d2c91d4416784d61563cb3f305d3
[07:40:37] sevenseacat: what problem are you having?
[07:40:38] Andr3as: it doesnt expect the parenthesis at the end of line 1.. anyone a tip how to fix that?
[07:40:38] bronson: has joined #RubyOnRails
[07:40:51] Andr3as: syntax error, unexpected keyword_end, expecting ')'
[07:40:59] Andr3as: hold on, wrong error
[07:41:10] sevenseacat: I'm not sure what that code is supposed to do
[07:41:26] sevenseacat: let's start with what `object` is
[07:42:06] Andr3as: what i wanna do is this: i pass an argument into that partial (its not the complete partial shown) and it should call the corresponding helper method, based on the string i pass into "object"
[07:42:12] byteflame: has joined #RubyOnRails
[07:42:29] sevenseacat: so what value does `object` have
[07:42:36] Andr3as: so it could be "actions" or "achievements"
[07:42:57] sevenseacat: okay. so your call to public_send wants to call a method named "actions_toplist(domain)"
[07:42:58] Andr3as: and if i pass in "acievements" it should call achievements_toplist(domain)
[07:43:07] sevenseacat: and I don't think you have a method called that
[07:43:22] sevenseacat: parentheses are not valid in method names
[07:43:35] sevenseacat: I think you meant domain to be an argument to the method, not part of the method name
[07:44:03] sevenseacat: thats the first issue
[07:44:17] Andr3as: thanks sevenseacat
[07:44:22] Andr3as: got it --> <% public_send("#{object}_toplist", domain).each_with_index do |object, index| %>
[07:52:38] arBmind: has joined #RubyOnRails
[08:01:05] kitsuneyo: has joined #RubyOnRails
[08:02:54] jsrn_: has joined #RubyOnRails
[08:09:39] aperkins81: has joined #RubyOnRails
[08:09:50] renegadeandy: has joined #RubyOnRails
[08:12:01] phanindra: has joined #RubyOnRails
[08:14:09] r3vDev: has joined #RubyOnRails
[08:16:46] blackmesa: has joined #RubyOnRails
[08:17:50] marr: has joined #RubyOnRails
[08:25:10] Andr3as: and another question.. i have a list of arrays like this ["Achievement", 126, 1], ["Action", 4, 1], ... - am googling for a bit now, but as i dont know the correct terms i end up at the same places and cant find anything...
[08:25:27] Andr3as: what i'd like to have is to convert that list into a 2dmin hash
[08:25:37] Andr3as: *2 dimensional
[08:26:00] Andr3as: with achievement/action as the first dimension and the id's as the second one
[08:26:06] tbuehlmann: can you gist an example of the input and desired output?
[08:26:17] Andr3as: hey tbuehlmann.. yeah, will do
[08:26:57] phanindra: has left #RubyOnRails: ("Good Bye")
[08:27:20] w0rd-driven: has joined #RubyOnRails
[08:27:56] pahnin: has joined #RubyOnRails
[08:30:46] DaveTaboola: has joined #RubyOnRails
[08:31:03] jaequery: has joined #RubyOnRails
[08:33:59] Andr3as: i might have screwed it up but you get the idea, probably https://gist.github.com/awunder/14e5e16f440c490e2662fea355594a8a
[08:34:29] arBmind: has joined #RubyOnRails
[08:35:49] matthewd: Andr3as: What have you come up with so far?
[08:37:09] tbuehlmann: I've got something for you, but I'm also interested in what you got so far
[08:37:17] Andr3as: matthewd: i wonder if you ever sleep... ;) - well, not too much.. i failed with Hash[] as it wants 2 args.. then i googled for "create 2 dimensional hash" and variations of it but maybe its just me, but that didnt yield anything usefull (for me)
[08:37:31] Andr3as: *2args max...
[08:37:57] Andr3as: but googled and found it its gotta be an even number of args.. havent checked if its true as i have only 3 attributes available
[08:38:05] Andr3as: but that doesnt help anyway, probably
[08:38:59] Andr3as: however, i am not after a solution.. a tip would be ok too... as i get that it makes more sense to dig a bit
[08:39:12] tbuehlmann: well, a first attempt: https://gist.github.com/tbuehlmann/c300a98fb7f06b7b4153716c07114fd1
[08:39:13] Andr3as: and i totally agree on that strategy
[08:39:46] Andr3as: i would never have gotten come up with anything remotely like this..
[08:40:08] Andr3as: i dont even know what that does - hmpf..
[08:40:48] matthewd: I'd do |(x, y, z), hash|
[08:41:08] Andr3as: ah, so, tbuehlmann - you go through each array, set the first dimension if it isnt alreday set
[08:41:26] bronson: has joined #RubyOnRails
[08:41:36] DaniG2k: has joined #RubyOnRails
[08:41:40] Andr3as: and then build a hash and save it in the second dimension
[08:41:50] tbuehlmann: maybe that's simpler to understand: https://gist.github.com/tbuehlmann/c300a98fb7f06b7b4153716c07114fd1#file-foo-simple-rb
[08:41:51] DaniG2k: has left #RubyOnRails: ()
[08:41:59] DaniG2k: has joined #RubyOnRails
[08:44:28] artto: has joined #RubyOnRails
[08:47:23] artto: has joined #RubyOnRails
[08:51:50] kassav_: has joined #RubyOnRails
[08:51:53] srinidhi: has joined #RubyOnRails
[08:57:11] ReBa_: has joined #RubyOnRails
[08:57:48] max__v: has joined #RubyOnRails
[08:57:59] max_v: has left #RubyOnRails: ("Saliendo")
[09:01:13] bronson: has joined #RubyOnRails
[09:01:56] workmad3: has joined #RubyOnRails
[09:03:05] Qchmqs: has joined #RubyOnRails
[09:03:26] xall: has joined #RubyOnRails
[09:11:26] Jameser: has joined #RubyOnRails
[09:12:49] naftilos76: has joined #RubyOnRails
[09:14:55] lxsameer: has joined #RubyOnRails
[09:14:57] artto: has joined #RubyOnRails
[09:23:23] Qchmqs: has joined #RubyOnRails
[09:25:02] nebiros: has joined #RubyOnRails
[09:25:41] patarr: has joined #RubyOnRails
[09:26:50] tris: has joined #RubyOnRails
[09:30:12] srinidhi: has joined #RubyOnRails
[09:34:33] tirto: has joined #RubyOnRails
[09:37:40] srinidhi: has joined #RubyOnRails
[09:37:45] kassav__: has joined #RubyOnRails
[09:43:36] srinidhi: has joined #RubyOnRails
[09:46:17] tvw: has joined #RubyOnRails
[09:50:20] hipertracker: has joined #RubyOnRails
[09:50:28] byteflame: has joined #RubyOnRails
[09:53:01] bob_f: Hi, has there been some change to how layouts work between Rails 4 and 5 ? I specify `layout: 'pdf'` to my render call but (confirmed by looking at rendered HTML source) the layout is certainly not applied. However if I change to e.g. `layout: 'blah'` I get an error, so Rails is definitely looking for the file.
[09:57:15] jenrzzz: has joined #RubyOnRails
[09:57:15] jenrzzz: has joined #RubyOnRails
[10:00:35] artto: has joined #RubyOnRails
[10:06:14] artto: has joined #RubyOnRails
[10:12:58] username: has joined #RubyOnRails
[10:14:05] mikecmpbll: has joined #RubyOnRails
[10:25:35] jusa: has joined #RubyOnRails
[10:27:37] Saukk: has joined #RubyOnRails
[10:44:01] artto: has joined #RubyOnRails
[10:51:05] greengriminal: has joined #RubyOnRails
[10:54:47] artto: has joined #RubyOnRails
[10:56:49] artto: has joined #RubyOnRails
[10:58:06] Fernando-Basso: has joined #RubyOnRails
[11:00:59] r3vDev: has joined #RubyOnRails
[11:01:05] S1kx: has joined #RubyOnRails
[11:01:53] S1kx: has joined #RubyOnRails
[11:02:18] bronson: has joined #RubyOnRails
[11:05:08] artto: has joined #RubyOnRails
[11:09:46] artto: has joined #RubyOnRails
[11:11:16] zpe: has joined #RubyOnRails
[11:13:31] r3vDev: has joined #RubyOnRails
[11:19:05] greengriminal: has joined #RubyOnRails
[11:20:25] greengriminal: has joined #RubyOnRails
[11:29:21] Sheperson: has joined #RubyOnRails
[11:31:11] krelly: has joined #RubyOnRails
[11:32:14] psethi: has joined #RubyOnRails
[11:32:28] `: has joined #RubyOnRails
[11:33:15] srinidhi: has joined #RubyOnRails
[11:42:15] hipertracker: has joined #RubyOnRails
[11:44:37] King_Rex: has joined #RubyOnRails
[11:45:45] HoierM: has joined #RubyOnRails
[11:46:44] handicraftsman: has joined #RubyOnRails
[11:56:53] nya: has joined #RubyOnRails
[11:58:04] mark_66: has joined #RubyOnRails
[12:03:07] bronson: has joined #RubyOnRails
[12:05:53] blackmesa: has joined #RubyOnRails
[12:06:14] matthewd: bob_f: Nothing I recall. Are you coming from 4.2?
[12:13:27] psethi: has joined #RubyOnRails
[12:13:54] r3vDev: has joined #RubyOnRails
[12:33:31] zpe: has joined #RubyOnRails
[12:34:29] pahnin: has joined #RubyOnRails
[12:35:08] zpe: has joined #RubyOnRails
[12:35:54] aajjbb: has joined #RubyOnRails
[12:36:46] artto: has joined #RubyOnRails
[12:37:59] nertzy: has joined #RubyOnRails
[12:39:45] r3vDev: has joined #RubyOnRails
[12:44:17] sevenseacat: has joined #RubyOnRails
[12:44:19] mrgreenfur: has joined #RubyOnRails
[12:47:11] Guest96: has joined #RubyOnRails
[12:47:44] psethi: has joined #RubyOnRails
[12:49:00] byteflame: has joined #RubyOnRails
[12:56:15] tvw: has joined #RubyOnRails
[13:00:45] artto: has joined #RubyOnRails
[13:03:18] psethi: has joined #RubyOnRails
[13:03:41] hakash: has joined #RubyOnRails
[13:04:18] bronson: has joined #RubyOnRails
[13:05:32] byteflame: has joined #RubyOnRails
[13:06:35] fmcgeough: has joined #RubyOnRails
[13:10:20] tedwing: has joined #RubyOnRails
[13:11:04] romeoh: has joined #RubyOnRails
[13:20:02] `: has joined #RubyOnRails
[13:23:04] mrgreenfur: anyone know how to include regular rails helpers to be used in Mailers? I’ve tried everything and can’t seem to figure it out. Currently onto “include DatesHelper” in the Mailer class
[13:26:04] filipechagas: has joined #RubyOnRails
[13:30:58] erlend: has joined #RubyOnRails
[13:31:04] blackmesa: has joined #RubyOnRails
[13:31:18] DLSteve: has joined #RubyOnRails
[13:32:55] naprimer: has joined #RubyOnRails
[13:33:01] aajjbb: has joined #RubyOnRails
[13:36:17] r3vDev: has joined #RubyOnRails
[13:38:27] Fernando-Basso: has joined #RubyOnRails
[13:41:25] romeoh: has joined #RubyOnRails
[13:42:58] artto: has joined #RubyOnRails
[13:42:58] romeoh_: has joined #RubyOnRails
[13:47:18] knight33: has joined #RubyOnRails
[13:48:32] nebiros: has joined #RubyOnRails
[13:48:32] nebiros: has joined #RubyOnRails
[13:49:12] shinnya: has joined #RubyOnRails
[13:49:46] psethi: has joined #RubyOnRails
[13:52:50] patarr: has joined #RubyOnRails
[13:59:00] artto: has joined #RubyOnRails
[14:02:28] Takumo: Hi all, anyone here had issues with PostGIS (activerecord-postgis-adapter) and non-gis `Point` fields?
[14:04:19] NoGodDamnIdea: has joined #RubyOnRails
[14:04:19] NoGodDamnIdea: has joined #RubyOnRails
[14:04:22] epochwolf: Takumo: not all that familar with those, what's the error message?
[14:04:58] bronson: has joined #RubyOnRails
[14:06:46] artto: has joined #RubyOnRails
[14:07:58] Takumo: epochwolf: ArgumentError: Unknown type :point
[14:08:00] Takumo: from /home/leo/development/projects/assetzen/app/vendor/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/registry.rb:20:in `lookup'
[14:08:07] Takumo: before I introduced postgis it was fine...
[14:10:00] epochwolf: Takumo: what version of rails are you using?
[14:10:17] swgillespie_: has joined #RubyOnRails
[14:10:21] Takumo: epochwolf: 5.0.1
[14:12:11] Diabolik: has joined #RubyOnRails
[14:12:17] sent-hil: has joined #RubyOnRails
[14:13:34] CustosLim3n: has joined #RubyOnRails
[14:15:00] ResidentBiscuit: has joined #RubyOnRails
[14:15:13] contradictioned_: has joined #RubyOnRails
[14:15:29] soahccc: has joined #RubyOnRails
[14:15:30] Technodrome: has joined #RubyOnRails
[14:15:56] clamstar: has joined #RubyOnRails
[14:16:06] voker57: has joined #RubyOnRails
[14:16:06] voker57: has joined #RubyOnRails
[14:16:06] poikon: has joined #RubyOnRails
[14:16:44] nickenchuggets: has joined #RubyOnRails
[14:18:28] rgr: has joined #RubyOnRails
[14:19:35] epochwolf: Takumo: I have been unable to find anything on google related to your issue. :/
[14:20:04] Takumo: same here...
[14:20:19] jahrichie: has joined #RubyOnRails
[14:20:39] epochwolf: Takumo: the thing that bugs me is Rails 5 has native support for points.
[14:20:39] Takumo: may have to abandon postgis for now, given that atm it'd only be used to store a single lat/lng point... that could just be stored in a regular geometric point...
[14:20:46] Takumo: epochwolf: it does and I was using it!
[14:20:59] Rodya_: has joined #RubyOnRails
[14:21:04] epochwolf: And what did you do that broke it?
[14:21:05] Takumo: now its not working now I've added PostGIS to the mix
[14:21:14] matthewd: I have Feels about the postgis adapter :/
[14:21:15] epochwolf: What's PostGIS?
[14:21:32] epochwolf: A postgres module or a ruby gem?
[14:22:05] cschneid_: has joined #RubyOnRails
[14:22:09] epochwolf: what's the ruby gem called?
[14:23:24] artto: has joined #RubyOnRails
[14:23:53] matthewd: It's a PostgreSQL extension (that's nice), but AR compatibility has been implemented as a completely separate adapter instead of building onto the built-in PG one (not so nice)
[14:24:00] chouhoulis: has joined #RubyOnRails
[14:24:39] epochwolf: Takumo: it looks like activerecord-postgis-adapter registers :st_point instead of :point.
[14:24:58] matthewd: Admittedly that's probably largely historic -- older versions didn't do such a good job of extensibility
[14:25:02] epochwolf: So when you switched adapters, the datatypes aren't matching up.
[14:25:32] matthewd: epochwolf: I believe that's a different (geospatial) point type
[14:25:46] workerbeetwo: has joined #RubyOnRails
[14:25:56] epochwolf: matthewd: activerecord-postgis-adapter doesn't support :point
[14:26:17] agent_white: has joined #RubyOnRails
[14:26:20] workerbeetwo: Hi. Is there a short way to determine all the models created during a rpocess (like registration process of an app) ?
[14:26:25] epochwolf: There's a note in the readme.
[14:26:37] mark_661: has joined #RubyOnRails
[14:27:00] epochwolf: Takumo: try nuking db/schema.rb and running rails db:migrate
[14:27:23] matthewd: epochwolf: See also: Feels. ;)
[14:27:49] naprimer: has joined #RubyOnRails
[14:28:46] Takumo: any reason why db:migrate rather than db:schema:dump? Just curious.
[14:29:12] epochwolf: Takumo: because dumb me forgot about that. :D
[14:29:16] agent_white: Mornin' folks
[14:29:46] Takumo: morning for some ;)
[14:30:02] Takumo: epochwolf: sadly that didn't fix it,
[14:30:04] epochwolf: workerbeetwo: list the contents of the models directory or get a list of database tables before and after?
[14:30:13] Takumo: although the recreated db/schema.rb is a `point`
[14:30:17] mephistophocles: has joined #RubyOnRails
[14:30:50] psethi: has joined #RubyOnRails
[14:30:59] epochwolf: Takumo: hmm... well, you could try nuking the database and rerunning the migrations after converting the migrations to the format of the new adapter. :/ That's the nuclear option.
[14:31:29] Takumo: epochwolf: except that won't really work so well on prod ;(
[14:32:06] Takumo: I think for now postgis support in-rails will need to wait
[14:32:11] Takumo: I can still use postgis without it
[14:32:13] Takumo: just manually
[14:32:28] epochwolf: Yeah, until you get a better hold on what's broken here, that's the safe option.
[14:32:55] narval: has joined #RubyOnRails
[14:32:59] chouhoul_: has joined #RubyOnRails
[14:33:57] epochwolf: Takumo: just found out the problem. Your point field is the wrong type for activerecord-postgis-adapter
[14:34:22] Takumo: I'm assuming it thinks its a postgis st_point rather than a regular postgres geometric point
[14:34:26] epochwolf: Point isn't supported. It uses a different datatype: STPoint.
[14:34:43] epochwolf: No, it doesn't know what it is. There's no mapping for Point.
[14:34:44] Takumo: yeah those are in fact totally different fields for different purposes
[14:34:44] matthewd: It uses a different datatype *for a different purpose*
[14:35:04] Takumo: I have the wonderful situation where I need both
[14:35:18] Takumo: regular point for mapping a position on a flat plane
[14:35:25] Takumo: and geometric point for geometric position
[14:35:54] Takumo: I mean you could just eschew the db layer and do it in app but when you have postgis and postgres' geometric operators... (ab)use them!
[14:36:29] chouhoulis: has joined #RubyOnRails
[14:36:31] epochwolf: According to the readme, this adapter is supposed to allow the underlaying system to handle :point and :polygon
[14:37:28] epochwolf: It looks like you can add custom serializion for :point though.
[14:37:35] epochwolf: https://github.com/rgeo/activerecord-postgis-adapter#configuring-activerecord
[14:37:56] mikecmpb_: has joined #RubyOnRails
[14:38:20] matthewd: Yeah.. https://github.com/rgeo/activerecord-postgis-adapter#point-and-polygon-types-with-activerecord-42 claims to acknowledge regular :point
[14:42:21] DrYockel: has joined #RubyOnRails
[14:43:07] bawsky: has joined #RubyOnRails
[14:43:25] Takumo: Given that for now, what I need from PostGIS is reasonably limited, I think I'll just handle it myself
[14:43:38] mikecmpbll: has joined #RubyOnRails
[14:43:39] Takumo: maybe re-use their serializers if needed
[14:44:00] epochwolf: Takumo: sorry I couldn't be more helpful. :(
[14:44:11] Takumo: its fine, sometimes there isn't an easy fix
[14:44:19] Takumo: if only clients understood that :(
[14:44:40] epochwolf: Clients typically don't understand technology limitations and tradeoffs.
[14:45:33] epochwolf: And because they don't understand, they have no frame of reference when making decisions and expressing desires.
[14:45:47] MasterAsia: If I need model A to has_many model B
[14:45:54] MasterAsia: but I can't store the fk on model B
[14:46:04] epochwolf: matthewd: why not?
[14:46:04] MasterAsia: would it be wise to use habtm?
[14:46:17] epochwolf: matthewd: sorry, meant masterasia. :)
[14:46:52] MasterAsia: because model B belongs to a lot of other models(would rather not put many fks on model b)
[14:47:24] sevenseacat: you want to introduce lots more little tables to avoid structuring associations properly?
[14:47:49] Takumo: epochwolf: Indeed, dealing with someone who is angry our AngularJS based application doesn't work in IE8
[14:48:19] MasterAsia: sevenseacat, because it feels like model B should have polymorphic(it has -alot- of associations)
[14:48:32] sevenseacat: that seems unrelated to the question
[14:48:57] MasterAsia: okay let me try again
[14:49:02] matthewd: !foo is starting to sound pretty relevant
[14:49:02] helpa: Please do not use fake variables for your name such as "foo", "bar" or "x". Use the real names, as if it makes sense to you it probably will make sense to the people helping you.
[14:49:06] epochwolf: Takumo: my job is fun, we just dropped support for anything that doesn't support the latest TLS and we don't support pervious versions.
[14:49:23] MasterAsia: specifically. model B is an upload table
[14:49:34] MasterAsia: uploads are files that can belong to other models
[14:49:43] epochwolf: masterasia: does it only belong to one other model at a time?
[14:49:44] MasterAsia: it just feel strange having to toss random fks onto that model
[14:49:47] Takumo: masterasia: sounds like it should be polymorphic!
[14:49:49] matthewd: masterasia: Are you sure you don't actually want a polymorphic association then?
[14:50:01] r3vDev: has joined #RubyOnRails
[14:50:04] MasterAsia: no because uploads can has_many of another model X
[14:50:08] MasterAsia: which would make polymorphic unsuitable
[14:50:12] sevenseacat: right, so it doesnt actually have a lot of associations, it just has one polymorphic one?
[14:50:16] MasterAsia: so I've been creating habtm join tables
[14:50:17] Takumo: epochwolf: Similar story here, no support for IE < 10, and I'm very picky about TLS configs
[14:50:37] sevenseacat: models can belong to and also have many things.
[14:50:42] sevenseacat: different things.
[14:50:48] MasterAsia: sevenseacat, it should be polymorphic in theory but can't because of a specific requirement
[14:50:54] Takumo: epochwolf: though I /really/ upset a client when I didn't really know what I was doing and accidentally put their domain in chrome's hsts preload
[14:51:12] epochwolf: Takumo: we are under round 3 of attempting a security certification for PCI+FERPA
[14:51:50] Takumo: epochwolf: FERPA? We don't actually have any compliance policies we have to meet tbh, we just all sleep better with strict TLS policies in place :)
[14:52:09] Technodrome: has joined #RubyOnRails
[14:52:14] epochwolf: Takumo: Family Educational Rights and Privacy Act. Basically school records.
[14:52:15] MasterAsia: sevenseacat, so you're saying I should suck it up and just belongs_to for all the models that only require a single upload?
[14:52:23] sevenseacat: masterasia: its hard to offer advice if we dont have all the information we ask for.
[14:52:43] sevenseacat: masterasia: again, it sounds like uploads have a polymorphic association.
[14:52:48] Takumo: epochwolf: ah ok, for any specific country?
[14:53:02] epochwolf: Takumo: FERPA is US Law.
[14:53:32] Takumo: ah ok, I'm in .uk so as far as I know we just have to comply with the standard DPA (Data Protection Act)
[14:53:47] Takumo: which is basically "don't hand out personal info to random strangers"
[14:53:54] sevenseacat: seems logical.
[14:54:17] epochwolf: masterasia: If an upload record belongs to only one other record but that record could be on any number of tables, you want a single polymorphic foreign key.
[14:54:50] epochwolf: Takumo: yeah, ours is don't hand information out to parents (for college records) or random strangers
[14:55:06] sevenseacat: technically the polymorphic association doesnt use foreign keys. but the idea is right.
[14:55:09] epochwolf: Schools love FEPRA, they just tell parents to piss off.
[14:55:28] MasterAsia: epochwolf, but what if for specific models(in this case - a contract model), an upload has_many contracts. because a upload can be referenced in more than one contract
[14:55:55] Takumo: epochwolf: Just that it comes with expensive and breaucratic certification process?
[14:55:57] rogue_koder: has joined #RubyOnRails
[14:56:05] MasterAsia: would I just go with the polymorphic association for most use-case and then hammer in join tables for the rest?
[14:56:28] epochwolf: Takumo: there's no federal certification requirement, it just means we need to do a 100+ question security questionaire for every little tiny school.
[14:56:59] Takumo: epochwolf: and let me guess, they're not standard so you can't just re-use the same one?
[14:57:10] epochwolf: If we get certified by a recongized third party, we can skip the stupid questionaires that cost us thousands in labor.
[14:57:31] epochwolf: Takumo: exactly, each school has their own version.
[14:57:45] ldnunes: has joined #RubyOnRails
[14:57:49] epochwolf: Each school is required to do due diligence with their vendors.
[14:57:57] Takumo: and yeah, have extra fun with PCI-DSS
[14:58:05] epochwolf: But if you have the proper certificates, you can skip that.
[14:58:18] Takumo: there's a reason we refuse to do anything that requires us to be fully PCI-DSS compliant ;)
[14:58:19] epochwolf: Because someone else they trust has done due diligence for them.
[14:58:37] Takumo: embedded payment forms and single-use token hashes all dy
[14:58:50] epochwolf: Takumo: I've passed PCI-DSS last year.
[14:59:03] Takumo: was it fun? :P
[14:59:10] epochwolf: I've done it before.
[14:59:27] Takumo: tbh I've never done it, don't really have any desire to do so either, neither does work
[14:59:30] epochwolf: I've always worked in corporate environments as an employee.
[14:59:42] Takumo: if we can make PCI-DSS someone else's problem, we will
[14:59:51] Takumo: and get by with an SAQ
[15:00:04] epochwolf: You read the documentation, you write documentation, and you make sure you're doing proper security you should have been doing anyway.
[15:00:21] epochwolf: Oh, and you install clamav on the servers and cry a little at night.
[15:00:58] Takumo: epochwolf: we did that for a while but after about a year of it finding nothing on any system and causing more than a few outages
[15:01:00] Takumo: it went away
[15:01:13] epochwolf: We process too many credit cards to do self-service.
[15:01:25] Takumo: most of our apps/sites don't take payments anyway, the few that do we ensure we're not handling any card data
[15:01:31] epochwolf: That's why we store credit cards in house.
[15:01:50] epochwolf: Even with audits, it's cheaper do DIY than outsource.
[15:02:15] Takumo: can you do the audits in-house? Do they not need to be impartially verified?
[15:02:21] epochwolf: Now, for a side project of mine, hello paypal. We love and hate you.
[15:02:34] epochwolf: Takumo: third party, same one as the FERPA stuff.
[15:02:34] Takumo: epochwolf: yeah we try to stick to stripe and worldpay
[15:03:01] epochwolf: Takumo: for our target audience, paypal is preferred.
[15:03:03] Takumo: nice apis, no need to be in-house PCI as no CC data internally
[15:03:08] Takumo: also for what we do
[15:03:13] Takumo: PayPal won't take our customer's business
[15:03:23] Takumo: (Travel and Tourism)
[15:03:38] Takumo: I think its because it involves a *lot* of refunds
[15:03:47] epochwolf: I help run a convention... that's a bit dangerous with paypal but we have a lot of history with them.
[15:04:08] Takumo: yeah, travel and tourism companies tend to sell stuff they don't have for a refundable deposit
[15:04:13] Takumo: then cancel it if not enough people buy it
[15:04:17] Takumo: and refund it all
[15:04:31] Takumo: don't think PayPal likes that model
[15:04:38] epochwolf: Takumo: that's against paypal's TOS.
[15:04:46] epochwolf: You're not allowed to sell vaporware.
[15:05:10] Takumo: A lot of our clients are "group tour" operators, so they say "A group of people will go here and do this stuff on this date"
[15:05:24] Takumo: and unless enough people put a deposit in, they cancel and refund
[15:05:35] Takumo: if enough people book it, then it goes on and they take the rest and do it
[15:05:58] Takumo: (they usually have all the stuff pre-booked with the upstream supplier, and have a period where they're allowed to cancel it all)
[15:06:07] epochwolf: Takumo: very neat.
[15:06:53] Takumo: I love how one of our clients has above very CC entry form "WE DO NOT TAKE AMEX CARDS" (they refuse to pay Amex fees)
[15:07:05] Takumo: still, dozens of people per day try an Amex card... multiple times
[15:09:26] Takumo: epochwolf: less neat are the systems these companies have to manage this stuff... most of them are written in VB6, and some of them are so slow its a joke
[15:10:00] epochwolf: Takumo: I've integrated with delphi applications.
[15:10:10] epochwolf: Windows 95 era stuff.
[15:10:19] tedwing: has joined #RubyOnRails
[15:10:22] Takumo: Yeah, I'm a aware of Delphi... ick
[15:10:34] epochwolf: And my current job include integration with a mainframe running IBM RPG.
[15:10:42] Takumo: wooo mainframes!! :P
[15:11:01] Takumo: one of the VB6 apps we've integrated is off-the-shelf and has a C♯ (ish) based SOAP api
[15:11:05] Takumo: complete with >800 methods
[15:11:17] Takumo: including GetFoo GetFoos GetFoosXML and GetFoos1
[15:11:32] Takumo: most of the methods pass the whole XML request to an SQL stored procedure that manually parses parameters out of the XML :)
[15:11:49] epochwolf: Takumo: they are parsing http by hand. >.< I have to order my form parameters or their code crashes.
[15:12:13] Takumo: another VB6 system was custom, so I wrote a Grape based API to expose its DB
[15:12:17] epochwolf: Oh, I would love SOAP.
[15:12:27] epochwolf: SOAP is love. SOAP is life.
[15:12:31] Takumo: another was actually Django based so I just extended our app's Golang API to integrate with it
[15:12:38] Takumo: epochwolf: no. nope nope nope. Pls no more soap
[15:13:08] epochwolf: Takumo: how about hand parsed json? I would kill for the other endpoint to have a proper parser...
[15:13:35] epochwolf: Knowing someone is literally scanning a string for a " just kills me inside.
[15:13:52] Takumo: epochwolf: Yeah but if it breaks and your JSON is valid its not your problem and not in your SLA :)
[15:13:55] epochwolf: And they would parse \" as the end of the string. :(
[15:14:18] epochwolf: Takumo: oh, it's my problem. My turn around time is less than theirs.
[15:14:37] epochwolf: And I have proper qa and staging environments.
[15:14:51] Takumo: tbh we have a UAT env for each app but that's about it
[15:14:53] hipertracker: has joined #RubyOnRails
[15:15:00] mikecmpb_: has joined #RubyOnRails
[15:15:03] epochwolf: Mainframe is internal to the company but a different department.
[15:15:29] Takumo: epochwolf: I think I solve my problem!!
[15:15:30] epochwolf: So I have to be diplomantic about telling people to fix their code. :)
[15:15:46] User458764: has joined #RubyOnRails
[15:16:14] Takumo: epochwolf: yeah, I'd basically say "My JSON is spec compliant. Therefore your parser is the thing which is broken."
[15:16:44] Takumo: epochwolf: I had the line `attribute :point_field, :point` to handle the regular point field
[15:16:47] Takumo: removed that and now it works
[15:17:15] Takumo: buuut now its an array rather than an ActiveRecord::Point :(
[15:17:17] epochwolf: Takumo: oh! No wonder it was breaking and we couldn't figure it out.
[15:17:44] cschneid_: has joined #RubyOnRails
[15:18:01] Takumo: yeah, I sorta jumped ahead and adopted the upcoming 5.1 point handling
[15:18:26] Takumo: which the rest of my app uses so I kinda need to make it work :(
[15:18:29] epochwolf: Why not add in ActiveRecord::Point as a custom conversation.
[15:18:34] epochwolf: conversion*
[15:18:47] Takumo: so just `serialize :point_field, ActiveRecord::Point` ?
[15:18:51] hipertracker: has joined #RubyOnRails
[15:20:01] mikecmpbll: has joined #RubyOnRails
[15:20:17] helpa: Why don't you try it and find out for yourself?
[15:20:37] epochwolf: I forgot how snarky helpa's canned messages are.
[15:21:53] armando1: has joined #RubyOnRails
[15:22:26] alexkitchens: has joined #RubyOnRails
[15:24:57] Takumo: epochwolf: tbh I've opened it as an issue on activerecord-postgis-adapter
[15:25:22] blackmesa: has joined #RubyOnRails
[15:26:03] romeoh: has joined #RubyOnRails
[15:26:33] Takumo: because it *should* really just work, might even have to have a go at fixing it myself though
[15:27:13] mikecmpb_: has joined #RubyOnRails
[15:27:25] artto: has joined #RubyOnRails
[15:28:55] artto: has joined #RubyOnRails
[15:29:01] epochwolf: Takumo: agreed
[15:31:34] buckrockwell: has joined #RubyOnRails
[15:43:13] [Butch]: has joined #RubyOnRails
[15:51:42] username1: has joined #RubyOnRails
[15:54:13] antgel: has joined #RubyOnRails
[15:56:37] Suslov: has joined #RubyOnRails
[16:01:06] gusrub: has joined #RubyOnRails
[16:01:43] jusa: has joined #RubyOnRails
[16:06:07] bronson: has joined #RubyOnRails
[16:12:03] dionysus69: has joined #RubyOnRails
[16:16:44] artto: has joined #RubyOnRails
[16:17:36] hipertracker: has joined #RubyOnRails
[16:19:24] artto: has joined #RubyOnRails
[16:20:22] neruda: has joined #RubyOnRails
[16:21:31] neruda: hi all, trying to put together a generic error page with no stack trace in my dev environment, and was wondering what config file settings might be conflicting with that efforts, need a little hand holding
[16:26:10] neruda: so far i've changed config.consider_all_requests_local from true to false, am i missing anything
[16:26:30] epochwolf: neruda: localhost is still local.
[16:27:02] matthewd: neruda: We should probably start with: why do you want to do that?
[16:27:51] neruda: epochwolf: so my motivation is to prevent "information leakage" due to a pentest scan saying such, my issue is that the more i delve into this issue the more i believe its a false positive since the finding was against a "dev" environment version of the app
[16:28:17] neruda: which to my understanding always give stack traces for dev/debugging purposes
[16:28:21] epochwolf: neruda: why is a pentest being run against your local machine?
[16:28:45] epochwolf: If you need to do that, run the application in production mode.
[16:28:59] neruda: sorry response was for matthewd, but anyways, the test was against a deployed version of the app that i "suspect" was left in a dev env setting
[16:29:27] epochwolf: I'd fix that.
[16:29:37] neruda: epochwolf: good so my question is: to run in production mode do i just need to exec: "rails s -e production"?
[16:29:53] matthewd: Yeah.. that seems easier to fix than breaking the development environment
[16:30:05] epochwolf: neruda: yes.
[16:30:24] epochwolf: I'd recommend setting RAILS_ENV to production system wide.
[16:30:33] epochwolf: on a production server.
[16:30:33] matthewd: Probably. Though if you're trying to do it "right" I'd argue you should be running against a full production deployment, using whatever nginx/apache/etc frontend server, etc.
[16:30:39] epochwolf: Prevents accidents.
[16:31:04] artto: has joined #RubyOnRails
[16:31:39] matthewd: epochwolf: Changes the class of available accidents. `db:drop` becomes easier to type.
[16:32:53] epochwolf: matthewd: if you think you're going to be a dummy, disable those taskes in production mode. :)
[16:34:39] matthewd: epochwolf: Fair. And ideally your production environment doesn't have enough rights to drop the DB anyway. But it applies to any other development/test-intended maintenance scripts too.
[16:35:09] matthewd: And "you think you're going to be a dummy" would seem to be a prerequisite for "Prevents accidents" to matter ;)
[16:35:49] rakm: has joined #RubyOnRails
[16:36:00] epochwolf: matthewd: yeah, my company is working on a server migration and we are tightening up database user permissions. Apparently postgres has seperate permissions for sequences. Ooops.
[16:36:31] Shoutsid: has joined #RubyOnRails
[16:39:03] neruda: matthewd: thanks
[16:39:09] neruda: epochwolf: thanks
[16:43:56] bawsky: has joined #RubyOnRails
[16:45:09] levifig: has joined #RubyOnRails
[16:45:45] pupsicle: has joined #RubyOnRails
[16:48:27] zz_timnovinger: has joined #RubyOnRails
[16:53:59] marcdel: has joined #RubyOnRails
[16:54:33] jaequery: has joined #RubyOnRails
[17:02:11] Saukk: has joined #RubyOnRails
[17:03:18] DrYockel: has joined #RubyOnRails
[17:03:37] saukk_: has joined #RubyOnRails
[17:04:42] sunya7a: is it possible to use images or icons inside the input placeholder value?
[17:05:15] levifig: has joined #RubyOnRails
[17:05:32] epochwolf: sunya7a: not unless it's emoji.
[17:05:58] sunya7a: epochwolf: how would i do it with emoji? I'm trying to use the foundation icons...but something else would be ok...
[17:06:36] epochwolf: sunya7a: emoji is just text. As long as you can use utf-8 in your code files, you just type it in.
[17:08:52] sunya7a: epochwolf: I tried entering the html code for it but it just displays the code...how would i tell the browser to convert the html code to the actual symbol?
[17:09:29] gusrub: has joined #RubyOnRails
[17:09:44] epochwolf: You just put the actual symbol in your code.
[17:10:06] sunya7a: epochwolf: i think i got it
[17:10:14] sunya7a: placeholder=("&#128270;").html_safe
[17:10:40] mikecmpbll: has joined #RubyOnRails
[17:11:18] epochwolf: I need to remember to paste things into textedit before dropping them in the terminal.
[17:12:55] zz_timnovinger: has joined #RubyOnRails
[17:16:47] djbkd: has joined #RubyOnRails
[17:18:09] pupsicle: has joined #RubyOnRails
[17:20:34] romeoh: has joined #RubyOnRails
[17:24:06] romeoh: has joined #RubyOnRails
[17:24:34] Suslov: has joined #RubyOnRails
[17:26:14] greengriminal: has joined #RubyOnRails
[17:27:56] User458764: has joined #RubyOnRails
[17:29:09] hahuang65: has joined #RubyOnRails
[17:32:42] levifig: has joined #RubyOnRails
[17:34:22] chouhoulis: has joined #RubyOnRails
[17:34:29] Suslov: has joined #RubyOnRails
[17:35:18] chouhoulis: has joined #RubyOnRails
[17:41:15] gusrub: has joined #RubyOnRails
[17:43:46] Saukk: has joined #RubyOnRails
[17:43:54] cagomez: has joined #RubyOnRails
[17:48:01] levifig: has joined #RubyOnRails
[17:48:46] hahuang61: has joined #RubyOnRails
[17:50:10] chouhoulis: has joined #RubyOnRails
[17:50:38] tvw: has joined #RubyOnRails
[17:50:51] Spami: has joined #RubyOnRails
[17:50:59] zz_timnovinger: has joined #RubyOnRails
[17:54:30] artto: has joined #RubyOnRails
[17:54:40] ss_much: has joined #RubyOnRails
[17:56:42] patarr1: has joined #RubyOnRails
[17:57:28] jsrn_: has joined #RubyOnRails
[17:58:56] Andr3as: a bit of a design question... if i have actions and those have many likes... what is the best way to sort those actions by the number of likes?
[18:00:20] Andr3as: i thought of getting all the likes and group them by the action id, extract all the action id's and get all the actions with those id's.. that works great unless there are zero likes... thats when i dont get any action as there is no like
[18:02:06] tildes: has joined #RubyOnRails
[18:02:20] tbuehlmann: Andr3as: you can add a likes_count column to your actions table and use rails' counter_cache functionality
[18:02:28] epochwolf: http://stackoverflow.com/questions/8696005/rails-3-activerecord-order-by-count-on-association
[18:02:51] tbuehlmann: else: left join, group by actions.id, counting the likes
[18:02:55] Andr3as: tbuehlmann: yeah, lol.. just found out about those on http://stackoverflow.com/questions/6181272/rails-order-by-number-of-likes-on-a-website
[18:03:17] Andr3as: thank you, though
[18:03:28] tbuehlmann: when using postgres, you can let the database do it, saving you some hazzle on the application side
[18:04:10] Andr3as: yeah, that sounds like a great idea.. saves me a lot of "hashing" too, to cache the likes count
[18:05:13] gloscombe: has joined #RubyOnRails
[18:05:28] tbuehlmann: no need for caching when using counter_cache, it's a simple column that is populated by rails
[18:05:49] Andr3as: thats what i was trying to say.. i can get rid of all teh caching
[18:05:52] byteflame: has joined #RubyOnRails
[18:08:26] meoblast001: has joined #RubyOnRails
[18:09:36] ResidentBiscuit: Can mattr_accessor be used in place of the class << self idiom?
[18:11:41] patarr: has joined #RubyOnRails
[18:11:55] matthewd: ResidentBiscuit: It's not the same, so.. it depends
[18:12:17] ResidentBiscuit: I just need to set an attr_accessor on a module. In what ways do they differ?
[18:12:25] epochwolf: https://apidock.com/rails/Module/mattr_accessor
[18:12:56] matthewd: boo apidock
[18:13:18] epochwolf: matthewd: why? also, sorry?
[18:14:20] matthewd: epochwolf: Mostly because it's dead
[18:14:38] matthewd: But also because the UI makes it too easy to get lost in wrong-version methods, IMO
[18:14:54] tedwing: has joined #RubyOnRails
[18:14:57] epochwolf: ah, I always pay attention to the versions.
[18:15:10] epochwolf: especially because I work with 3.2, 4.2, and 5.0 applications.
[18:15:18] matthewd: Our official docs need to do a better (read: any) job of offering version-switching
[18:15:40] epochwolf: matthewd: how would one go about that?
[18:16:13] matthewd: Something like PostgreSQL, I think -- just a set of links to "this page in other versions"
[18:16:33] epochwolf: matthewd: I meant, me doing the work to make that happen... in theory
[18:17:42] matthewd: There was some conversation about it a little while ago.. I'll find that and see where/who got up to
[18:21:26] keerthana: has joined #RubyOnRails
[18:28:03] Terens: has joined #RubyOnRails
[18:30:10] greengriminal: has joined #RubyOnRails
[18:32:50] Rodya_: has joined #RubyOnRails
[18:34:25] Pumukel: has joined #RubyOnRails
[18:37:43] Terens: I have a package (self extracting) in plain ruby and standalone bundler along with some shell scripts and capistrano that update a rails application.
[18:38:16] Terens: it works fine the problem is that I don't know how to monitor reliably the process of the update
[18:40:07] lxsameer: has joined #RubyOnRails
[18:40:31] DoctorMonocular: has joined #RubyOnRails
[18:41:19] epochwolf: terens: what information would you want to know?
[18:42:18] Terens: I am looking how to know whether it failed or not
[18:42:37] epochwolf: terens: check the exit code. If it's 0, it worked. If not, it failed.
[18:42:47] Terens: checking the exit code doesnt work
[18:42:51] Terens: because it is rails app
[18:42:59] Terens: and system may restart
[18:43:15] Terens: when user hits upgrade
[18:43:30] Terens: I dont want to block it waiting for exit code
[18:43:42] elsurudo: has joined #RubyOnRails
[18:45:12] Spami: has joined #RubyOnRails
[18:45:38] elsurudo: My app serves two domains, and I want each to have it’s own “root” application_domain1.scss and application_domain2.scss files. I added these to the precompiles list, so far so good. But how can I stop Rails from trying to precompile the usual application.scss file, which now doesn’t compile because variables are undeclared?
[18:46:02] elsurudo: When I use asset_path in a view, it tries to compile application.scss and fails
[18:46:36] epochwolf: elsurudo: remove application.scss from the path.
[18:46:45] epochwolf: err precompiles list.
[18:47:17] elsurudo: It’s not in there
[18:47:31] elsurudo: looks like a default
[18:47:44] elsurudo: I did just get it working… by renaming application.scss to application_shared.scss
[18:47:54] elsurudo: But I wonder how to do it the way we are thinking?
[18:48:31] patarr: has joined #RubyOnRails
[18:50:19] epochwolf: https://github.com/rails/rails/issues/26260
[18:50:40] epochwolf: Prior to Rails 5.1, you'd remove a regex from the precompile list.
[18:51:06] epochwolf: With 5.1, you'd modify app/assets/manifest.js
[18:54:45] elsurudo: I am on 5.1 and have no such file
[18:55:06] elsurudo: wait sorry, this isn’t my project that is on 5.1 :P
[18:55:17] epochwolf: Sorry, it's assets/config/manifest.js
[18:55:43] epochwolf: For 5.0, remove the regex listed in the issue.
[18:56:37] User458764: has joined #RubyOnRails
[18:57:28] elsurudo: From what file? no such regex in my assets initializer
[18:57:52] elsurudo: Ah right, nevermind
[18:57:55] elsurudo: it’s in there by default
[18:58:01] epochwolf: Yes, sorry. :)
[18:58:18] elsurudo: thanks for the help. i think i’ll just stick with my solution of renaming the file actually
[18:58:26] elsurudo: turns out to be less of a hack IMO
[18:58:39] elsurudo: but good to know nonetheless
[18:58:57] elsurudo: application.scss -> application_shared.scss
[19:02:35] Spami: has joined #RubyOnRails
[19:02:35] Spami: has joined #RubyOnRails
[19:06:05] armyriad: has joined #RubyOnRails
[19:06:53] tercenya: has joined #RubyOnRails
[19:08:43] hipertracker: has joined #RubyOnRails
[19:08:45] arBmind: has joined #RubyOnRails
[19:09:19] srinidhi: has joined #RubyOnRails
[19:09:50] dionysus69: has joined #RubyOnRails
[19:20:55] arBmind: has joined #RubyOnRails
[19:23:36] levifig: has joined #RubyOnRails
[19:25:37] zz_timnovinger: has joined #RubyOnRails
[19:29:49] Rodya_: has joined #RubyOnRails
[19:34:22] chouhoul_: has joined #RubyOnRails
[19:34:26] pupsicle: has joined #RubyOnRails
[19:41:11] hahuang61: has joined #RubyOnRails
[19:43:45] jgt: has joined #RubyOnRails
[19:43:48] Rodya_: has joined #RubyOnRails
[19:50:12] Spami: has joined #RubyOnRails
[19:50:13] Spami: has joined #RubyOnRails
[19:50:36] chouhoul_: has joined #RubyOnRails
[19:51:24] chouhoul_: has joined #RubyOnRails
[19:52:45] King_Rex: has joined #RubyOnRails
[19:54:21] defsdoor: has joined #RubyOnRails
[19:55:30] username1: has joined #RubyOnRails
[19:56:19] duderonomy: has joined #RubyOnRails
[19:56:58] Guest96_: has joined #RubyOnRails
[19:57:40] uksio: has joined #RubyOnRails
[19:58:56] marcdel: has joined #RubyOnRails
[19:59:32] shinnya: has joined #RubyOnRails
[20:02:25] workmad3: has joined #RubyOnRails
[20:02:34] ResidentBiscuit: has joined #RubyOnRails
[20:04:29] pwnd_nsfw`: has joined #RubyOnRails
[20:06:55] TheSuper: has joined #RubyOnRails
[20:08:45] marcdel: has joined #RubyOnRails
[20:16:34] Spami: has joined #RubyOnRails
[20:16:34] Spami: has joined #RubyOnRails
[20:19:16] DrYockel: has joined #RubyOnRails
[20:19:43] mlt-: I have 1:1 relationships in ERD (details for various types of objects), and I would like to allow a user to change (via dropdown) what object (type) he creates and thus change part of the HTML page. How would I approach it? I feel like I could get by with nested params, but I need to save form builder object somehow to render nested fields_for. I mean it is not a problem to pass #new?type=A , to achieve objects of different type
[20:19:44] mlt-: creation. However I don't want to reload entire page if user wants to create an object of different type. I want to reflect changes for corresponding fields only.
[20:20:37] mlt-: What is the best practice? Still go with #new?type=A approach and reload complete page?
[20:23:27] jeremiahlukus: has joined #RubyOnRails
[20:23:41] aperkins81: has joined #RubyOnRails
[20:23:53] SteenJobs_: has joined #RubyOnRails
[20:24:48] hakash: has joined #RubyOnRails
[20:25:00] jeremiahlukus: Does someone have a few min to help me setup stripe? . . . My stripe token is returning nil, I have no idea why. This is my first time with e-commerce
[20:25:48] jeremiahlukus: Is this site still active ? haha
[20:29:48] jenrzzz: has joined #RubyOnRails
[20:29:49] jenrzzz: has joined #RubyOnRails
[20:30:15] ResidentBiscuit: has joined #RubyOnRails
[20:33:11] levifig: has joined #RubyOnRails
[20:34:18] zz_timnovinger: has joined #RubyOnRails
[20:41:09] mephistophocles: has joined #RubyOnRails
[20:42:05] srinidhi: has joined #RubyOnRails
[20:43:48] jusa: has joined #RubyOnRails
[20:47:39] mephisto_: has joined #RubyOnRails
[20:50:59] iamdevnul: it's plenty active, you just have to be patient
[20:51:05] iamdevnul: never used stripe so i can't help you
[20:53:00] buckrockwell: has joined #RubyOnRails
[20:59:13] guacamole: has joined #RubyOnRails
[21:01:00] GodFather: has joined #RubyOnRails
[21:02:50] Technodrome: if i am trying to play with some old rails apps, should i just use rvm for this? or is there something better?
[21:03:01] TheSuper: RVM is fine.
[21:03:59] jenrzzz: has joined #RubyOnRails
[21:04:38] Technodrome: is there something more simple and easier than that TheSuper ?
[21:07:46] pupsicle: has joined #RubyOnRails
[21:10:21] helpa: has joined #RubyOnRails
[21:13:04] helpa: has joined #RubyOnRails
[21:16:50] Technodrome: i just wish there was a very simple way of doing it, almost like virtualenv in python
[21:21:22] TheSuper: has joined #RubyOnRails
[21:22:40] matthewd: Technodrome: I think bundler is a closer equivalent for virtualenv
[21:22:59] Technodrome: but i need an older version
[21:23:04] matthewd: Technodrome: At which point the question arises just how old said rails apps are
[21:23:15] Technodrome: 2009 looks like
[21:23:26] Technodrome: then another from 2011
[21:23:50] havenwood: Technodrome: chruby with gem_home is quite simple
[21:24:06] havenwood: Technodrome: https://github.com/postmodern/chruby
[21:24:11] havenwood: Technodrome: https://github.com/postmodern/gem_home
[21:24:14] matthewd: You should be able to set up a Gemfile for it, I think
[21:24:35] havenwood: If you really need a separate GEM_HOME. I'm suspicious it would be better to setup Bundler as well.
[21:25:06] havenwood: Technodrome: Are you trying to get them running in dev together or separately in prod?
[21:25:42] matthewd: The 2011 project likely already has a Gemfile, IIRC (and assuming it was up to date at the time)
[21:26:09] havenwood: Technodrome: What os/distro and dev or prod?
[21:26:35] Technodrome: its just an old project, i want to upgrade as a hobby project, its not running anymore
[21:26:57] Technodrome: just going to have some fun
[21:27:11] matthewd: I doubt it ;)
[21:33:06] b3l914n: has joined #RubyOnRails
[21:34:39] hive-mind: has joined #RubyOnRails
[21:35:16] GodFather: has joined #RubyOnRails
[21:35:20] b3l914n: has left #RubyOnRails: ()
[21:45:48] Technodrome: matthewd why not? :)
[21:48:12] matthewd: I think trying to drag something that old forward will be more painful than fun.. but don't let me discourage you from trying :)
[21:48:40] Technodrome: matthewd one line at a time, just trying to increase my learning
[21:48:57] helpa: has joined #RubyOnRails
[21:49:19] helpa: has joined #RubyOnRails
[21:50:01] Pumukel: has joined #RubyOnRails
[21:54:16] helpa: has joined #RubyOnRails
[21:54:49] helpa: has joined #RubyOnRails
[21:54:54] Robtop__: has joined #RubyOnRails
[21:56:22] helpa: has joined #RubyOnRails
[21:56:47] jaegerca: has joined #RubyOnRails
[21:57:23] jaegerca: Somewhat off topic, but can anyone refresh my memory on how AWS secures its api calls - I forget the name of it.
[21:57:43] helpa: has joined #RubyOnRails
[21:57:45] quazimodo: has joined #RubyOnRails
[21:58:53] cagomez: has joined #RubyOnRails
[21:59:35] helpa: has joined #RubyOnRails
[21:59:52] cagomez: in a controller, if the create action fails and calls render :new, should the entire #new method execute?
[22:01:00] tercenya: has joined #RubyOnRails
[22:01:16] helpa: has joined #RubyOnRails
[22:01:48] superscott: has joined #RubyOnRails
[22:02:04] b3l914n: has joined #RubyOnRails
[22:11:20] tercenya: has joined #RubyOnRails
[22:16:34] NoGodDamnIdea: has joined #RubyOnRails
[22:16:35] NoGodDamnIdea: has joined #RubyOnRails
[22:17:40] hahuang61: has joined #RubyOnRails
[22:20:48] hipertracker: has joined #RubyOnRails
[22:31:24] _3dwardsharp: has joined #RubyOnRails
[22:34:30] DoctorMonocular: has joined #RubyOnRails
[22:49:07] Jasaka|NA: has joined #RubyOnRails
[22:53:52] hipertracker: has joined #RubyOnRails
[22:58:14] Jasaka: has joined #RubyOnRails
[22:59:42] romeoh: has joined #RubyOnRails
[23:02:55] chouhoul_: has joined #RubyOnRails
[23:07:38] erlend: has joined #RubyOnRails
[23:08:56] jusa: has joined #RubyOnRails
[23:21:21] dopie: has joined #RubyOnRails
[23:26:36] Guest96: has joined #RubyOnRails
[23:26:38] marcdel: has joined #RubyOnRails
[23:30:39] bawsky: has joined #RubyOnRails
[23:33:04] aajjbb: has joined #RubyOnRails
[23:33:11] aperkins81: has joined #RubyOnRails
[23:44:44] cschneid_: has joined #RubyOnRails
[23:46:24] romeoh: has joined #RubyOnRails
[23:50:26] Pumukel: has joined #RubyOnRails
[23:51:16] renegadeandy: has left #RubyOnRails: ()
[23:51:29] superlou: has joined #RubyOnRails
[23:54:14] Guest96: has joined #RubyOnRails