« Back to channel list

#RubyOnRails - 08 April 2016

« Back 1 day Forward 1 day »
[00:00:18] weaksauce: what are your takeaways Technodrome
[00:00:34] girlydev: weaksauce: yes the emails have .com at the end :p altho i am checking to see if it might be b/c of stupid errors like this. and truthfully i dont think it is. and for the "400 errors", i dont think it's Request is missing or the wrong api (since in the doc, it literally shows you whats your api key)
[00:01:08] weaksauce: try to curl post one request and see if that works
[00:01:54] Devalo: has joined #RubyOnRails
[00:02:34] Arcaire: Where's Ropeney
[00:02:37] Arcaire: I want to talk about D O C K E R
[00:03:49] marcdel: has joined #RubyOnRails
[00:04:01] Technodrome: weaksauce just curious, what are your takeaways first?
[00:04:40] Technodrome: my biggest takeaway is that everyone says "they're prettty much the same" etc etc, hardly making a case for differences. I see it completely different, I see almost everything in how both works as different
[00:06:35] neanderslob: Hi everyone, I'm deeply nesting a set of fields using cocoon that happen to be associated by a join table. The issue that I'm running into is that the ID on each of these fields does not properly reflect the nesting structure (leaves out the top level model)
[00:06:52] rubyonrailed: has joined #RubyOnRails
[00:06:57] neanderslob: here's a gist: https://gist.github.com/BigMcLargeHuge/c89da57a69fbd5549392cffdcdfbf137 if anyone's interested
[00:07:56] jgpawletko: has joined #RubyOnRails
[00:07:57] girlydev: weaksauce, interesting. i guess my account needs to be authorized
[00:08:13] neanderslob: also, if you have a look at the gist, you will probably want to read "question.txt" first, as it lays out what's going on in more detail
[00:10:04] girlydev: thanks weaksauce for helping out! at least i know im not dillusional
[00:10:26] Radar: delusional
[00:11:01] totimkopf: it's like delusional but involves vinegary cucumbers
[00:11:33] neanderslob: totimkopf: often paired with yogurt and lemon juice?
[00:11:36] Radar: mmmmm delicious
[00:11:45] totimkopf: neanderslob: why not
[00:11:52] weaksauce: Technodrome i thought that django is explicit and rails is implicit
[00:11:58] weaksauce: girlydev cheers!
[00:12:30] girlydev: Radar totimkopf hahahaha. i'm tired guys :P
[00:12:37] Technodrome: weaksauce oh you can't use phrases like that, everyone says it! be creative :)
[00:12:56] weaksauce: i like rails more.
[00:13:28] maxdoubt: has joined #RubyOnRails
[00:13:45] weaksauce: except for the silly automatic pluralization of models
[00:13:55] weaksauce: I really dislike that
[00:15:35] Technodrome: weaksauce hmm yeah, i think the biggest change for me is django has alot more settings, and things are split up a ton more into different folders and apps
[00:16:56] mices: is polymorphic the same as belongs_to has_many of the same model?
[00:17:52] jenrzzz: has joined #RubyOnRails
[00:17:52] jenrzzz: has joined #RubyOnRails
[00:17:56] one_zero: has joined #RubyOnRails
[00:18:40] rake_db_migrate: has joined #RubyOnRails
[00:18:58] weaksauce: not really no mices
[00:19:32] weaksauce: unless i misread your explanation
[00:20:02] weaksauce: the canonical example is a pictures table
[00:20:10] mices: over here, http://stackoverflow.com/questions/25101089/mutual-friendship-rails-4 where it says create a friendable model ...
[00:20:22] yohle: has joined #RubyOnRails
[00:20:49] yohle: has joined #RubyOnRails
[00:21:48] mices: so i created the model and ran the migration
[00:22:15] mices: but they didn't give me any logic for the model.rb file
[00:22:26] weaksauce: the pictures table can be considered polymorphic because it can be used by many other tables(models). say you had a product image and a location image both of those could be stored as polymorphic association in those models with the foreign relation begin the pictures table
[00:23:11] SteenJobs: any idea why exporting an svg would make the image asset less opaque? (using sketch if that matters)
[00:23:18] mices: weaksauce, i see
[00:23:56] dannyguk: has joined #RubyOnRails
[00:24:09] mices: so in my case the User model has_many :users, through: :friendable
[00:24:21] mices: but what about the friendable model
[00:24:45] mices: it should belong_to User and also have_many users
[00:25:00] weaksauce: that's different that's a has and belongs to many type of relationship
[00:25:07] yohle: has joined #RubyOnRails
[00:25:16] mices: right thanks, i realize now that it's different
[00:25:23] mices: my memory was a little fuzzy
[00:25:31] weaksauce: basically it's a join table
[00:26:06] qejk: has joined #RubyOnRails
[00:26:07] mices: just getting back to rails after a couple of months of messing with system only stuff
[00:27:12] owenjones: has joined #RubyOnRails
[00:27:52] mices: weaksauce: so polymorphic: :true would only be used with a belongs_to ?
[00:28:41] weaksauce: yes because it can belong to more than one type of class
[00:28:53] weaksauce: or model if you use rails terms
[00:29:15] weaksauce: mices http://guides.rubyonrails.org/association_basics.html#polymorphic-associations
[00:29:39] twilling: has joined #RubyOnRails
[00:30:10] mices: it only comes up because i mistakenly referred to my polymorphic that i set up for imageables / pictures trying to get this logic together
[00:30:40] mices: it's not gonna have anything to do with polymorphics
[00:31:07] mices: just taking the opporuntity to get poly's clarified
[00:32:59] GodFather: has joined #RubyOnRails
[00:36:05] jgpawletko: has left #RubyOnRails: ()
[00:41:13] B1n4r10: has joined #RubyOnRails
[00:41:59] mattwithoos_: has joined #RubyOnRails
[00:43:00] nettoweb: has joined #RubyOnRails
[00:45:02] _Tariq: has joined #RubyOnRails
[00:48:11] smathy: has joined #RubyOnRails
[00:48:49] w09x: has joined #RubyOnRails
[00:50:04] mattwithoos_: has joined #RubyOnRails
[00:50:29] mattwithoos: has joined #RubyOnRails
[00:51:39] ramfjord: has joined #RubyOnRails
[00:53:07] newbieuser: has joined #RubyOnRails
[00:57:00] quazimodo: has joined #RubyOnRails
[00:57:55] flashpoint9: has joined #RubyOnRails
[01:05:47] SteenJobs: if i’m storing FAQ in my db so we can add new ones in the admin panel, is there any way to make links embedded in an answer clickable?
[01:06:30] SteenJobs: ahh gotta bounce, so don’t waste time answering
[01:11:04] ekinmur: has joined #RubyOnRails
[01:13:35] maxdoubt: has joined #RubyOnRails
[01:14:14] sevenseacat: has joined #RubyOnRails
[01:19:53] ur5us: has joined #RubyOnRails
[01:19:57] AnoHito: has joined #RubyOnRails
[01:21:43] GodFather: has joined #RubyOnRails
[01:23:22] Ropeney: has joined #RubyOnRails
[01:24:23] diego2: has joined #RubyOnRails
[01:24:49] diego2: has joined #RubyOnRails
[01:24:53] maxdoubt: has joined #RubyOnRails
[01:24:58] mwcmitchell: has joined #RubyOnRails
[01:27:12] maxdoubt: how can i keep cucumber from dropping the database on rake cucumber?
[01:29:48] maxdoubt: has joined #RubyOnRails
[01:30:43] weaksauce: bundle exec rake no:cucumber:for:you
[01:31:34] King_Rex: has joined #RubyOnRails
[01:37:59] SteenJobs: has joined #RubyOnRails
[01:38:07] GnuYawk: has joined #RubyOnRails
[01:38:31] rubyonrailed: has joined #RubyOnRails
[01:38:31] GnuYawk: has joined #RubyOnRails
[01:40:40] deadlock: has joined #RubyOnRails
[01:41:25] sp1rs: has joined #RubyOnRails
[01:48:26] B1n4r10: has joined #RubyOnRails
[01:49:29] smathy: has joined #RubyOnRails
[01:54:57] rubyonrails423: has joined #RubyOnRails
[01:55:06] Technodrome: has joined #RubyOnRails
[01:58:21] rubyonrails979: has joined #RubyOnRails
[02:03:11] rubyonrails979: <account>:<password>
[02:03:16] Radar: rubyonrails979: hi
[02:03:22] Radar: rubyonrails979: bno
[02:03:40] Radar: That has to be the vaguest help request ever.
[02:03:50] Radar: And I've been here for 10 years. You gotta think that I've seen some real shockers.
[02:04:17] Radar: You win. Here is your gold star 👉⭐️👈
[02:04:37] sami: has joined #RubyOnRails
[02:05:03] marcdel: has joined #RubyOnRails
[02:05:28] adavia: is it better to use the ember-cli-rails gem or to build to separate apps?
[02:05:39] Radar: HELPA HAS SPOKEN
[02:05:54] Radar: adavia: Separate apps I reckon.
[02:06:07] Radar: adavia: Encourages you to maintain + deploy them separately.
[02:07:18] lessless: has joined #RubyOnRails
[02:07:56] dstarh: has joined #RubyOnRails
[02:09:09] Technodrome: has joined #RubyOnRails
[02:09:59] maxdoubt: has joined #RubyOnRails
[02:10:54] _Tariq: has joined #RubyOnRails
[02:11:22] tvon: has joined #RubyOnRails
[02:11:28] rubyonrails979: Is this the main channel?
[02:11:36] barajasfab: has joined #RubyOnRails
[02:12:26] rubyonrails979: So are there any other channels?
[02:12:28] sevenseacat: the main channel for rails, yes :)
[02:12:38] ensyde__: has joined #RubyOnRails
[02:12:51] sevenseacat: there are squillions of other channels on freenode, yes
[02:12:52] context: i think so, freenode has lots of channels
[02:13:03] context: i cant guarantee for sure though
[02:13:05] context: but im pretty sure
[02:13:13] rubyonrails979: Lol, "Squillions".
[02:13:21] sevenseacat: thats the technical term.
[02:13:22] sevenseacat: ACTION nods
[02:14:42] rubyonrails979: Do you know if there is a channel for junior rails jobs?
[02:14:57] quazimodo: Radar: some one else took the star?
[02:15:08] sevenseacat: unlikely specifically for junior jobs
[02:15:59] HouseMD: has joined #RubyOnRails
[02:16:24] ekinmur_: has joined #RubyOnRails
[02:16:56] neanderslob_: has joined #RubyOnRails
[02:17:07] rickmasta: has joined #RubyOnRails
[02:22:49] mDuff: has joined #RubyOnRails
[02:24:42] dannyguk: has joined #RubyOnRails
[02:25:05] chagel: has joined #RubyOnRails
[02:31:37] smathy: has joined #RubyOnRails
[02:31:56] newbieuser: has joined #RubyOnRails
[02:33:02] bronson: has joined #RubyOnRails
[02:34:52] sdwrage: has joined #RubyOnRails
[02:39:32] baweaver: has joined #RubyOnRails
[02:42:47] SteenJobs: has joined #RubyOnRails
[02:43:46] mhoungbo: has joined #RubyOnRails
[02:47:53] tildes: has joined #RubyOnRails
[02:51:25] crameth: has joined #RubyOnRails
[02:51:37] Rubie: has joined #RubyOnRails
[02:51:49] nickenchuggets: has joined #RubyOnRails
[02:51:54] mattwithoos_: has joined #RubyOnRails
[02:53:24] wsk: has joined #RubyOnRails
[02:53:36] joaumg: has joined #RubyOnRails
[02:53:45] Chagel_: has joined #RubyOnRails
[02:53:58] jenrzzz: has joined #RubyOnRails
[02:55:10] MarkTR: has joined #RubyOnRails
[02:58:44] chagel: has joined #RubyOnRails
[02:59:19] _Tariq: has joined #RubyOnRails
[03:03:43] chagel: has joined #RubyOnRails
[03:03:49] chipotle: has joined #RubyOnRails
[03:06:03] marcdel: has joined #RubyOnRails
[03:06:30] rubyonrailed: has joined #RubyOnRails
[03:12:55] bruno-: has joined #RubyOnRails
[03:14:06] chipotle: has joined #RubyOnRails
[03:14:33] braincrash: has joined #RubyOnRails
[03:18:24] zprz: has joined #RubyOnRails
[03:20:22] chagel: has joined #RubyOnRails
[03:20:45] nodejunkie: has joined #RubyOnRails
[03:24:43] bruno-: has joined #RubyOnRails
[03:24:50] cpruitt: has joined #RubyOnRails
[03:26:35] chagel: has joined #RubyOnRails
[03:31:04] Radar: quazimodo: yeah sorry
[03:31:10] Radar: quazimodo: You'll have to try extra hard.
[03:31:33] sevenseacat: don't tempt him.
[03:34:02] arBmind1: has joined #RubyOnRails
[03:34:07] chagel: has joined #RubyOnRails
[03:36:09] georgedrummond: has joined #RubyOnRails
[03:37:41] chipotle: has joined #RubyOnRails
[03:37:44] sp1rs: has joined #RubyOnRails
[03:40:44] AnoHito: has joined #RubyOnRails
[03:41:32] quazimodo: i'm trying so hard right now
[03:43:19] _Tariq: has joined #RubyOnRails
[03:45:59] dvinciguerra__: has joined #RubyOnRails
[03:46:50] wsk: has joined #RubyOnRails
[03:47:01] wsk: has left #RubyOnRails: ()
[03:48:14] wsk: has joined #RubyOnRails
[03:50:04] sypheren: has joined #RubyOnRails
[03:51:55] new_bruins: has joined #RubyOnRails
[03:52:57] Inside: has joined #RubyOnRails
[03:52:57] Inside: has joined #RubyOnRails
[03:59:00] pawnbox: has joined #RubyOnRails
[04:03:31] Devalo: has joined #RubyOnRails
[04:04:18] georgedrummond: has joined #RubyOnRails
[04:11:53] sp1rs: has joined #RubyOnRails
[04:15:40] DLSteve: has joined #RubyOnRails
[04:16:41] marcdel: has joined #RubyOnRails
[04:17:42] duncannz: has joined #RubyOnRails
[04:18:46] duncannz: has joined #RubyOnRails
[04:18:56] pawnbox: has joined #RubyOnRails
[04:25:02] cpruitt: has joined #RubyOnRails
[04:25:14] hxegon: has joined #RubyOnRails
[04:25:24] dannyguk: has joined #RubyOnRails
[04:25:31] newbieuser: has joined #RubyOnRails
[04:27:16] sp1rs: has joined #RubyOnRails
[04:29:41] sadaf2606: has joined #RubyOnRails
[04:31:07] SteenJobs: has joined #RubyOnRails
[04:31:08] ramfjord: has joined #RubyOnRails
[04:34:47] new_bruins: why does rails think that my defualt paramater that I pass will be :id
[04:35:17] Radar: new_bruins: because you haven't told it otherwise
[04:35:40] new_bruins: where would I specify that? or where can I read more on that?
[04:37:03] new_bruins: ah, maybe here http://stackoverflow.com/questions/2837102/changing-the-id-parameter-in-rails-routing
[04:37:23] Radar: The first answer on that does not do what you think it odes.
[04:37:36] sevenseacat: oh definitely not
[04:37:38] Radar: I think you want to rename params[:id] to something else, yes?
[04:37:59] new_bruins: okay, is this more what I am looking for? http://railscasts.com/episodes/63-model-name-in-url
[04:38:29] sevenseacat: that depends on what you're looking for
[04:38:32] sevenseacat: there are two options really
[04:40:30] new_bruins: what are the options?
[04:40:58] sevenseacat: 1) you're looking to rename the parameter from :id to something else. 2) you're looking to change that value actually gets put in that param ket
[04:43:39] _djbkd: has joined #RubyOnRails
[04:44:23] new_bruins: that worked! solid. thanks
[04:48:03] kies: has joined #RubyOnRails
[04:48:51] njero: has joined #RubyOnRails
[04:51:08] hinbody: has joined #RubyOnRails
[04:57:57] fedexo: has joined #RubyOnRails
[04:59:14] owenjones: has joined #RubyOnRails
[05:00:46] iamvery: has joined #RubyOnRails
[05:00:47] rvanlieshout: has joined #RubyOnRails
[05:02:04] ascarter: has joined #RubyOnRails
[05:02:28] Spami_: has joined #RubyOnRails
[05:03:08] sami: has joined #RubyOnRails
[05:09:23] rake_db_migrate: has joined #RubyOnRails
[05:09:48] ascarter: has joined #RubyOnRails
[05:11:57] ascarter: has joined #RubyOnRails
[05:13:47] chagel: has joined #RubyOnRails
[05:18:22] phredus: has joined #RubyOnRails
[05:18:49] chagel: has joined #RubyOnRails
[05:18:58] sp1rs: has joined #RubyOnRails
[05:22:37] Disavowed: has joined #RubyOnRails
[05:24:02] jero_: has joined #RubyOnRails
[05:24:09] nartes: has joined #RubyOnRails
[05:24:36] sudoubuntu: has joined #RubyOnRails
[05:30:08] penguinpowernz: has joined #RubyOnRails
[05:31:22] jero_: has joined #RubyOnRails
[05:36:14] Devalo: has joined #RubyOnRails
[05:40:45] Rubie: has joined #RubyOnRails
[05:41:52] yfeldblum: has joined #RubyOnRails
[05:47:12] Cohedrin: has joined #RubyOnRails
[05:47:34] Spami: has joined #RubyOnRails
[05:51:20] chagel: has joined #RubyOnRails
[05:56:58] czerasz: has joined #RubyOnRails
[05:58:18] moeabdol1: has joined #RubyOnRails
[06:02:52] nartes: has joined #RubyOnRails
[06:06:43] Chagel_: has joined #RubyOnRails
[06:10:22] lumidify: has joined #RubyOnRails
[06:10:35] lumidify: has left #RubyOnRails: ("Leaving")
[06:11:13] krz: has joined #RubyOnRails
[06:16:30] joshhbk: has joined #RubyOnRails
[06:20:53] tildes: has joined #RubyOnRails
[06:24:24] chagel: has joined #RubyOnRails
[06:25:59] agit0: has joined #RubyOnRails
[06:26:08] dannyguk: has joined #RubyOnRails
[06:26:14] jas02: has joined #RubyOnRails
[06:26:32] Spami_: has joined #RubyOnRails
[06:30:56] polyidus: has joined #RubyOnRails
[06:31:12] petor: has joined #RubyOnRails
[06:31:19] pawnbox: has joined #RubyOnRails
[06:35:16] krz: has joined #RubyOnRails
[06:35:53] ascarter: has joined #RubyOnRails
[06:35:59] bronson: has joined #RubyOnRails
[06:36:16] Macaveli: has joined #RubyOnRails
[06:40:29] mark2: has joined #RubyOnRails
[06:41:50] arup_r: has joined #RubyOnRails
[06:41:57] yfeldblum: has joined #RubyOnRails
[06:46:14] nartes: has joined #RubyOnRails
[06:49:49] chagel: has joined #RubyOnRails
[06:50:57] pawnbox: has joined #RubyOnRails
[06:54:59] chagel: has joined #RubyOnRails
[06:57:03] sp1rs: has joined #RubyOnRails
[06:57:43] sp1rs: has joined #RubyOnRails
[06:59:16] comrad: has joined #RubyOnRails
[07:03:13] ascarter: has joined #RubyOnRails
[07:03:51] alaing: has joined #RubyOnRails
[07:04:59] ascarter: has joined #RubyOnRails
[07:05:20] sp1rs: has joined #RubyOnRails
[07:06:01] leksster: has joined #RubyOnRails
[07:06:17] solars: has joined #RubyOnRails
[07:06:56] georgedrummond: has joined #RubyOnRails
[07:10:27] petor: has joined #RubyOnRails
[07:11:14] nartes: has joined #RubyOnRails
[07:15:28] chagel: has joined #RubyOnRails
[07:15:33] petertretyakov: has joined #RubyOnRails
[07:17:41] Devalo: has joined #RubyOnRails
[07:19:03] futilegames: has joined #RubyOnRails
[07:20:38] alaing: has joined #RubyOnRails
[07:20:43] alaing: has joined #RubyOnRails
[07:20:50] dannyguk: has joined #RubyOnRails
[07:21:30] petertretyakov: Does anybody knows Rails 5 release date? March, 16 is already over ))
[07:22:42] sevenseacat: its not even in rc yet, so release is some way off.
[07:22:59] ur5us: has joined #RubyOnRails
[07:22:59] alaing: hi any idea why my method is throwiing NoMethodError: undefined method `concat' error? https://gist.github.com/aliuk2012/672d601db37c289745897f77bfef9541
[07:23:18] AimlessRAven: has joined #RubyOnRails
[07:23:35] futilegames: has joined #RubyOnRails
[07:23:41] AimlessRAven: hi i use gretel gem for breadcrumbs, how to define global separator in breadcrumbs.rb.. i just dont want to define it in each view
[07:24:02] ferr: has joined #RubyOnRails
[07:24:49] rvanlieshout: alaing: see our delegate
[07:25:00] rvanlieshout: you're delegating content_tag and tag to @template
[07:25:54] kies: has joined #RubyOnRails
[07:26:39] alaing: rvanlieshout: ah so i need to add concat too?
[07:27:01] rvanlieshout: if @template is the one that provides concat yes
[07:29:02] alaing: thanks, now i 'm getting a different error undefined method `<<' for nil:NilClass
[07:29:40] alaing: as part of the concat
[07:29:55] rvanlieshout: i don't know how you should use concat
[07:29:58] rvanlieshout: i mostly use safe_join and a map
[07:30:02] petertretyakov: has joined #RubyOnRails
[07:31:26] alaing: as part of my gist I've places a copy of the markup that i'm hoping the form builder can output
[07:31:46] alaing: <label><input type="radio">my radio button</label>
[07:31:52] rvanlieshout: safe_join(records.map{ |r| ... })
[07:34:13] alaing: rvanlieshout: thank you so much thats getting me closer to my goal
[07:34:48] alaing: i'll carry on :-)
[07:35:49] rake_db_migrate: has joined #RubyOnRails
[07:35:58] Ergo: has joined #RubyOnRails
[07:39:50] chagel: has joined #RubyOnRails
[07:44:19] PedramT: has joined #RubyOnRails
[07:46:48] ur5us: has joined #RubyOnRails
[07:47:42] petor: has joined #RubyOnRails
[07:48:06] solars: has joined #RubyOnRails
[07:49:22] dionysus69: has joined #RubyOnRails
[07:49:32] mbreedlove: has joined #RubyOnRails
[07:49:39] mikecmpbll: has joined #RubyOnRails
[07:53:11] sosuniverse: has joined #RubyOnRails
[07:53:18] dpg_sf: has left #RubyOnRails: ()
[07:54:00] dpg1: has joined #RubyOnRails
[07:54:29] dpg1: anyone know of a reason sidekiq + redis would sit with a job in the queue and not process it? how do I start it going?
[07:59:41] rvanlieshout: dpg_: what queue?
[08:01:53] dannyguk: has joined #RubyOnRails
[08:03:40] petor: has joined #RubyOnRails
[08:03:50] mikecmpbll: has joined #RubyOnRails
[08:03:57] dpg1: rvanlieshout: default queue
[08:04:14] bruce_lee: has joined #RubyOnRails
[08:05:27] rvanlieshout: dpg_: same redis database?
[08:05:34] rvanlieshout: is it visible in the queue of sidekiq web?
[08:05:45] dpg1: rvanlieshout: https://i.imgur.com/ACmFjL4.png
[08:06:02] dpg1: hat do you mean by "same redis database"
[08:06:05] rvanlieshout: and your workers?
[08:06:07] dpg1: I have a default install of redis.
[08:06:18] dpg1: how do I set-up workers? I didn't see that on the install page?
[08:06:32] dpg1: (this is my missing piece most likely)
[08:06:37] rvanlieshout: did you start sidekiq?
[08:06:42] rvanlieshout: you start separate workers
[08:07:28] dpg1: oh, well I just ran sidekiq in the shell... ah ok
[08:07:37] rvanlieshout: that's a worker indeed
[08:08:07] dpg1: snazzy. thanks. hm. I wonder why I missed this in the docs.
[08:08:07] ur5us: has joined #RubyOnRails
[08:08:23] rvanlieshout: you'll also have to setup a running sidekiq on your production server
[08:08:27] rvanlieshout: which you restart when deploying
[08:10:22] dpg1: rvanlieshout: hm, how do I keep sidekiq running?
[08:10:31] dpg1: can it just run a worker in daemon mode?
[08:10:44] rvanlieshout: that won't start it when the server reboots
[08:10:45] dpg1: I'll rtfm if you don't know off the top of your head.
[08:10:52] jsrn: has joined #RubyOnRails
[08:11:00] rvanlieshout: you really want to use systemctl, initctl, whatever your env provides
[08:11:23] rvanlieshout: and you want to restart that thing as task when deploying
[08:11:27] yfeldblum: has joined #RubyOnRails
[08:11:33] rvanlieshout: similar in restarting a rails server instance
[08:13:03] marr: has joined #RubyOnRails
[08:13:08] darutoko: has joined #RubyOnRails
[08:13:10] dpg1: cool thanks for the info
[08:18:54] d0nn1e: has joined #RubyOnRails
[08:19:02] blackhuey: has joined #RubyOnRails
[08:20:17] pawnbox: has joined #RubyOnRails
[08:23:35] Nuck: has joined #RubyOnRails
[08:24:41] AimlessRAven: has joined #RubyOnRails
[08:25:03] AimlessRAven: in rails is there some f.input attribute to validate field
[08:25:21] AimlessRAven: i knwo i can do it in model validates :email.. presence: true, but i want only single input to validate inline
[08:25:22] rvanlieshout: AimlessRaven: you don't validate fields in the view
[08:25:41] rvanlieshout: you just have to fix the validation in your model
[08:26:02] rvanlieshout: and if you don't always want to ensure presence of email, make that conditional
[08:27:21] hello9: has joined #RubyOnRails
[08:28:31] hello9: hey, anyone know if you can use errors.add to multiple attributes at once (e.g errors.add [:post1, :post2], "POST ERROR") which doesn't work obviously but that kind of thing
[08:29:56] baweaver: has joined #RubyOnRails
[08:33:31] blackmesa: has joined #RubyOnRails
[08:34:15] moep: has joined #RubyOnRails
[08:34:35] arBmind: has joined #RubyOnRails
[08:36:22] benlieb: has joined #RubyOnRails
[08:36:36] mosez: has joined #RubyOnRails
[08:40:27] ur5us: has joined #RubyOnRails
[08:41:19] skislak: has joined #RubyOnRails
[08:41:54] rubyonrailed: has joined #RubyOnRails
[08:45:32] petertretyakov: has joined #RubyOnRails
[08:47:52] snowy: has joined #RubyOnRails
[08:53:09] chagel: has joined #RubyOnRails
[08:54:05] emilkarl: has joined #RubyOnRails
[08:57:08] davee_: has joined #RubyOnRails
[08:58:08] chagel: has joined #RubyOnRails
[08:59:10] bruce_lee: has joined #RubyOnRails
[08:59:58] DylanJ: hello9: don't think so, but you can do [:post1, :post2].each { |x| errors.add(x, 'post error') }
[09:00:19] hello9: DylanJ, the error then will show up twice right?
[09:00:22] hello9: the message
[09:01:38] DylanJ: depends how you display the errors on the model.
[09:01:41] jgt4: has joined #RubyOnRails
[09:02:15] DylanJ: but if you were to do errors.full_messages.to_sentence for instance you will see the error twice.
[09:02:30] tildes: has joined #RubyOnRails
[09:02:58] mdw: has joined #RubyOnRails
[09:03:58] tvw: has joined #RubyOnRails
[09:05:27] pawnbox: has joined #RubyOnRails
[09:06:32] robbyoconnor: has joined #RubyOnRails
[09:09:57] arup_r: has joined #RubyOnRails
[09:10:19] georgedrummond: has joined #RubyOnRails
[09:11:29] chagel: has joined #RubyOnRails
[09:12:20] sp1rs: has joined #RubyOnRails
[09:14:08] corl: has joined #RubyOnRails
[09:16:58] akkmaxon: has joined #RubyOnRails
[09:18:26] PedramT: has joined #RubyOnRails
[09:24:16] rake_db_migrate: has joined #RubyOnRails
[09:25:56] mosez: has joined #RubyOnRails
[09:26:25] merida: has joined #RubyOnRails
[09:26:54] ferr: How would I benchmark my controller to know what takes the most time to be executed?
[09:27:28] moeabdol: has joined #RubyOnRails
[09:29:18] shmoon_: has joined #RubyOnRails
[09:29:32] srinidhi: has joined #RubyOnRails
[09:30:02] workmad3: has joined #RubyOnRails
[09:31:51] ramfjord: has joined #RubyOnRails
[09:33:09] chagel: has joined #RubyOnRails
[09:33:12] blackhuey: has joined #RubyOnRails
[09:33:49] arup_r: has joined #RubyOnRails
[09:34:14] dpg1: ferr: newrelic?
[09:34:33] PedramT: has joined #RubyOnRails
[09:34:50] dpg1: I'd be interested to know if there is a monitoring tool that I can use locally that captures that stuff.
[09:35:05] Ropeney: has joined #RubyOnRails
[09:35:10] smoitra: has joined #RubyOnRails
[09:36:50] TheRokh: has joined #RubyOnRails
[09:37:39] dionysus69: has joined #RubyOnRails
[09:38:09] deavid: has joined #RubyOnRails
[09:40:34] Sylario: has joined #RubyOnRails
[09:40:40] ferr: I get this Completed 200 OK in 16907ms (Views: 0.1ms | ActiveRecord: 3381.6ms)
[09:40:54] ferr: My controller only renders json, so the render to json process is taking so long?
[09:41:45] leksster: has joined #RubyOnRails
[09:41:56] mbreedlove: has joined #RubyOnRails
[09:41:56] rvanlieshout: ferr: how big is that json?
[09:42:37] Sylario: When I patch a model with paperclip it fails on content type validation. The submitted form only update 2 boolean and does not contain anything related to the attachement.
[09:43:03] Sylario: I do not find any info on paperclip model and partial update
[09:44:34] mosez: has joined #RubyOnRails
[09:44:50] rvanlieshout: sylario: you've got a validation on the content type?
[09:44:57] rvanlieshout: and it's not about partial update
[09:45:02] rvanlieshout: it could be invalid to start with
[09:45:04] ferr: rvanlieshout: how would I measure the json?
[09:45:19] rvanlieshout: download it, size in kb i guess
[09:45:25] Sylario: rvanlieshout: trying to reupload an attachement to check
[09:45:38] ferr: rvanlieshout: 131kb
[09:46:39] Sylario: rvanlieshout: nice catch, my dev data was probably faulty because dev
[09:46:43] Sylario: rvanlieshout: thx
[09:46:58] rvanlieshout: ferr: that's quite a response. try to limit the number of results in the json. just to see if it's just the amount that's slowing things down
[09:47:00] Sylario: so paperclip validate file even without changes
[09:47:06] rvanlieshout: sylario: you're welcome
[09:47:17] rvanlieshout: not paperclip. rails will run validations on save
[09:47:19] ferr: rvanlieshout: yes, it is the amount
[09:47:54] sergio__: has joined #RubyOnRails
[09:48:10] rvanlieshout: ferr: how are you creating the actual json?
[09:49:28] ferr: rvanlieshout: that is the main part of the code https://gist.github.com/Fercell/121ba6eefb44a0bdc17f6a1aeceafb03
[09:50:04] rvanlieshout: ah. that's quite some operation
[09:50:37] rvanlieshout: you might want to see if you're able to get the right list using pure sql
[09:50:39] rvanlieshout: and only the fields you need
[09:51:25] ferr: rvanlieshout: what if I would create new table and store sorted information to that table every 15 minutes
[09:51:35] walidvb: has joined #RubyOnRails
[09:51:36] ferr: would taking information from that sorted table be faster?
[09:52:29] walidvb: i'm trying, again, and failing, again, to get a list of records that have different :country_name
[09:52:33] sonOfRa: has joined #RubyOnRails
[09:52:57] ferr: rvanlieshout: shall I only store data to that table and request it every controller hit
[09:53:10] walidvb: Model.select(:country_name).uniq is the closest i get to, but i lose the rest of the record if i do that (no :id, or other columns)
[09:53:30] rvanlieshout: walidvb: Model.pluck(:country_name).uniq
[09:53:38] walidvb: tried with distinct but that gives me distinct records, rather than distinct ON country
[09:53:40] rvanlieshout: what do you want?
[09:54:10] walidvb: I want all records, but one per different country_name
[09:54:26] rvanlieshout: ferr: you want a single query that returns exactly what you need. so you can use .pluck or raw sql and convert that to json
[09:54:33] rvanlieshout: over having rails create gazilion instances
[09:54:44] rvanlieshout: walidvb: Model.group(:country_name)
[09:55:32] walidvb: rvanlieshout: pgsql too? i'm getting an error with that
[09:55:37] walidvb: PG::GroupingError: ERROR: column "screenshots.id" must appear in the GROUP BY clause or be used in an aggregate function
[09:55:52] rvanlieshout: walidvb: then you need to aggregate those. cause postgres doesn't know what id to return
[09:56:01] rvanlieshout: e.g. it has 4 records for a single country_name
[09:56:04] rvanlieshout: what id should it use?
[09:56:31] walidvb: well, i'd like the 1st record for each country, ordered by :created_at
[09:57:29] rvanlieshout: something like http://stackoverflow.com/questions/3800551/select-first-row-in-each-group-by-group might help
[09:57:35] rvanlieshout: you select MIN(x.created_at) and the rest
[09:57:58] rvanlieshout: although postgres has some row_number over partiion stuff
[09:58:33] walidvb: hm ok thx let me check that
[09:58:54] walidvb: sounds over complicated for a simple query(as in, humanly simple query), but ok ^^
[09:59:08] rvanlieshout: it is, cause you need to tell the db what to do
[09:59:33] Regulati_: has joined #RubyOnRails
[09:59:50] norc: has joined #RubyOnRails
[09:59:58] rvanlieshout: http://www.postgresql.org/docs/9.1/static/tutorial-window.html
[10:01:16] myntcake: has joined #RubyOnRails
[10:01:46] norc: has joined #RubyOnRails
[10:05:13] emilkarl: has joined #RubyOnRails
[10:08:53] walidvb: has joined #RubyOnRails
[10:08:57] walidvb: got disconnecte
[10:09:02] walidvb: thanks rvanlieshout
[10:09:16] walidvb: ended up with Screenshot.find_by_sql(%{SELECT DISTINCT ON (country_name) id, country_name, screenshot_file_name, screenshot_content_type, screenshot_updated_at, updated_at FROM screenshots})
[10:09:25] GodFather: has joined #RubyOnRails
[10:09:27] rvanlieshout: well... no need to use find_by_sql though
[10:09:38] rvanlieshout: Screenshot.select('DISTINCT ON (country_name) id, country_name, screenshot_file_name, screenshot_content_type, screenshot_updated_at, updated_at
[10:09:45] rvanlieshout: would keep the arel stuff
[10:11:09] walidvb: better that way, indeed
[10:11:21] walidvb: now i need to find how to get the most recent for each country ^^
[10:12:03] rvanlieshout: for that you might want to read about those windows functions. you can have ordering in grouping with postgres
[10:14:04] walidvb: i'll read through
[10:14:09] walidvb: thx again, and have a nice day!
[10:15:44] emilkarl: has joined #RubyOnRails
[10:18:02] chagel: has joined #RubyOnRails
[10:21:19] workmad3: walidvb: did you try `Screenshot.select('DISTINCT ON (screenshots.country_name) screenshots.*')` so you wouldn't need to update the query for every new column you introduce? :)
[10:22:16] arup_r: has joined #RubyOnRails
[10:26:14] sp1rs: has joined #RubyOnRails
[10:28:47] bronson: has joined #RubyOnRails
[10:30:25] rubyonrailed: has joined #RubyOnRails
[10:32:21] walidvb: thank you haha
[10:34:58] aaronr: has joined #RubyOnRails
[10:38:53] AimlessRAven: has joined #RubyOnRails
[10:39:18] AimlessRAven: can anyone help me to transform this sql request https://gist.github.com/anonymous/7c7556a85ec357cd476947bbe37d32bc to active record request
[10:40:29] triangles: has joined #RubyOnRails
[10:42:06] Yeomra: has joined #RubyOnRails
[10:46:31] pawnbox: has joined #RubyOnRails
[10:46:56] moeabdol: has joined #RubyOnRails
[10:47:53] dionysus69: has joined #RubyOnRails
[10:49:30] AimlessRAven: can anyone help me to transform this sql request https://gist.github.com/anonymous/7c7556a85ec357cd476947bbe37d32bc to rails active-record request
[10:51:02] nfk|laptop: has joined #RubyOnRails
[10:53:30] sthns: has joined #RubyOnRails
[10:56:28] rickmasta: has joined #RubyOnRails
[10:58:17] AimlessRAven: anyone here who can help me ?
[10:59:36] matthewd: AimlessRaven: !rule11
[10:59:36] helpa: AimlessRaven: Do not repeat your question every 5 minutes expecting somebody to answer it. If you do not get a reply after the first time perhaps posting your question on StackOverflow (http://stackoverflow.com) would help you. Linking to the question in the channel after you've posted it is OK.
[10:59:40] matthewd: AimlessRaven: !rule10
[10:59:40] helpa: AimlessRaven: Do not beg / plead with people to help you. This includes asking questions like "Any ideas?" after posting your original question.
[11:00:22] Chagel_: has joined #RubyOnRails
[11:00:26] ferr: rvanlieshout: I cached the data and the response from 35 seconds is gone to 35ms
[11:01:12] matthewd: AimlessRaven: What have you tried so far?
[11:01:43] nettoweb: has joined #RubyOnRails
[11:02:26] fx: has joined #RubyOnRails
[11:02:36] AimlessRAven: matthewd: i need to update my request to use activerecord request, not sql
[11:04:01] mosez: has joined #RubyOnRails
[11:06:29] bob434: has joined #RubyOnRails
[11:07:50] chagel: has joined #RubyOnRails
[11:08:31] merida: has joined #RubyOnRails
[11:10:12] sevenseacat: that doesnt answer the question
[11:11:31] blackmesa: has joined #RubyOnRails
[11:12:09] gaussblurinc1: has joined #RubyOnRails
[11:14:05] maya-migo: has joined #RubyOnRails
[11:14:57] Detch: has joined #RubyOnRails
[11:16:13] gaussblurinc1: hello! am I right that rails migration workflow is: rake task db:migrate takes all migrations files ( with timestamps that indicate files positions and allow sort them in time order ) and put them into ActiveRecord::Migration::CommandRecorder, which will try to apply them or revert everything(not everything) back? how rails understand that these migrations'd been already applied?
[11:16:44] nfk|laptop: gaussblurinc1, from the top of my head the DB or something records the last applied migration or something
[11:16:49] antgel: has joined #RubyOnRails
[11:16:49] rvanlieshout: gaussblurinc1: it'll use the number in the beginning of a file
[11:16:57] rvanlieshout: and use that to order and save it in a table called schema_migrations
[11:18:03] nfk|laptop: in practice as long as you haven't done anything funky, you should be able to simply run rake db:migrate on whatever DB you have and it will migrate it to the latest schema; and what more can you ask for?
[11:18:04] gaussblurinc1: rvanlieshout: ok, so, rake task gather latest schema_migrations entity ( timestamp from it ) and filter migrations that a later that this timestamp?
[11:18:10] maya-migo: Hi People, I was wondering if someone could help me out with making a Database model for an IP registration page. Currently I was think about having 2 models: Range and RangeSubnet, whereas the RangeSubnet belongs_to the Range and the Range has_many RangeSubnet's. But here is the thing, I would like to be able to have a possible SubRange model depending on how large the Range mask is.. Should I use polymorphic associations or
[11:18:10] maya-migo: perhaps has many trough, anyone has some thoughts?? Greatly appreciated! Mick
[11:18:42] rvanlieshout: gaussblurinc1: it'll gather anything in that folder that's not in schema_migrations and run that
[11:19:01] rvanlieshout: maya-migo: what exactly are you trying to store?
[11:19:22] nfk|laptop: rvanlieshout, your IP when you make hatespeak online or slander the gov
[11:19:29] nfk|laptop: or so it sounds like
[11:19:43] rvanlieshout: that doesn't explain the range part :)
[11:19:49] herbst: has joined #RubyOnRails
[11:19:49] herbst: has joined #RubyOnRails
[11:20:08] maya-migo: Within Range there would be a base_address(ipv4 or ipv6), mask, name and description, in RangeSubnet a subset of this base_address (ipv4 or ipv6)
[11:20:22] nfk|laptop: would it not be for filtering out a specific subnet or somesuch?
[11:20:46] gaussblurinc1: rvanlieshout: how does it understand that migration applied in past? it can only take timestamp and compare it. so, it take timestamp from latest applied migration ( ? ) and compare all migration files ( their names contain timestamps ) to decide about their necessity.
[11:21:22] rvanlieshout: gaussblurinc1: iterate over all files in db/migrations, timestamp present in schema_migrations? next...
[11:21:33] rvanlieshout: maya-migo: so what exactly do you want to store?
[11:21:33] drptbl_: has joined #RubyOnRails
[11:21:35] rvanlieshout: it doesn't make sense yet
[11:22:18] nibbo: has joined #RubyOnRails
[11:22:39] baash05: has joined #RubyOnRails
[11:23:02] baash05: Hey all.. anyone use the github version of carrier wave?
[11:23:16] rvanlieshout: baash05: 'the github version'?
[11:23:25] gaussblurinc1: rvanlieshout: architectural questions :) ok, so, it doesn't use any ActiveRecord::Migration::Migrator ( Executor? ) which store somekind of db knowledge, rake task simply retrieves latest db version ( which was latest migration timestamp ).
[11:23:39] rvanlieshout: it's not the latest
[11:23:41] rvanlieshout: it compares any
[11:23:49] rvanlieshout: if you remove 1 entry from your schema_migrations table it'll run that one again
[11:23:57] rvanlieshout: doesn't matter if it's the first, middle or last
[11:24:01] maya-migo: rvanlieshout: IP ranges, for example 172.16.0.0/16 in Range, 172.16.1.0/24 in a possible SubRange model or smth, and in there smaller ranges which are handed out to customers like 172.16.1.0/29 etc
[11:24:08] rvanlieshout: and i haven't looked at what code is touched for that
[11:24:39] rvanlieshout: maya-migo: and what's wrong with saving an ip + range in separate models? although you can substract the range from the ip + mask
[11:24:47] rvanlieshout: efficiently if the db has native fields for ip addresses
[11:25:16] baash05: The github version of carrier wave includes the ability to have many files in one field.
[11:25:26] rvanlieshout: the version in master you mean?
[11:25:32] sp1rs: has joined #RubyOnRails
[11:25:32] gaussblurinc1: rvanlieshout: thanks!
[11:25:47] AimlessRAven: can anyone help me to transform this sql request https://gist.github.com/anonymous/7c7556a85ec357cd476947bbe37d32bc to rails active-record request
[11:25:53] kimegede: has joined #RubyOnRails
[11:25:57] baash05: But the latest one that comes down with gem doesn't have the many.
[11:26:21] maya-migo: rvanlieshout: So you mean if I'd make a single model met ip + mask, can be /32 or /24, and dynamically substract from there in which range it fits etc?
[11:26:39] rvanlieshout: dependent of what you need to do with it, yes
[11:26:54] baash05: The only problem is that the "master" doesn't work.. mimetype file not found
[11:26:59] rvanlieshout: baash05: then they didn't release it yet. might be for good reasons
[11:27:04] rvanlieshout: what's the full error?
[11:27:06] delgiudices: has joined #RubyOnRails
[11:27:21] baash05: dependencies.rb:274:in `require': No such file to load -- carrierwave/processing/mime_types (LoadError)
[11:27:30] emilkarl: has joined #RubyOnRails
[11:27:54] rvanlieshout: ah like that. so then i guess it's really unstable
[11:27:54] baash05: Yeah.. good reason.. but still I want the multi file.
[11:28:23] rvanlieshout: then ask the folks at carrierwave what's up with that and if they are planning a release
[11:28:54] diegoaguilar: has joined #RubyOnRails
[11:29:08] ldnunes: has joined #RubyOnRails
[11:29:40] jas02: has left #RubyOnRails: ()
[11:30:09] baash05: I was hoping someone here had it running :)
[11:30:13] maya-migo: rvanlieshout: I need to be able to update the RIPE DB from the tool based on a ip+mask, and assign it into routing_instances, LIR's etc, but that last part is already created in the tool. thank you for your interesting comment, that option hasnt crossed my mind. it gives me something to think about..
[11:30:30] lyoshajapan: has joined #RubyOnRails
[11:31:02] georgedrummond: has joined #RubyOnRails
[11:32:56] antgel: has joined #RubyOnRails
[11:33:40] sonOfRa: has joined #RubyOnRails
[11:36:43] n008f4g_: has joined #RubyOnRails
[11:42:07] lyoshajapan: has joined #RubyOnRails
[11:46:29] nartes: has joined #RubyOnRails
[11:46:39] tribals: has joined #RubyOnRails
[11:48:06] tribals: how to prepend view paths of ActionView in rails 4.0? There is no ActionView::Base.prepend_view_path nor ActionView::ViewPaths.prepend_view_path in this version
[11:48:47] antgel: has joined #RubyOnRails
[11:52:21] King_Rex: has joined #RubyOnRails
[11:53:19] mbreedlove: has joined #RubyOnRails
[11:54:00] triangles3: has joined #RubyOnRails
[11:57:07] someish: has joined #RubyOnRails
[11:58:18] Ergo^: has joined #RubyOnRails
[11:59:36] petor: has joined #RubyOnRails
[12:01:42] drptbl: has joined #RubyOnRails
[12:04:45] sudoubuntu: has joined #RubyOnRails
[12:06:32] davee_: has joined #RubyOnRails
[12:13:01] nartes: has joined #RubyOnRails
[12:14:58] joshkovach: has joined #RubyOnRails
[12:15:00] rodfersou: has joined #RubyOnRails
[12:16:24] mbreedlove: has joined #RubyOnRails
[12:17:34] agit0: has joined #RubyOnRails
[12:18:19] snowy: has joined #RubyOnRails
[12:18:22] hello9: has joined #RubyOnRails
[12:18:50] rubyonrailed: has joined #RubyOnRails
[12:22:54] rknLA: has joined #RubyOnRails
[12:23:16] pawnbox_: has joined #RubyOnRails
[12:26:33] Ergo^: has joined #RubyOnRails
[12:26:45] chouhoulis: has joined #RubyOnRails
[12:27:41] Malgorath: has joined #RubyOnRails
[12:31:01] djellemah_: has joined #RubyOnRails
[12:31:39] herbst: has joined #RubyOnRails
[12:33:18] Malgorath: Anyone know a good guide for extending views in engines to make changes in the engine without changing that 'master' app
[12:34:03] herbst: has joined #RubyOnRails
[12:39:18] armyriad: has joined #RubyOnRails
[12:41:05] drbayer: has joined #RubyOnRails
[12:41:15] magikid: has joined #RubyOnRails
[12:42:26] rknLA: has left #RubyOnRails: ()
[12:51:21] dstarh: has joined #RubyOnRails
[12:51:26] Yeomra: has joined #RubyOnRails
[12:51:31] wopi: has joined #RubyOnRails
[12:51:52] srinidhi: has joined #RubyOnRails
[12:52:06] SeanLazer: has joined #RubyOnRails
[12:52:14] wopi: Hi, how I can append some params to a url ? I don't want append just "?foo=bar", instead I search for something like parsing the url string and adding a params hash
[12:53:01] maxdoubt: has joined #RubyOnRails
[12:55:29] eljimbo: has joined #RubyOnRails
[12:55:30] rake_db_migrate: has joined #RubyOnRails
[12:55:34] herbst: some_path(@element, yay: true )
[12:58:54] dannyguk: has joined #RubyOnRails
[12:59:16] pawnbox: has joined #RubyOnRails
[12:59:55] pawnbox: has joined #RubyOnRails
[13:00:44] n008f4g_: has joined #RubyOnRails
[13:03:03] krz: has joined #RubyOnRails
[13:03:07] Palsson: has joined #RubyOnRails
[13:03:50] aegis3121: has joined #RubyOnRails
[13:07:14] Donkoko: has joined #RubyOnRails
[13:10:30] delgiudices: has joined #RubyOnRails
[13:10:32] mosez: has joined #RubyOnRails
[13:11:04] fourq: has left #RubyOnRails: ("twip")
[13:11:10] yellow5: has joined #RubyOnRails
[13:13:32] rubyonrailed: has joined #RubyOnRails
[13:13:53] openstruct: has joined #RubyOnRails
[13:14:15] chipotle: has joined #RubyOnRails
[13:15:38] jero_: has joined #RubyOnRails
[13:16:23] ekinmur: has joined #RubyOnRails
[13:17:29] diegoaguilar: has joined #RubyOnRails
[13:18:46] diegoaguilar: has joined #RubyOnRails
[13:19:07] crameth: has joined #RubyOnRails
[13:19:59] Megamos: has joined #RubyOnRails
[13:21:48] triangles: has joined #RubyOnRails
[13:24:22] jokke: has joined #RubyOnRails
[13:24:26] georgedrummond: has joined #RubyOnRails
[13:25:12] flashpoint9: has joined #RubyOnRails
[13:25:21] jokke: i'm trying to figure out a bug with devise. I've been developing other than rails apps for a long while now and i'm having trouble finding my way back so to speak. I get an error undefined local variable or method `current_user' for #<Application::PagesController:0x0055ae87558df0>
[13:26:03] jokke: i've set up devise with the devise:install generator
[13:26:39] SeanLazer: has joined #RubyOnRails
[13:26:42] AimlessRAven: has joined #RubyOnRails
[13:26:43] flashpoint9: jokke: you may need to restart the server
[13:26:55] jokke: i'll give it a try
[13:27:23] Ropeney: anyone got a sec with this regex? http://regexr.com/3d66g it's just not clicking for me
[13:27:29] emilkarl_: has joined #RubyOnRails
[13:27:34] akkmaxon: has joined #RubyOnRails
[13:27:42] AimlessRAven: https://gist.github.com/anonymous/87e9c85ce86a3b14773341a7ca1a27f0 why this dont show my separator ", "
[13:27:48] pawnbox: has joined #RubyOnRails
[13:27:58] sevenseacat: ropeney: you may have to elaborate on what the problem is
[13:28:09] Ropeney: I tried to inside it sevenseacat
[13:28:25] Ropeney: I don't know how to be anymore detailed then the examples
[13:28:37] sevenseacat: ropeney: for starters, what is your regex trying to achieve
[13:29:07] Ropeney: anything inside () aslong as it either has an : in it, or doesn't end in cake.
[13:29:29] sevenseacat: i... dont think you linked to the right page
[13:29:43] jokke: flashpoint9: restarting didn't help
[13:29:53] Ropeney: its coming up when i click it :\
[13:30:19] sevenseacat: ropeney: so, your regex is /([A-Z])\w+/g ? wheres the cake and : ?
[13:30:25] marcules: has joined #RubyOnRails
[13:30:43] Ropeney: definately not, its /(\(\w+:.*?\)|\((?!.*cake)\))/
[13:30:50] sevenseacat: great, so please link to the right page
[13:30:51] Ropeney: this is really odd
[13:30:58] sevenseacat: or use a regex site that doesnt suck
[13:31:00] Ropeney: i just clicked the link i pasted, in a new browser
[13:31:10] flashpoint9: jokke: I have a meeting, sorry I cant help more
[13:31:34] matthewd: I see (\(\w+:.*?\)|\((?!.*cake)\))
[13:31:43] Ropeney: so im not going insane
[13:31:44] jokke: thanks anyay
[13:32:10] maxdoubt: has joined #RubyOnRails
[13:32:16] sevenseacat: probably something ghostery-related
[13:32:28] sevenseacat: i block a lot of shit from a lot of random sites
[13:32:41] Ropeney: do you know any that share better?
[13:32:49] jokke: anyone else maybe? :)
[13:33:01] sevenseacat: rubular is what we tend to recommend
[13:33:05] sevenseacat: jokke: what was the question?
[13:34:02] matthewd: ropeney: So the problem is on the RHS
[13:34:08] jokke: i'm trying to figure out a bug with devise. I've been developing other than rails apps for a long while now and i'm having trouble finding my way back so to speak. I get an error undefined local variable or method `current_user' for #<Application::PagesController:0x0055ae87558df0>
[13:34:19] Ropeney: http://rubular.com/r/QFzjWdPD6V
[13:34:20] jokke: i've set up devise with the devise:install generator
[13:34:24] AimlessRAven: https://gist.github.com/anonymous/87e9c85ce86a3b14773341a7ca1a27f0 why this dont show my separator ", "
[13:34:27] maxdoubt: has joined #RubyOnRails
[13:34:56] sevenseacat: jokke: and your code looks like?
[13:34:59] workmad3: ropeney: you're so, so close :)
[13:35:22] jokke: sevenseacat: a mess :)
[13:35:32] sevenseacat: jokke: i suggest cleaning the mess.
[13:35:48] Ropeney: workmad3, it just won'
[13:35:53] Ropeney: t slide into place haha
[13:35:56] jokke: sevenseacat: https://p.jreinert.com/6gW/ruby
[13:36:04] helpa: jokke: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[13:36:05] matthewd: ropeney: Talk through what the rhs does
[13:36:06] workmad3: ropeney: (?! blah) does a negative lookahead... basically it goes "Prevent a match if this matches"... but if it doesn't match, the regexp after it starts matching
[13:36:47] jokke: https://gist.github.com/b9804f374597b98b23ebd3f37a5307f4
[13:37:14] Ropeney: (\(\w+:.*?\)|\((?!.*cake).*?\))
[13:37:17] Ropeney: beautifull :D
[13:37:38] sevenseacat: jokke: thats not even the controller raising the error
[13:37:59] jokke: i'm an idiot
[13:38:00] Ropeney: matthewd, did u ask that so that I answer it in my own head?
[13:38:03] sevenseacat: thats not Application::PagesController
[13:38:11] jokke: just noticed m(
[13:38:14] vedu: Hello. How to provide a logout_path for rails_admin? In its source I can see that it needs a logout_path, but I don't know how to set it: https://github.com/sferik/rails_admin/blob/dca8911f240ea11ebb186c33573188aa9e1b031d/app/views/layouts/rails_admin/_secondary_navigation.html.haml#L9
[13:38:58] jokke: sevenseacat: https://gist.github.com/96a72941173604d2bb7e150effeee267
[13:39:11] Ropeney: workmad3, I had the lookahead wrong in my head, I had matches before it but it kept ruining it all cheers
[13:39:21] jokke: that's not it either
[13:39:36] jokke: https://gist.github.com/835f29e33d5dff111e20ea064674eb69
[13:39:42] workmad3: ropeney: yeah... lookaheads can be difficult to figure out (I had to play a bit with yours to see the mistake too)
[13:40:10] workmad3: ropeney: hence why I figured it would be useful to bring up what the negative lookahead is doing and let you figure out what to do next :)
[13:40:49] sevenseacat: jokke: that code makes no mention of current_user
[13:41:23] jokke: app/controllers/application_controller.rb:110:in `current_admin'
[13:41:32] jokke: so the first paste was ok
[13:41:39] jokke: it's just inherited
[13:42:24] matthewd: ropeney: Well yes, I wasn't just making conversation ;)
[13:42:35] sevenseacat: jokke: okay, so do you have a User model hooked up to devise?
[13:43:02] jokke: sevenseacat: https://gist.github.com/2939158bf05a01c7975fbd9ba92806b6
[13:43:09] n1lo: has joined #RubyOnRails
[13:43:12] Ropeney: matthewd, haha I just didn't want to be rude and not explain it if it wasn't the case!
[13:43:23] Ropeney: Having solved it
[13:43:38] workmad3: vedu: https://github.com/sferik/rails_admin/blob/dca8911f240ea11ebb186c33573188aa9e1b031d/app/helpers/rails_admin/application_helper.rb#L46
[13:43:52] jokke: it seems there was some issue
[13:43:55] jokke: wrong class name
[13:44:02] jokke: in the roles association
[13:44:11] jokke: but it failed silently
[13:44:26] jokke: so problem solved i guess
[13:45:03] vedu: workmad3: yes I had seen this as well :) I am not using devise, so how can I `main_app.respond_to?(:logout_path)`?
[13:45:24] workmad3: vedu: main_app is your app (specifically the routing context for your app)
[13:45:34] workmad3: vedu: so it's just looking for a path in your routes called `logout`
[13:45:57] workmad3: vedu: it also assumes the logout will happen with the `:delete` method, if you look at `logout_method` below :)
[13:46:42] vedu: workmad3: ohh. so I just set some route as: `delete 'logout'.... as: :logout`
[13:46:53] vedu: thanks :)
[13:49:33] vedu: workmad3: this is not working: `delete 'logout' => 'application#logout', as: :logout` :(
[13:50:30] georgedrummond: has joined #RubyOnRails
[13:52:50] pawnbox: has joined #RubyOnRails
[13:52:59] merida: has joined #RubyOnRails
[13:56:02] petor: has joined #RubyOnRails
[13:57:35] JesseH: has joined #RubyOnRails
[13:59:51] dvinciguerra__: has joined #RubyOnRails
[14:00:22] workmad3: vedu: generally, people need a bit more than 'not working' in problem descriptions... what with not being mind readers or being able to see your screen, etc.
[14:00:51] akshat: has joined #RubyOnRails
[14:01:08] vedu: workmad3: The logout button is not being displayed in the dashboard. There is no error
[14:01:12] dvinciguerra__: has joined #RubyOnRails
[14:01:55] emilkarl: has joined #RubyOnRails
[14:02:03] workmad3: vedu: right... and `rake routes` definitely shows your route with the name `logout`?
[14:02:10] chouhoulis: has joined #RubyOnRails
[14:02:32] dvinciguerra__: has joined #RubyOnRails
[14:03:15] hxegon: has joined #RubyOnRails
[14:03:23] workmad3: vedu: no idea then, I'm afraid... I don't use rails_admin
[14:03:34] vedu: workmad3: I tried both, as: :logout and :logout_path.
[14:03:46] vedu: Yeah I figured the same
[14:05:18] workmad3: vedu: you restarted your server after making the change, yeah?
[14:05:31] vedu: workmad3: yep
[14:05:32] workmad3: (just in case the engine has a cached version of the old routes under `main_app` internally)
[14:06:04] joshkovach: has joined #RubyOnRails
[14:06:32] workmad3: vedu: and the rest of that secondary nav partial is being rendered?
[14:06:38] maxdoubt: has joined #RubyOnRails
[14:06:49] treehug88: has joined #RubyOnRails
[14:08:35] maxdoubt: has joined #RubyOnRails
[14:09:08] vedu: workmad3: no... lol we were looking at the wrong partial?
[14:09:42] workmad3: vedu: no idea... but that's the next step I'd check :)
[14:09:53] joshkovach: has joined #RubyOnRails
[14:10:12] Malgorath: Anyone know a good guide for extending views in engines to make changes in the engine without changing that 'master' app, didn't see any response sorry if someoen did answer this
[14:10:30] workmad3: vedu: and if it's not rendering, I'd start looking for a reason why (such as overriding the primary nav partial in your app and forgetting to render the secondary nav in your override)
[14:10:50] vedu: workmad3: yeah will do :)
[14:10:53] workmad3: malgorath: sounds like you may want to look at Deface
[14:11:38] Malgorath: workmad3: thanks
[14:12:38] rake_db__: has joined #RubyOnRails
[14:13:15] LastWhisper____: has joined #RubyOnRails
[14:14:42] Rodya_: has joined #RubyOnRails
[14:15:29] maxdoubt: has joined #RubyOnRails
[14:18:32] VeryBewitching: has joined #RubyOnRails
[14:19:46] joshkovach: has joined #RubyOnRails
[14:25:03] emilkarl: has joined #RubyOnRails
[14:25:33] pawnbox: has joined #RubyOnRails
[14:28:20] dANOKELOFF: has joined #RubyOnRails
[14:29:30] michael_mbp: any tips on finding remote work?
[14:30:14] marcdel: has joined #RubyOnRails
[14:30:27] bronson: has joined #RubyOnRails
[14:32:22] delgiudices: has joined #RubyOnRails
[14:33:09] M-shine: has joined #RubyOnRails
[14:34:10] arup_r: 1 question, in your Gemfile can you mention the gems in any order? I am trying to arrange them alphabatically.. no idea will it mess or not
[14:34:22] michael_mbp: arup_r: order doesn't matter
[14:34:29] arup_r: wow. nice to know
[14:34:29] njero: has joined #RubyOnRails
[14:34:32] michael_mbp: but I try to keep it a fairly logical
[14:34:32] arup_r: thanks michael_mbp
[14:34:42] michael_mbp: is this the same arup in rails slack?
[14:34:43] georgedrummond: has joined #RubyOnRails
[14:34:45] michael_mbp: bsodmike here :)
[14:34:45] arup_r: what do you mena by logical?
[14:34:54] arup_r: yes same arup
[14:35:10] michael_mbp: hang on, I'll gist up an example
[14:35:15] arup_r: yes.. I recognize you
[14:36:40] michael_mbp: https://gist.github.com/bsodmike/cbee4cd11819c1ae79fa27af232008d7
[14:37:00] cpruitt: has joined #RubyOnRails
[14:37:05] michael_mbp: So I tend to keep rails/db adaptor at the top, then group up the asset pipeline dependent gems.
[14:37:38] arup_r: ok let m esee
[14:37:40] michael_mbp: Ultimately it's a personal preference.
[14:39:06] emilkarl: Anyone using SimpleForm with radio_buttons. I would like to extend CollectionRadioButtonsInput to include an extra <span> with the input and input text.
[14:39:09] arup_r: The company I am working with now, have some guidelines.. and putting the gems in sorted order is 1 of them.. this is a old project, need to add some features. So lead asked to sort the Gemfile if I can.
[14:39:31] arup_r: michael_mbp: You started writing ES6? https://gist.github.com/bsodmike/cbee4cd11819c1ae79fa27af232008d7#file-gemfile-L22 awesome! :)
[14:39:43] michael_mbp: Been doing ES6 for a while now :)
[14:40:00] michael_mbp: ah yeah, alphabetical makes sense too.
[14:40:11] arup_r: ok.. still in ES5 .. trying to understand as hard as possible :)
[14:40:26] michael_mbp: thing is, stuff like this will be determined by the team you work with. And the person in that team with the biggest base-ball bat :p
[14:40:46] arup_r: emilkarl: I checked last time rails doc, and the helper supports block, inside which you can do some fancy things
[14:41:01] emilkarl: But cant figure ut:/
[14:41:13] michael_mbp: Becareful with fat-arrows in ES6, it's _not_ the same as CoffeeScript handles it. Been bitten a few time. BUT, I do _LOVE_ promises.
[14:41:17] Malgorath: anyone else here have an idea how to use Deface or something similar in engines. I'm trying to modify the main app views from inside my engine.
[14:41:44] arup_r: malgorath: good progress! :D
[14:41:47] michael_mbp: Hate deface with a vengence, good luck though.
[14:41:58] michael_mbp: last team I worked with (Solidus) decided to ditch deface.
[14:42:15] michael_mbp: modify the partial/view where it needs to be changed.
[14:42:40] IrishGringo: has joined #RubyOnRails
[14:43:21] Malgorath: arup_r: yeah
[14:43:21] arup_r: emilkarl: last time I battled with it, and produced some html .. keep paying, you will be there.. If you want customize you need to do it inside the block
[14:43:29] sevenseacat: solidus ditched deface? interesting
[14:43:42] sevenseacat: it was one of the more interesting features of spree
[14:44:01] emilkarl: arup_r: Im trying to extend the CollectionRadioButtonsInput but that might be the wrong way to do it
[14:44:06] cpruitt: has joined #RubyOnRails
[14:45:07] arup_r: deface is the only way to tweak the view instead of copy pasting the whole view..
[14:46:01] Malgorath: so deface is no longer usable?
[14:47:50] Rubie: has joined #RubyOnRails
[14:47:51] Rodya_: has joined #RubyOnRails
[14:49:06] zave: has joined #RubyOnRails
[14:50:22] Rodya_: has joined #RubyOnRails
[14:50:34] arup_r: michael_mbp: Why solidus is better than Spree, if you can brief me..
[14:50:59] michael_mbp: Spree is dead, Solidus _is_ spree.
[14:51:00] arup_r: I worked on Spree.. never got a chance to work on Solidus. So why suddenly this one
[14:51:19] michael_mbp: Spreecommerce killed their support of it
[14:51:26] arup_r: yeah.. I meant what was wrong with Spree, that is solved by Solidus
[14:51:27] michael_mbp: so a new team forked it, and now call it Solidus.
[14:51:39] michael_mbp: Well, not so much *wrong* :)
[14:51:46] michael_mbp: it's still the same old Spree, for the most part
[14:51:52] michael_mbp: they've been making LOADS of improvements etc.
[14:52:26] jtong: has joined #RubyOnRails
[14:52:33] michael_mbp: Check out v1.2.0 changelog for example https://github.com/solidusio/solidus/releases
[14:52:54] michael_mbp: I contributed a wee bit to that project, but left that team a while back.
[14:53:02] AzaToth: has joined #RubyOnRails
[14:53:16] michael_mbp: I was tasked with the mobile API for http://raden.com
[14:53:35] neohunter: has joined #RubyOnRails
[14:55:17] Devalo: has joined #RubyOnRails
[14:55:24] fmcgeough: has joined #RubyOnRails
[14:58:00] polishdub: has joined #RubyOnRails
[15:00:05] Malgorath: So is Deface not being maintained anymore? Sorry I was just confused
[15:00:09] workmad3: has joined #RubyOnRails
[15:00:41] sevenseacat: well it was a spree project, and unless solidus took it over, then likely not
[15:01:01] maxdoubt: has joined #RubyOnRails
[15:02:02] mbreedlove: has joined #RubyOnRails
[15:02:37] adavia: has joined #RubyOnRails
[15:03:37] mwlang: finer point regarding sessions: If a user has two tabs opened in the browser to same website, is that two sessions for the user or is the same session seen by the rails server for both tabs?
[15:03:51] delgiudices: has joined #RubyOnRails
[15:04:27] morenoh149: has joined #RubyOnRails
[15:05:30] kailido: has joined #RubyOnRails
[15:05:51] PedramT: has joined #RubyOnRails
[15:06:03] kailido: can I create two different voting system in the same object?? with the acts as votable gem
[15:06:16] chouhoulis: has joined #RubyOnRails
[15:06:34] cpruitt: mwlang: Sessisions are independent of windows / tabs
[15:07:14] smathy: has joined #RubyOnRails
[15:07:17] maxdoubt: has joined #RubyOnRails
[15:07:33] cpruitt: All requests are “stateless” meaning the browser has to send information to the server (e.g. a cookie) to give any information about state, including session. The broser will identify itself the same way for any window / tab connecting to a given domain.
[15:08:55] mbreedlove: has joined #RubyOnRails
[15:11:25] nettoweb: has joined #RubyOnRails
[15:11:26] flashpoint9: has joined #RubyOnRails
[15:11:50] SteenJobs: has joined #RubyOnRails
[15:11:53] kailido: can I create two different voting system in the same object?? with the acts as votable gem
[15:12:03] mbreedlo_: has joined #RubyOnRails
[15:12:07] czerasz2: has joined #RubyOnRails
[15:14:40] nartes: has joined #RubyOnRails
[15:14:40] bruno-: has joined #RubyOnRails
[15:15:05] aegis3121: has joined #RubyOnRails
[15:15:09] Jasaka|NA: has joined #RubyOnRails
[15:16:00] GnuYawk: has joined #RubyOnRails
[15:16:00] nartes: has joined #RubyOnRails
[15:16:12] marcdel: has joined #RubyOnRails
[15:16:14] pawnbox: has joined #RubyOnRails
[15:16:21] Rodya_: has joined #RubyOnRails
[15:16:24] GnuYawk: has joined #RubyOnRails
[15:16:41] nartes: has joined #RubyOnRails
[15:18:25] SteenJobs: weaksauce: was it you or workmad3 that recommended doing the multi-step form using JS?
[15:19:00] nartes: has joined #RubyOnRails
[15:19:38] arup_r: has joined #RubyOnRails
[15:20:01] nartes: has joined #RubyOnRails
[15:20:26] dANOKELOFF: has joined #RubyOnRails
[15:20:34] diegoaguilar: has joined #RubyOnRails
[15:21:12] Rodya_: has joined #RubyOnRails
[15:21:25] mwlang: cpruitt: thanks
[15:22:19] alevy: has joined #RubyOnRails
[15:24:35] disgrntld: has joined #RubyOnRails
[15:24:36] jschoolcraft: has joined #RubyOnRails
[15:27:32] Frem: has joined #RubyOnRails
[15:28:21] smathy: kailido, !rules - especially 11
[15:28:21] helpa: kailido: https://gist.github.com/996779
[15:29:03] nfk|laptop: has joined #RubyOnRails
[15:30:14] neohunter: has joined #RubyOnRails
[15:31:28] petertretyakov: has joined #RubyOnRails
[15:32:51] daveomcd: has joined #RubyOnRails
[15:32:59] maxdoubt: has joined #RubyOnRails
[15:33:12] daveomcd: is it possible to pass a form builder object through ajax call or is that likely a bad idea?
[15:35:44] apeiros: daveomcd: as in: a ruby form builder object? what do you want to do on the other side with it without ruby?
[15:39:11] [Butch]: has joined #RubyOnRails
[15:39:18] M-shine: has joined #RubyOnRails
[15:42:08] maxdoubt: has joined #RubyOnRails
[15:45:04] soahccc: Does anyone have an idea why facebook sends us weird JSON data to weird random looking subdomains? It has an OPENRTB_VERSION header and that appears to be "Open RealTimeBidding" but I have no idea why facebook is sending us this stuff. Apparently it is invalid JSON and raises exceptions :/
[15:47:03] petor: has joined #RubyOnRails
[15:47:47] rafaelfranca: has joined #RubyOnRails
[15:47:52] sudoubuntu: has joined #RubyOnRails
[15:50:06] nartes: has joined #RubyOnRails
[15:51:32] fedexo: has joined #RubyOnRails
[15:58:18] jgt4: has joined #RubyOnRails
[15:59:02] jhack: has joined #RubyOnRails
[16:01:04] bmf: has joined #RubyOnRails
[16:01:34] nettoweb: has joined #RubyOnRails
[16:03:10] merida: has joined #RubyOnRails
[16:03:11] djellemah_: has joined #RubyOnRails
[16:03:40] sp1rs: has joined #RubyOnRails
[16:05:51] dpg1: has joined #RubyOnRails
[16:08:39] KnownSyntax: has joined #RubyOnRails
[16:08:44] KnownSyntax: has joined #RubyOnRails
[16:09:52] brendenyule: has joined #RubyOnRails
[16:10:20] KensoDev: has joined #RubyOnRails
[16:12:38] petor: has joined #RubyOnRails
[16:14:59] sp1rs: has joined #RubyOnRails
[16:16:29] baweaver: has joined #RubyOnRails
[16:17:33] cschneid_: has joined #RubyOnRails
[16:19:27] sleungcy: has joined #RubyOnRails
[16:20:00] delgiudices: has joined #RubyOnRails
[16:22:28] sudoubuntu: has joined #RubyOnRails
[16:24:29] norc: has joined #RubyOnRails
[16:28:13] ascarter: has joined #RubyOnRails
[16:29:49] mwlang: has left #RubyOnRails: ()
[16:29:55] ascarter: has joined #RubyOnRails
[16:30:26] sypheren: has joined #RubyOnRails
[16:31:54] manfrin: has joined #RubyOnRails
[16:32:50] girlydev: has joined #RubyOnRails
[16:33:26] girlydev: Hello, I'm trying to use Klaviyo API with RoR 4.2.5 app, to render a template and send an email by using the POST form request, and it gave me an error of "Net::HTTPBadRequest 400 BAD REQUEST readbody=true". Here is the pastie with the general idea of the code: http://pastie.org/private/0nlrzudcdu1obexydbvna. The Klaviyo API doc can be found at the bottom of the page: https://www.klaviyo.com/docs/api/email-templates.
[16:33:35] girlydev: When I use CURL, it gave me a successful message. Maybe one of you can help me figure out why I ran into this error?
[16:33:58] mikecmpbll: has joined #RubyOnRails
[16:34:53] ramfjord: has joined #RubyOnRails
[16:35:17] _djbkd: has joined #RubyOnRails
[16:36:00] _djbkd: has joined #RubyOnRails
[16:36:15] hxegon: has joined #RubyOnRails
[16:37:46] wsk: has joined #RubyOnRails
[16:41:31] PedramT: has joined #RubyOnRails
[16:41:59] petor: has joined #RubyOnRails
[16:44:40] michael_mbp: girlydev: what's the error
[16:45:10] michael_mbp: I'd also suggest you use httparty, which has a nicer DSL.
[16:45:46] tildes: has joined #RubyOnRails
[16:46:02] michael_mbp: *http gem I mean.
[16:46:12] havenwood: michael_mbp: HTTP.rb ftw: https://github.com/httprb/http#readme
[16:46:36] michael_mbp: havenwood: that's the one, thanks
[16:47:13] dionysus69: has joined #RubyOnRails
[16:48:12] michael_mbp: girlydev: parsing that data as a form maybe your mistake, try sending them as params.
[16:49:00] nettoweb: has joined #RubyOnRails
[16:49:18] mbreedlove: has joined #RubyOnRails
[16:50:57] trinaldi: has joined #RubyOnRails
[16:52:20] The_Phoenix: has joined #RubyOnRails
[16:53:07] The_Phoenix: has joined #RubyOnRails
[16:53:18] PaulePanter: Hi. Most examples for the asset pipeline don’t include woff2.
[16:53:28] shinnya: has joined #RubyOnRails
[16:53:43] PaulePanter: Is that because it’s not needed with woff2, or just because woff2 wasn’t around back then and it was copied around?
[16:54:35] smathy: PaulePanter, the latter.
[16:55:19] michael_mbp: Seems typekit is the easiest (best?) way to get fonts on the web?
[16:55:21] DoubleMalt: has joined #RubyOnRails
[16:55:37] michael_mbp: Font deck is shutting down soon :/
[16:55:40] The_Phoenix: has joined #RubyOnRails
[16:57:24] The_Phoenix: has joined #RubyOnRails
[16:57:52] jtong: has joined #RubyOnRails
[16:58:42] The_Phoenix: has joined #RubyOnRails
[16:59:07] girlydev: michael_mbp i'll look into that. i'll use params
[16:59:37] SteenJobs: can i have a class initializer return a value - so this way i can instantiate an abstract object, ‘onboarding’, and depending on the argument passed it can return a new instance of one of 3 other classes?
[17:00:22] The_Phoenix: has joined #RubyOnRails
[17:01:03] merida: has joined #RubyOnRails
[17:01:40] The_Phoenix: has joined #RubyOnRails
[17:03:10] The_Phoenix: has joined #RubyOnRails
[17:03:19] Technodrome: has joined #RubyOnRails
[17:04:23] gambl0re: has joined #RubyOnRails
[17:04:32] The_Phoenix: has joined #RubyOnRails
[17:05:52] The_Phoenix: has joined #RubyOnRails
[17:05:53] kadoppe: has joined #RubyOnRails
[17:06:06] n008f4g_: has joined #RubyOnRails
[17:06:07] girlydev: michael_mbp fyi, the error it gave me was "Net::HTTPBadRequest 400 BAD REQUEST readbody=true"
[17:06:30] Malgorath: mikecmpbll: you around? was wondering if you could help me with these templates
[17:06:34] michael_mbp: try using the http gem
[17:06:38] mikecmpbll: malgorath : hai thar
[17:07:10] michael_mbp: require 'http', then you'll need to do HTTP.post(url, params: { })
[17:07:32] The_Phoenix: has joined #RubyOnRails
[17:07:33] Malgorath: mikecmpbll: do you have experience or knowledge on how to extend templates from the parent app into my engine? I've looked at deface but from what people have said here its not supported anymore so I'm curious as to how I am to do this thing
[17:07:37] michael_mbp: girlydev: can you share your code via a gist?
[17:07:50] mikecmpbll: malgorath : just override the view
[17:08:14] Malgorath: copy the original from the project and just 'redo' it?
[17:08:31] benlieb: has joined #RubyOnRails
[17:08:49] The_Phoenix: has joined #RubyOnRails
[17:08:54] michael_mbp: girlydev: see PM.
[17:09:28] Malgorath: same directory and naming to boot?
[17:09:49] The_Phoenix: has joined #RubyOnRails
[17:10:28] aegis3121: has joined #RubyOnRails
[17:10:55] The_Phoenix: has joined #RubyOnRails
[17:12:25] ericmeds_: has joined #RubyOnRails
[17:12:30] The_Phoenix: has joined #RubyOnRails
[17:12:40] sleungcy_: has joined #RubyOnRails
[17:12:49] aegis3121: has joined #RubyOnRails
[17:12:59] sp1rs: has joined #RubyOnRails
[17:13:01] jtong_: has joined #RubyOnRails
[17:13:06] chocoelho: has left #RubyOnRails: ()
[17:13:28] polyidus: has joined #RubyOnRails
[17:13:34] chocoelho: has joined #RubyOnRails
[17:13:57] GodFather: has joined #RubyOnRails
[17:14:53] PaulePanter: smathy: Thank you! (As always!)
[17:16:09] stannard: has joined #RubyOnRails
[17:18:11] norc: has joined #RubyOnRails
[17:18:53] FooMunki: has joined #RubyOnRails
[17:21:34] quazimodo: has joined #RubyOnRails
[17:21:37] Malgorath: mikecmpbll: after I copy and modify the template, do I have to rake assets or something to get it to show up?
[17:22:52] PedramT: has joined #RubyOnRails
[17:25:22] mikecmpbll: malgorath : nope
[17:27:49] ramfjord: has joined #RubyOnRails
[17:27:51] Malgorath: how does it know to look for changes? just after you hook into the main app via engine.rb?
[17:28:35] mikecmpbll: your 'main app' the openproject thing has your plugin in the gemfile right?
[17:28:50] mikecmpbll: when that app loads it loads the plugin. the views from the plugin override those from the app.
[17:29:06] hello9: has joined #RubyOnRails
[17:29:43] jtong: has joined #RubyOnRails
[17:31:00] maxdoubt: has joined #RubyOnRails
[17:31:20] sudoubuntu: has joined #RubyOnRails
[17:31:44] arup_r: has joined #RubyOnRails
[17:34:47] Malgorath: mikecmpbll: yes its in the gemfile.plugins
[17:34:56] PaulePanter: As soon as sprockets-rails/sprockets is used, using `font-awesome.css.erb` is not enough, and `font-awesome-css.scss.erb` (or `font-awesome.scss.erb`) has to be used?
[17:35:07] mikecmpbll: malgorath : k
[17:36:03] PaulePanter: Only ERB commands/syntax, like `url(<%= asset_path('fontawesome-webfont.eot?v=4.3.0') %>)`, is used.
[17:36:08] gormandy: has joined #RubyOnRails
[17:36:27] gambl0re: has joined #RubyOnRails
[17:36:27] gambl0re: has joined #RubyOnRails
[17:36:58] arup_r: if you have sass, then no need erb.. sass has their own helpers for it.
[17:37:06] gormandy: I'm trying to run a migration to create a table with a single jsonb column, but when I run the migration I get NoMethodError: undefined method `jsonb' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition:0x007f850b12d288>
[17:37:18] arup_r: asset-path and asset-url I think
[17:37:18] gormandy: I'm requiring the jsonb gem in my Gemfile
[17:37:53] PaulePanter: arup_r: I know. But shouldn’t it still be allowed to use both? Sass and ERB?
[17:38:19] audy: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[17:38:37] theblang: has joined #RubyOnRails
[17:38:41] gormandy: also im using pg version 9.4.5 so I should have jsonb
[17:39:21] matthewd: PaulePanter: If you're having a problem, you're likely to get a better result by describing it, rather than merely being surprised/questioning the fact it doesn't work
[17:40:23] rake_db_migrate: has joined #RubyOnRails
[17:40:38] SteenJobs: if i want to build a virtual model, what classes should i be including in Rails 4?
[17:40:55] SteenJobs: to mimic a normal model
[17:41:21] rake_db_migrate: has joined #RubyOnRails
[17:41:31] kadoppe: has joined #RubyOnRails
[17:43:34] PaulePanter: matthewd, arup_r: http://paste.debian.net/427684/
[17:43:51] PaulePanter: … is what I get, when `scss` is not part of the file.
[17:44:36] PedramT: has joined #RubyOnRails
[17:44:37] eljimmy: has joined #RubyOnRails
[17:45:12] eljimmy: has joined #RubyOnRails
[17:45:16] PaulePanter: matthewd, arup_r: The file looks like http://paste.debian.net/427685/.
[17:45:23] PaulePanter: … no Sass in there, just ERB.
[17:46:25] VeryBewitching: PaulePanter: !gist
[17:46:25] helpa: PaulePanter: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:46:47] VeryBewitching: PaulePanter: Gist is preferred in the channel, just for the future :D
[17:47:40] arup_r: PaulePanter: no. http://stackoverflow.com/a/8663533/2767755 .. it will work without erb extension. I was testing .. like ` background:asset-url("apt-placeholder.png") repeat-y;`
[17:47:57] arup_r: but you need to have .scss extension
[17:50:11] arup_r: PaulePanter: so, you will do like src: asset-path('fontawesome-webfont.eot?v=4.3.0');
[17:50:47] Malgorath: mikecmpbll: does this dir structure look right to you? https://gist.github.com/ae56e241a99899112bd8eb4d116c461a
[17:50:48] arup_r: PaulePanter: note it us a *dash*, not *underscore*
[17:51:35] PaulePanter: arup_r: I know. There seems to be a misunderstanding.
[17:51:50] PaulePanter: arup_r: I (my colleague) wants to use ERB style and not Sass.
[17:51:57] PaulePanter: Is that disallowed?
[17:52:23] PaulePanter: VeryBewitching: I’ll keep that in mind.
[17:52:33] veloutin: has joined #RubyOnRails
[17:52:39] PedramT: has joined #RubyOnRails
[17:52:44] arup_r: then use .css.erb as you were doing.. and use rails assets helpers..
[17:52:55] arup_r: with <%= %>
[17:53:36] daveomcd: I'm trying to have a nested fields for partial update based on the value in a drop-down-list of the parent form. The trouble I'm currently having is re-rendering my partial since it requires me to pass in my form builder. I've included my code and the error on the following gist if anyone could perhaps take a peek... https://gist.github.com/anonymous/15905bddb075ecdf118f92f0e11c82db
[17:56:29] morenoh149: has joined #RubyOnRails
[17:56:36] baweaver: has joined #RubyOnRails
[17:56:56] PaulePanter: arup_r: Yes, that’s what I found out.
[17:57:11] PaulePanter: arup_r: But why do I need to add `scss` to the file name, if no Sass is used?
[17:57:22] kadoppe: has joined #RubyOnRails
[17:57:27] arup_r: You don't need to add.
[17:57:42] michael_mbp: PaulePanter: it helps your editor
[17:57:48] arup_r: I thought you are using sass-rails
[17:58:53] arup_r: and writing css using sccs.. I misunderstood.
[17:59:55] ldnunes: has joined #RubyOnRails
[18:00:01] Cohedrin: has joined #RubyOnRails
[18:00:28] PaulePanter: arup_r: Sprockets is used, but a colleague used just erb. That causes the pasted exception.
[18:00:34] PaulePanter: Should I report a bug?
[18:01:13] [Butch]: has joined #RubyOnRails
[18:01:40] chipotle: has joined #RubyOnRails
[18:02:11] Palsson: has joined #RubyOnRails
[18:02:33] arup_r: no, that is your code has an issue.. not rails. debug that.. without seeing the live code, not possible to help you.
[18:02:34] stannard: has joined #RubyOnRails
[18:02:41] petor: has joined #RubyOnRails
[18:02:53] srinidhi1: has joined #RubyOnRails
[18:04:34] PaulePanter: arup_r: I cannot share the code.
[18:04:51] weaksauce: SteenJobs when?
[18:04:58] arup_r: Not needed...
[18:05:23] weaksauce: SteenJobs sounds like something i'd approve of but I don't specifically remember recommending that
[18:05:28] georgedrummond: has joined #RubyOnRails
[18:05:37] arup_r: try to debug first from which file the error is coming.. compile the file locally ..
[18:05:48] tubbo: PaulePanter: what's your sass-rails version?
[18:05:52] michael_mbp: PaulePanter: sorry, I'm late to the convo
[18:05:59] Devalo: has joined #RubyOnRails
[18:06:02] tubbo: also if you're not using sass, i think it would be safe to remove sass-rails
[18:06:06] michael_mbp: if your asset is foo.scss.erb you should be able to use ERB.
[18:06:06] mikecmpbll: malgorath : if your overriding views, the file path below app/ should be the same.
[18:06:13] mikecmpbll: the same as the view your overriding.
[18:06:24] michael_mbp: but as arup_r said, there are SASS helpers.
[18:07:04] chouhoul_: has joined #RubyOnRails
[18:07:12] emilkarl: has joined #RubyOnRails
[18:09:04] jtong_: has joined #RubyOnRails
[18:09:56] polyidus: has joined #RubyOnRails
[18:09:58] rafaelfranca: has joined #RubyOnRails
[18:11:21] quazimodo: has joined #RubyOnRails
[18:12:04] yellow5: has joined #RubyOnRails
[18:13:24] aegis3121: has joined #RubyOnRails
[18:13:50] PaulePanter: tubbo: sass-rails 5.0.4
[18:14:14] Palsson: has joined #RubyOnRails
[18:14:34] PaulePanter: michael_mbp: But why can’t the asset name not be foo.erb?
[18:14:39] apotry: has joined #RubyOnRails
[18:14:44] PaulePanter: tubbo: Sass is used in some files.
[18:15:21] sp1rs: has joined #RubyOnRails
[18:15:26] michael_mbp: PaulePanter: you could have lib/foos/foo.erb
[18:15:34] michael_mbp: and parse it by hand if you wish
[18:15:43] Mia: has joined #RubyOnRails
[18:15:58] michael_mbp: ah ignore that
[18:16:10] baweaver: has joined #RubyOnRails
[18:16:12] Malgorath: mikecmpbll: I've moved it but still don't see any changes in the templates(just doing <h1>test header</h1> to see if something comes up)
[18:16:32] michael_mbp: ERB is a pre-processor, so you need to still submit a file of some type to be processed.
[18:16:53] mwlang: has joined #RubyOnRails
[18:18:36] mikecmpbll: malgorath : i'm not following what you've done.
[18:18:58] michael_mbp: PaulePanter: so for example you could have js/app.coffee.erb. This tells the asset pipeline to run that file through the ERB pre-processor. But at the end of the day it is a _JS_ asset. And as far as the asset pipeline goes assets can be images, css (and derivatives, or JS. Can't think of any other 'types' - thoughts arup_r?
[18:19:13] edwinvdgraaf: has joined #RubyOnRails
[18:19:52] edwinvdgraaf: has joined #RubyOnRails
[18:20:00] michael_mbp: Oh I stand corrected - there's fonts, audio and video too!
[18:20:17] PaulePanter: michael_mbp, arup_r: Sorry, I mistyped.
[18:20:32] PaulePanter: michael_mbp, arup_r: Why can’t the file name be asset.css.erb.
[18:20:39] arup_r: PaulePanter: you take a break
[18:20:50] arup_r: and then come back and start working..
[18:20:55] michael_mbp: heh yeah. If it is vanilla CSS you can do that
[18:21:05] michael_mbp: just make sure your asset manifest is picking it up
[18:21:27] arup_r: You can. I used erb only when I need to access assets using asset helper methods..
[18:21:29] PaulePanter: arup_r, michael_mbp: It was just a type. My original question included that detail.
[18:21:31] ekinmur: has joined #RubyOnRails
[18:21:32] michael_mbp: app/assets/stylesheets/application.css (the manifest).
[18:21:33] PaulePanter: 17:34 < PaulePanter> As soon as sprockets-rails/sprockets is used, using `font-awesome.css.erb` is not enough, and `font-awesome-css.scss.erb` (or `font-awesome.scss.erb`) has to be used?
[18:21:36] audy: has joined #RubyOnRails
[18:21:54] Jon30: Hey guys... Should I index every database field that Rails model validates?
[18:21:56] drbayer: has joined #RubyOnRails
[18:22:06] arup_r: what do you mean by not enough?
[18:22:24] michael_mbp: depends if the asset is CSS or SASS.
[18:22:43] PaulePanter: $ grep font-awesome app/assets/stylesheets/application.css.erb *= require font-awesome
[18:23:21] edwinvdg_: has joined #RubyOnRails
[18:23:45] PaulePanter: arup_r: Not enough, means, sprockets throws a nil exception.
[18:24:27] michael_mbp: PaulePanter: your example above, how come you are jumping from css to scss?
[18:24:40] michael_mbp: is the font-awesome library there as CSS or SASS?
[18:25:21] PaulePanter: michael_mbp: It’s there as CSS.
[18:25:30] michael_mbp: OT I actually used this today, had no issues https://github.com/FortAwesome/font-awesome-sass
[18:25:33] davee_: has joined #RubyOnRails
[18:25:45] drptbl: has joined #RubyOnRails
[18:25:52] PaulePanter: michael_mbp: I am jumping to Sass, so that `rake assets:precompile` does not error out with a nil exception.
[18:26:31] PaulePanter: michael_mbp: Yes, that code is from a different developer, who for whatever reason, did not use the Gem (caused us lots of headaches) but included it manually.
[18:26:33] michael_mbp: I don't see why css.erb shouldn't work hmm.
[18:27:05] eyeamaye: has joined #RubyOnRails
[18:27:09] tubbo: PaulePanter: when do you get this error?
[18:27:12] michael_mbp: PaulePanter: yeah, including manually tends to be a pain, plus upgrading needs a lot of copy/pasting rather than updating the gem dependency.
[18:28:50] jtong: has joined #RubyOnRails
[18:29:04] tubbo: if you're only getting it on `rake assets:precompile`, it might be a strange configuration thing happening on prod
[18:29:52] tubbo: i've definitely had my fair share of inexplicable nil errors when precompiling
[18:30:13] michael_mbp: could be bad CSS (but then again, that should error in dev too!)
[18:30:17] DoctorMonocular: has joined #RubyOnRails
[18:30:30] michael_mbp: but then again, one rarely precompiles in dev ;-)
[18:30:39] michael_mbp: PaulePanter: try that ^^
[18:30:53] michael_mbp: RAILS_ENV=development rake assets:precompile
[18:30:54] arup_r: ^ that is good aproach
[18:30:56] tubbo: PaulePanter: barring configuration-level changes, this *might* be at the very least inconsistency
[18:31:00] tubbo: an inconsistency*
[18:31:04] michael_mbp: then once you're done, make sure you delete the assets from public/
[18:31:10] michael_mbp: or your local dev will go a bit crazy
[18:31:32] tubbo: but i would argue that it's not worth your time to work it out, and thus, renaming the file to scss *shouldn't* cause any problems
[18:32:06] tubbo: look on the bright side, if you use scss you can take advantage of sass @import (which is better and faster than sprockets =require) and get the nice rails url helper mixins for free
[18:32:14] tubbo: no need for erb (which is an extra compilation step anyway)
[18:32:20] michael_mbp: yeah. Loving SASS.
[18:32:32] tubbo: the way i see it, you're dynamically generating that CSS anyway, so you might as well do it with the right tool for the job rather than the ERb sledgehammer.
[18:32:33] bronson: has joined #RubyOnRails
[18:32:34] PaulePanter: tubbo: It’s happening in production and staging.
[18:32:41] michael_mbp: tubbo: I upgraded the menu today http://inertialbox.com
[18:32:52] michael_mbp: did the whole hamburger icon and animations in SASS.
[18:33:26] tubbo: PaulePanter: if you can `RAILS_ENV=development rake assets:precompile` (don't forget to `rm -rf public/assets` afterwards!), then i would say the culprit probably lies in your production and/or staging configuration.
[18:33:52] PaulePanter: tubbo: Give me a minute, to try that.
[18:34:00] tubbo: if that doesn't work, you might have a bug...at the very least it's giving you a shit error.
[18:34:03] PaulePanter: *five minutes
[18:34:37] tubbo: spiffy and responsive, michael_mbp :)
[18:34:46] tubbo: although i hear the hamburger menu is a little out-of-style at this point
[18:34:46] Disavowed: has joined #RubyOnRails
[18:35:06] tubbo: i always preferred tabbed icons myself
[18:35:13] tubbo: but i guess it works for some people
[18:36:05] sp1rs: has joined #RubyOnRails
[18:36:29] tjohnson: has joined #RubyOnRails
[18:36:40] hxegon: has joined #RubyOnRails
[18:38:17] chouhoulis: has joined #RubyOnRails
[18:38:29] polyidus: has joined #RubyOnRails
[18:41:36] georgedrummond: has joined #RubyOnRails
[18:41:40] rake_db__: has joined #RubyOnRails
[18:43:58] afroboy: has joined #RubyOnRails
[18:44:37] jgt4: has joined #RubyOnRails
[18:46:02] rake_db_migrate: has joined #RubyOnRails
[18:48:31] stannard: has joined #RubyOnRails
[18:49:06] stannard: has joined #RubyOnRails
[18:50:07] delgiudices: has joined #RubyOnRails
[18:53:18] workmad3: has joined #RubyOnRails
[18:55:27] dionysus69: has joined #RubyOnRails
[18:58:35] rake_db__: has joined #RubyOnRails
[18:59:53] rafaelfranca: has joined #RubyOnRails
[19:05:25] rafaelfranca: has joined #RubyOnRails
[19:06:04] rake_db_migrate: has joined #RubyOnRails
[19:06:52] Devalo: has joined #RubyOnRails
[19:08:03] dvinciguerra__: has joined #RubyOnRails
[19:09:03] King_Rex: has joined #RubyOnRails
[19:12:13] ekinmur: has joined #RubyOnRails
[19:12:20] rake_db_migrate: has joined #RubyOnRails
[19:13:15] rake_db_migrate: has joined #RubyOnRails
[19:13:31] boboc: has joined #RubyOnRails
[19:15:47] Pumukel: has joined #RubyOnRails
[19:19:02] cpruitt: has joined #RubyOnRails
[19:19:58] ur5us: has joined #RubyOnRails
[19:22:42] baweaver: has joined #RubyOnRails
[19:26:51] mdw: has joined #RubyOnRails
[19:28:55] cabinB: has joined #RubyOnRails
[19:29:03] diegoviola: has joined #RubyOnRails
[19:29:19] cabinB: I want to duplicate a record in Rail console for testing. What's the syntax for that?
[19:31:37] dpg1: has joined #RubyOnRails
[19:31:40] weaksauce: cabinB dup then save
[19:31:53] arup_r: or. ceate_with?
[19:32:26] weaksauce: presumably they want to change some stuff up between the dup and the save
[19:33:23] frozenfoxx: has joined #RubyOnRails
[19:34:44] ekinmur: has joined #RubyOnRails
[19:34:48] frozenfoxx: I have a super-quick question. I'm using Rails 5, I have a Channel. This Channel, when created, calls a long-running process. When I hit this Channel, it seems to create multiple instances of that Channel. Is there any way to only every create and allow to communicate with *one* instance of that Channel? Or am I more looking at doing a Controller?
[19:35:15] cabinB: thx weaksauce!
[19:35:28] frozenfoxx: If I'm describing it wrong I apologize, it's a very odd issue that I'm absolutely positive has to do with my approach.
[19:36:14] jenrzzz: has joined #RubyOnRails
[19:36:14] jenrzzz: has joined #RubyOnRails
[19:37:12] PaulePanter: michael_mbp, tubbo: Sorry, it took longer. Locally it works with `bundle exec rake assets:precompile RAILS_ENV=development`.
[19:38:04] mdw: has joined #RubyOnRails
[19:39:30] jtong_: has joined #RubyOnRails
[19:39:55] weaksauce: doesn't order matter in setting the env variables for a command like that
[19:40:07] seemsinevitable: has joined #RubyOnRails
[19:40:34] workmad3: frozenfoxx: as channels are authenticated, I'd expect each connection to create a new channel instance
[19:40:40] cosmicfires: has joined #RubyOnRails
[19:41:11] workmad3: frozenfoxx: if you need to deal with something you want to only create once, I'd suggest that you handle that in your own code, and keep your channel lightweight, so multiple channels communicate with a single heavyweight resource
[19:41:22] workmad3: (multiple instances of the channel, that is)
[19:41:46] cosmicfires: Hi, If I rolled back a migration and I don't want it anymore can I delete the migration file in /db/migrate?
[19:42:01] workmad3: cosmicfires: yup
[19:42:06] pawnbox: has joined #RubyOnRails
[19:42:07] michael_mbp: cosmicfires: yeah
[19:42:16] workmad3: michael_mbp: o/
[19:44:50] pawnbox: has joined #RubyOnRails
[19:45:03] cabinB: If I have a date-time in a record, how do I only display the month & year in the view (using erb)?
[19:45:25] norc: cabinB, the correct way would be to make use of I18n.
[19:46:36] Disavowed: has joined #RubyOnRails
[19:47:16] cabinB: norc, that's for localization... is there a simpler way in erb to just discard the date portion when displaying a date?
[19:47:33] workmad3: cabinB: look up the docs for strftime on DateTime
[19:48:26] cabinB: thx workmad3. string formatting of time - that's what i was getting at.
[19:49:52] baweaver: has joined #RubyOnRails
[19:51:04] weaksauce: cabinB http://guides.rubyonrails.org/i18n.html#adding-date-time-formats
[19:51:25] polyidus: has joined #RubyOnRails
[19:53:26] polyidus: has joined #RubyOnRails
[19:57:46] lemur: has joined #RubyOnRails
[19:58:04] seemsinevitable: has joined #RubyOnRails
[20:01:21] Tarential: has joined #RubyOnRails
[20:01:33] dangerousdave: has joined #RubyOnRails
[20:01:40] frozenfoxx: workmad3: awesome, I see
[20:02:04] frozenfoxx: workmad3: dumb question, but would a good approach for this be to put my long-running code in a controller, then just have my Channels plug into that controller?
[20:02:30] frozenfoxx: Such as asking the Channel to perform an action passes that through to the Controller? Since there's only one Controller it always attaches up correctly?
[20:02:39] Junaos: has joined #RubyOnRails
[20:03:35] Liothen: has joined #RubyOnRails
[20:03:43] Liothen: has joined #RubyOnRails
[20:04:06] alevy: has joined #RubyOnRails
[20:04:06] alevy: has joined #RubyOnRails
[20:04:06] noah256: has joined #RubyOnRails
[20:04:45] ZerGabriel: has joined #RubyOnRails
[20:04:58] sudoubuntu: has joined #RubyOnRails
[20:06:12] flashpoint9: has joined #RubyOnRails
[20:08:28] codezomb: has joined #RubyOnRails
[20:10:01] rafaelfranca: has joined #RubyOnRails
[20:11:40] delgiudices: has joined #RubyOnRails
[20:14:28] workmad3: has joined #RubyOnRails
[20:21:12] ekinmur: has joined #RubyOnRails
[20:23:32] gheegh: has joined #RubyOnRails
[20:23:56] mwlang: if two forms with same id are rendered on a page and hidden text fields are rendered for those two forms and have same id as well, does the browser make the 2nd hidden input the same as the first hidden input? (Firefox, at least). I’m reasonably sure my code’s not doing this, but in a list of items in which a hidden field’s being populated in each form, the value’s the same while all other fields changed per form.
[20:27:03] mwlang: just to clarify, by “id” I mean the HTML attribute, not the ID field of the AR model
[20:27:13] Shidash: has joined #RubyOnRails
[20:27:29] polyidus: has joined #RubyOnRails
[20:27:38] ur5us: has joined #RubyOnRails
[20:28:42] arup_r: genrally when input fields has same name, last one is get the priority.. not sure about id.
[20:29:17] mwlang: so using simple_form_for how do I prevent such name/id collisions for multiple forms of same rendered on a page?
[20:30:07] arup_r: I am stilling thinking the usercase of rendering 2 forms in a page.. :) ..
[20:30:40] arup_r: they have like html: {} options.. add there some uniq names.. like html: {name: '..'}} ?
[20:31:09] mwlang: well, sure I can hack it…
[20:31:12] mwlang: ACTION *sighs*
[20:31:43] arup_r: hi cabinB
[20:32:16] mwlang: I so rarely use hidden fields…this little spat is good reason to continue to avoid!
[20:33:42] arup_r: that hidden field is because you know the value.. why not add then it inside the controller before create/updating by merging it to params..?
[20:34:43] arup_r: take from UI unknown value and known value add inside the controller.. if possible. Many times I saw it is possible..
[20:34:45] gabeodess: has joined #RubyOnRails
[20:35:23] metalic: has joined #RubyOnRails
[20:35:34] gabeodess: Hey all, I’m building a custom Slack integration in Rails, but I’m not sure about some of the options available with slack integrations. Does anyone know what channel I might want to ask around in?
[20:36:21] arup_r: Ask there help team if Slack knows answer, and if it is rails ask here :)
[20:36:26] arup_r: manage somehow .. haha
[20:36:28] mwlang: arup_r: yeah, I need to rethink the strategy…using an ActiveModel class which doesn’t have the typical ID to “look up” Instead, it’s pairing two AR objects, those are the values going into the hidden field.
[20:37:00] mwlang: gabeodess: find the slack documentation for api calls.
[20:37:11] AntiSpamMeta: has joined #RubyOnRails
[20:37:21] gabeodess: mwlang: yeah, I’ve been reading through it, but can’t find my answer :/
[20:37:28] mwlang: write some code and if it doesn’t work, gist your attempt here.
[20:37:49] arup_r: I will write one cronjob.. and if it fails they want it to drop in Slack :/ so I will code it tomorrow.
[20:38:16] retro2: has joined #RubyOnRails
[20:38:38] arup_r: I was doing some google search.. I have a webhook url for now.. dunno what else I need. But I will figure out.. :p
[20:39:42] PedramT: has joined #RubyOnRails
[20:39:58] mdw: has joined #RubyOnRails
[20:40:14] arup_r: mwlang: I am getting good at bootstrap :) and changing the sass variable to override much nicer.. and I had 1 question to ask you yesterday.. I forgot it now. :(
[20:40:31] mwlang: arup_r: that’s because you solved it already. :-)
[20:40:53] mdw: has joined #RubyOnRails
[20:41:34] arup_r: dunno know. I will ask you once I will remember again.. You were not online here when I was.. and I was missing you.. haha
[20:41:37] _djbkd: has joined #RubyOnRails
[20:41:39] mdw: has joined #RubyOnRails
[20:41:49] arup_r: because last time you told me the trick, that I remember
[20:42:26] mwlang: arup_r: ah. yesterday was tunnel vision day. :-)
[20:43:11] PedramT: has joined #RubyOnRails
[20:44:26] ramfjord: has joined #RubyOnRails
[20:45:03] fernandomm: has joined #RubyOnRails
[20:46:25] stannard: has joined #RubyOnRails
[20:49:22] barajasfab: has joined #RubyOnRails
[20:49:39] Palsson: has joined #RubyOnRails
[20:49:46] Jon30: Hey guys... Should I index every database field that Rails model validates?
[20:50:38] smathy: Jon30, no.
[20:52:14] Macaveli: has joined #RubyOnRails
[20:53:13] njero: Jon30: better to do unique indexing if you have uniqueness validation or something like that. Rails may not be able to provide uniqueness on multiserver envs, db comes to help there :)
[20:53:19] yfeldblum: has joined #RubyOnRails
[20:53:25] delgiudices: has joined #RubyOnRails
[20:53:38] alex88: has joined #RubyOnRails
[20:54:10] yos7ph: has joined #RubyOnRails
[20:54:10] blackmesa: has joined #RubyOnRails
[20:54:23] weaksauce: index things that you query often Jon30
[20:55:16] sonofdirt: has joined #RubyOnRails
[20:57:17] weaksauce: aw they are gone. one follow up point is that a boolean field is probably not worth indexing but it might be if it's a flag field for something like "active users" or "active posts" and then a compound index might be useful too. more of a db design question than a rails question though.
[20:58:50] njero: weaksauce: thanks good to know
[20:59:14] PedramT_: has joined #RubyOnRails
[21:00:35] dopie: has joined #RubyOnRails
[21:00:50] PedramT__: has joined #RubyOnRails
[21:01:54] weaksauce: n_e_o np :D also, the more indices you have the slower the writes and the more space your tables use. i usually turn off indexing on a table if you are batch inserting a ton of rows so you only need to rebuild the index at the end too.
[21:03:27] _djbkd: has joined #RubyOnRails
[21:03:52] rubyonrailed: has joined #RubyOnRails
[21:04:35] morenoh149: has joined #RubyOnRails
[21:05:10] arup_r: good to know... thanks weaksauce
[21:05:35] VeryBewitching: Index what you join and index what you scan.
[21:05:50] VeryBewitching: Everything else is not really a candidate.
[21:06:19] arup_r: I want to bookmark ^^
[21:06:26] njero: weaksauce: what happens if it's wrapped into transaction, in that scenario is it one time or do we have to take care of indexing at that time too?
[21:06:46] arup_r: VeryBewitching: scan means what?
[21:06:47] VeryBewitching: arup_r: http://logs.ryanbigg.com/RubyOnRails
[21:07:17] VeryBewitching: arup_r: SELECT <columns> FROM <table> WHERE this LIKE '%that%'
[21:07:24] VeryBewitching: Or this = 'that'
[21:08:15] PedramT: has joined #RubyOnRails
[21:08:22] arup_r: ok.. you mean columns that I used in where ..
[21:08:23] VeryBewitching: If you're using a field to retrieve data you should index the field, only exception I ever use is blob/(varchar with no limit/text)
[21:09:13] kadoppe: has joined #RubyOnRails
[21:09:16] VeryBewitching: arup_r: Not entirely, anything can be used in a where, it's fields that your application requires constant use of to look for records
[21:09:19] chipotle: has joined #RubyOnRails
[21:09:28] VeryBewitching: So user.active is an example
[21:10:02] VeryBewitching: And of course any column used to join two tables or more tables should be indexed.
[21:11:14] fox_mulder_cp: hi. how to pass in allowed params list of objects?
[21:11:35] arup_r: pass to where?
[21:11:41] arup_r: thanks VeryBewitching :)
[21:12:04] fox_mulder_cp: i want create a object with list of sub-objects
[21:12:06] njero: VeryBewitching: and at what point this becomes a concern?, I haven't dug much deeper which to index. I'm waiting the db to grow and then performance tune :o
[21:12:41] njero: Hope that won't be a big deal to add on. :)
[21:12:50] agit0: has joined #RubyOnRails
[21:13:40] fox_mulder_cp: arup_r: i want create order with it's list of positions, as example
[21:13:47] Megamos: has joined #RubyOnRails
[21:13:47] smathy: There's no universal rule for what do index. Eg. if you write to a join table thousands of times a second, and read from it once a day in a cron job then making an index on it is folly.
[21:14:04] dpg1: has joined #RubyOnRails
[21:14:13] VeryBewitching: n_e_o: I do believe that premature optimization is a sin, but when you write your code you'll know what you should index prior to any optimization considerations. Consider a field like enum :state, [:one, :two, :three]; if you have scopes or queries that make consistent use of this state, you should probably index the field because your *app* uses it a lot.
[21:14:25] maxdoubt: has joined #RubyOnRails
[21:14:32] VeryBewitching: smathy: Agreed.
[21:15:17] VeryBewitching: The benefit of indexing is the speed at which you can scan your table/make joins to other tables. Index for reading, not for writing.
[21:15:36] nettoweb: has joined #RubyOnRails
[21:15:41] weaksauce: n_e_o not sure on the transaction indexes. the database backend is probably the deciding factor in that
[21:15:48] smathy: Indexing a column that you do a LIKE '%that%' on won't help at all.
[21:16:02] meoblast001: has joined #RubyOnRails
[21:16:08] VeryBewitching: smathy: Really?
[21:16:44] VeryBewitching: I've seen speed improvements on varchar fields, it could be incidental/ephemeral but I'm pretty sure it helped.
[21:16:57] smathy: VeryBewitching, yeah, the only reason the index helps is because it's an ordered list of that field. Ie. your query needs to be tied to the front of the field/string in order to be able to use the index.
[21:17:13] smathy: LIKE 'foo%' will use an index, LIKE '%foo%' can't.
[21:17:14] VeryBewitching: Ah, ya, that makes sense.
[21:17:16] njero: interesting..
[21:17:43] smathy: (obviously I'm excluding full text indexes in the DB engines that those are available)
[21:18:02] weaksauce: some index types are useful for full text search.. ah yeah you covered that
[21:18:04] VeryBewitching: Ya, full text search is its own optimization beast
[21:18:23] njero: i love postgres for its json search with index :)
[21:18:28] arup_r: not make sense to me the last thing .. why %foo% wouldn't ? I am learning ..
[21:18:40] ramfjord: has joined #RubyOnRails
[21:18:41] VeryBewitching: jsonb made a project I'm working on *much* simpler to handle
[21:19:06] VeryBewitching: I'm kind of afraid to look under the hood for the GIN index on those.
[21:19:19] smathy: arup_r, because the index is basically a map of all the values in the column to the memory location of the row.
[21:19:45] njero: VeryBewitching: you mean a rails helper for postgres jsonb?
[21:19:56] VeryBewitching: n_e_o: No, the index on disk of the column
[21:20:11] VeryBewitching: n_e_o: GIN index on JSONB produces a pretty big index.
[21:20:11] njero: VeryBewitching: k
[21:20:21] VeryBewitching: Which is appropriate.
[21:21:28] arup_r: smathy: ok.. makes sense now.
[21:22:09] stannard: has joined #RubyOnRails
[21:22:50] nettoweb: has joined #RubyOnRails
[21:23:32] stannard: has joined #RubyOnRails
[21:25:21] moeabdol: has joined #RubyOnRails
[21:26:00] njero: rt now I'm kind of moving some has_many relation data to user which is not directly queried to a simple jsonb field. It kind of help reduce no:of unwanted models and advantage of ever growing attributes :)
[21:26:39] njero: not to user table.
[21:27:51] kadoppe: has joined #RubyOnRails
[21:27:57] smathy: Poor unwanted models.
[21:28:00] pawnbox: has joined #RubyOnRails
[21:28:33] arup_r: ok.. happy weekend to all of you
[21:28:34] smathy: ACTION pats his models, there there my darlings, daddy loves you
[21:29:03] mhoungbo: has joined #RubyOnRails
[21:29:39] njero: and one more query...
[21:29:46] arup_r: can I pm you VeryBewitching ?
[21:30:15] smathy: n_e_o, that's what joins is for.
[21:30:30] camilasan: has joined #RubyOnRails
[21:30:36] njero: is that against the law of RoR@IRC to post any job opportunity?
[21:30:57] smathy: n_e_o, !rules if you care - I don't think so
[21:30:57] helpa: n_e_o: https://gist.github.com/996779
[21:31:39] njero: hope wont come Radar and kick * me
[21:32:40] delgiudices: has joined #RubyOnRails
[21:32:40] arup_r: ACTION grabbed some blogs on indexing.. 
[21:32:49] arup_r: and this weekend I will read about them.. I learned those while I was at college, and forgot then.. :D
[21:33:20] njero: If anyone interested in RoR dev job @bnglr please do ping me :)
[21:33:39] njero: I'm part of a startup here :)
[21:33:46] context: Bangalor ?
[21:33:47] njero: sorry,,, Bangalore, India
[21:33:49] VeryBewitching: Do you mean Bangalore?
[21:34:19] VeryBewitching: Coffee time, brb.
[21:34:20] MarkTR: has joined #RubyOnRails
[21:34:27] smathy: arup_r maybe.
[21:34:36] smathy: He can spend that currency.
[21:34:45] njero: https://gist.github.com/NeoElit/0b1a9519264653780dbe
[21:35:13] arup_r: n_e_o: you are so creative! :p
[21:35:30] njero: thanks :)
[21:36:52] flashpoint9: has joined #RubyOnRails
[21:37:22] polyidus: has joined #RubyOnRails
[21:40:37] moeabdol: has joined #RubyOnRails
[21:40:55] ramfjord: has joined #RubyOnRails
[21:42:18] BD8: has joined #RubyOnRails
[21:44:10] SteenJobs: i’m using a virtual model by including ActiveModel - how can i use something like assign_attributes with a non persistent model?
[21:44:18] arBmind: has joined #RubyOnRails
[21:45:19] chipotle: has joined #RubyOnRails
[21:45:24] frozenfoxx: has left #RubyOnRails: ()
[21:45:48] jinette: has joined #RubyOnRails
[21:47:32] weaksauce: n_e_o gridlle.com doesn't exist.... :P
[21:48:06] njero: weaksauce: yeah.. I know, I'm working on the site, will be back in two days..
[21:48:40] VeryBewitching: SteenJobs: Have you tried including ActiveRecord::AttributeAssignment ?
[21:48:47] VeryBewitching: http://api.rubyonrails.org/classes/ActiveRecord/AttributeAssignment.html
[21:49:00] SteenJobs: i haven’t - i was worried any AR classes would throw an error since there’s no correspoinding table for the model
[21:49:03] SteenJobs: i’ll givew it a try
[21:49:59] SteenJobs: we’re in business
[21:50:04] SteenJobs: i passed over it earlier
[21:50:07] SteenJobs: should’ve given it a try
[21:50:39] njero: weaksauce: but if you're curious check app on google play(only India) https://play.google.com/store/apps/details?id=com.gridlle.inc.gridlle
[21:51:22] njero: we tried some test runs through college fest and all.. Real thing coming soon :)
[21:51:52] VeryBewitching: SteenJobs: That module includes those methods. Take a look at https://github.com/rails/rails/blob/b0994d07c4ddda5e8b5317db56ef4e7c20e4c9ea/activerecord/lib/active_record/base.rb
[21:52:01] context: x This app is incompatible with all of your devices
[21:52:09] VeryBewitching: Which includes a variety of different modules.
[21:52:26] weaksauce: n_e_o cool stuff. i'm in california so i can't play around with it though
[21:52:30] SteenJobs: VeryBewitching: yea was reading thru it earlier - i just erroneously assumed i couldn’t include any AR modules
[21:53:01] owenjones: has joined #RubyOnRails
[21:54:46] chouhoul_: has joined #RubyOnRails
[21:55:34] neanderslob_: has joined #RubyOnRails
[21:56:55] workmad3: has joined #RubyOnRails
[21:58:30] baweaver: has joined #RubyOnRails
[21:58:51] neanderslob: has joined #RubyOnRails
[22:00:39] Cohedrin: has joined #RubyOnRails
[22:02:43] lemur: has joined #RubyOnRails
[22:02:56] i: has joined #RubyOnRails
[22:02:59] mices: has joined #RubyOnRails
[22:03:14] polyidus: has joined #RubyOnRails
[22:03:18] dvinciguerra_: has joined #RubyOnRails
[22:03:25] _djbkd: has joined #RubyOnRails
[22:03:28] mices: jquery not working, i'm pretty sure something's not installed in my system, how can i find out what it is
[22:04:02] dopie: has joined #RubyOnRails
[22:04:14] d0nn1e: has joined #RubyOnRails
[22:04:32] SteenJobs: has joined #RubyOnRails
[22:05:03] jinette: has joined #RubyOnRails
[22:05:55] twilling: has joined #RubyOnRails
[22:06:28] polyidus: has joined #RubyOnRails
[22:06:37] nettoweb: has joined #RubyOnRails
[22:07:58] petor: has joined #RubyOnRails
[22:08:21] capin: mices: what do you mean jquery isn't working? did you check your browser console?
[22:08:26] jenrzzz_: has joined #RubyOnRails
[22:08:41] eyeamaye1: has joined #RubyOnRails
[22:08:46] sleungcy: has joined #RubyOnRails
[22:09:41] mwlang: gotta love this line of code: min_shipping_exeption_amt= (ShippingSetting.get_value("post_exp_per_order") rescue false)? ShippingSetting.get_value("post_exp_per_order").to_i : 0
[22:11:09] smathy: On first call it writes the field internally so that on the second call it returns instead of raises.
[22:11:41] smathy: No, ahem, sorry - `rescue false` - Friday afternoon <-- my excuse.
[22:12:20] owenjones: has joined #RubyOnRails
[22:12:38] smathy: I'd use that trailing rescue so much more if I could add an exception class to it.
[22:14:57] HouseMD: has joined #RubyOnRails
[22:15:27] HouseMD: has joined #RubyOnRails
[22:15:57] HouseMD: has joined #RubyOnRails
[22:16:04] mwlang: see, confusing as hell. It’s fetching a value from the database on the ShippingSetting AR model. “get_value” is itself even more complicated than it needs to be. So that line + 10 LoC in “get_value” can be reduced to: ShippingSetting.find_by(code: code).try(:value)
[22:16:28] HouseMD: has joined #RubyOnRails
[22:16:56] mwlang: the trailing rescue is used in just about every line of code that fetches anything from the database in this app.
[22:16:58] HouseMD: has joined #RubyOnRails
[22:17:06] mices: capin: yes, https://gist.github.com/mices/25676eab7f4b936d6c33f99e508f0766
[22:17:12] mwlang: it’s so regular, I could almost write a parser to remove ‘em all.
[22:17:37] pawnbox: has joined #RubyOnRails
[22:17:59] mices: capin: many different versions of railties installed, not reference to railsties in my gemfile
[22:19:21] mices: i mean no reference to railties in my gemfile
[22:20:12] diegoviola: has joined #RubyOnRails
[22:22:58] trinaldi: has joined #RubyOnRails
[22:23:24] rake_db_migrate: has joined #RubyOnRails
[22:23:57] audy: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[22:24:05] Spami: has joined #RubyOnRails
[22:24:46] baweaver: has joined #RubyOnRails
[22:25:04] rake_db__: has joined #RubyOnRails
[22:25:50] yohle: has joined #RubyOnRails
[22:27:10] kadoppe: has joined #RubyOnRails
[22:28:10] k1t: has joined #RubyOnRails
[22:28:43] chipotle: has joined #RubyOnRails
[22:31:50] polyidus: has joined #RubyOnRails
[22:33:03] rake_db_migrate: has joined #RubyOnRails
[22:33:48] rafaelfranca: has joined #RubyOnRails
[22:33:48] rafaelfranca: has joined #RubyOnRails
[22:34:51] nickenchuggets: has joined #RubyOnRails
[22:36:02] Spami: has joined #RubyOnRails
[22:37:36] Spami: has joined #RubyOnRails
[22:37:41] chouhoulis: has joined #RubyOnRails
[22:39:53] new_fox: has joined #RubyOnRails
[22:40:03] new_fox: Good afternoon
[22:40:30] new_fox: its anyone there?
[22:42:17] georgedrummond: has joined #RubyOnRails
[22:42:31] mhoungbo: has joined #RubyOnRails
[22:43:16] havenwood: new_fox: hi
[22:44:37] jinette: has left #RubyOnRails: ("Leaving")
[22:44:55] mwlang: new_fox: just us 552 lurkers. :-)
[22:44:55] moeabdol1: has joined #RubyOnRails
[22:47:23] pawnbox: has joined #RubyOnRails
[22:47:32] new_fox: I needed to ask something
[22:47:45] new_fox: I need some serious RoR devs to answer
[22:48:21] mwlang: new_fox: well, that rules me out. I’m too zany.
[22:48:23] maxx88: new_fox: so, we can’t have a sense of humor
[22:48:26] mices: variables set by callbacks should be available in views yes?
[22:49:23] mwlang: mices: if the callbacks have fired, yes.
[22:49:40] baweaver: and are instance variables
[22:50:06] baweaver: or passed as locals, but that's a side case.
[22:50:14] eljimbo: has joined #RubyOnRails
[22:50:20] ZerGabriel: has left #RubyOnRails: ()
[22:50:33] new_fox: the thing is this, In our project our client wants us to migrate the versions to the latest ones, we are currently at ruby 1.8.7 and rails 2.3.5, but we don't know which could be the best idea, moving the project upgrading the versions and start trying to put him online again fixing all config shit that come across and of course after config, code syntax that changed OR create a new rails 4.2.6 project from scratch nice and beauty and sta
[22:50:33] new_fox: rt moving logic from 1 project to the other.
[22:50:37] mices: i have before_action :set_profile
[22:50:51] mices: so i don't need a @profile = ...
[22:51:03] baweaver: that large of a gap, you want a fresh start
[22:51:53] baweaver: if I were you I would heavily use TDD on it, write all of your acceptance/unit tests possible before writing features.
[22:52:40] _djbkd: has joined #RubyOnRails
[22:52:41] new_fox: fresh start?
[22:52:52] new_fox: so new project would be the best option?
[22:53:16] mwlang: new_fox: It’s what I do for a living. old rails apps => shiny new rails apps.
[22:53:53] new_fox: you do that?
[22:54:07] new_fox: you work moving legacy apps to new standards?
[22:54:22] new_fox: Oh I would love some tips cause this will be out first time
[22:54:26] new_fox: making something like that
[22:54:33] new_fox: and such an agressive move
[22:54:46] mwlang: new_fox: sooo…in my experience, it’s often a mixture of strategies when jumping from pre-3.x to 4.x. Best strategy for me is start brand new 4.x project, copy over models and rewrite controllers and views.
[22:54:47] new_fox: from 1.8.7 to 2.3 and 2.3.5 to 4.2.6
[22:56:25] mwlang: new_fox: Aggressive move, yes, but also an opportunity to evaluate what’s good and bad with current app then redesign for 4.x.
[22:56:42] new_fox: we estimate to the client 6 months
[22:56:46] new_fox: but the app is kinda massive
[22:56:48] baweaver: mwlang: conflating a refactor with an upgrade is nightmarish
[22:56:59] new_fox: conflating?
[22:57:08] mwlang: baweaver: indeed!
[22:57:23] mwlang: baweaver: but we have our ways. :-D
[22:57:42] new_fox: we fear not reaching the 6 months
[22:57:42] baweaver: yes, it's called alcoholism and depression meds
[22:58:06] mwlang: baweaver: dang. you got me pegged!
[22:58:15] baweaver: On a serious note, focus on 1 to 1 upgrade as a minimum viable
[22:58:18] new_fox: so baweaver how would you proceed if u where in my situatuon
[22:58:21] maxx88: must be 5pm already
[22:58:35] baweaver: transfer over as many of the tests as possible
[22:58:45] baweaver: resist the urge to fix anything, just transfer it
[22:58:45] new_fox: we have 0 test
[22:58:51] new_fox: the app is 10 years old
[22:58:56] kadoppe: has joined #RubyOnRails
[22:59:02] owenjones: has joined #RubyOnRails
[22:59:03] new_fox: it has been developed by tons of devs
[22:59:05] mwlang: baweaver: yeah, what I do is “no schema changes” in the rewrites — unless seriously poor non-railsy choices made in old app.
[22:59:10] weaksauce: not a good start new_fox
[22:59:22] baweaver: write tests for the current behavior
[22:59:27] baweaver: as much as possible
[22:59:28] weaksauce: take a month to write tests
[22:59:32] baweaver: then write the code to fill that in
[22:59:51] baweaver: https://makers.airware.com/engineering/lost-wax-method-rewriting-software/
[22:59:55] baweaver: that was a fairly good read
[23:00:21] new_fox: oh thanks I'll check it out
[23:00:27] baweaver: the danger is playing hero / boyscout in cleaning things up
[23:00:41] baweaver: then you not only have the task at hand, but fixing new bugs as well
[23:00:45] Kallis: has joined #RubyOnRails
[23:00:47] new_fox: yeah we will try not doing that
[23:00:54] baweaver: new_fox: what type of team do you have?
[23:01:05] new_fox: what do you mean?
[23:01:12] new_fox: we are only 2 backend developers
[23:01:13] baweaver: 1 senior, 2 juniors, etc
[23:01:27] baweaver: pair program the entire thing
[23:01:55] new_fox: 1 has been working on the project for 2.5 years
[23:02:01] new_fox: and I have 1.2 years
[23:02:09] baweaver: start by transferring over the db:schema, then the models
[23:02:12] johnflux: has joined #RubyOnRails
[23:02:26] new_fox: what happens with the migrations?
[23:02:30] baweaver: I won't lie to you, this is a hellish task
[23:02:48] diegoaguilar: has joined #RubyOnRails
[23:03:42] baweaver: I'd be tempted to archive them and start from the schema
[23:03:46] mwlang: baweaver: that’s pretty much what I do. One thing I’ve done successfully is capture logs from old app with what parameters were passed to each URL. Build a “playback” acceptance test from those. basically, hit the server with one of the requests, note every database change. Then write the code on the new 4.x app to reproduce same DB results — this mostly with API oriented or SOAP servers written in Rails.
[23:03:49] baweaver: mwlang: thoughts?
[23:04:29] baweaver: I've not done an entire app, but I've refactored legacy systems before and legacy data models
[23:04:42] baweaver: the one thing that will kill you is getting distracted or side tracked on cleanup
[23:05:02] baweaver: If you catch anyone saying "It'd be better if" or "One little change" you need to slap them
[23:05:03] _Tariq: has joined #RubyOnRails
[23:05:08] new_fox: ok but I mean if I create an new project and set in the db config the database, and move the schema file from the old project and run rake db:migrate
[23:05:11] yohle: has joined #RubyOnRails
[23:05:12] new_fox: what will happen?
[23:05:20] mwlang: baweaver: will be challenging for 2 mids. new_fox do either developer know 4.x well?
[23:05:21] new_fox: if no rake task exist?
[23:05:23] baweaver: rake db:schema:load iirc
[23:05:39] baweaver: mwlang: no doubt
[23:05:51] baweaver: hopefully pairing keeps erroneous errors out.
[23:05:51] owenjones: has joined #RubyOnRails
[23:06:18] polyidus: has joined #RubyOnRails
[23:06:22] baweaver: If you can get a Senior onboard that'd be a life saver for something like that
[23:06:31] mwlang: new_fox: generate new project, set database.yml to current database, then rake db:migrate => that will get you a db/schema.rb file.
[23:06:34] baweaver: Mids _should_ be able to handle it, but it'll be rough
[23:06:40] IrishGringo: has joined #RubyOnRails
[23:06:59] baweaver: I'll leave mwlang to it, got to get some Nagios stuff finished before EOD
[23:08:29] new_fox: so what should I do connect the DB and do rake db:migrate or connect the DB, move the old schema to the new project and do rake db:schema:load
[23:09:29] mwlang: new_fox: I would strongly consider an experienced developer to at least get things started — a good one can look at existing code, develop a strategy for the two of you, get the project established and at least some initial functionality ported to Rails 4 along with a good start on testing framework, capybara and all that set up and ready to roll. Then it’s up to you’re at least rolling and filling in the blanks rather than figuri
[23:09:30] mwlang: out how to get it set up and functioning.
[23:09:31] _Tariq: has joined #RubyOnRails
[23:09:55] mwlang: new_fox: just rake db:migrate on the new project.
[23:10:17] new_fox: awesome :D
[23:10:36] new_fox: mwlang the problem is that client have no $$ for Senior couching
[23:10:38] mwlang: Then make a test database, point the database.yml at it and RAILS_ENV=test rake db:reset to establish same schema.
[23:11:23] mwlang: new_fox: ah
[23:11:56] new_fox: oh another thing
[23:12:06] new_fox: do I need to move to the new project all the migrations?
[23:12:15] new_fox: or not needed
[23:12:43] aegis3121: has joined #RubyOnRails
[23:13:43] blackhuey: has joined #RubyOnRails
[23:14:24] mwlang: new_fox: no
[23:15:14] mwlang: you can’t rake db:migrate from scratch in new project, but you can rake db:reset to get an initial schema.
[23:15:50] mwlang: basically, the rake commands will support you going from nothing to full schema, but how you do it may be different than you’re used to.
[23:15:53] new_fox: will I loose my db data?
[23:16:14] mwlang: new_fox: rake db:reset will lose data.
[23:16:21] new_fox: can't loose data
[23:16:37] mwlang: don’t run it on development. :-)
[23:16:44] new_fox: another way to get the full schema?
[23:16:47] mwlang: just rake db:migrate on development.
[23:17:02] mwlang: which gives you full db/schema.rb
[23:17:32] pawnbox: has joined #RubyOnRails
[23:17:38] new_fox: so rake db:reset
[23:17:47] new_fox: rake db:migrate
[23:18:02] mwlang: hmmm…no
[23:18:27] new_fox: em I got confused then
[23:18:35] mwlang: if you set up new project and point config/database.yml to an existing database with data, rake db:reset will clear the whole thing, tables and all.
[23:18:49] mwlang: step 1: generate new 4.x project
[23:19:07] mwlang: step 2: modify config/database.yml to point to existing database
[23:19:19] edwinvdgraaf: has joined #RubyOnRails
[23:19:26] jgt4: has joined #RubyOnRails
[23:19:30] mwlang: step 3: rake db:migrate to get full db/schema.rb file for the project.
[23:19:39] mwlang: step 4: commit to git.
[23:20:01] new_fox: awesome thats what I needed
[23:20:32] mwlang: step 5: RAILS_ENV=test rake db:reset to create fresh, full TEST schema with all tables and devoid of any data.
[23:20:53] mwlang: thereafter, any migrations added to Rails 4.x project is simple rake db:migrate
[23:22:06] rake_db_migrate: has joined #RubyOnRails
[23:22:28] GodFather: has joined #RubyOnRails
[23:23:59] new_fox: super cool
[23:24:09] new_fox: thanks for that mwlang
[23:24:18] new_fox: where do you work? and what dev lvl you are?
[23:25:43] mwlang: new_fox: work for myself. Ruby developer since 2006ish.
[23:26:05] mwlang: new_fox: living in San Diego nowadays.
[23:26:12] new_fox: so Senior jaja
[23:26:44] duncannz: how can I remove a unique constraint from a column?
[23:26:44] new_fox: have you made any addition to the ruby or rails project?
[23:26:45] ZerGabriel: has joined #RubyOnRails
[23:27:09] duncannz: specifically I want to change what devise users are identified by from email to a membership ID, and allow nonunique emails since many users share emails
[23:27:56] mwlang: new_fox: a few. I’m not a core member or anything like that. mostly contribute to gems I use in rails projects or to gems I migrate from Ruby 1.8.7 to 2.x or correspondingly for Rails related gems.
[23:28:16] new_fox: :o so fucking cool
[23:28:21] mwlang: which also can be a challenge. Sometimes you’ll have to migrate old, unmaintained gems as well.
[23:29:56] new_fox: jaja but thats really cool u must be really good at ruby
[23:30:53] mwlang: new_fox: I have my moments. I’m more of a jack of all trades
[23:31:32] magikid: has joined #RubyOnRails
[23:32:57] mwlang: new_fox: right now, I’m porting a Rails 1.2 app to 4.1. about 125k lines of code.
[23:33:08] ashleyw: has joined #RubyOnRails
[23:33:24] Ikri: has joined #RubyOnRails
[23:34:18] mwlang: don’t laugh. It used to be hosted on a Windows server. so to port it to Linux, had to port Rails 1.2 to 1.8.7 since 1.8.6 ODBC drivers would no longer install.
[23:34:45] k1t: has joined #RubyOnRails
[23:38:40] pawnbox: has joined #RubyOnRails
[23:39:33] dfockler: has joined #RubyOnRails
[23:39:54] zave: has joined #RubyOnRails
[23:41:39] aegis3121: has joined #RubyOnRails
[23:41:44] moei: has joined #RubyOnRails
[23:44:01] aegis3121: has joined #RubyOnRails
[23:46:48] gambl0re: has joined #RubyOnRails
[23:46:48] gambl0re: has joined #RubyOnRails
[23:49:03] kadoppe: has joined #RubyOnRails
[23:59:03] ur5us: has joined #RubyOnRails
[23:59:23] lemur: has joined #RubyOnRails