« Back to channel list

#RubyOnRails - 03 July 2015

« Back 1 day Forward 1 day »
[00:02:16] kalx: has joined #RubyOnRails
[00:03:51] crdpink2: has joined #RubyOnRails
[00:05:16] smathy: l0oky, and we're into the same, tired pattern once again where you don't answer the question you're being asked. I'm not sure if you're not a native English speaker, or if you're busy doing too many things at once, or if you're just a bit muddle headed but I can't help you, sorry.
[00:11:32] Skizu: has left #RubyOnRails: ()
[00:14:44] Axsuul: has joined #RubyOnRails
[00:15:28] Axsuul: anyone know if there is a date range gem for ruby?
[00:15:33] Axsuul: i.e. this month, next month
[00:15:40] Radar: for what purpose?
[00:16:18] Radar: that only gives exact dates
[00:16:19] HenriettaSalt: has joined #RubyOnRails
[00:16:46] lupine: sure, from inexact date specs
[00:16:47] Axsuul: im thinking of building my gem for it, have had to use the logic for multiple projects now
[00:16:55] lupine: the requirement is a bit vague right now
[00:17:03] Axsuul: basically filtering
[00:17:10] Radar: axsuul: Filtering... AR records?
[00:17:52] Radar: https://github.com/radar/by_star maybe?
[00:17:57] Radar: Your reuqirements are still quite vague.
[00:19:02] Axsuul: sweet , nice Radar
[00:19:18] Axsuul: this encompasses mostly what I need
[00:20:31] Radar: Time.current.beginning_of_month and Time.current.end_of_month will get you .. well I think it's obvious what it'll get you.
[00:20:50] jtdoncas: has joined #RubyOnRails
[00:21:12] Axsuul: what are you up to these days Radar?
[00:21:24] Radar: I work at marketplacer.com building ecommerce things
[00:21:27] smathy: axsuul, also, not to put down Radar's gem but you know that this works right: Foo.where created_at: Date.current..Date.current.end_of_day
[00:21:44] sevenseacat: has joined #RubyOnRails
[00:21:50] Axsuul: I know, but helper libraries help so you don't have to think about it
[00:21:57] Axsuul: aka.. this month, last month, next year, etc
[00:22:16] Axsuul: Radar: nice, no longer at spree?
[00:22:20] one_zero: has joined #RubyOnRails
[00:22:28] Radar: I left Spree over a year ago now
[00:22:50] Axsuul: Radar: that website is bugged, if you scroll donw, and scroll back up top btw
[00:23:16] smathy: axsuul, agreed, just making sure you were aware.
[00:23:32] Axsuul: Ype fully aware, i had to build my own libraries doing this
[00:23:38] Axsuul: thank you
[00:26:31] Kedric: has joined #RubyOnRails
[00:27:46] s2013: has joined #RubyOnRails
[00:28:39] baweaver: has joined #RubyOnRails
[00:29:49] drPoggs: has joined #RubyOnRails
[00:29:51] elektronaut: has joined #RubyOnRails
[00:30:09] Scripore: has joined #RubyOnRails
[00:30:35] Axsuul: Radar: so we actually have a starts_at, and duration field, will your by_* library work with that type of schema?
[00:30:37] erich: has joined #RubyOnRails
[00:30:59] Radar: axsuul: Model.between(starts_at, starts_at + duration)
[00:31:05] Radar: What is duration?
[00:31:11] Axsuul: db column
[00:31:23] michael_mbp: has joined #RubyOnRails
[00:31:24] Radar: give me an example value?
[00:31:39] erich: has joined #RubyOnRails
[00:31:40] Axsuul: starts_at: Time.zone.local(2014, 1, 1, 0, 0, 0), duration: 2.hours
[00:31:53] Radar: Should be alright.
[00:32:34] s2013: has joined #RubyOnRails
[00:33:42] |PiP|: has joined #RubyOnRails
[00:34:36] findaway: has joined #RubyOnRails
[00:34:39] axilla_: has joined #RubyOnRails
[00:34:59] Axsuul: Radar: its just that your library expects a end_field, rather than a duration
[00:35:00] Axsuul: https://github.com/radar/by_star/blob/42c5583dc6f802cf4a629a4fb83d34de58aefa26/lib/by_star/orm/active_record/by_star.rb#L11-L23
[00:35:09] Radar: [10:30:57] <Radar> axsuul: Model.between(starts_at, starts_at + duration)
[00:35:39] Axsuul: what im saying is, we dont have a end_field db column
[00:36:08] Axsuul: does that make sense?
[00:36:36] Radar: So maybe change it so that you do? :)
[00:36:41] Axsuul: I suppose what we can do is.. make our end_field be.. (#{table_name}.starts_at + (#{table_name}.duration * interval '1 second'))
[00:36:49] Radar: starts_at + ends_at is so much better than starts_at + duration
[00:37:11] Axsuul: right, but in our app/business, durations were a first class citizen
[00:37:20] Axsuul: which is why we chose to do it like that, it was just easier to work with initially :O
[00:38:08] wsmoak: has joined #RubyOnRails
[00:38:08] wsmoak: has joined #RubyOnRails
[00:45:23] iooner: has joined #RubyOnRails
[00:46:16] Pupeno: has joined #RubyOnRails
[00:48:03] Dwarf: has joined #RubyOnRails
[00:50:22] gniquil: has joined #RubyOnRails
[00:53:48] yaymukund: has joined #RubyOnRails
[00:54:27] earthquake: has joined #RubyOnRails
[00:55:53] willharrison: has joined #RubyOnRails
[01:00:18] workmad3: has joined #RubyOnRails
[01:03:01] x-light: has joined #RubyOnRails
[01:03:59] asheinfeld: has joined #RubyOnRails
[01:05:50] fgo: has joined #RubyOnRails
[01:06:00] Denarii: has joined #RubyOnRails
[01:07:05] toretore: has joined #RubyOnRails
[01:11:58] andatche: has joined #RubyOnRails
[01:12:51] workmad3: has joined #RubyOnRails
[01:14:02] Anakat: has joined #RubyOnRails
[01:19:23] robbyoconnor: has joined #RubyOnRails
[01:19:23] seank_: has joined #RubyOnRails
[01:19:23] drale2k: has joined #RubyOnRails
[01:21:05] hanss: Newbie question here but... What exactly does this mean? #<ActiveRecord::Relation []> I'm trying to find a record by multiple params and that's what it's giving me.
[01:21:34] sevenseacat: hanss: its an empty result set.
[01:22:13] hanss: sevenseacat: Meaning it didn't find anything? Wouldn't it otherwise return nil?
[01:22:23] sevenseacat: meaning it didnt find anything.
[01:22:23] Helheim: has joined #RubyOnRails
[01:22:52] sevenseacat: if you're using where() to look up items, you'll always get back an enumerable result, zero or many items
[01:28:07] hanss: Gotcha, thanks! I was using where() but just discovered that for some reason the record I was testing for isn't showing up. The other records show up fine. Time to look into it some more...
[01:28:31] siemprefresco: has joined #RubyOnRails
[01:29:03] workmad3: has joined #RubyOnRails
[01:31:07] AntiSpamMeta: has joined #RubyOnRails
[01:31:20] rickmasta: has joined #RubyOnRails
[01:32:14] mheld: has joined #RubyOnRails
[01:33:44] AntiSpamMeta: has joined #RubyOnRails
[01:35:14] brain_shim: has joined #RubyOnRails
[01:35:53] findaway: has joined #RubyOnRails
[01:36:46] stef1a: has joined #RubyOnRails
[01:40:50] JeramyRR: has joined #RubyOnRails
[01:41:39] twilling: has joined #RubyOnRails
[01:44:21] bruno-: has joined #RubyOnRails
[01:46:22] Anakat: has joined #RubyOnRails
[01:46:55] Aswebb_: has joined #RubyOnRails
[01:51:32] dc1: has joined #RubyOnRails
[01:51:49] Anakat_: has joined #RubyOnRails
[01:55:02] bradleyprice: has joined #RubyOnRails
[01:57:19] Lui: has joined #RubyOnRails
[01:59:20] charliesome: has joined #RubyOnRails
[01:59:23] arooni-mobile: has joined #RubyOnRails
[02:02:57] rickmasta: has joined #RubyOnRails
[02:05:04] asheinfeld: has joined #RubyOnRails
[02:05:25] baweaver: has joined #RubyOnRails
[02:07:13] hololeap: if i have a standard ActiveRecord model called Thing and it includes a string attribute called string_attr, if i do Thing.where(string_attr: Object.new) it will do something like SELECT "things".* FROM "things" WHERE "things"."string_attr" = '--- !ruby/object {}\n'
[02:07:45] hololeap: in other words it seems to call to_yaml on the new Object, but i expected it to call to_s
[02:07:58] hololeap: does anyone know why this is and/or where it is defined?
[02:09:57] fryguy: hololeap: http://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html
[02:10:12] sevenseacat: yeah I would have expected it to call serialize
[02:10:44] stef1a: has joined #RubyOnRails
[02:10:52] bf4: has joined #RubyOnRails
[02:12:05] hololeap: how would i override this behavior for this particular model/attribute so that it calls to_s instead when an object is passed as a value?
[02:13:28] fryguy: hololeap: the documentation shows you how to use different serializers
[02:13:51] fryguy: just call serialize, specify the column you want to serialize, and give it a class that implements the interface specified
[02:14:28] hololeap: fryguy: ok i see
[02:15:32] sevenseacat: personally i wouldnt be calling where() with complex objects
[02:17:26] MEATCHICKEN: I'm shuffling teams for a league but want to ensure a team only plays once per "cycle" -> @season.teams.combination(2).to_a.shuffle
[02:17:30] MEATCHICKEN: Is there a way to do what I want?
[02:18:47] hololeap: sevenseacat: it's kind of silly, but i have a "path" attribute and i have been passing Pathname objects to it. i could find all of these instances and change them to path.to_s, but i'd rather override this behavior
[02:19:17] yaymukund: has joined #RubyOnRails
[02:19:58] fryguy: meatchicken: @season.teams.shuffle.each_slice(2)
[02:20:44] MEATCHICKEN: fryguy, that does what I'm currently doing
[02:20:53] fryguy: meatchicken: what's wrong with what you are currently doing?
[02:21:47] MEATCHICKEN: a team may have to play multiple times per week fryguy
[02:21:50] gambl0re: has joined #RubyOnRails
[02:22:00] fryguy: meatchicken: what is a week?
[02:22:06] fryguy: none of this is in the model that you showed us
[02:22:44] MEATCHICKEN: a week every 15 elements of the array
[02:22:54] MEATCHICKEN: I suppose I can try to uniq it out?
[02:23:18] fryguy: what array
[02:23:56] MEATCHICKEN: fryguy, the returned @season.teams -> the returned collection
[02:24:18] fryguy: that's teams? not weeks?
[02:25:00] MEATCHICKEN: fryguy, okay I get it - I'm terrible at explaining the problem -> thanks
[02:25:14] fryguy: meatchicken: we can't help you if you can't help us understand the problem
[02:25:26] hololeap: has joined #RubyOnRails
[02:30:51] jenrzzz: has joined #RubyOnRails
[02:31:54] JeramyRR: has joined #RubyOnRails
[02:40:05] cytoskeletor: has joined #RubyOnRails
[02:41:10] cytoskeletor: I'm having trouble hooking up my Heroku postgres database to RubyMine.
[02:41:41] brain_shim: has joined #RubyOnRails
[02:41:59] cytoskeletor: Just thought I would share that
[02:44:29] radialneon: has joined #RubyOnRails
[02:45:08] sevenseacat: good to know.
[02:47:05] Pupeno: has joined #RubyOnRails
[02:50:03] m3_del: has joined #RubyOnRails
[02:51:55] dmz: has joined #RubyOnRails
[02:51:55] dmz: has joined #RubyOnRails
[02:52:31] brain_shim: has joined #RubyOnRails
[02:56:45] yza: has joined #RubyOnRails
[02:58:17] cirn0: has joined #RubyOnRails
[03:01:08] Axsuul: has joined #RubyOnRails
[03:01:17] gniquil: has joined #RubyOnRails
[03:04:36] arup_r: has joined #RubyOnRails
[03:05:42] cytoskeletor: DO you use rubymine sevenseacat?
[03:05:51] asheinfeld: has joined #RubyOnRails
[03:05:52] sevenseacat: cytoskeletor: nope.
[03:06:43] asheinfeld: has joined #RubyOnRails
[03:08:18] Ropeney: has joined #RubyOnRails
[03:09:07] behrz: has joined #RubyOnRails
[03:09:21] braincrash: has joined #RubyOnRails
[03:10:41] cytoskeletor: has joined #RubyOnRails
[03:11:45] ecksit: has joined #RubyOnRails
[03:13:23] theKhan: has joined #RubyOnRails
[03:13:42] lessless: has joined #RubyOnRails
[03:15:49] theKhan: has left #RubyOnRails: ()
[03:15:59] theKhan: has joined #RubyOnRails
[03:23:02] pgatt: has joined #RubyOnRails
[03:23:49] Pharaoh2: has joined #RubyOnRails
[03:32:37] m3_del: has joined #RubyOnRails
[03:33:46] theKhan: has left #RubyOnRails: ()
[03:35:28] kahunaio: has joined #RubyOnRails
[03:35:42] Aswebb_: has joined #RubyOnRails
[03:35:59] m3_del: has joined #RubyOnRails
[03:37:12] Guest96568: has joined #RubyOnRails
[03:40:12] w09x: has joined #RubyOnRails
[03:40:20] Radar: GOOD AFTERNOON
[03:40:32] Radar: I have chocolate from Haighs and it is good and not even bullshit legacy code can disappoint me this afternoon.
[03:40:36] sevenseacat: <singsong> good afternoon Mr Bigg
[03:41:52] Radar: p.s. our interview consists of only one programming exercise and it is to decrypt this in under 5 minutes: https://gist.github.com/radar/43d8feeed687f7169730
[03:42:00] Radar: So yeah you should totally come work with us
[03:42:32] sevenseacat: ACTION turns head to the side to see if it makes more sense
[03:43:07] Radar: It's like one of 0x0dea's ideas
[03:43:29] sevenseacat: ACTION stands on head to see if it makes more sense
[03:43:53] sevenseacat: ACTION goes back to playing with phoenix feature testing
[03:45:55] icyflame: so, ruby on rails production setup question! Can anyone here help?
[03:46:03] sevenseacat: if you ask it, we can try.
[03:46:14] icyflame: We are using Passenger, on an Apache server
[03:46:21] icyflame: The weird thing is Passenger standalone works
[03:46:32] icyflame: so, we can access domain.in:3000 from the local network
[03:46:41] icyflame: but domain.in does not work on the internet :/
[03:46:56] sevenseacat: 'does not work'?
[03:47:04] icyflame: I have tried complete uninstalling and installing passenger all over again, and still does not work.
[03:47:12] icyflame: yeah, i mean that the directory listing is shown
[03:47:23] icyflame: so, I point the Apache conf to the `public` folder, right?
[03:47:27] sevenseacat: how did you configure your virtual host?
[03:47:29] drale2k: has joined #RubyOnRails
[03:47:46] pipework: sevenseacat: Drunkenly.
[03:47:54] pipework: Both the virtual host and I. we're buddies.
[03:48:15] icyflame: I copied the config from here: http://httpd.apache.org/docs/2.2/vhosts/examples.html
[03:48:30] sevenseacat: you'll need to modify it for passenger.
[03:48:30] icyflame: I just changed teh servername and added a serveralias
[03:48:43] icyflame: and changed the document root
[03:48:49] icyflame: are those the only three things to be modified?
[03:49:59] icyflame: oh, what else needs to be modified?
[03:50:02] sevenseacat: how did you install passenger?
[03:50:50] icyflame: `gem install passenger`
[03:51:36] Radar: !debug-proxy
[03:51:36] helpa: This kind of issue is hard to debug remotely. You should hire someone who can look at your code and figure it out. We are most likely unable to help you in this situation.
[03:51:48] sevenseacat: icyflame: https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#rubygems_generic_install ok follow the rest of the installation steps now
[03:51:59] fgo: has joined #RubyOnRails
[03:52:36] icyflame: Yes, that's the guide that I followed too!
[03:52:38] radialneon: has left #RubyOnRails: ("Leaving")
[03:52:50] icyflame: I enabled the module, and it seemed to work fine, as in it showed me the instructions that it is supposed to
[03:53:17] icyflame: Yeah, helpa is probably right :/
[03:53:31] rhizome: did you add passenger as a handler?
[03:53:51] rhizome: which means, did you run passenger-install-apache?
[03:53:59] radialneon: has joined #RubyOnRails
[03:54:03] w09x: has joined #RubyOnRails
[03:54:14] icyflame: No, I added it as a Module
[03:54:17] icyflame: and then enabled the module
[03:54:23] Lui: has joined #RubyOnRails
[03:54:33] sevenseacat: so you *didnt* follow the instructions?
[03:54:46] rhizome: passenger-install-apache gives you the exact lines to put in your conf
[03:55:03] sevenseacat: "step 3: run the phusion passenger installer"
[03:55:11] icyflame: sevenseacat: No no, I did follow the instructions
[03:55:12] sevenseacat: "passenger-install-apache2-module"
[03:55:17] icyflame: I did run that
[03:55:25] rhizome: and then it spit out three lines...
[03:55:27] icyflame: I was just explaining what I did to rhizome
[03:55:28] sevenseacat: you just told rhizome you didnt...
[03:55:41] sevenseacat: ACTION continues grumbling
[03:55:51] icyflame: I ran passenger-install-apache2-module
[03:56:00] icyflame: rhizome asked if I ran passenger-install-apache
[03:56:02] rhizome: and then what
[03:56:07] rhizome: well whatever it's called
[03:56:13] icyflame: yeah, sorry
[03:56:28] icyflame: after that as you said it told me what lines to add into the virtual host
[03:56:35] Nuck: has joined #RubyOnRails
[03:56:44] x44x45x41x4E: has joined #RubyOnRails
[03:56:51] icyflame: and I copied those lines, changed the path to the appropriate public folder and then restarted apache2
[03:56:56] sevenseacat: no, not to the virtual host
[03:56:59] sevenseacat: to the apache config
[03:58:08] icyflame: oh, you mean the `.conf` file. shit, i think i screwed that up
[04:00:31] icyflame: well, i found some guide that told me to create a conf file inside sites-available/ and and then do a2ensite sitename.. Then the file was symlinked into the sites-enabled directory (the same conf file, that had the virtual host settings that were spit out by passenger-install-apache2-module )
[04:01:04] sevenseacat: and this is more reliable than the official passenger docs why?
[04:02:29] chouhoulis: has joined #RubyOnRails
[04:03:29] icyflame: actually, the server is being used for 3 sites, maintained by 3-4 people, so it is a general rule to not touch the apache.conf file.. and add everything in sites-available and then do it. That's how it has always been done..! i didn't have a choice!
[04:03:49] icyflame: does that make sense ?
[04:03:57] Radar: yes that makes sense to me.
[04:04:10] icyflame: oh, is it common practise too?
[04:04:18] icyflame: when a lot of people manage a server
[04:04:18] Radar: icyflame: Really though, you should get someone who's able to inspect the application with you. IRC is not the place to get help for this problem.
[04:05:39] icyflame: Radar: I wish! I am in a college, and they are pretty stringent in money matters! you may not believe it, but one of our production applications is actually deployed on Heroku's free plan, because they are not ready to shell out the 7 bucks for a hobby plan! :/ So, if I had the money, I would go for the Cloud way, rather than struggling with a stupid server
[04:05:39] icyflame: that we obviously can't run!
[04:06:59] baweaver: has joined #RubyOnRails
[04:07:31] Aeyrix: ACTION understands that interview code.
[04:07:53] michael_mbp: has joined #RubyOnRails
[04:09:13] icyflame: ACTION needs to hire someone
[04:09:40] rickmasta: has joined #RubyOnRails
[04:09:48] pipework: sevenseacat: I wish I were funnier.
[04:09:53] icyflame: anyways! sevenseacat, Radar and rhizome ! thanks for your help! Now, I know for sure that i need to hire some one! :D
[04:10:45] MEATCHICKEN: has joined #RubyOnRails
[04:10:50] Aeyrix: icyflame: or learn
[04:12:45] oliver___: has joined #RubyOnRails
[04:12:56] Aeyrix: Radar: Is your work hurting for talent that much that you're advertising in #ror? :P
[04:13:03] Radar: Aeyrix: hardly :P
[04:14:45] rhizome: icyflame: certain directives can only be used in the server config, such as LoadModule
[04:25:03] rushed: has joined #RubyOnRails
[04:28:32] michael_mbp: has joined #RubyOnRails
[04:32:47] jordanstorz: has joined #RubyOnRails
[04:33:12] blahwoop: has joined #RubyOnRails
[04:34:47] tyl: has joined #RubyOnRails
[04:34:59] blahwoop: hi all, im writing a caesar cipher rot-13. i can get it to work for all the letters but i don't know how to ignore the spaces and keep the spaces or any other non characters
[04:35:21] Aeyrix: In Rails?
[04:35:25] blahwoop: would i need some regex?
[04:35:34] Aeyrix: --> #ruby
[04:39:48] fgo: has joined #RubyOnRails
[04:40:34] s2013: has joined #RubyOnRails
[04:41:39] tyl: Hi, just curious why in irb when you type ObjectSpace.memsize_of("ActiveRecordObject") most of the activerecord instances are of the same size despite having less attributes
[04:42:01] tyl: another question I have is it better to have the user model with as little attributes as possible
[04:42:11] LeoDee: has joined #RubyOnRails
[04:42:47] tyl: basically if an active record object has fewer attributes is it more effcient?
[04:44:41] doge__: If you neee all the attributes then it's unefficient to load rhem from somewhere else all the time
[04:45:09] rhizome: tyl: generally not a problem
[04:45:17] icyflame: tyl: Yes, if you need all the fields, you can have all of them in the user model itself
[04:46:34] DoctorMonocular: hey, I have an AREL question
[04:46:35] DoctorMonocular: https://gist.github.com/PeteMichaud/da52a688c6da2070250f
[04:46:51] tyl: icyflame , rhizome why doesn't rails consume more memory if it loads an activerecord instance with more attributes?
[04:46:55] DoctorMonocular: how can I do a join that would get me a result like the gist without the 2 queries?
[04:47:28] tyl: i've been trying to find documentation on how rails loads activerecord instances but I am not finding anything
[04:47:48] Pupeno: has joined #RubyOnRails
[04:47:56] jenrzzz: has joined #RubyOnRails
[04:48:03] icyflame: DoctorMonocular: You can join all the tables that you need results from, and then apply the where on that joined result. That will get you the required results in just one query
[04:48:23] yaymukund: has joined #RubyOnRails
[04:49:09] tyl: doge__ yeah i seldom have to load some of the attributes in the model, I am just wondering if i need to take the trouble to move some of the attributes out into another table
[04:51:09] rhizome: DoctorMonocular: my impression is that a join isn't going to get you "not"-ness. one suggestion is user.answers.pluck(:id) tho
[04:51:54] icyflame: rhizome, how about using something like this :-
[04:51:55] icyflame: `Alumni.select("*").joins(:AlumniData, :AlumniStatus, :TieAlumniWithStudentMember)`
[04:52:02] icyflame: Which is chained with the required where
[04:52:11] rhizome: tyl: it's a matter of preference
[04:52:19] icyflame: `where('alumni.id not in (?)', answered_ids)`
[04:52:20] rhizome: icyflame: i've never seen a query like that
[04:52:54] icyflame: It joins the four tables on the basis of the references that I had defined while generating the model
[04:52:59] rhizome: typically you use the symbolized table names
[04:53:05] DoctorMonocular: Question.joins(:answers).where('questions.id not in (SELECT question_id FROM answers WHERE answer.user_id = ?', self.id)
[04:53:10] tyl: rhizome what do you mean by a matter of perference?
[04:53:14] DoctorMonocular: it feels gross to write raw sql that way
[04:53:21] DoctorMonocular: I guess it'll work though :/
[04:54:04] rhizome: you want unanswered questions
[04:54:25] pipework: I want a stiff drink.
[04:54:55] rhizome: http://stackoverflow.com/questions/24415044/how-to-query-across-2-different-tables-in-rails
[04:55:00] rhizome: DoctorMonocular: ^
[04:55:17] rhizome: turns out you can google on those exact words, it's common enough a problem :)
[04:55:58] rhizome: sadly though, SO has the word "unanswered" on every page
[04:56:29] rhizome: hmm, that means you could probably reference the many SO clones on github ;)
[04:57:56] icyflame: rhizome: What did you mean by `symbolized table names` ?
[04:58:19] rhizome: i mean stuff like :alumni_statuses
[04:59:30] icyflame: yes, i know! that was my mistake! I made a huge mistake when I was selecting the model names.. I can probably still go to what you are saying but I can't find the time to migrate all the queries, so I am holding off on that!
[04:59:30] icyflame: relatedly, do you think models and controllers should be named with capital letters ?
[04:59:53] icyflame: Like `rails g model User` and `rails g controller User index show`
[05:00:27] rhizome: yes to the former, no to the latter. rails g controller users index show
[05:00:47] rhizome: however, it may read your mind. i haven't played with it in years
[05:01:14] cornerma1: has joined #RubyOnRails
[05:01:24] icyflame: well, if yes to the former, then I did rails g model AlumniStatus
[05:01:48] icyflame: so, you mean that I should refer to the table as alumni_statuses
[05:01:50] rhizome: then it should have created a migration that had :alumni_statuses for a table name
[05:01:52] icyflame: instead of AlumniStatus?
[05:02:07] rhizome: joins requires the actual table names, yes
[05:02:24] icyflame: yes, true.. the table name is indeed :alumni_statuses
[05:02:42] icyflame: another case issue, do you think the names of the columns in Models should be lower cased or camelCased ?
[05:02:54] icyflame: Like, I have a model StudentMember
[05:03:06] icyflame: and wherever it has a foreign key it is StudentMember_id
[05:03:12] icyflame: and I faced a specific problem with this.
[05:03:15] rhizome: snake case
[05:03:32] icyflame: While sqlite3 is case sensitive, PG is not, and that led to a huge screw up
[05:04:42] icyflame: Hmm, you mean something like student_member_id
[05:04:55] melonstorm: has joined #RubyOnRails
[05:05:00] wenshan: has joined #RubyOnRails
[05:05:23] icyflame: Well, I wrote a migration about a month into the application that hanged all the uppercase column names to lower case names without underscore :'(
[05:06:50] icyflame: rhizome : anyways, to summarise, you think that models should be this :- rails g User member:string website_url:string and controllers should be rails g users show index create .. Is that right ?
[05:07:54] wenshan: hi #ror, could someone please help me with some rspec? I'm writing a test for line `AdminMailer.terms_updates.deliver`. By putting "binding.pry" there, I'm sure that the code reaches there, but in rspec `AdminMailer.should_receive(:terms_updates)` gave "received: 0 times with any arguments"
[05:08:23] wenshan: I guess this is something to do with the `.deliver` part? What should I do to have a proper test?
[05:08:49] icyflame: rhizome: thanks! need to keep that in mind! :D
[05:09:13] rhizome: wenshan: i test emails via ActionMailer.deliveries.last
[05:10:13] asheinfeld: has joined #RubyOnRails
[05:10:48] wenshan: rhizome: thanks, that sounds a promising approach, but I still want to know what's wrong with my current rspec.
[05:11:11] Wolland: has joined #RubyOnRails
[05:11:12] DoctorMonocular: ok, so I have a working thing that's 1 query:
[05:11:12] DoctorMonocular: https://gist.github.com/PeteMichaud/535bcc244385c5db8552
[05:11:34] rickmasta: has joined #RubyOnRails
[05:11:34] DoctorMonocular: but it's ugly as fuck -- any idea how to clean it up?
[05:11:39] x-light: has joined #RubyOnRails
[05:12:07] DoctorMonocular: it's pretty much the definition of "doing it wrong" wrt to sql
[05:13:03] wenshan: rhizome: hmm, the mailer is triggered by update action, previous I have `put :update, :id => 123` before `AdminMailer.should....`, now it works after swapping the two lines around
[05:14:40] jenrzzz: has joined #RubyOnRails
[05:15:19] Rukeal: has joined #RubyOnRails
[05:15:35] speaking1ode: has joined #RubyOnRails
[05:16:59] abuzze: has joined #RubyOnRails
[05:17:30] cirn0: has joined #RubyOnRails
[05:18:35] workmad3: has joined #RubyOnRails
[05:20:18] cirn0: has joined #RubyOnRails
[05:21:11] ewitchin: has joined #RubyOnRails
[05:21:51] bruno-: has joined #RubyOnRails
[05:24:58] Aswebb_: has joined #RubyOnRails
[05:26:58] brain_shim: has joined #RubyOnRails
[05:28:10] dhjondoh: has joined #RubyOnRails
[05:30:12] x-light: has joined #RubyOnRails
[05:30:13] rvanlieshout: has joined #RubyOnRails
[05:31:35] Aeyrix: sevenseacat:
[05:31:41] Aeyrix: My brain isn't working
[05:31:45] Aeyrix: what's that piece of Rails we both hate?
[05:31:53] sevenseacat: turbolinks? spring?
[05:31:58] Aeyrix: spring, that's it
[05:32:00] Radar: Rails itself?
[05:32:02] sevenseacat: fucking spring.
[05:32:05] Aeyrix: turbolinks i already had
[05:32:09] Aeyrix: rails is best
[05:32:29] Aeyrix: Can you disable coffeescript?
[05:32:34] sevenseacat: remove it from Gemfile.
[05:32:37] Aeyrix: Also sprockets
[05:32:53] sevenseacat: sprockets not unless you want to disable the entire asset pipeline.
[05:34:20] ur5us_: has joined #RubyOnRails
[05:36:40] Pharaoh2: has joined #RubyOnRails
[05:37:12] icyflame: Aeyrix : Would you really disable sprockets and live without the entire asset pipeline ? How would you do that ?
[05:37:27] Aeyrix: Bad idea.
[05:37:58] tyl: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[05:38:03] jfarmer: Turbolinks solves a problem I never really had in practice, contra the asset pipeline. Haha.
[05:38:11] Varun_krishna: has joined #RubyOnRails
[05:38:36] Varun_krishna: Hi guys how do I send image through json ? https://gist.github.com/Varun-Krishna-P/ef2cc3cdaad3c6be6d3d
[05:39:00] rushed: has joined #RubyOnRails
[05:39:21] duncannz: has joined #RubyOnRails
[05:39:46] sevenseacat: I was fine with assets in rails before the asset pipeline. but now I don't remember what it was like not having it.
[05:39:49] krz: has joined #RubyOnRails
[05:39:57] rvanlieshout: Varun_Krishna: any way you like
[05:40:08] Varun_krishna: rvanlieshout: How ?
[05:40:17] rvanlieshout: well.. it depends on what you can handle client-side
[05:40:22] rvanlieshout: it's not going to be a real file
[05:40:42] rvanlieshout: and if you're only going to display it i would just send the url back
[05:40:53] Varun_krishna: rvanlieshout: Do you mean I can's send a real file like photo.jpg or whatever ?
[05:41:08] rvanlieshout: your response is of 1 kind
[05:41:15] rvanlieshout: not a mixture of json and a file
[05:41:24] rvanlieshout: you could include the binary data of the file in the json though
[05:41:37] Varun_krishna: rvanlieshout: So what should I change to include the binary data ?
[05:41:48] rvanlieshout: how are you going to handle that binary data at the client?
[05:42:20] Varun_krishna: Just planning to display that image.
[05:42:41] rvanlieshout: using it's binary data?
[05:43:07] apofis: has joined #RubyOnRails
[05:43:08] fgo: has joined #RubyOnRails
[05:43:16] Aeyrix: holy mother of documentation in rails
[05:43:20] Aeyrix: still installing it
[05:43:25] Varun_krishna: rvanlieshout: It's binary data(image)
[05:44:16] Varun_krishna: rvanlieshout: and I am planning to send the thumb version of carrier wave. to my client side .
[05:44:31] rvanlieshout: hmm. i would just include the url
[05:44:32] rvanlieshout: http://api.rubyonrails.org/classes/ActiveModel/Serializers/JSON.html#method-i-as_json
[05:44:37] djbkd: has joined #RubyOnRails
[05:44:39] rvanlieshout: there you can specify what it needs to include in a json
[05:45:30] Varun_krishna: rvanlieshout: But that image_url will be pointing to my server's location url right ?
[05:45:43] s2013: has joined #RubyOnRails
[05:45:43] rvanlieshout: yeah, so that might not be possible
[05:45:51] rvanlieshout: although it's able to access this url
[05:46:22] yfeldblum: has joined #RubyOnRails
[05:46:26] lethjakman: has joined #RubyOnRails
[05:47:09] Varun_krishna: rvanlieshout: because of this the feature of showing the image on the client side is still open :(
[05:47:34] rvanlieshout: it's not that big deal
[05:47:53] yfeldblum: has joined #RubyOnRails
[05:47:59] Varun_krishna: rvanlieshout: http://www.nishantnigam.in/2012/01/sending-binary-data-over-network-with.html
[05:48:02] Varun_krishna: will this work ?
[05:48:09] s2013: im getting an issue with undeifnedmixin border-radius
[05:48:12] rvanlieshout: did you look at that as_json?
[05:48:14] s2013: it works when i comment it out
[05:48:32] jfarmer: JSON documents can't include actual binary data.
[05:48:49] rvanlieshout: include a method that returns the base64 encoded version of the image
[05:48:58] Varun_krishna: jfarmer: What ?
[05:49:11] Varun_krishna: rvanlieshout: Ok will try it.
[05:49:55] jfarmer: Varun_Krishna I would recommend having the client treat the image field as a URL.
[05:50:05] jfarmer: The server can use a data URL if you want to send down the actual file data.
[05:50:16] jfarmer: https://en.wikipedia.org/wiki/Data_URI_scheme
[05:50:33] jfarmer: https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs
[05:51:20] rvanlieshout: didn't think of that one
[05:51:22] Varun_krishna: jfarmer: Thank you man.
[05:52:04] Sypheren_: has left #RubyOnRails: ()
[05:52:12] tvw: has joined #RubyOnRails
[05:52:24] sypheren: has joined #RubyOnRails
[05:52:34] sypheren: Have any of you used Atom for Rails?
[05:52:37] sypheren: What can you say about it?
[05:52:46] jfarmer: Sypheren I have. I like it just fine.
[05:52:50] yaymukund: has joined #RubyOnRails
[05:52:52] suy: has left #RubyOnRails: ("http://quassel-irc.org - Chatee c??modamente donde sea.")
[05:52:54] jfarmer: Not sure what to say specifically.
[05:53:03] jfarmer: Atom is my main editor.
[05:53:12] Pupeno: has joined #RubyOnRails
[05:53:52] s2013: anyone use bourbon
[05:54:18] helpa: s2013: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[05:54:25] sypheren: I'm caught between Notepad++ and atom
[05:54:30] s2013: im familiar with that
[05:54:43] s2013: but i already stated the isse.. with undefined mixin.. and the project is using bourbon
[05:54:44] sypheren: helpa, I was just wanting to know what the community thought about it
[05:57:09] chrissonar: has joined #RubyOnRails
[05:58:07] cac: has joined #RubyOnRails
[05:58:16] jfarmer: Sypheren I like it. It has its shortcomings and those shortcomings don't happen to bother me as much as they do other folks.
[05:58:55] jfarmer: But I trust it more than, say, Sublime in terms of existing as a long-term, continually-improving thing.
[05:59:12] jfarmer: Sublime Text 3 has been in "beta" for, what, 3 years?
[05:59:27] arup_r: has joined #RubyOnRails
[06:00:06] Varun_krishna: Sypheren: Dude helpa is a bot :)
[06:00:13] s2013: helpa is not bot
[06:00:22] Trynemjoel: has joined #RubyOnRails
[06:00:28] Varun_krishna: s2013: Oh really
[06:00:32] sypheren: Shows you what I know
[06:00:46] Varun_krishna: s2013: For all these days I thought he was a bot :(
[06:00:51] s2013: helpa is Radar's alter ego and he controls our lives
[06:00:55] sevenseacat: helpa is a bot.
[06:01:00] jfarmer: helpa Are you a bot?
[06:01:08] sevenseacat: jfarmer: !auto
[06:01:16] Varun_krishna: jfarmer: ha haha :)
[06:01:29] Oog: has joined #RubyOnRails
[06:01:32] sypheren: Thanks, but it's not the first time I've looked stupid in the channel
[06:01:35] s2013: helpa is secretly sevenseacat
[06:01:41] sevenseacat: s2013: shhhhhhh.
[06:01:46] sypheren: ACTION remembers every question he's ever asked in here
[06:01:54] s2013: so do we Sypheren
[06:02:07] Radar: We have logs of it
[06:02:16] gaussblurinc1: has joined #RubyOnRails
[06:02:23] Radar: And probably s2013's entire history here too.
[06:02:30] Varun_krishna: Radar: That's why you guys have created logs for :)
[06:02:37] rvanlieshout: forgot to party
[06:02:53] Varun_krishna: Radar: So is mine
[06:02:57] Radar: Yay the bot has been logging for 1,000 days :D
[06:03:08] Radar: Still no Shakespeare has been produced. Keep trying, everyone!
[06:03:15] Varun_krishna: Radar: You created him ?
[06:03:15] pontiki: and it still hasn't developed sentience???
[06:03:16] s2013: everything i say is shakespearean
[06:03:20] s2013: Varun_Krishnau Radar is him
[06:03:34] Radar: Varun_Krishna: https://github.com/radar/railsbot
[06:03:46] s2013: Radar and helpa are one
[06:04:07] s2013: wont work for you jfarmer you arent cool enough
[06:04:08] jfarmer: rejected :'(
[06:04:19] jfarmer: even robots can hurt feelings
[06:04:42] arup_r1: has joined #RubyOnRails
[06:04:57] sypheren: <Radar> We have logs of it
[06:04:59] sypheren: This is not a good thing
[06:05:09] s2013: i love inheriting shitty 5 year old projects woohoo
[06:05:22] krokuz_: has joined #RubyOnRails
[06:05:28] raunicolae: has joined #RubyOnRails
[06:05:29] Oog: how do i access a helper in a javascript asset?
[06:05:52] s2013: in your .js file?
[06:05:55] s2013: or .js.erb
[06:05:55] Radar: http://logs.ryanbigg.com/p/Sypheren
[06:05:59] m3_del: has joined #RubyOnRails
[06:06:02] Oog: .js.coffee.erb
[06:06:05] Radar: Everything you've ever written in the channel. EVER.
[06:06:20] sypheren: ACTION cringes
[06:06:21] Radar: It is good for the soul.
[06:06:30] sypheren: I've actually.. Improved in my knowledge of rails
[06:06:32] Radar: Sypheren: I remember coming in this channel and asking why I couldn't have a model called Thread.
[06:06:35] eoy: has joined #RubyOnRails
[06:06:41] s2013: omg why cant you Radar
[06:06:41] sevenseacat: how do you think I feel, everything I've ever said for three years has been logged here.
[06:06:49] sypheren: ACTION doesn't know the answer to that
[06:06:53] sevenseacat: Radar: I did the same thing, except with Fixture in rails 3.0.
[06:06:55] s2013: sevenseacat but half the stuff you say is just being snarky to someone else
[06:06:56] sypheren: the painful honesty
[06:07:12] sevenseacat: s2013: only half? i better lift my game
[06:07:15] sypheren: ^ what s2013 said
[06:07:17] s2013: yeah get on it
[06:07:38] s2013: hows life down under
[06:07:42] s2013: Radar and sevenseacat
[06:07:43] sevenseacat: s2013: like if you knew more about rails you'd know its way more than half
[06:07:45] sevenseacat: is that better?
[06:07:50] sypheren: I think Radars book has helped me more than anything else
[06:08:07] chouhoulis: has joined #RubyOnRails
[06:08:09] Radar: deleted a space
[06:08:10] Radar: test works
[06:08:10] s2013: im glad im working on a rails project again
[06:08:14] Varun_krishna: Sypheren: What book ? manning ?
[06:08:16] Radar: Time taken: 30 minutes
[06:08:21] s2013: Radar dont you write Go mostly
[06:08:27] Radar: s2013: not any more
[06:08:29] Aeyrix: @Radar: at least you get to put that in your timesheet
[06:08:31] Radar: Elixir is where it's at
[06:08:32] s2013: same company or different
[06:08:39] Radar: s2013: marketplacer.com
[06:08:42] sypheren: I never quite got how you all came to understand rails
[06:08:46] s2013: by just doing shit Sypheren
[06:08:55] Varun_krishna: Rails 4 in action ?
[06:08:56] sypheren: Playing with ruby?
[06:08:57] Radar: Sypheren: I just started doing it
[06:09:00] sypheren: yes, Varun_Krishna
[06:09:01] s2013: dude ive been looking for something like that Radar
[06:09:05] s2013: company based out of au?
[06:09:08] Radar: s2013: indeed
[06:09:14] sypheren: Just start coding?
[06:09:17] Radar: Sypheren: I watched the getting started with Rails video and started trying to build a forum app and failed hilariously.
[06:09:31] Radar: Sypheren: Then I embarrassed myself by asking a ton of questions in this channel
[06:09:34] Radar: <skip forward 9 years>
[06:09:50] sypheren: This is quotable
[06:09:51] s2013: who the hell answered your questions Radar
[06:09:53] Aeyrix: Fucking tyrant.
[06:09:54] sypheren: Good thing we have logs
[06:09:56] Radar: s2013: tim pope
[06:09:56] Varun_krishna: Radar: Even me too for the first time
[06:09:57] s2013: ive been here for few years. i used differnt nicks until i settled on one
[06:09:59] Radar: rein heinrichs
[06:10:07] Radar: all the Ancient Rails developers
[06:10:21] s2013: was bates ever here?
[06:10:26] Varun_krishna: Now Radar answers most of our questions :P
[06:10:31] Radar: Tim was *especially* condscending and extremely helpful. Aeyrix would have a fit.
[06:10:45] s2013: classic tim
[06:10:46] sevenseacat: my first day learning rails, i came here and got smacked down by Radar and pipework because a) I used apt to install ruby and b) I wanted a tool like activeadmin
[06:10:48] sypheren: As much as I love reminiscing on the past embarrasment of Radar rather than myself for once, I need to take care of my dog (shes scared of the storms) and head to bed
[06:11:00] sevenseacat: and I got smacked down real good.
[06:11:01] Radar: Sypheren: We were all newbs once
[06:11:02] s2013: omg the project i inherited uses activeadmin
[06:11:05] s2013: half the shit is deprecated
[06:11:07] Aeyrix: I actually avoided these channels while I was learning ruby and rails.
[06:11:11] Radar: Sypheren: And we aren't anyone special
[06:11:16] Radar: We are flesh+blood like you
[06:11:16] s2013: Radar you are special
[06:11:17] Radar: except helpa
[06:11:18] sevenseacat: we're really not
[06:11:36] sypheren: I feel stuck often while learning it
[06:11:44] Aeyrix: Radar is actually tyrant and blood
[06:11:46] sypheren: But I'll come back to that next time, my dog is freaking out
[06:11:47] Aeyrix: not flesh and blood
[06:11:56] asheinfeld: has joined #RubyOnRails
[06:12:00] s2013: Radar marketplacer launched already? like is there a public sign up
[06:12:03] Varun_krishna: sevenseacat: Radar I wanted to learn spring mvc though.
[06:12:07] sypheren: Night guys :)
[06:12:08] sevenseacat: ACTION is flesh, blood, diet coke and iced coffee
[06:12:10] s2013: seems like there is just an email submit
[06:12:12] sevenseacat: see ya Sypheren
[06:12:16] Radar: s2013: We run our own sites. It's not something you can run yourself yet.
[06:12:22] Aeyrix: reg coffee
[06:12:24] Aeyrix: and that's it
[06:12:28] s2013: building a marketplace is tough
[06:12:29] Aeyrix: i am but a pure pool of espresso
[06:12:33] s2013: i built kuju.io
[06:12:39] Radar: Aeyrix: My birth was heralded by swallows
[06:12:47] sevenseacat: ACTION is at least 30% owned by Dare
[06:13:16] Aeyrix: Radar: Kim-Jong Il?
[06:13:30] Radar: Aeyrix: boom
[06:13:35] eGGsha: has joined #RubyOnRails
[06:13:36] Aeyrix: thanks FPS Doug
[06:13:51] tagrudev: has joined #RubyOnRails
[06:13:52] s2013: Radar you ever used bourbon? if so, you ever ran into undefined mixin error?
[06:13:56] Varun_krishna: Radar: sevenseacat Thank you guys for creating such a friendly channel :)
[06:14:03] s2013: friendly? LOL
[06:14:16] sevenseacat: Varun_Krishna: we didnt create it, but we try to keep it a happy place :)
[06:14:16] Varun_krishna: s2013: Yes why not ?
[06:14:27] Aeyrix: Varun_Krishna: It's friendly when I'm paying attention enough to yell at unfriendlies.
[06:14:42] Aeyrix: Although one time I went for lunch
[06:14:48] Aeyrix: terrible idea
[06:14:52] Varun_krishna: sevenseacat: I had a very hard hard time with the c# channel .
[06:15:13] ekem: this seems 100% wrong
[06:15:14] ekem: @comment = @article.comments.create(:commenter => current_user.email, :body => (params.require(:comment).permit(:body)[:body]))
[06:15:24] Radar: s2013: I'ver never used it.
[06:15:32] riotjones: has joined #RubyOnRails
[06:15:45] ekem: i mean, it works, but i know its wrong. I don't know why though.
[06:15:50] ekem: i mean i have several guesses.
[06:16:09] s2013: that just looks disgusting
[06:16:14] s2013: not even its own mother would love it
[06:16:16] ekem: that was my first tip
[06:16:26] rvanlieshout: ekem: move params.require(:comment).permit(:body) to a separate method
[06:16:26] ekem: im not sure how else to accomplish what im after
[06:16:29] sevenseacat: s2013: who's unfriendly now?
[06:16:41] s2013: move it to controller
[06:16:42] Radar: ekem: https://gist.github.com/radar/5fab6fc601bdb6fe6094
[06:16:42] rvanlieshout: then .comments.create(new_method.merge(commenter: current_user.email))
[06:16:56] ekem: oh, ok rvanlieshout, but the setup is correct?
[06:17:04] rvanlieshout: it looks like it
[06:17:06] ekem: ok Radar, ill look
[06:17:08] sevenseacat: s2013: it is in a controller.
[06:17:29] s2013: well duh. i meant make it aprivate method in the controller
[06:17:41] sevenseacat: of course you did.
[06:17:42] ekem: Radar: merge... now that sounds reasonable
[06:18:14] s2013: of course
[06:18:48] Scripore: has joined #RubyOnRails
[06:19:05] frek818: has joined #RubyOnRails
[06:19:07] ekem: thanks rvanlieshout, thanks radar
[06:19:34] s2013: i wish there was an advanced rails book similar to the format of r4ia and stuff
[06:19:42] s2013: the ones are all old
[06:20:09] Aeyrix: In the form of Rails internals or?
[06:20:11] sevenseacat: s2013: what would you like one about?
[06:20:51] s2013: not internals per se but like building a rails application with more advanced features and stuff. would like to see some good coding practices and patterns
[06:20:59] s2013: Radar is working on rails deep dive which is cool and ibought that
[06:21:17] sevenseacat: advanced features like what?
[06:21:41] sevenseacat: we had a whole pile of stuff we wanted to include in R4IA but ran out of space
[06:22:02] Aeyrix: r5ia = Riding Rails 5
[06:22:07] s2013: r4ia is more beginner friendly but building something where you dont have to explain what mvc is or what strong params are, etc
[06:22:25] sevenseacat: you're not really answering my questions here
[06:22:37] s2013: it would be interesting to see... let me think of some features
[06:22:47] s2013: engines would be good
[06:23:04] arBmind: has joined #RubyOnRails
[06:23:10] s2013: service objects would be good too
[06:23:23] sevenseacat: we use one service object in R4IA
[06:23:23] s2013: soem are intermediate i guess but anything but basic rails
[06:23:51] s2013: some design patterns, etc
[06:24:12] yfeldblum: has joined #RubyOnRails
[06:25:03] roolo: has joined #RubyOnRails
[06:28:34] Ropeney: s2013: Multitenancy With Rails
[06:29:03] s2013: Ropeney yeah thats a good one. i have it too but it focuses on one type of use case
[06:29:34] s2013: speaking of which so i figured id go through it since im building a multi tenant application now.. but for some reason my tests arent passing and i followed the code exactly. so i need to set aside some time to figure out what i did wrong
[06:29:37] Ropeney: s2013: Thats what advanced books do, you then apply it to everything else
[06:30:16] s2013: im not saying for my case.. im pretty comfortable with rails by now but i mean in general would be a good thing, especially if it was physically published or something similar to r4ia
[06:30:40] Varun_krishna: https://gist.github.com/Varun-Krishna-P/ef2cc3cdaad3c6be6d3d Now how do I access these images especially the thumb version in the client side ?
[06:31:30] s2013: .image.thumb.url
[06:31:51] s2013: on whatever object you are trying to grab the image of
[06:32:05] Varun_krishna: s2013: But I guess it gives me the string itself.
[06:32:15] Varun_krishna: s2013: Let me try it from my client side and get back.
[06:32:15] jarray52: has joined #RubyOnRails
[06:32:31] s2013: JSON.parse
[06:32:54] s2013: or maybe im misunderstanding your question. it is 230 am
[06:32:55] workmad3: has joined #RubyOnRails
[06:33:03] x-light: has joined #RubyOnRails
[06:33:30] rvanlieshout: hmm. we don't have 230 hours in a day here
[06:33:53] s2013: oh silly earthlings
[06:34:45] hanss: So if you folks (I already picked up on the 'guys' thing), don't mind me asking... Did you know any other languages before learning ruby/RoR? Are you self taught or took classes?
[06:35:39] rvanlieshout: i did learn assembly, pascal, c and c++ at school
[06:35:41] s2013: php, c++, python, js, c.. was a computer science major in high school and college. but started with programming at age 12.. but took a break between doing all that and learning rails by being on the business side so i got really rusty for a while
[06:35:55] rvanlieshout: used php for several years before switching to rails
[06:36:09] sevenseacat: hanss: I have a computer science degree and had six years of professional php dev as well.
[06:36:10] rvanlieshout: first app was on rails 1.. just missed the 0.x versions
[06:36:38] s2013: i remember when rails came out around 2005.. i looked at it and im like meh its some fad and didnt think about it for a while
[06:36:39] sevenseacat: and I'm glad you get picked up on the guys thing :) I do get tired of assumed genders around here
[06:37:00] s2013: around rails 2 i tried to get into it more but i had windows so i spent more time trying to get it to work until i said f it
[06:37:16] Varun_krishna: sevenseacat: I do get tired of assumed genders around here What do you mean ?
[06:37:28] sevenseacat: Varun_Krishna: well "guys" assumes that everyone is male
[06:37:29] s2013: then about 3 years ago i got more seirous since i started using linux
[06:37:43] s2013: guys is just a general plural term
[06:37:48] sevenseacat: no, it's not.
[06:37:49] s2013: i prefer yall but not everyone is from the south
[06:37:59] sevenseacat: it's only ever men that say it is.
[06:38:07] s2013: maybe not for you aussies, but for us, yes
[06:38:13] s2013: we say you guys all the time
[06:38:30] s2013: even girls say it..even sometimes to group of girls
[06:38:36] sevenseacat: s2013: have you ever asked a woman what they think about that?
[06:39:02] Varun_krishna: sevenseacat: I don't know all that we are all rails developers.:)
[06:39:08] s2013: well i dont think anyone really tries to look at a deeper meaning or try to find offense in something as innocuous as that
[06:39:14] rvanlieshout: Varun_Krishna: also that doesn't have to be true :)
[06:39:21] yfeldblum: has joined #RubyOnRails
[06:39:32] sevenseacat: I don't take offense, I just get annoyed at the presumption.
[06:39:39] rvanlieshout: s2013: then why not use ladies from now on?
[06:39:58] hanss: 'Sup ladies!
[06:40:05] Aeyrix: I have several female friends that use 'guys' and suggest it's a gender-neutral term.
[06:40:10] sevenseacat: replace 'guys' with 'ladies' in your vocabulary and see how it goes.
[06:40:29] s2013: because it doesnt make sense.. mayb it might in some place where its used but ive always seen it used as guys..
[06:40:33] s2013: its just semantics
[06:40:35] s2013: Aeyrix yep
[06:40:37] Aeyrix: I did also link you like three dictionaries last time, although Macquarie is a paid dictionary.
[06:40:42] sevenseacat: funny! you change the gender of a word and it doesnt make sense anymore!
[06:40:54] sevenseacat: I'd probably be less annoyed if I didn't hear it every. damn. day.
[06:41:03] Aeyrix: Oxford (UK English), Merriam-Webster (US English), and Macquarie (UK-AU English).
[06:41:10] Varun_krishna: sevenseacat: Funny !!!
[06:41:21] s2013: well i dont think they literally mean everyone is a guy
[06:41:28] sevenseacat: ACTION raises eyebrow
[06:41:46] s2013: instead of saying you guys and girls.. people just use guys.. maybe not in australia. i dont know. but in the US guys is plural gender neutral
[06:41:46] sevenseacat: 'everyone isnt a guy' 'guy isnt a gendered word!!!!'
[06:42:03] s2013: maybe if someone specifically called you a guy thats a different issue
[06:42:07] sevenseacat: but if 'guy' isnt a gendered word, then everyone *is* a guy, arent they?
[06:42:10] Varun_krishna: s2013: Watchout sevenseacat will come and catch you by the collar and will slap you man :)
[06:42:16] errakeshpd: has joined #RubyOnRails
[06:42:22] s2013: i specifically said plural term
[06:42:23] hanss: I would say guys is used fairly equally here, my girlfriend says it. I didn't really think of it until I read one of your comments before, better play on the safe side. Hah
[06:42:23] sevenseacat: you cant have two different rules for the same word
[06:42:23] Aeyrix: I mean there's the other definition of guy
[06:42:30] Aeyrix: straw person
[06:42:36] s2013: i just use yall
[06:43:12] sevenseacat: I've been known to use y'all in conversation.
[06:43:14] Aeyrix: I don't because I'm not from the deep South.
[06:43:29] s2013: im from nyc but live in texas now
[06:43:36] s2013: yall is the best word in the english language
[06:43:40] Aeyrix: You're legally required to use it then.
[06:43:53] sevenseacat: when I was younger I was fine to be 'one of the guys' because I was trying to fit into the industry. now, fuck that.
[06:43:53] s2013: first time i used it i felt dirty.. like i was cheating on my northern heritage.. then it felt good
[06:44:39] sevenseacat: I've met people in person that I'd known for years online and they had no idea I was a woman, because I was 'one of the guys'
[06:44:48] sevenseacat: so no, no more of that.
[06:44:59] s2013: http://english.stackexchange.com/questions/11816/is-guy-gender-neutral
[06:45:07] Aeyrix: I feel that may be more because of presumptions regarding Internet users.
[06:45:20] Varun_krishna: sevenseacat: Even when I first came here I thought you are a boy :)
[06:45:29] s2013: yeah statistiacally you are more likely to be a guy
[06:45:37] s2013: especially on irc
[06:45:37] Aeyrix: s2013: I linked sevenseacat to three dictionaries and was told it's bullshit.
[06:45:43] Aeyrix: I don't think a StackExchange article is gonna cut it.
[06:45:55] s2013: Aeyrix no but that explains better than i could what i was tryign to say
[06:45:59] s2013: and that its very common
[06:46:09] Aeyrix: It's common where I live, very common.
[06:46:10] s2013: women call other women guys.. at least in the US
[06:46:27] sevenseacat: just because it's common for *you* because *you are not a woman*, does not mean its common for everyone.
[06:46:37] s2013: i just said its common for women too
[06:46:39] sevenseacat: hello, privilege.
[06:46:45] Aeyrix: hello, strawman
[06:46:49] Aeyrix: strawperson?
[06:46:53] s2013: strawwomen
[06:46:59] sevenseacat: and you know what women say to each other when there are no men around, do you?
[06:46:59] pontiki: how about this: instead of saying "it's not really a problem." try listening when it is.
[06:47:01] Varun_krishna: s2013: I didn't know that.
[06:47:11] Aeyrix: sevenseacat: Actually my girlfriend still says "hey guys".
[06:47:27] Aeyrix: So uh, that's a generalisation that I can prove is incorrect.
[06:47:29] sevenseacat: i think you're missing the point.
[06:47:54] s2013: ok well maybe they have a secret language when people of xy chromosome arent around
[06:47:56] sevenseacat: I think this is the first time I've actually been a little amazed by privilege.
[06:48:58] Aeyrix: ACTION is confused as to which part of this conversation indicates that one group of people has a privilege that the other does not.
[06:49:02] Varun_krishna: ACTION wondering how this topic "guys" got in here
[06:49:14] Aeyrix: I may not have being paying attention, though. I did have to drop out.
[06:49:22] Aeyrix: Varun_Krishna: Someone probably said "guys".
[06:49:26] sevenseacat: Aeyrix: because you're telling me my opinion of gender is wrong because it doesnt match yours.
[06:49:33] hanss: ... I brought it up. Sorry!
[06:49:39] s2013: look waht you did hanss
[06:49:40] Aeyrix: sevenseacat: I'm saying it's incorrect based on three dictionaries.
[06:49:50] Aeyrix: You know, the peer-reviewed documentation on the foundations of our language?
[06:50:18] Dopagod: has joined #RubyOnRails
[06:50:21] s2013: but the way our politically correct society is going. .maybe thats the next thing people wanna tackle
[06:50:33] rvanlieshout: sevenseacat: some people just don't get it so it seems
[06:50:41] Varun_krishna: thank God we don't have some confusing methods here on rails like "guys" :)
[06:50:53] Aeyrix: Varun_Krishna: initialize vs initialise
[06:51:00] s2013: yes some people such as pretty much the entire population that speak the language
[06:51:05] hanss: s2013 I'm the new guy stirring shit up
[06:51:17] Varun_krishna: rvanlieshout: Even I didn't get it.
[06:51:19] hanss: Uh oh... ;')
[06:51:27] s2013: yeah you are a bad person hanss
[06:51:33] Varun_krishna: Aeyrix: Oh O_o
[06:51:44] Aeyrix: Varun_Krishna: American privilege
[06:51:49] Aeyrix: getting their subdialect of the language
[06:51:59] Aeyrix: while us Australians and Brits have to deal with using nonstandard language.
[06:52:00] sevenseacat: hanss: nah you were cool, you noted it was a thing and avoided it :)
[06:52:11] sevenseacat: and its not a hard thing to do, is it
[06:52:31] Aeyrix: when someone comes from the US to AU
[06:52:31] Varun_krishna: sevenseacat: No. Even I'll avouid it
[06:52:43] s2013: i lived in au for a year
[06:53:00] Aeyrix: did you died?
[06:53:09] s2013: almost did with the prices i paid
[06:53:14] s2013: i studied there for a year
[06:53:22] Aeyrix: versus US college...?
[06:53:24] s2013: exchange program
[06:53:34] Aeyrix: $120+k for USA
[06:53:40] Aeyrix: $40k for AU
[06:53:51] s2013: my first school was like $50K/yr but i had scholarship
[06:54:00] Aeyrix: $40k is scholarship free
[06:54:07] Aeyrix: AU education regulation is great
[06:54:14] s2013: the second one was public but i never took any aid so i paid out of pocket $10K/yr
[06:54:47] s2013: in australia i studied at a really good uni there
[06:54:56] s2013: university of sydney
[06:55:03] Aeyrix: v solid uni
[06:55:05] s2013: but id never give up the experience of going to school in the us
[06:55:12] dhjondoh: has joined #RubyOnRails
[06:55:14] Aeyrix: > go to class
[06:55:15] Varun_krishna: s2013: So you must be a genius in technology.
[06:55:16] Aeyrix: > get shot
[06:55:18] Aeyrix: > go to party
[06:55:19] Aeyrix: > get shot
[06:55:23] Aeyrix: > hand in assignment
[06:55:24] Aeyrix: > get shot
[06:55:28] Aeyrix: ah yes, the US experience
[06:55:31] cac: has joined #RubyOnRails
[06:55:40] s2013: i had choice between australia national univ, sydney univ or melbourne univ. i picked sydney
[06:55:53] Aeyrix: Good choice.
[06:55:55] s2013: almost picked ANU but someone said that was the most boring uni ever
[06:55:59] Aeyrix: USyd is pretty damn good.
[06:56:05] s2013: are you aussie?
[06:56:09] Aeyrix: Melbourne.
[06:56:12] Cork: does there exist anything in activemodel to set that fields should trim field values before adding them to the database?
[06:56:21] s2013: i wish i lived in melbourne instead. i loved it
[06:56:26] s2013: have family in craigieburn and werribe
[06:56:27] Cork: or do one have to add that manually for every field?
[06:56:38] Aeyrix: Cork: You could snip them all in a method
[06:56:49] Cork: ya, that was the "or" :)
[06:56:52] s2013: sydney, especially where i lived was pretty much a big chinatown
[06:57:03] Aeyrix: s2013: Melbourne is great. I just moved from Brisbane
[06:57:21] s2013: oo i went up to gold coast but not brisbane. ireally wanted to go up there tho
[06:57:28] Aeyrix: Brisbane is p slow.
[06:57:34] s2013: i really wanna cehck out perth
[06:57:34] Aeyrix: Not much happens really, except sometimes people wake up.
[06:57:47] crdpink: has joined #RubyOnRails
[06:57:51] s2013: i remember the flooding that happened and shot up banana prices
[06:58:06] hanss: Looking back I wish I had done an exchange program. Especially one of my first few years of school, it would have been really good for me. I was thinking either NZ or AUS.
[06:58:15] s2013: man NZ is awesome
[06:58:16] Aeyrix: ACTION points in sevenseacat's direction.
[06:58:21] s2013: hanss where did you go to school
[06:58:23] Aeyrix: NZ I actually haven't visited yet.
[06:58:29] s2013: i loved nz
[06:58:35] Aeyrix: I think I'm going in Dec.
[06:58:39] s2013: good time
[06:58:43] s2013: i was there in november
[06:58:56] s2013: right after they won the rugby world cup
[06:58:57] hanss: s2013 I went to NAU, Northern Arizona.
[06:58:57] Varun_krishna: s2013: How come you love all the other places than you currently live :P
[06:59:08] s2013: Varun_Krishna i love Texas
[06:59:16] s2013: hanss oh nice
[06:59:16] neanderslob: question about associations: if Model1 has_many Model2 is it then actually necessary to say Model2 belongs_to Model1?
[06:59:22] s2013: yes neanderslob
[06:59:33] s2013: i went to NYU and University of Texas
[06:59:43] Aeyrix: I have a couple friends at NYU.
[06:59:50] Varun_krishna: s2013: Just joking man :)
[07:00:05] s2013: Aeyrix nice.. its a very good school but i didnt like it much
[07:00:22] s2013: i was in their engineering school which is pretty isolated from rest of NYU life
[07:00:51] s2013: but i love university of texas.. its a way of life almost when you go to a school like that
[07:00:58] hanss: s2013 yeah it was good. I messed around then then switched majors so it took me awhile to get done. Can't complain though.
[07:01:03] GnuYawk: has joined #RubyOnRails
[07:01:05] s2013: atleast you finished
[07:01:13] neanderslob: s2013: I seemed to remember that belongs_to was only necessary under certain circumstances but worth while to always include
[07:01:21] s2013: no neanderslob
[07:01:38] Aeyrix: s2013: It depends.
[07:01:40] Aeyrix: You can not have it
[07:01:50] Aeyrix: but you don't have a parent relation
[07:02:04] Aeyrix: it is far better to just have it though
[07:02:08] s2013: yeah thats true
[07:02:13] crdpink2: has joined #RubyOnRails
[07:02:24] Aeyrix: For the sake of simplicity: Yes, you should have it.
[07:02:31] s2013: Aeyrix where in melbourne are you?
[07:02:37] Aeyrix: Literally in Melbourne.
[07:02:38] Varun_krishna: s2013: What is the best way to learn and adopt to a new technology ?
[07:02:51] s2013: the docklands or something?
[07:02:53] s2013: Varun_Krishna just do it
[07:02:56] Aeyrix: s2013: Mhm.
[07:02:57] hanss: Yeah, looking back I wish I had taken some CS classes though. I originally started in ME and did that route for a few years before doing terrible and then swtiching to marketing. What a breath of fresh air that was.
[07:03:00] s2013: build stuff, break, etc.
[07:03:00] neanderslob: Aeyrix: that's sort of what I seem to recall; if I only have a has_many without the belongs_to, what does that prevent me from doing?
[07:03:09] Aeyrix: neanderslob:
[07:03:13] s2013: Aeyrix do you and Radar meet up for vegemite sessions
[07:03:14] Aeyrix: User has_many cars
[07:03:18] Aeyrix: Car belongs_to User
[07:03:27] Aeyrix: if you don't have the belongs_to
[07:03:28] Aeyrix: you can do
[07:03:30] Aeyrix: user.cars
[07:03:31] Aeyrix: but can't do
[07:03:33] Aeyrix: cars.user
[07:03:37] Aeyrix: car.user *
[07:03:43] Aeyrix: make sense?
[07:03:55] neanderslob: Aeyrix: absolutely
[07:03:55] Aeyrix: s2013: He keeps trying to get me to go to meetups
[07:03:57] Aeyrix: but I keep getting sick
[07:04:09] s2013: how big is the rails meetup in melbourne
[07:04:11] Jamal: has joined #RubyOnRails
[07:04:33] Aeyrix: ask Radar.
[07:04:49] s2013: the big one in ny has like 3000 or so people.
[07:04:53] s2013: i run one it has like 1500 or something
[07:04:55] neanderslob: Aeyrix: thanks for clearing that up
[07:05:02] Sehryn_: has joined #RubyOnRails
[07:05:05] Aeyrix: neanderslob: np np
[07:05:17] s2013: we are planning a big event this summer tho
[07:06:38] s2013: anyways, nice talking to yall.. night
[07:07:09] m3_del: has joined #RubyOnRails
[07:07:52] GnuYawk: has joined #RubyOnRails
[07:07:53] GnuYawk: has joined #RubyOnRails
[07:07:56] brain_shim: has joined #RubyOnRails
[07:08:39] Varun_krishna: has left #RubyOnRails: ()
[07:09:18] Sylario: has joined #RubyOnRails
[07:09:34] Babelfish: has joined #RubyOnRails
[07:09:52] dcope-: has joined #RubyOnRails
[07:10:12] Radar: You peope talk too much
[07:10:28] Radar: give me the tl;drs
[07:10:32] dhjondoh1: has joined #RubyOnRails
[07:10:33] Sehryn: has joined #RubyOnRails
[07:10:46] funnel_: has joined #RubyOnRails
[07:10:54] Mession_: has joined #RubyOnRails
[07:11:07] baweaver: Radar: Code broke, you fix?
[07:11:07] Afterglow: has joined #RubyOnRails
[07:11:08] skyjumper: has joined #RubyOnRails
[07:11:08] skyjumper: has joined #RubyOnRails
[07:11:11] Afterglow: has joined #RubyOnRails
[07:11:18] stylus: has joined #RubyOnRails
[07:11:22] Radar: oh that's right we were discussion payment terms
[07:11:26] rlomax: has joined #RubyOnRails
[07:11:26] Radar: discussing*
[07:11:30] Prira: has joined #RubyOnRails
[07:11:34] krokuz_: has joined #RubyOnRails
[07:11:34] Radar: $2500/hr was the agreed upon figure, yes?
[07:12:00] drzel: has joined #RubyOnRails
[07:12:20] baweaver: You said TL;DR
[07:12:21] Helheim_: has joined #RubyOnRails
[07:13:18] baweaver: That was TL;DR for the entire channel
[07:13:26] Aswebb_: has joined #RubyOnRails
[07:13:27] asheinfeld: has joined #RubyOnRails
[07:14:02] Ergo: has joined #RubyOnRails
[07:17:04] baweaver: ACTION reads up
[07:17:43] man_in_the_b0x: has joined #RubyOnRails
[07:17:50] eGGsha: has joined #RubyOnRails
[07:18:03] baweaver: ACTION scrolls back down whilst shaking head
[07:18:59] neilfse: has joined #RubyOnRails
[07:19:08] alex88: has joined #RubyOnRails
[07:20:23] darutoko: has joined #RubyOnRails
[07:20:49] yash: has joined #RubyOnRails
[07:23:49] arup_r: has joined #RubyOnRails
[07:24:22] mc_-: has joined #RubyOnRails
[07:25:02] xcesariox: has joined #RubyOnRails
[07:31:24] cac: has joined #RubyOnRails
[07:31:58] ebryn_: has joined #RubyOnRails
[07:32:21] llakey_: has joined #RubyOnRails
[07:33:09] xhoy_: has joined #RubyOnRails
[07:33:15] daxroc1: has joined #RubyOnRails
[07:33:35] ebryn_: has joined #RubyOnRails
[07:33:54] krz: has joined #RubyOnRails
[07:34:16] melonstorm: has joined #RubyOnRails
[07:36:57] Shoutsid: has joined #RubyOnRails
[07:37:50] lestrade: has joined #RubyOnRails
[07:37:51] DEA7TH: has joined #RubyOnRails
[07:37:56] x-light: has joined #RubyOnRails
[07:38:04] yash_: has joined #RubyOnRails
[07:38:33] iamse7en: has joined #RubyOnRails
[07:38:51] blackmesa: has joined #RubyOnRails
[07:40:12] sandelius: has joined #RubyOnRails
[07:40:26] Oog: has joined #RubyOnRails
[07:42:27] Oog: how do i access a helper in a .js.coffee.erb asset?
[07:44:34] dionysus69: has joined #RubyOnRails
[07:44:49] iamse7en: if anyone is really good at re-arranging hashes/arrays, i'm struggling taking an array from a json and converting it into a specific format needed for a chart. gist should be self-explanatory on what I need: https://gist.github.com/austinarchibald/c612b1693513d19d4956
[07:45:00] yash: has joined #RubyOnRails
[07:45:28] jfarmer: has joined #RubyOnRails
[07:48:02] yash_: has joined #RubyOnRails
[07:48:15] towski_: has joined #RubyOnRails
[07:49:04] tbuehlmann: iamse7en, this? events.map { |event| {label: event['event_name], value: event['count']} }
[07:49:11] dhjondoh: has joined #RubyOnRails
[07:49:39] aep: has joined #RubyOnRails
[07:49:50] coffeeju1: has joined #RubyOnRails
[07:50:07] Aswebb_: has joined #RubyOnRails
[07:51:08] tbuehlmann: or this ("renaming" keys)? events['label'] = events.delete('event_name'); events['value'] = events.delete('count')
[07:53:58] spectra: has joined #RubyOnRails
[07:54:05] iamse7en: and set events equal to what it is in my events_list method?
[07:54:26] iamse7en: by doing that and then going with your first idea, I got TypeError (no implicit conversion of String into Integer):
[07:54:42] ur5us: has joined #RubyOnRails
[07:56:36] brain_shim: has joined #RubyOnRails
[07:57:49] konsolebox: has joined #RubyOnRails
[07:59:05] jsrn_: has joined #RubyOnRails
[07:59:38] konsolebox: has joined #RubyOnRails
[08:00:02] iamse7en: tbuehlmann: i then tried events_list.map { |event| {label: event['event_name'], value: event['count']} }
[08:00:27] toretore: has joined #RubyOnRails
[08:00:33] iamse7en: which produced no errors, but the resulting array was { label: null, value: null }, etc . this is a step in the right direction though!
[08:03:20] fgo: has joined #RubyOnRails
[08:05:11] tbuehlmann: are the keys symbols? then events.map { |event| {label: event[:event_name], value: event[:count]} }
[08:06:27] iamse7en: tbuehlmann. holy shit. that did it
[08:06:34] iamse7en: it's so easy once you see it
[08:06:39] iamse7en: thank you!!
[08:06:40] IanV0rn2341: has joined #RubyOnRails
[08:07:36] mikecmpbll: has joined #RubyOnRails
[08:07:49] m3_del: has joined #RubyOnRails
[08:09:24] eGGsha: has joined #RubyOnRails
[08:09:58] IanV0rn2341: has joined #RubyOnRails
[08:11:16] jeanlinux: has joined #RubyOnRails
[08:14:11] asheinfeld: has joined #RubyOnRails
[08:14:52] artto: has joined #RubyOnRails
[08:15:00] blackmesa: has joined #RubyOnRails
[08:15:12] Trefex: has joined #RubyOnRails
[08:17:02] zorak8: has joined #RubyOnRails
[08:32:29] Oog: is it safe to have two servers try and do rake db migrate at the same time?
[08:32:45] Spami: has joined #RubyOnRails
[08:33:38] rvanlieshout: Oog: why wouldn't it?
[08:33:40] rvanlieshout: what db engine?
[08:33:44] rvanlieshout: two db servers you mean
[08:33:46] Oog: postgres
[08:33:59] Oog: imagine two computers using same database both run db:migrate at same time
[08:34:07] rvanlieshout: postgres supports schema changes in a transction
[08:34:11] jenrzzz: has joined #RubyOnRails
[08:34:15] sevenseacat: the second would fail
[08:34:26] Oog: oh so it would fail not skip it?
[08:34:33] rvanlieshout: i think it would skip it
[08:34:39] rvanlieshout: if it waits for the transaction
[08:34:47] rvanlieshout: and if db locks the schema_migrations table for update
[08:34:55] Oog: yeah thats what im wondering
[08:34:57] sevenseacat: well even if both were running at the same time in their own transaction, when the second tried to commit the transaction, i think it would go kerboom
[08:35:06] elektronaut: has joined #RubyOnRails
[08:35:12] drPoggs: has joined #RubyOnRails
[08:35:21] rvanlieshout: true, but if it tries to lock schema_migrations for update and then determine what needs to run, it'll wait
[08:35:22] Oog: depends how the locking is done if its table lock it should wait do it in sequence and skip
[08:35:41] sevenseacat: if the table gets locked and the second has to wait, then yeah I think it would skip it
[08:37:08] Oog: where od i find the code to look
[08:37:15] dionysus69: has joined #RubyOnRails
[08:37:27] rvanlieshout: but why would you run it twice?
[08:37:33] rvanlieshout: that would imply a wrong deployment procedure
[08:38:12] Oog: hmm yeah you know that might be right
[08:39:08] Oog: got 2 ec2 servers - 1 web 1 worker. wanted to deploy to both at same time to speed things up but maybe i need to do worker first
[08:39:15] Oog: make sure its code is updated before web in case it queues a job
[08:39:49] rvanlieshout: if you use capistrano it'll know you only have 1 db server
[08:40:03] Oog: i use semaphore
[08:40:06] Oog: no capistrano
[08:40:20] Oog: actually its really beanstalk
[08:42:43] gremax: has joined #RubyOnRails
[08:42:54] konsolebox: has joined #RubyOnRails
[08:42:57] nigelx344: has joined #RubyOnRails
[08:43:11] baweaver: has joined #RubyOnRails
[08:43:40] n008f4g_: has joined #RubyOnRails
[08:45:07] darutoko-: has joined #RubyOnRails
[08:52:45] srinidhi: has joined #RubyOnRails
[08:55:25] alexhartley: has joined #RubyOnRails
[08:56:54] rikkipitt: has joined #RubyOnRails
[08:57:11] ndrei: has joined #RubyOnRails
[08:57:32] srinidhi: has joined #RubyOnRails
[09:01:03] avril14th: has joined #RubyOnRails
[09:03:07] adre: has joined #RubyOnRails
[09:03:48] stamina: has joined #RubyOnRails
[09:04:27] fgo: has joined #RubyOnRails
[09:04:29] rikkipitt: has joined #RubyOnRails
[09:07:30] yaymukund: has joined #RubyOnRails
[09:07:40] chrissonar: I often read about removing as much as possible logic out of ActiveRecord and I'm convinced that it helps. but for example how to move validations out into validation objects?
[09:08:19] chrissonar: and is it really worth for say 3 presence of validations on an object?
[09:08:30] rvanlieshout: from model -> helper is weird
[09:08:32] m3_del: has joined #RubyOnRails
[09:08:46] rvanlieshout: to validation objects would make sense of you use them multiple times
[09:09:09] chrissonar: rvanlieshout, with multiple times you mean in several model objects?
[09:10:21] rvanlieshout: cause there is nothing wrong with a validates :foobar, presence: true
[09:10:21] chrissonar: rvanlieshout, which is true for the classical presence of validations very soon.
[09:11:29] rikkipitt: has joined #RubyOnRails
[09:12:03] rvanlieshout: i wouldn't overcomplicate things by moving everything into separate things
[09:13:02] chrissonar: rvanlieshout, I'm still looking for a balanced refactoring of simple objects. and yeah i defintely don't wanna overengineer it.
[09:13:40] eGGsha: has joined #RubyOnRails
[09:14:08] Jamal_: has joined #RubyOnRails
[09:14:15] rvanlieshout: it's the same as defining a line count for a 'fat model'
[09:14:17] rvanlieshout: that's just wrong
[09:14:59] asheinfeld: has joined #RubyOnRails
[09:16:24] chrissonar: rvanlieshout, sure, there is no sharp border line. but since I'm quite unconfident maybe you could take a look at: https://gist.github.com/christianrolle/2785295070636ebe4d4c and say what would you refactor out of the model into other objects?
[09:16:52] MissionCritical: has joined #RubyOnRails
[09:17:00] chrissonar: then I probably could copy that knowledge to other objects and get more confident the more I decide.
[09:17:11] wasp__: has joined #RubyOnRails
[09:18:58] gaussblurinc1: has joined #RubyOnRails
[09:19:27] rikkipitt: has joined #RubyOnRails
[09:20:14] rvanlieshout: added a comment to that gist
[09:20:22] rvanlieshout: hmm. that indent is wrong
[09:20:23] chrissonar: rvanlieshout, nice! :)
[09:20:37] rvanlieshout: just give it some more space
[09:20:41] gaussblurinc1: hi! I have app that has both api part ( by api_token ) and user authenticated part. should I split controllers in two categories: Api module and Users module?
[09:23:46] sinkensabe: has joined #RubyOnRails
[09:24:29] chrissonar: rvanlieshout, o.k. you renamed the default_label method and used the syntactic sugar for definig the named scope, don't you? and what would you extract into a separate object?
[09:26:05] yfeldblum: has joined #RubyOnRails
[09:26:13] beilabs_: has joined #RubyOnRails
[09:26:41] chrissonar: rvanlieshout, ah the usage of present? is nice and I didn't refactor it in this legacy object. but thank for pointing me.
[09:27:04] bruno-: has joined #RubyOnRails
[09:27:54] chrissonar: rvanlieshout, but would you extract any method or validation or whatever out of the object or leave as it is (since it is a quite simple one)?
[09:28:10] rvanlieshout: i wouldn't place anything in an object
[09:28:11] x-light: has joined #RubyOnRails
[09:28:45] rvanlieshout: and the default_label -> set_default_label is imporant imo. cause it changes something
[09:29:22] apofis: has joined #RubyOnRails
[09:30:19] lxsameer: has joined #RubyOnRails
[09:30:59] chrissonar: rvanlieshout, because it changes something ont the object itself? and the 2 remaining instance methods are just wrappers for attributes.
[09:31:23] rvanlieshout: because of the difference between setting and getting
[09:31:26] chrissonar: and that's why the have tp remain in that object, right?
[09:32:02] rvanlieshout: no, they don't _have_ to remain in that object
[09:32:04] rvanlieshout: could also be in a concern
[09:32:17] chrissonar: rvanlieshout, @set_default_label: sure. that is far more intentional.
[09:32:25] rvanlieshout: but for this file i don't see any benefit of having it split into several files
[09:32:37] rvanlieshout: unless you use that mandatory method on several things in a similar way
[09:33:46] chrissonar: rvanlieshout, ah o.k. good point.
[09:33:52] alexhart_: has joined #RubyOnRails
[09:37:14] alexhartley: has joined #RubyOnRails
[09:41:42] wasp__: has joined #RubyOnRails
[09:42:21] krz: has joined #RubyOnRails
[09:43:45] bin_005: has joined #RubyOnRails
[09:44:43] jenrzzz: has joined #RubyOnRails
[09:46:18] arBmind: has joined #RubyOnRails
[09:48:58] britter: has left #RubyOnRails: ()
[09:49:12] comrad: has joined #RubyOnRails
[09:54:04] michael_mbp: has joined #RubyOnRails
[09:54:36] IanV0rn2341: has joined #RubyOnRails
[09:55:21] chrissonar: rvanlieshout, thank you very much for your thoughts.
[09:59:00] User458764: has joined #RubyOnRails
[09:59:18] ndrei: has joined #RubyOnRails
[10:00:14] El3k0n: has joined #RubyOnRails
[10:03:42] nya: has joined #RubyOnRails
[10:04:55] marr: has joined #RubyOnRails
[10:06:23] mrchris: has joined #RubyOnRails
[10:06:25] blackmesa: has joined #RubyOnRails
[10:06:54] mrchris: Hi All.. Does anyone know how add a display only field to a form using simple_form? So this is a field in the form that is static text only and not related to the model
[10:06:54] rickmasta: has joined #RubyOnRails
[10:08:02] sevenseacat: you could write a custom input to do that
[10:08:47] vedu: Hello. I want to set a has_many through a polymorphic association: https://gist.github.com/vedant1811/e8be33cc4e1cc890f7cc
[10:09:17] m3_del: has joined #RubyOnRails
[10:09:37] benhuda: has joined #RubyOnRails
[10:11:37] rvanlieshout: that's not a has_many through a polymorphic association you want
[10:11:55] rvanlieshout: cause it's not the users locations you want to go through
[10:12:03] machty: has joined #RubyOnRails
[10:12:57] vedu: rvanlieshout: yeah it is complicated. I just want to get the orders when I do user.orders
[10:13:11] rvanlieshout: it's not really complicated
[10:13:18] rvanlieshout: what exactly do you want?
[10:13:36] rvanlieshout: cause a location only belongs to one thing
[10:13:43] rvanlieshout: so not to both a user and a order
[10:14:19] vedu: oder should belong to a user if order.drop_location.locationable_type == 'User' && order.drop_location.locationable_id == user.id
[10:14:30] rvanlieshout: that cannot be the case
[10:14:34] rvanlieshout: how is location references to an order?
[10:15:08] vedu: location references a user and order also references a user
[10:15:18] eoy: has joined #RubyOnRails
[10:15:28] rvanlieshout: not according to your location model
[10:15:29] axl_: has joined #RubyOnRails
[10:15:32] rvanlieshout: that would be two different locations
[10:16:26] vedu: rvanlieshout: yeah my location does not reference user. But it can right? How can do it
[10:16:52] rvanlieshout: add a second relationship
[10:17:00] rvanlieshout: no need for this to be polymorphic
[10:17:08] rvanlieshout: a location belongs_to user and belongs_to order
[10:18:19] vedu: But location does not 'belong_to' order.in fact, location can have many orders
[10:19:00] chancancode: has joined #RubyOnRails
[10:19:01] rvanlieshout: then it's still not polymorphic
[10:19:05] rvanlieshout: so location belongs_to :user and has_many :orders
[10:19:12] rvanlieshout: for a single location?
[10:19:40] vedu: But location can also belong to a 'merchant'
[10:20:09] rvanlieshout: so that belongs to is polymorphic
[10:20:13] rvanlieshout: the has_many aint
[10:21:01] Zadrel: has joined #RubyOnRails
[10:21:16] darutoko: has joined #RubyOnRails
[10:21:43] sash_: has joined #RubyOnRails
[10:22:41] Aftergl0w: has joined #RubyOnRails
[10:23:03] funnymanva: has joined #RubyOnRails
[10:23:20] vedu: rvanlieshout: Sorry net dropped. Last message I sent was "[15:49] <vedu> But location can also belong to a 'merchant'"
[10:23:28] rvanlieshout: 12:20 < rvanlieshout> so that belongs to is polymorphic
[10:23:28] rvanlieshout: 12:20 < rvanlieshout> the has_many aint
[10:23:45] pgatt: has joined #RubyOnRails
[10:23:52] skyjumper: has joined #RubyOnRails
[10:23:55] rlomax: has joined #RubyOnRails
[10:24:04] pgatt: has joined #RubyOnRails
[10:24:17] DEA7TH: has joined #RubyOnRails
[10:25:09] vedu: rvanlieshout: yes. exactly. not it sounds less complicated :)
[10:28:49] GeorgesLeYeti: has joined #RubyOnRails
[10:30:09] bruno-: has joined #RubyOnRails
[10:31:04] kalx: has left #RubyOnRails: ()
[10:33:41] blackmes1: has joined #RubyOnRails
[10:34:10] vedu: rvanlieshout: so what is the correct way to reference orders from users?
[10:34:36] fighella: has joined #RubyOnRails
[10:37:53] helpa: has joined #RubyOnRails
[10:38:06] raunicolae: has joined #RubyOnRails
[10:38:41] hd1: why isn't the cucumber:install generator working?
[10:42:58] jenrzzz: has joined #RubyOnRails
[10:43:28] dede: has joined #RubyOnRails
[10:48:19] rmoriz: has joined #RubyOnRails
[10:50:03] centrx: has joined #RubyOnRails
[10:50:44] fgo: has joined #RubyOnRails
[10:53:31] eGGsha: has joined #RubyOnRails
[10:53:53] tdguy: has joined #RubyOnRails
[10:54:49] Hates_: has joined #RubyOnRails
[10:54:54] DEA7TH_: has joined #RubyOnRails
[10:54:59] sevenseacat: hd1: thats a bit of a vague question
[10:55:49] thebatu1: has joined #RubyOnRails
[10:57:24] thebatu1: hello. I cant understand an issue. I created a user model and micropost model. I added belongs_to and has_many to the models. in Rails c if I try User.Micropost it is giving me undefinied method. how can I correct this ?
[10:58:30] bhuvanaurora: has joined #RubyOnRails
[10:58:39] DylanJ: thebatu1: code.
[10:58:43] DylanJ: User.Micropost?
[10:58:49] DylanJ: .CAPITALM icropost?
[10:59:24] thebatu1: no still undefinied
[10:59:25] DylanJ: you probably want. (if you did things right) User.first.micropost.
[11:00:43] thebatu1: still getting method mising
[11:01:10] frishi: has joined #RubyOnRails
[11:01:19] raunico3: has joined #RubyOnRails
[11:01:49] erich: has joined #RubyOnRails
[11:02:29] razzle_dazzle: has joined #RubyOnRails
[11:03:54] rodfersou: has joined #RubyOnRails
[11:03:56] chrissonar: has joined #RubyOnRails
[11:05:19] thebatu1: DylanJ, here is the full ocde https://github.com/thebatu/Blog2/blob/b66c609b8291fc1469e18046fbc096addf115c96/app/models/micropost.rb
[11:05:58] blackmes1: has joined #RubyOnRails
[11:06:00] DylanJ: User.first.microposts
[11:06:20] sevenseacat: !associations
[11:06:20] helpa: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[11:06:42] sevenseacat: in particular, http://guides.rubyonrails.org/association_basics.html#has-many-association-reference
[11:07:02] seank_: has joined #RubyOnRails
[11:07:13] thebatu1: DylanJ, oh ok now its working but i am watching Michael Hartl guide and in rails 3 he just does User.microposts
[11:07:46] sevenseacat: and thats not what you originally had either
[11:08:04] DylanJ: i haven't seen the tutorial. but there's no way he wrote User.micropost because that makes no sense.
[11:08:13] DylanJ: User.microposts*
[11:09:48] thebatu1: yes User.microposts
[11:09:51] fgo: has joined #RubyOnRails
[11:09:52] pusewicz: has joined #RubyOnRails
[11:09:56] sevenseacat: show us the guide? :)
[11:10:03] sevenseacat: because I can guarantee he doesnt do that
[11:10:06] m3_del: has joined #RubyOnRails
[11:10:50] thebatu1: sevenseacat, no he doesnt u r correct. the guide is a video of his rails 3 book that I purchaseed
[11:12:18] thebatu1: sevenseacat, did u follow his tutoirals at the begining ?.
[11:12:26] sevenseacat: a few years ago, yeah
[11:12:34] sevenseacat: I didn't like them very much
[11:12:59] thebatu1: sevenseacat, oh yea, he seems to popup when ever I sreach for info
[11:13:28] thebatu1: sevenseacat, what else did u follow as tutorial?
[11:13:44] DylanJ: sevenseacat: have you seen the rails stuff on codeschool? any idea if that's any good?
[11:13:47] sevenseacat: thebatu1: at the time there were no other really good ones around, so I wrote one.
[11:13:58] DylanJ: i'm teaching an intern ruby/rails atm and wondering if it might save me some time.
[11:14:14] sevenseacat: DylanJ: I've done a lot of it. It's good for going in-depth into stuff, but it doesnt give a good overview and doesn't put the pieces together (IMO)
[11:14:55] thebatu1: sevenseacat, oh yea, can I see the tutorial ?
[11:15:09] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[11:15:10] DylanJ: ah okay. i noticed yesterday that the guy was struggling with html/css so i set him up with the html+css tutorials on codeacademy. he seems to be whizzing through it. but on monday i'd like to get back to code.
[11:15:25] thebatu1: DylanJ, I had much trouble when I worked in a pro company doing rails. everything was different from the book. the book seemed a bit simple
[11:15:39] blackmesa: has joined #RubyOnRails
[11:15:43] DylanJ: the book is an intro. not a bible.
[11:15:49] DylanJ: from what i understand.
[11:15:56] thebatu1: so I had super trouble coz the book is simple and the company code was complex
[11:16:01] sevenseacat: indeed, the books are to teach you concepts. you need to them extrapolate and apply those concepts
[11:16:08] DylanJ: as is most real code thebatu1.
[11:16:08] asheinfeld: has joined #RubyOnRails
[11:16:22] eGGsha: has joined #RubyOnRails
[11:16:41] sevenseacat: its impossible to teach every possible way code can be put together
[11:16:46] thebatu1: DylanJ, indeed
[11:16:53] sevenseacat: and if we could, you'd be out of a job
[11:18:57] thebatu1: sevenseacat, yea I agree. but I wish I can find a real tutorial from a guy who actually did a complex project.
[11:19:14] DylanJ: i dont know if you'll find one
[11:19:20] DylanJ: or if it would even be helpful
[11:19:22] sevenseacat: why does it have to be from a guy?
[11:19:46] DoctorMonocular: he is right about something though
[11:19:49] thebatu1: not a guy. rails girls is also fantastic
[11:20:01] DoctorMonocular: he's asking for a tutorial, but what I think he's getting at is more like a mentorship
[11:20:07] DoctorMonocular: and that can be super valuable
[11:20:15] k4nd4lf: has joined #RubyOnRails
[11:20:24] thebatu1: yes mentorship is what I need
[11:20:25] DoctorMonocular: I wish I had a mentor :(
[11:20:32] thebatu1: where can I get a mentor
[11:20:54] thebatu1: a master in the art of rails
[11:20:54] DylanJ: network, show potential, be handsome.
[11:21:11] sevenseacat: networking is very important.
[11:21:20] DoctorMonocular: most people find mentors by getting jobs with awesome coworkers thebatu1
[11:21:40] DoctorMonocular: I know it's a catch 22 though
[11:21:44] cac: has joined #RubyOnRails
[11:22:00] DylanJ: you might be able to find a job as an intern or a junior programmer if you know another language
[11:24:33] thebatu1: I know java. and most java jobs are in big companies for banking clients. not so interesting. I did an internship in one company I was like a robot
[11:26:15] thebatu1: anyways I will keep trying. ty peeps
[11:26:24] hd1: thebatu1: might I PM you?
[11:27:04] hd1: guy as in general human, I suspect
[11:27:40] sevenseacat: yeah I'm not having this discussion for a fourth time today.
[11:28:01] jenrzzz: has joined #RubyOnRails
[11:28:07] thebatu1: sevenseacat, deja vue!
[11:28:56] DoctorMonocular: is it the whole "but it's a figure of speech" vs "but it erases half the population from our ideolect" thing?
[11:29:21] hd1: DoctorMonocular: pretty much :p
[11:29:42] sevenseacat: yeah pretty much
[11:30:23] centrx: ideolect, n - The linguistic system of one person, differing in some details from that of all other speakers of the same dialect or language.
[11:30:26] nettoweb: has joined #RubyOnRails
[11:30:33] sevenseacat: 'guys can mean both men and women and if you dont believe that then you dont know the english language'
[11:30:39] intinig: has joined #RubyOnRails
[11:30:42] sevenseacat: i paraphrase, but only slightly.
[11:31:15] hd1: Earth to batu, do you read me, ranger batu1?
[11:32:39] thebatu1: hd1, yea i P% you
[11:34:02] DoctorMonocular: centrx: interestung, I use ideolect differently than that definition
[11:34:10] DoctorMonocular: my whole group does
[11:34:20] DoctorMonocular: but then, we have very specific needs for words about brains
[11:34:29] ndrei: has joined #RubyOnRails
[11:35:13] DoctorMonocular: we use it to mean a person's internal thought representations, like the raw material of how their brain processes information
[11:35:27] DoctorMonocular: which is then translated, often through several layers, as spoken or written language
[11:35:47] DoctorMonocular: some ideolects are pretty close to the linear, verbal thing
[11:35:55] DoctorMonocular: others are way the fuck different
[11:37:44] nfk: has joined #RubyOnRails
[11:38:18] centrx: Sounds like ideology, especially in the way you used it above. Although 'ideology' is already overloaded with meaning
[11:40:00] diegoviola: has joined #RubyOnRails
[11:43:10] wsmoak: has joined #RubyOnRails
[11:43:58] ldnunes: has joined #RubyOnRails
[11:44:28] DoctorMonocular: yeah, that's not quite right, it'd be too confusing
[11:45:01] DoctorMonocular: I imagine that the definition you quoted comes from "idiosyncratic dialect"
[11:45:15] DoctorMonocular: whereas mine is more like "idea dialect"
[11:46:30] rickmasta: has joined #RubyOnRails
[11:50:53] jeanlinux: has joined #RubyOnRails
[11:54:22] sandstrom: has joined #RubyOnRails
[11:54:44] JohnBat26: has joined #RubyOnRails
[11:55:09] blackmesa: has joined #RubyOnRails
[11:55:47] JeramyRR: has joined #RubyOnRails
[11:56:33] cac: has joined #RubyOnRails
[11:58:15] darrencauthon: has joined #RubyOnRails
[11:58:42] w09x: has joined #RubyOnRails
[11:59:27] spectra-: has joined #RubyOnRails
[12:00:20] merryfett: has joined #RubyOnRails
[12:00:58] silverdust: has joined #RubyOnRails
[12:02:13] rustymyers: has joined #RubyOnRails
[12:04:41] zack6849: has joined #RubyOnRails
[12:04:42] zack6849: has joined #RubyOnRails
[12:04:59] emilkarl: has joined #RubyOnRails
[12:06:03] DEA7TH_: has joined #RubyOnRails
[12:06:15] emilkarl: Anyone using Simplecov to check testcoverage and get the method names as covered but the content marked as missed in the simplecov result page? Why is that? Like this: http://cl.ly/image/0z1y243R2z3x
[12:08:46] Papierkorb: has joined #RubyOnRails
[12:09:11] chouhoulis: has joined #RubyOnRails
[12:09:55] cytoskeletor: has joined #RubyOnRails
[12:10:51] m3_del: has joined #RubyOnRails
[12:12:01] rvanlieshout: emilkarl: the method gets defined, but you didn't use it in any test
[12:12:35] jeanlinux: has joined #RubyOnRails
[12:12:40] pedrosnk: has joined #RubyOnRails
[12:13:30] emilkarl: rvanlieshout: not sure what you mean, lets me show you the test for this???1 sec
[12:14:21] alexhartley: has joined #RubyOnRails
[12:14:31] cac: has joined #RubyOnRails
[12:15:50] ur5us: has joined #RubyOnRails
[12:15:57] gaussblurinc1: has joined #RubyOnRails
[12:16:45] DylanJ: emilkarl: many seconds.
[12:16:51] emilkarl: http://pastie.org/10271471
[12:17:15] asheinfeld: has joined #RubyOnRails
[12:17:16] emilkarl: and the coverage??? http://cl.ly/image/3O2X2T2V3F43
[12:17:40] rvanlieshout: so where are you calling extend_slug?
[12:17:54] emilkarl: rvanlieshout: just sent you the a new pic as well
[12:17:59] emilkarl: same problem with last_mission?
[12:18:09] emilkarl: just eaiser to copy to pastie
[12:18:10] eGGsha: has joined #RubyOnRails
[12:18:11] rvanlieshout: yeah. where are you calling that one in your test?
[12:18:20] eoy: has joined #RubyOnRails
[12:18:27] emilkarl: rvanlieshout: assert mission_mars.last_mission?
[12:18:45] emilkarl: and line 15
[12:18:52] DylanJ: and missions(:xyz) is definitely returning a whatever class has .last_missiong?
[12:18:54] rvanlieshout: you're calling last_mission there
[12:19:26] rvanlieshout: we're talking about last mission
[12:19:28] rvanlieshout: what's the test output?
[12:19:34] rvanlieshout: when running the test
[12:19:34] emilkarl: the test works fine
[12:19:49] rvanlieshout: did you start coverage in the spec_helper?
[12:19:51] emilkarl: its just the simplecov doesnt mark the content of the method as covered?
[12:20:00] DylanJ: can you paste your spec_helper?
[12:20:47] DylanJ: this is how i do it in my projects
[12:20:50] DylanJ: https://gist.github.com/DylanJ/9a8f7aef9d4c5f307714
[12:20:51] emilkarl: http://pastie.org/10271475
[12:20:58] DylanJ: though, this is _rails_helper_ cause i'm using rspec.
[12:21:51] DylanJ: fairly certain simplecov needs to be loaded first.
[12:21:55] emilkarl: but if you look at the test the method name is ???covered??? but not the content of it? http://cl.ly/image/3O2X2T2V3F43
[12:22:19] DylanJ: yeah cause it sees you loaded the file/class
[12:22:34] emilkarl: I just change order of the require...
[12:23:30] emilkarl: same result. s
[12:23:54] emilkarl: I am using minitest but that shouldnt matter right?
[12:24:22] DylanJ: Does it still happen if you replace missions(:xyz) with Mission.new(explicitly defined things)
[12:24:27] DylanJ: I haven't used fixtures in ages.
[12:24:37] DylanJ: But I really can't see it being an issue tbh.
[12:24:50] emilkarl: hmm if I remove the describe ???flow??? it still marks the method names as covered. but not the content.
[12:25:02] chipotle: has joined #RubyOnRails
[12:25:11] emilkarl: DylanJ: let me check
[12:25:34] charliesome: has joined #RubyOnRails
[12:25:41] IanV0rn2341: has joined #RubyOnRails
[12:26:57] emilkarl: no difference.
[12:27:28] DylanJ: how are you running this test?
[12:27:32] rvanlieshout: emilkarl: you're missing SimpleCov.start
[12:27:46] emilkarl: rvanlieshout: it is there?
[12:27:47] DylanJ: rvanlieshout: its in his test_helper.rb
[12:28:04] emilkarl: and I get the test coverage html files
[12:28:09] rvanlieshout: that should be on top
[12:28:15] rvanlieshout: first 2 lines
[12:28:28] DylanJ: yeah paste your updated test_helper
[12:28:29] man_in_the_b0x: has joined #RubyOnRails
[12:28:53] emilkarl: http://pastie.org/10271483
[12:29:20] vedu: Hello again. I have defined a simple method in my model so that I can do @user.orders . But I would rather do has_many :orders. .... . code: https://gist.github.com/vedant1811/e8be33cc4e1cc890f7cc
[12:30:04] sevenseacat: vedu: unless you have a foreign key association, then no.
[12:30:23] sevenseacat: you could do a has_many :through
[12:31:13] DylanJ: emilkarl: and if you do
[12:31:26] DylanJ: ruby test/models/mission_test.rb ?
[12:31:36] DylanJ: rake is gonna load rails code
[12:31:39] DylanJ: and then simplecov
[12:31:43] DylanJ: so i think that's your problem
[12:31:46] vedu: sevenseacat: yes I tried something like has_many through but my column_name is 'orders.drop_location_id' and not 'order.location_id'
[12:31:53] emilkarl: `require': cannot load such file -- test_helper (LoadError)
[12:32:09] sevenseacat: vedu: then you need to specify that column name when you define the association
[12:32:12] DylanJ: ruby -Ipath/to/test_helper.rb test/moedls/mission_test.rb
[12:32:16] DylanJ: I think that's how it goes
[12:32:27] DylanJ: or -Itest
[12:32:38] DylanJ: -I being a path to add to your include path
[12:32:45] DylanJ: so it can find 'test_helper.rb'
[12:33:29] emilkarl: ruby -l test/test_helper.rb test/models/mission_test.rb
[12:33:47] emilkarl: then i get some gem problems
[12:34:15] DylanJ: i can only imagine with all this information you're relaying back to us
[12:34:15] sevenseacat: thats not a helpful error message
[12:35:32] jeanlinux: has joined #RubyOnRails
[12:35:35] emilkarl: http://pastie.org/10271496
[12:36:00] emilkarl: trying bundle exec before now
[12:36:04] emilkarl: seems to work
[12:36:13] emilkarl: lets sett what the report says
[12:36:16] sandstrom: has left #RubyOnRails: ("OS X IRC Client (www.textualapp.com)")
[12:37:08] emilkarl: ran just fine but the simplecov result is still the same
[12:42:40] Haydos: has joined #RubyOnRails
[12:43:28] emilkarl: from what I can see the config looks fine.
[12:43:34] elektronaut: has joined #RubyOnRails
[12:43:39] drPoggs: has joined #RubyOnRails
[12:44:49] emilkarl: adn the files gets generated but it marks all lines in the first level (2 spaces) as ok and the rest as untested no matter what
[12:45:07] emilkarl: even tho there are no tests for things
[12:48:02] DylanJ: do you get any coverage of anything at all?
[12:48:04] emilkarl: rvanlieshout DylanJ if I skip the block
[12:48:11] emilkarl: and just put require 'simplecov'
[12:48:11] emilkarl: SimpleCov.start 'rails'
[12:48:45] emilkarl: in the test_helper.rb I get a different result???looks like all validations gets marked anyway but the tested methods seems to be ok???at least some of them
[12:50:00] konsolebox: has joined #RubyOnRails
[12:51:43] rvanlieshout: so without the block it kinda works?
[12:52:09] DylanJ: try without the block using ruby -Ixyz xyz.tb
[12:52:17] ur5us: has joined #RubyOnRails
[12:53:01] emilkarl: but I give up
[12:53:09] DylanJ: don't be a quitter.
[12:53:20] emilkarl: I???ll try to get it to work later???dont have time atm
[12:53:29] emilkarl: would be nice to have it working
[12:53:31] Zadrel: has joined #RubyOnRails
[12:53:38] emilkarl: thanks for the help so far at least
[12:54:09] jeanlinux: has joined #RubyOnRails
[13:00:17] strcmp1: has joined #RubyOnRails
[13:02:04] eoy: has joined #RubyOnRails
[13:08:17] thelastinuit: has joined #RubyOnRails
[13:08:47] givanse: has joined #RubyOnRails
[13:09:21] JoshL: has joined #RubyOnRails
[13:11:38] m3_del: has joined #RubyOnRails
[13:12:33] Sylario_: has joined #RubyOnRails
[13:14:46] JeramyRR: has joined #RubyOnRails
[13:15:06] DEA7TH_: has joined #RubyOnRails
[13:18:00] asheinfeld: has joined #RubyOnRails
[13:18:37] asheinfeld: has joined #RubyOnRails
[13:18:51] jenrzzz: has joined #RubyOnRails
[13:18:58] nothingmuch: has joined #RubyOnRails
[13:19:12] mostlybadfly: has joined #RubyOnRails
[13:19:54] Zadrel: anyone knows hos do i open 2 methods(pages) inside the same lightbox, side by side?
[13:20:33] asheinfeld: has joined #RubyOnRails
[13:22:52] sevenseacat: that sounds problematic.
[13:22:53] Zadrel: nvm, i was complicating the problem, i can just AJAX a table or 2 divs, sry :P
[13:24:05] hellschreiber: has joined #RubyOnRails
[13:24:17] alxndr: has joined #RubyOnRails
[13:24:59] chouhoulis: has joined #RubyOnRails
[13:28:02] eyck: has joined #RubyOnRails
[13:28:03] danlucraft: has joined #RubyOnRails
[13:31:05] Zadrel: i need to set a different layout for a single page inside the products controller, any ideas how i do it:?
[13:31:51] rvanlieshout: render layout: 'foobar'
[13:32:05] frishi: has joined #RubyOnRails
[13:32:36] alexhartley: has joined #RubyOnRails
[13:33:10] Zadrel: rvanlieshout: works on rails3? i put it in the method?
[13:33:19] Zadrel: cuz didn''t work :P
[13:33:43] Zadrel: says "undefined method 'layout' "
[13:33:51] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[13:34:25] Miesco: has joined #RubyOnRails
[13:34:47] Miesco: I can do this: gem install passenger; to install passenger?
[13:35:00] rvanlieshout: Miesco: can do
[13:35:07] DEA7TH_: Is it possible, upon receiving a GET request, to wait and only reply once a certain piece of interprocess communication has happened? This might mean that the client will wait for a few minutes until they receive a reply.
[13:35:31] rvanlieshout: DEA7TH_: yes, but not really considered stable
[13:35:47] DEA7TH_: rvanlieshout: I'm better off using sockets?
[13:36:03] fryguy: DEA7TH_: it is, but you'll need to make sure that your webserver is configured to allow an appropriate timeout, and if you are using a process-per-request or thread-per-request model you will have terrible capacity
[13:36:17] DEA7TH_: I want no timeout
[13:36:29] JoshL: has joined #RubyOnRails
[13:36:30] rvanlieshout: and you cannot really control that
[13:36:39] rvanlieshout: there are many things between the rails server and the browser that could break your connection
[13:36:52] DEA7TH_: the client is using sockets API, not a browser
[13:36:54] Papierkorb: Does anyone have an ETA on when rails5 comes around?
[13:36:59] Miesco: So passenger is... a web server? Or a plugin for a web server?
[13:37:00] fryguy: DEA7TH_: if you want no timeout then you are begging to have your server fall over and crash
[13:37:15] Zadrel: rvanlieshout: https://gist.github.com/rmatuoka/5286fbb2749b2166d906
[13:37:29] nettoweb: has joined #RubyOnRails
[13:37:33] rvanlieshout: ah. old ruby version
[13:37:38] rvanlieshout: render :layout => "admin"
[13:37:40] Papierkorb: Miesco: it's a plugin for nginx, which is patched into it and then compiled. So .. somewhat both at that stage
[13:37:54] seank_: has joined #RubyOnRails
[13:38:04] DEA7TH_: maybe a very long timeout anyway, but is it easy to do with just Rails or should I use websocket-rails or something instead?
[13:38:10] Zadrel: rvanlieshout: unexpected tASSOC
[13:38:15] Papierkorb: No idea if nginx supports shared lib plugins or not, so maybe that's the norm for nginx
[13:38:28] Scripore: has joined #RubyOnRails
[13:38:37] sevenseacat: Zadrel: layout 4 is foobared
[13:38:39] apofis: has joined #RubyOnRails
[13:38:52] fryguy: DEA7TH_: what you are trying to do is not going to work how you want it to, and you are going to run into lots of problems
[13:39:14] fryguy: passenger is also a plugin for apache
[13:39:17] DEA7TH_: fryguy: you mean I shouldn't do it via native Rails?
[13:39:31] ramortegui: has joined #RubyOnRails
[13:39:33] Zadrel: sevenseacat: idk what is foobared :/
[13:39:35] fryguy: DEA7TH_: meaning you shouldn't try to do no-timeout async the way that you are
[13:39:42] sevenseacat: Zadrel: you're missing the : in layout:
[13:39:43] fryguy: whether that's in rails or any other setup
[13:39:46] DEA7TH_: well it might have 1-hour timeout anyway
[13:39:50] sevenseacat: the syntax highlighting is a dead giveaway
[13:40:10] cha1tanya: has joined #RubyOnRails
[13:40:22] sevenseacat: oh wait, thats two sets of the same method?
[13:40:26] DEA7TH_: it's supposed to establish an ongoing connection, with the client ready to receive data, while consuming minimal amount of bandwidth. 5-10 minutes timeout is also ok
[13:40:27] quazimodo: has joined #RubyOnRails
[13:40:34] sevenseacat: can you gist the code you have now and the error
[13:40:40] Zadrel: sevenseacat: just tryed the ':' in it, generates unexpected tASSOC
[13:40:49] fryguy: DEA7TH_: then you should look into long-polling, websockets, server sent events, etc.
[13:41:33] Zadrel: sevenseacat: if tASSOC is taken out, then generates unexpected tSTRING_BEG
[13:41:56] lessless: has joined #RubyOnRails
[13:42:30] fryguy: Zadrel: what version of ruby are you using
[13:42:54] Zadrel: fryguy: ruby 1.8.7 and rails 3.2.13
[13:42:59] fryguy: that's the problem
[13:43:03] fryguy: 1.8.7 is VERY old
[13:43:05] fryguy: don't use that
[13:43:07] nya: has joined #RubyOnRails
[13:43:14] smathy: has joined #RubyOnRails
[13:44:06] fryguy: rails 3.2 is also several years old and you should consider upgrading that too, but that is less egregious
[13:44:08] Zadrel: fryguy: not my call, :/
[13:44:25] rvanlieshout: but then the render :layout => 'admin' should still work
[13:44:29] fryguy: Zadrel: well then use the old hash syntax, :layout => 'admin'
[13:44:56] fryguy: Zadrel: and figure out why you are using old bad performing versions of the language when much newer more modern things are available that are significantly faster and better at memory management
[13:45:09] Hates_: woo legacy
[13:45:26] rvanlieshout: i wouldn't worry about memory management in the first place
[13:45:27] Hates_: I have to maintain a rails 2.0.2 and ruby 1.8.7 app :(
[13:45:28] rvanlieshout: more about security
[13:45:37] rvanlieshout: Hates_: there is a rails LTS version
[13:45:39] rvanlieshout: consider that one
[13:46:10] Hates_: rvanlieshout: looks interesting, 2.3 :(
[13:46:21] rvanlieshout: unable to upgrade to 2.3?
[13:47:01] Hates_: rvanlieshout: client doesn't want to pay for it
[13:47:12] fryguy: the company i work for has had a rails app in development since pre-1.0 beta and it's currently running on 4.2.2, there's really no reason why you shouldn't be able to make the requisite upgrades.
[13:47:29] Hates_: there is if you don't work for free
[13:48:22] merryfett: has joined #RubyOnRails
[13:48:53] fryguy: i definitely don't work for free
[13:48:54] rvanlieshout: ok. my weekend starts now
[13:49:18] DylanJ: yeah some apps are huge and upgrading to v3 or v4 is just not "in the budget"
[13:49:25] DylanJ: a lot of the time feature development comes first
[13:49:46] fryguy: the app i did is "huge" and we did the upgrades while doing feature development
[13:49:48] Hates_: my situation is made more complicated in that I'm a third party dev to the company that originally supplied the code base... which has some controllers that are over 2000 lines long.
[13:49:51] DylanJ: different situations for different companies.
[13:49:52] gaussblurinc1: has left #RubyOnRails: ()
[13:51:40] Zadrel: fryguy: this generates unexpected tASSOC
[13:51:43] erts: has joined #RubyOnRails
[13:51:51] fryguy: Zadrel: show us
[13:52:17] Zadrel: fryguy: nvm, i used layout "admin", :only=>[:compare] and worked
[13:52:24] Zadrel: thx you all for the attention
[13:52:32] merryfett: has joined #RubyOnRails
[13:52:36] Zadrel: may Odin bless you all
[13:53:50] Zadrel: sevenseacat: before the declatarion of the methods [index,show,create,...] i wrote *layout "admin", :only=>[:compare] and worked* and worked :)
[13:54:04] Zadrel: sevenseacat: before the declatarion of the methods [index,show,create,...] i wrote *layout "admin", :only=>[:compare]* and worked :)
[13:54:10] Zadrel: now it's right
[13:54:22] sevenseacat: well now its different
[13:54:35] sevenseacat: and your other methods wont have a layout assigned
[13:55:03] sevenseacat: but if thats cool, then its cool :)
[13:57:13] EminenceHC: has joined #RubyOnRails
[13:58:22] avril14th: Does anyone know how to have Sidekiq output its work to PaperTrail on Heroku?
[13:59:15] emilkarl: has joined #RubyOnRails
[14:00:46] axl_: avril14th, bundle exec sidekiq | logger -t sidekiq
[14:01:01] avril14th: axl_: thanks
[14:03:44] camonz: has joined #RubyOnRails
[14:04:09] darrencauthon: has joined #RubyOnRails
[14:04:11] darrik: has joined #RubyOnRails
[14:05:12] darrencauthon: has joined #RubyOnRails
[14:05:29] devdazed: has joined #RubyOnRails
[14:08:34] intinig: has joined #RubyOnRails
[14:11:21] Travis-42: has joined #RubyOnRails
[14:12:23] m3_del: has joined #RubyOnRails
[14:12:28] dopie: has joined #RubyOnRails
[14:12:46] erich: has joined #RubyOnRails
[14:13:26] Zadrel: anyone knows how to operate jquery.fancybox?
[14:15:05] acovrig: has joined #RubyOnRails
[14:15:41] acovrig: I???m trying to do a link_to /page/:id, I???m getting /page.id instead of /page/id why?
[14:16:09] acovrig: <%= link_to "Error", file_items_path(file_item.id) %>
[14:16:11] bruno-: has joined #RubyOnRails
[14:17:35] nya: has joined #RubyOnRails
[14:18:11] sevenseacat: acovrig: because file_items_path is for the index route
[14:18:19] sevenseacat: you want file_item_path(file_item)
[14:18:51] DoubleMalt: has joined #RubyOnRails
[14:18:56] acovrig: sevenseacat: I see, thanks
[14:20:42] brain_shim: has joined #RubyOnRails
[14:21:55] Exuma: has joined #RubyOnRails
[14:22:08] Travis-42: I???m trying to simulate my production environment to test caching. I have a number of view caches, but Rails is seeming to recalculate the cache digests on not just every request, but every read of a partial ??? is there any way to change this?
[14:25:42] chouhoulis: has joined #RubyOnRails
[14:26:12] acovrig: How would I be getting a FileNotFound on the image_tag: <% if File.exist? "app/assets/images/thmb/#{file_item.fname}" then %> <td><%= (link_to (image_tag 'thmb/' + file_item.fname), 'all/' + file_item.fname) %></td>
[14:27:56] disgrntld: has joined #RubyOnRails
[14:28:11] renegadeandy: has joined #RubyOnRails
[14:28:55] renegadeandy: Hi everyone. I am using RSpec and factorygirl for my feature tests. After a test runs, my test db is not 'emptied'. Is that expected? Should objects made in my factories persist across each test suite run?
[14:30:48] moeabdol: has joined #RubyOnRails
[14:30:48] mary5030: has joined #RubyOnRails
[14:30:58] sevenseacat: renegadeandy: hoe are you cleaning the database?
[14:32:32] renegadeandy: sevenseacat: i am not actually asking it to be cleaned...i wasnt sure if it was just going to be handled by RSPec maybe?
[14:32:42] renegadeandy: sevenseacat: how do you suggest that is handled?
[14:33:16] sevenseacat: two options - either you're using transactions (defined in rails_helper.rb) or you're using something like database_cleaner
[14:34:12] renegadeandy: sevenseacat: config.use_transactional_fixtures = true - seems im using transactions
[14:34:49] fryguy: fixtures are not factories
[14:35:03] idd2d: has joined #RubyOnRails
[14:35:20] renegadeandy: fryguy: im using factories using factorygirl
[14:35:25] renegadeandy: but that config line is part of rspec
[14:35:29] fryguy: yes, I read that initially
[14:35:51] renegadeandy: are you saying it should be : config.use_transactional_factories = true
[14:36:49] sevenseacat: so you're using transactions, ok cool
[14:36:58] sevenseacat: now where in your tests are you creating your data
[14:38:23] renegadeandy: sevenseacat: in my factorygirl - here : https://gist.github.com/renegadeandy/8913f4e518d35adf3bb4 -- interestingly the tests users table is empty after the test completes, but the category and sub_categories tables both do not empty.
[14:38:29] diegoviola: has joined #RubyOnRails
[14:38:38] sevenseacat: no, in your tests
[14:38:52] workmad3: sevenseacat: he's preloading data in the factory
[14:38:52] sevenseacat: that code just defines factories
[14:39:09] sevenseacat: i dont even know what that does
[14:39:17] sevenseacat: never seen preload before
[14:39:31] workmad3: sevenseacat: most likely, it's running FactoryGirl.create(:sub_category) when the factories are loaded
[14:39:39] workmad3: and so data ends up in the database before the transaction is started
[14:39:40] sevenseacat: oh fun. thats silly.
[14:40:10] renegadeandy: sevenseacat: its a separate gem, Ok, so in a background of my rspec feature tests I have the sign_in_as running, which creates that data : https://gist.github.com/renegadeandy/8913f4e518d35adf3bb4
[14:40:26] workmad3: sevenseacat: https://github.com/fnando/factory_girl-preload <-- fun fun fun
[14:41:27] diegoviola: has joined #RubyOnRails
[14:41:34] sevenseacat: renegadeandy: yep, and I am not psychic and do not know where that code is being called from. like i said, the *tests*
[14:41:48] sevenseacat: have not seen a test yet
[14:42:02] sevenseacat: but yeah, that preload should be nuked from orbit
[14:42:18] fryguy: it's not the WORST idea, implementation needs some help though :)
[14:42:46] renegadeandy: sevenseacat: https://gist.github.com/renegadeandy/8913f4e518d35adf3bb4 - that preload was suggested by Senjai when I asked how do I create a barebones set of things that my application needs to *work* during a test - yeah my implementation is probably wrong but it was my 1st shot
[14:42:57] renegadeandy: sevenseacat: ive added the test to that
[14:43:14] sevenseacat: well the preload is the problem - theres nothing in your app to remove it after the suite runs.
[14:43:17] workmad3: fryguy: yeah, it's not a bad idea... I doubt it works well with databasecleaner's truncate strategy when doing tests with poltergeist or capybara-webkit though...
[14:43:23] sevenseacat: so the data gets left behind.
[14:43:48] renegadeandy: sevenseacat: Ah I see
[14:43:51] Exuma: has joined #RubyOnRails
[14:43:57] fryguy: workmad3: yah, probably
[14:44:11] fryguy: rails fixture data gets left behind too though
[14:44:33] sevenseacat: true, but rails has mechanisms in place to deal with it
[14:44:38] fryguy: at least it does on my minispec setup
[14:44:47] renegadeandy: sevenseacat: so i dont see anything in the preload gem docs suggesting how to 'tidy' preload creations.....
[14:44:49] fryguy: right, but wouldn't those mechanisms also work for factorygirl preloading?
[14:44:49] sevenseacat: it will completely empty and re-add the fixtures before each suite
[14:45:05] sevenseacat: rails doesnt know anything about factories, so no
[14:45:12] fryguy: sevenseacat: I do not have that behavior on my minispec setup. I might be missing some config though
[14:45:29] Criten_: has joined #RubyOnRails
[14:45:40] eGGsha: has joined #RubyOnRails
[14:45:50] sevenseacat: renegadeandy: like was said previously, the implementation of the gem needs some work.
[14:46:01] adre: has joined #RubyOnRails
[14:46:10] sevenseacat: i wouldnt use it, personally. i would just create the data in a before :suite block, and then delete it afterwards.
[14:46:13] renegadeandy: sevenseacat: given my situation what would you do to tidy up the preload created records? I know it needs work - but I don't know what to do !
[14:46:30] renegadeandy: sevenseacat: so you could dump the preload
[14:47:02] workmad3: sevenseacat: the rake tasks for tests used to run db:test:prepare before test runs, which would completely recreate the database
[14:47:24] renegadeandy: and use a before like this : https://www.relishapp.com/rspec/rspec-core/v/2-2/docs/hooks/before-and-after-hooks#define-before(:all)-block-in-example-group
[14:47:28] sevenseacat: but that doesnt exist anymore, and the behaviour still persists
[14:48:26] fryguy: sevenseacat: do you know how the behavior still persists? I think I'm missing some config in my test setup, because my fixtures don't reset at the start of new test runs (aka, if I define a users fixture in test1, and don't define it in test2, it's still there assuming test1 ran first at least once)
[14:48:35] sevenseacat: didnt look into it, no.
[14:48:49] brazenbraden: has joined #RubyOnRails
[14:49:00] cpruitt: has joined #RubyOnRails
[14:49:04] fryguy: which made removing some old global fixtures a real pain 2 weeks ago, as I had to run db:test:prepare in between each file to make sure it wasn't polluted from other tests
[14:49:10] renegadeandy: sevenseacat: you would use those rspec before and after to do what i am doing with the preload, and then just do something like Category.delete_all in the after?
[14:49:15] sevenseacat: all fixtures are loaded at the start of a test suite run
[14:49:23] Exuma: Does anyone have any insight into getting rails running in production with docker?
[14:49:28] sevenseacat: whether you reference them or not
[14:49:40] fryguy: sevenseacat: not in my minispec setup
[14:49:41] Exuma: it seems like rolling restarts is kind of up in the air, and all the solutions need to be written manually
[14:49:42] sevenseacat: and they're all reset before each test suite run
[14:49:50] sevenseacat: fryguy: then you're doing something unusual
[14:49:59] fryguy: sevenseacat: yes, that's what I'm trying to fiure out
[14:50:01] sevenseacat: because thats what fixtures are for
[14:50:09] sevenseacat: to load one set of data, once
[14:50:38] kies^: has joined #RubyOnRails
[14:50:58] fryguy: sevenseacat: how does rails usually find the list of fixtures to load?
[14:51:12] workmad3: fryguy: it loads everything in test/fixtures, iirc
[14:51:16] sevenseacat: by looking in the fixtures folder.
[14:51:25] fryguy: that does not happen for me
[14:51:41] fryguy: i need to specify fixtures by using the fixtures class method
[14:51:52] workmad3: fryguy: then it'll wrap each of your tests in a transaction so that changes made inside a test can be thrown away afterwards by simply not commiting the transaction
[14:52:32] fryguy: http://api.rubyonrails.org/classes/ActiveRecord/TestFixtures/ClassMethods.html#method-i-fixtures
[14:52:41] fryguy: if i don't specify this in tests, fixtures don't get loaded for me
[14:53:30] sevenseacat: oh have they removed the global default fixtures option or something
[14:55:43] sevenseacat: meh, too tired to figure out what you're doing without seeing any code
[14:55:52] sevenseacat: crystal ball needs a rest
[14:57:10] benhuda: has joined #RubyOnRails
[14:57:39] jordanstorz: has joined #RubyOnRails
[14:57:45] renegadeandy: sevenseacat: thanks for your help - so you would do something like this : https://gist.github.com/renegadeandy/71151e99aabafd93f342
[14:57:50] renegadeandy: and dump preload
[14:57:58] smathy: has joined #RubyOnRails
[14:58:09] acti0nman: has joined #RubyOnRails
[14:58:13] fryguy: i'm reading the activerecord fixture code, trying to figure out how the uses_transaction? method works
[14:58:26] sevenseacat: renegadeandy: there's absolutely no reason to use a before :all block there.
[14:59:12] sevenseacat: what is your test even doing? theres no action in it, its just a bunch of assertions :/
[14:59:22] lindii_: has joined #RubyOnRails
[14:59:25] sevenseacat: you're not even using the data you're creating
[15:02:09] renegadeandy: sevenseacat: its not doing much at the moment, so if its not a before(:all) what is the call to say before the first....
[15:02:30] adre: has joined #RubyOnRails
[15:03:04] sevenseacat: before :each? just plain before? why does it need to be in a before block at all when its not being shared between tests?
[15:03:37] workmad3: let! blocks
[15:03:45] sevenseacat: even that would be preferable
[15:04:23] workmad3: let!(:sub_category) { create(:sub_category) } <-- eager-creates the object and allows you to access it as `sub_category` in your specs
[15:05:14] sevenseacat: i will leave this in workmad3 's capable hands and go watch some tennis and fall asleep.
[15:05:38] workmad3: sevenseacat: please don't :P
[15:07:13] Papierkorb_: has joined #RubyOnRails
[15:08:21] BBHoss: has joined #RubyOnRails
[15:09:44] lindii_: can i get rid of the label in a collection_select?
[15:11:44] bratsche: has joined #RubyOnRails
[15:12:54] DoctorMonocular: has joined #RubyOnRails
[15:13:08] m3_del: has joined #RubyOnRails
[15:16:24] riotjones: has joined #RubyOnRails
[15:18:53] xcesariox: has joined #RubyOnRails
[15:21:08] gambl0re: has joined #RubyOnRails
[15:22:00] lethjakman: has joined #RubyOnRails
[15:23:09] Deck`: If I have many-to-many relation and additional attributes in 3rd table (connection table), how can I get them?
[15:23:57] a346: has joined #RubyOnRails
[15:24:14] bullcitydev: has joined #RubyOnRails
[15:24:32] nettoweb: has joined #RubyOnRails
[15:29:03] dopie: has joined #RubyOnRails
[15:35:56] chinmay_dd: has joined #RubyOnRails
[15:37:30] asheinfeld: has joined #RubyOnRails
[15:39:10] idd2d: has joined #RubyOnRails
[15:39:13] CheckYourSix: has joined #RubyOnRails
[15:39:23] asheinfeld: has joined #RubyOnRails
[15:42:23] michael_mbp: has joined #RubyOnRails
[15:42:40] jeanlinux: has joined #RubyOnRails
[15:44:25] tbuehlmann: Deck`, you would have a model for the join table
[15:44:57] CheckYourSix: has joined #RubyOnRails
[15:45:15] cytoskeletor: has joined #RubyOnRails
[15:45:19] Deck`: tbuehlmann, yes, I have. Unfortunately I can't think of a way to iterate over all teammates and get their attributes from jointable
[15:45:53] tbuehlmann: what about teammate.that_join_table_model.that_attribute?
[15:47:18] mustmodify: has joined #RubyOnRails
[15:47:41] apofis: has joined #RubyOnRails
[15:47:49] bruno-: has joined #RubyOnRails
[15:47:54] jeanlinux: has joined #RubyOnRails
[15:52:27] Deck`: tbuehlmann, I think teammate.jointable.first.attribute?
[15:53:02] tbuehlmann: can we talk about real models? what do you have beside Teammate?
[15:53:19] mustmodify: has left #RubyOnRails: ()
[15:53:25] benhuda: has joined #RubyOnRails
[15:53:49] Peteykun: has joined #RubyOnRails
[15:53:51] iamjoe: has joined #RubyOnRails
[15:54:52] Deck`: tbuehlmann, I have Team model, User model and TeamUser model. TeamUser model has deleted_at field. I want to iterate over all users from specific team print their names (which is in User mode) and deleted_at attribute
[15:58:24] GnuYawk: has joined #RubyOnRails
[15:58:46] tbuehlmann: try this: TeamUser.includes(:users).where(team_id: team_id).each { |team_user| puts team_user.delete_at; puts team_user.user.whatnot }
[15:59:27] jsrn_: has joined #RubyOnRails
[16:00:10] chinmay_dd: has joined #RubyOnRails
[16:00:17] gniquil: has joined #RubyOnRails
[16:01:17] thebatu1: has joined #RubyOnRails
[16:02:19] maZtah: has joined #RubyOnRails
[16:05:36] Deck`: tbuehlmann, yeah, thank you. Although I thought the way to merge attributes to user collection from connection table. For example if I need to pass user to partial template
[16:06:14] victortyau: has joined #RubyOnRails
[16:07:22] tbuehlmann: then this? User.includes(:team_users).where(team_users: {team_id: team_id})
[16:07:26] tbuehlmann: or this? team.users.includes(:team_users)
[16:08:57] tbuehlmann: oh, won't make a difference, right? you
[16:09:09] tbuehlmann: would still need to figure out the correct team_user
[16:10:09] tbuehlmann: I don't think there's a good way to merge the attributes into one object
[16:10:41] tbuehlmann: but you could delegate the user methods from TeamUser, so team_user.foo delegates to team_user.user
[16:11:04] Deck`: Thank you, I will try
[16:11:36] tbuehlmann: you'd put something like this in the TeamUser class: `delegate :foo, to: :user`
[16:13:40] DoctorMonocular: has joined #RubyOnRails
[16:13:53] m3_del: has joined #RubyOnRails
[16:15:00] chinmay_dd_: has joined #RubyOnRails
[16:17:06] arBmind: has joined #RubyOnRails
[16:19:29] bf4: has joined #RubyOnRails
[16:20:04] chinmay_dd: has joined #RubyOnRails
[16:21:15] shinnya: has joined #RubyOnRails
[16:22:10] sankaber: has joined #RubyOnRails
[16:23:44] idd2d: has joined #RubyOnRails
[16:24:50] sbhatore: has joined #RubyOnRails
[16:26:18] asheinfeld: has joined #RubyOnRails
[16:28:11] hrendalf: has joined #RubyOnRails
[16:28:29] abuzze: has joined #RubyOnRails
[16:29:17] chinmay_dd_: has joined #RubyOnRails
[16:29:37] findaway: has joined #RubyOnRails
[16:29:55] renegadeandy: workmad3: ok - so i would do this : https://gist.github.com/renegadeandy/71151e99aabafd93f342
[16:29:57] willharrison: has joined #RubyOnRails
[16:30:22] renegadeandy: workmad3: the thing is - its not something that would be requireed for just this test...it would be required so that all tests could run....so where best do i put that?
[16:30:26] renegadeandy: in a before()?
[16:30:35] renegadeandy: so it runs once before any test?
[16:30:40] bryancp: has joined #RubyOnRails
[16:33:05] CheckYourSix: has joined #RubyOnRails
[16:33:43] dopie: has joined #RubyOnRails
[16:34:13] chinmay_dd: has joined #RubyOnRails
[16:34:30] sbhatore: Hey! This is a question regarding aes-256-gcm encryption algorithm. The function p2 works in the case of aes-256-cbc algorithm
[16:34:30] sbhatore: https://gist.github.com/sbhatore/1787fe1784f1f79d5f0d
[16:34:30] sbhatore: while it doesn't in case of aes-256-gcm for the similar code
[16:34:30] sbhatore: https://gist.github.com/sbhatore/345f5bc8098c3011dfd6
[16:34:30] sbhatore: and gives this error: OpenSSL::Cipher::CipherError: in the decipher.final. Can someone help me with this please, on how to make the gcm encryption work. It encrypts perfectly, but gives the above error in decryption part.
[16:35:44] dopie: Hey all when I set has_secure_password rails provides the authenticate method from ActiveModel::SecurePassword::InstanceMethodsOnActivation
[16:36:26] abuzze: has joined #RubyOnRails
[16:36:35] blackmesa: has joined #RubyOnRails
[16:38:16] jordanstorz: has joined #RubyOnRails
[16:38:29] neanderslob: has joined #RubyOnRails
[16:39:33] jarray52: has joined #RubyOnRails
[16:39:33] n008f4g_: has joined #RubyOnRails
[16:41:22] chinmay_dd: has joined #RubyOnRails
[16:41:25] chouhoulis: has joined #RubyOnRails
[16:42:12] stef1a: has joined #RubyOnRails
[16:42:58] fgo: has joined #RubyOnRails
[16:43:55] stef1a: i have an academic_year model which has_many quarters, and each quarter has an integer (year) column that i want to be the foreign key, rather than the ID of the year. but if i just declare the foreign key in the model, and i have an academic_year AY with AY.year = 2015, and a quarter Q with Q.year = 2015, calling AY.quarters returns nil. help?
[16:43:57] tbuehlmann: dopie, is that all?
[16:44:20] dopie: tbuehlmann, it was a question
[16:44:25] stef1a: also, each quarter belongs_to an academic_year
[16:45:36] tbuehlmann: dopie, https://github.com/rails/rails/blob/869a90512f36b04914d73cbf58317d953caea7c5/activemodel/lib/active_model/secure_password.rb#L64
[16:45:55] gremax: has joined #RubyOnRails
[16:46:56] dopie: so it does
[16:47:03] dopie: i was just trying to understand :)
[16:47:05] Pharaoh2: has joined #RubyOnRails
[16:47:40] drPoggs: has joined #RubyOnRails
[16:47:47] stef1a: here's some output to demonstrate the problem: https://gist.github.com/smlance/1a8b4f061dc2c7a4931c
[16:48:02] elektronaut: has joined #RubyOnRails
[16:48:30] stef1a: since both the year and the quarter have year = 2015, i'd like them to be associated with each other
[16:49:02] johnkpaul_: has joined #RubyOnRails
[16:49:21] fryguy: stef1a: why does it need to be a foreign key?
[16:49:39] stef1a: fryguy: what else would it be?
[16:49:52] fryguy: stef1a: could you maybe just create a scope on year instead?
[16:50:37] fryguy: def self.quarters ; quarters.where(year: year) ; end
[16:50:39] fryguy: or something similar
[16:51:00] stef1a: well, yeah, that would work; but isn't that not "the Rails way"?
[16:51:13] fryguy: doing non-primary-key based foreign keys is also not "the Rails way"
[16:51:28] chinmay_dd_: has joined #RubyOnRails
[16:51:48] loglaunch: has joined #RubyOnRails
[16:52:10] stef1a: no -- i want year be the primary key
[16:52:17] stef1a: for academic_years, anyway
[16:52:28] stef1a: s/be/to be/g
[16:52:37] fryguy: rails doesn't like non-surrogate primary keys
[16:52:51] jsrn_: has joined #RubyOnRails
[16:53:03] stef1a: surrogate?
[16:53:26] fryguy: https://en.wikipedia.org/wiki/Surrogate_key
[16:54:39] intuxicated: has joined #RubyOnRails
[16:54:41] norc: has joined #RubyOnRails
[16:54:53] speaking1ode: has joined #RubyOnRails
[16:55:19] norc: Hi. Hi have a business application that defines how certain product bundles can be configured by an enduser by means of an XML file that looks like this: http://pastie.org/10271838
[16:55:41] ramortegui: has left #RubyOnRails: ("Ex-Chat")
[16:56:01] norc: Now I will be supplying my own database that contains descriptions to these items to generate tool tips in my views.
[16:56:06] JimmyNeutron: has joined #RubyOnRails
[16:56:18] willharrison: has joined #RubyOnRails
[16:56:23] norc: However, I also want to be able to change the layout how these articles are presented.
[16:56:57] norc: So I was initially thinking of storing HAML templates to be able to dynamically generate the visualization of these products.
[16:57:01] norc: inside the database
[16:57:04] norc: Is that a bad idea?
[16:57:26] tlarevo: has joined #RubyOnRails
[16:57:30] iamse7en: has joined #RubyOnRails
[17:02:40] fryguy: norc: yes
[17:03:24] norc: fryguy: Maybe what I really want is just some HTML snippet that I can use to visualize each item. Is that still bad and why?
[17:03:52] bmurt: has joined #RubyOnRails
[17:04:16] fryguy: haml in database is bad because users can write it, and they have access to basically everything in ruby, so they can/will ruin your page and site performance (loop through 100000 items? sure!)
[17:04:23] fryguy: doing something like liquid can help with that
[17:04:31] fryguy: putting things in the database has 2 other problems
[17:04:57] fryguy: users are dumb and will fuck up their templates, and then the site will be down/broken/whatever and there's not much you can do about that, and it becomes your problem to manage and give them tools to help ensure valid html and stuff
[17:05:10] fryguy: and secondly, having templates in the database makes it very hard if you ever do any site updates or restyles
[17:05:26] owenjones: has joined #RubyOnRails
[17:05:35] moeabdol: has joined #RubyOnRails
[17:06:17] norc: fryguy: Ok I guess thats some valid points there. The liquid gem seems really interesting, as it seems its exactly designed for what Im trying to accomplish.
[17:07:10] norc: I mean in the end the maintainance issue is not really there, as I will not have more than maybe 15 bundles at any given time.
[17:07:21] norc: I can live with forcing people to update their bundles when I change stuff.
[17:07:51] cmisenas: has joined #RubyOnRails
[17:08:50] fryguy: figuring out how to handle it from a deployment standpoint is worth consideration
[17:08:53] mikecmpbll: has joined #RubyOnRails
[17:09:25] podman: has joined #RubyOnRails
[17:09:59] dc1: has joined #RubyOnRails
[17:10:17] jeanlinux: has joined #RubyOnRails
[17:13:49] stef1a: fryguy: changing the primary key of academic_year to "year" solved my problem, fyi
[17:14:06] fandi: has joined #RubyOnRails
[17:14:06] The_Phoenix: has joined #RubyOnRails
[17:14:26] stef1a: but thanks for pointing out the Rails convention (or lack thereof?) re: primary keys!
[17:14:39] m3_del: has joined #RubyOnRails
[17:15:06] The_Phoenix: has joined #RubyOnRails
[17:16:02] [H]unt3r: has joined #RubyOnRails
[17:16:28] The_Phoenix: has joined #RubyOnRails
[17:17:43] The_Phoenix: has joined #RubyOnRails
[17:18:48] The_Phoenix: has joined #RubyOnRails
[17:19:48] The_Phoenix: has joined #RubyOnRails
[17:21:10] srinidhi: has joined #RubyOnRails
[17:24:34] cornerman: has joined #RubyOnRails
[17:27:29] gambl0re: has joined #RubyOnRails
[17:28:35] idd2d: has joined #RubyOnRails
[17:29:21] meoblast001: has joined #RubyOnRails
[17:30:52] findaway: has joined #RubyOnRails
[17:31:26] CatMartyn: has joined #RubyOnRails
[17:31:51] bruno-: has joined #RubyOnRails
[17:33:07] drale2k: has joined #RubyOnRails
[17:33:50] bruno-: has joined #RubyOnRails
[17:33:51] bmurt: has joined #RubyOnRails
[17:35:42] baweaver: has joined #RubyOnRails
[17:39:16] bruno-_: has joined #RubyOnRails
[17:42:12] abuzze: has joined #RubyOnRails
[17:42:41] rubynuby: has joined #RubyOnRails
[17:43:27] brain_shim: has joined #RubyOnRails
[17:44:29] DoctorMonocular: has joined #RubyOnRails
[17:47:40] x44x45x41x4E: has joined #RubyOnRails
[17:48:30] x44x45x41x4E: has left #RubyOnRails: ("Away, for now.")
[17:49:17] XCMer: has joined #RubyOnRails
[17:51:14] smathy: has joined #RubyOnRails
[17:51:21] rubynuby: has joined #RubyOnRails
[17:53:24] rubynuby: has left #RubyOnRails: ()
[17:53:41] krz: has joined #RubyOnRails
[17:53:42] dcope-: has joined #RubyOnRails
[17:54:32] Travis-42: has joined #RubyOnRails
[17:55:33] dc4: has joined #RubyOnRails
[17:58:14] Travis-42: has joined #RubyOnRails
[17:59:12] saadq: has joined #RubyOnRails
[17:59:52] dopie: has joined #RubyOnRails
[18:01:53] CatMartyn: has joined #RubyOnRails
[18:05:55] CatMartyn: has joined #RubyOnRails
[18:05:57] JeramyRR: has joined #RubyOnRails
[18:08:53] twilling: has joined #RubyOnRails
[18:13:05] radialneon: has joined #RubyOnRails
[18:14:05] sha1sum: has joined #RubyOnRails
[18:15:22] sha1sum: Hey all. I've been searching around for a while, but was wondering if anyone here has had any experience with setting up models in order to be able to do point-in-time reporting both with the models themselves but also able to be done via database queries?
[18:15:25] m3_del: has joined #RubyOnRails
[18:15:30] El3k0n: has joined #RubyOnRails
[18:15:56] sha1sum: Basically I almost want to be able to run database queries on "what was the state of this table and the associated tables on March 20th" (March 20th is just an example)
[18:16:20] sha1sum: Papertrail came to mind, but it's not very SQL-friendly as far as I can tell, and it doesn't really help for many-to-many assocations.
[18:17:26] sha1sum: We have management bonuses that are paid out based on management structures from 2 months ago, and I can't wrap my head round how to tell what the management strcuture *was* 2 months ago
[18:17:32] sha1sum: structure*
[18:18:16] sha1sum: The best I could come up with on my own (conceptually) was to have secondary tables for each relevant table that saves each record along with a date on a daily basis
[18:18:39] sha1sum: Anybody have experience with something like this?
[18:18:42] rhizome: why would you wait months to run reports?
[18:18:44] Scripore: has joined #RubyOnRails
[18:19:09] sha1sum: rhizome: we sell contract-based services and management bonuses are dependent on whether customers are still active after 60 days.
[18:19:28] sha1sum: "vested sales"
[18:21:04] nya: has joined #RubyOnRails
[18:22:09] Stuffness: has joined #RubyOnRails
[18:24:05] fandi: has joined #RubyOnRails
[18:24:09] Travis-42: has joined #RubyOnRails
[18:26:39] madstap: has joined #RubyOnRails
[18:28:16] kitsuneyo: has joined #RubyOnRails
[18:28:32] crdpink: has joined #RubyOnRails
[18:28:37] webdestroya: has joined #RubyOnRails
[18:30:39] Zadrel: anyone can tell me the reasons that my AJAX is reloading the entire page rather than just the section in .js.erb file?
[18:31:08] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[18:31:10] findaway: has joined #RubyOnRails
[18:31:19] matt_d: Zadrel: You have to give us some more info :)
[18:31:30] rmoriz: has joined #RubyOnRails
[18:31:56] abuzze: has joined #RubyOnRails
[18:32:46] Isthar: has joined #RubyOnRails
[18:33:32] LeoDee: has joined #RubyOnRails
[18:34:35] Zadrel: matt_d, jhass : https://gist.github.com/rmatuoka/e24fbad502a024c86e63
[18:35:03] LeoDee: has joined #RubyOnRails
[18:36:22] asheinfeld: has joined #RubyOnRails
[18:36:58] yfeldblum: has joined #RubyOnRails
[18:37:58] matt_d: Zadrel: So, your entire view template is being rendered at the #change anchor?
[18:38:41] Zadrel: matt_d: the change is, in fact the target div tha should update
[18:38:53] dc4: has joined #RubyOnRails
[18:39:43] Zadrel: matt_d: th anchor is in view.html.haml, last line
[18:39:45] Etriaph: has joined #RubyOnRails
[18:41:14] MiracleBlue: has joined #RubyOnRails
[18:41:21] tvw: has joined #RubyOnRails
[18:41:29] jhass: checked your browser error console? ujs is loaded? nothing breaks the entire JS?
[18:41:40] fortunate: has joined #RubyOnRails
[18:41:46] fmcgeough: has joined #RubyOnRails
[18:44:09] dideler: has joined #RubyOnRails
[18:46:27] jordanstorz: has joined #RubyOnRails
[18:48:20] abuzze: has joined #RubyOnRails
[18:53:09] gniquil: has joined #RubyOnRails
[18:53:16] Frem: has joined #RubyOnRails
[18:53:44] owenjones: has joined #RubyOnRails
[18:58:06] jfarmer: has joined #RubyOnRails
[18:58:36] krzkrz: has joined #RubyOnRails
[19:01:01] JoshL: has joined #RubyOnRails
[19:02:08] Zadrel: jhass, matt_d :gist updated with browser console error https://gist.github.com/rmatuoka/e24fbad502a024c86e63
[19:02:19] Zadrel: i have no idea where this is coming from
[19:03:29] jhass: uh, that's the full backtrace, not touching any of your JS at all?
[19:05:10] dopie: https://gist.github.com/staycreativedesign/6b8d4630ddb59c7b9c4f is this the correct way to test should not save without email present
[19:06:40] dopie: or does it {should validate_presence_of(:password)}
[19:06:43] dopie: already do that?
[19:06:49] bin_005: has joined #RubyOnRails
[19:06:51] Zadrel: jhass: guess not, it's a fancybox with all the main imports of the rest of the views. and this error only shows in this view
[19:06:56] DEA7TH_: has joined #RubyOnRails
[19:07:32] jhass: Zadrel: well, doubt anybody has any hints beyond that, at least not without the full app
[19:07:35] Zadrel: jhass: i1m getting nuts already
[19:07:52] jhass: but that's most likely why the remote: true is ignored
[19:08:25] Zadrel: jhass: makes sense, once it reloads the entire view instead of the selected div
[19:10:41] alex88: has joined #RubyOnRails
[19:10:57] kitsuneyo: has joined #RubyOnRails
[19:11:54] mastyd: has joined #RubyOnRails
[19:12:01] mastyd: Hi, I'm migrating from Heroku to Elastic Beanstalk; was running a Puma server for a Rails app on a $500/month performance Heroku server and $50 Postgres DB. I'm getting a bit overwhelmed by the wealth of options and configs, but so far things are running over 3x faster on a t2.medium instance based on load testing via loader.io. I'm having an issue
[19:12:01] mastyd: with the DB though: "FATAL: remaining connection slots are reserved for non-replication superuser connections". I can't really find any info online on how many puma threads/workers to run, how to set the DB pool, etc. Any tips from any veterans?
[19:12:01] mastyd: that happens on about 6% of requests on a sustained 100 connections a second load test
[19:13:41] idd2d: has joined #RubyOnRails
[19:13:55] idd2d: What's the best way to deploy a rails app with model entries?
[19:14:35] idd2d: At the moment my app has a rake task that generates the entries from a couple .csv files. Wondering if that's The Rails Way
[19:15:06] matt_d: mastyd: You're using RDS, correct?
[19:16:09] m3_del: has joined #RubyOnRails
[19:16:28] drim: has joined #RubyOnRails
[19:16:28] matt_d: idd2d: You can use seeds, if it's app related things like a list of cities, etc...
[19:16:55] matt_d: idd2d: You can use seeds for anything, but by pratice is not really used to import your working data from another database...
[19:17:15] idd2d: I've only ever seen seeds used for things like populating test data
[19:17:41] idd2d: To put it into perspective, I have about 100k records of restaurant health inspection violations
[19:17:48] idd2d: Is seeding the database appropriate in this case?
[19:18:16] idd2d: Or perhaps exporting the db (postgres) and importing it on my server?
[19:18:44] gambl0re: has joined #RubyOnRails
[19:19:05] matt_d: idd2d: Health inspeciton violations, such as the codified violations? Such as California Heath and Safety Section XXX ?
[19:19:20] matt_d: idd2d: Or an actual incident?
[19:19:21] idd2d: No, these are specific violations of the restaurants themselves
[19:19:23] idd2d: incidents
[19:19:34] matt_d: idd2d: Okay, yeah, export and import.
[19:19:42] towski_: has joined #RubyOnRails
[19:19:50] mastyd: matt_d: yeah!
[19:20:00] idd2d: Okay. Seeds would be more appropriate for something like the codified violations?
[19:20:27] DoctorMonocular: has joined #RubyOnRails
[19:20:40] matt_d: mastyd: I'ts been a minute since i've used RDS, but I think you might have max connections param value set too high for your RDS instance size. What do you have it set to?
[19:21:28] Zadrel: jhass: found it! wasn't loading application.js, so :remote=>treu wasn't being found
[19:22:55] matt_d: idd2d: Yeah, use it to populate default values or initial data.. test data you would want to put in your fixtures or factories.
[19:23:48] matt_d: mastyd: holy cow.. $500! heroku is an awesome turnkey platform, but expensive!
[19:25:45] idd2d: has joined #RubyOnRails
[19:26:07] idd2d: has joined #RubyOnRails
[19:26:25] s2013: has joined #RubyOnRails
[19:27:08] dopie: anyone here use Dash?
[19:27:12] chouhoulis: has joined #RubyOnRails
[19:27:41] Anakat: has joined #RubyOnRails
[19:27:44] lala: has joined #RubyOnRails
[19:27:54] matt_d: dopie: no.
[19:28:47] idd2d: I'm attempting to run a rake task to generate some of my model data, but it fails and gives some weird output: http://hastebin.com/kiluxirabu.rsl
[19:28:53] JeramyRR: has joined #RubyOnRails
[19:30:08] toretore: has joined #RubyOnRails
[19:31:23] LeoDee: has joined #RubyOnRails
[19:32:02] findaway: has joined #RubyOnRails
[19:32:46] Pupeno: has joined #RubyOnRails
[19:33:45] mastyd: matt_d: I'm not sure if it was configured well on Heroku but new_relic was showing me 90% of request time being spent in request queueing
[19:33:57] mastyd: what should it be set to? I don't see a max_connections param in RDS
[19:34:51] k4nd4lf: has joined #RubyOnRails
[19:35:21] Axsuul: has joined #RubyOnRails
[19:36:22] bruno-: has joined #RubyOnRails
[19:36:54] matt_d: mastyd: micro has a max of 34 connections, small 125, large 623.
[19:37:07] matt_d: mastyd: rds instance that is
[19:37:50] Anakat: has joined #RubyOnRails
[19:38:00] asheinfeld: has joined #RubyOnRails
[19:38:32] asheinfeld: has joined #RubyOnRails
[19:40:34] wsmoak: has joined #RubyOnRails
[19:41:14] mastyd: So I should set the database.yml pool variable to 125 or the RDS instance from the AWS console to 125?
[19:41:24] mastyd: does the database.ml pool variable not do anything matt_d
[19:45:39] matt_d: mastyd: You need to try and determine how many connections your app may make to your RDS. Heroku actually has a good article regarding pool size and Puma: http://bit.ly/1f94Hng
[19:46:00] hahuang65: has joined #RubyOnRails
[19:46:36] jordanstorz: has joined #RubyOnRails
[19:49:53] matt_d: mastyd: I spun up a RDS... If you goto param groups, you can create a new group. There, you can modify the max_connections param if you would like.
[19:51:08] cornerma1: has joined #RubyOnRails
[19:51:10] s2013: has joined #RubyOnRails
[19:52:35] mastyd: matt_d: Okay I'm seeing this as the value right now: {DBInstanceClassMemory/31457280}
[19:53:09] matt_d: mastyd: thats how aws is calcuating the default value.
[19:53:19] mastyd: matt_d: so I should up this then?
[19:53:53] hahuang65: has joined #RubyOnRails
[19:54:03] mastyd: matt_d: With puma is the setting I set for this per thread/worker or for all instances? I'm pretty confused by all this
[19:54:09] matt_d: DBInstanceClassMemory returns how many bytes of memory the instance has..
[19:54:19] matt_d: mastyd so if you can change it to a solid number if you wish.
[19:54:59] mastyd: Yeah so it looks like that's 63 based on 2gb memory which is what t2.medium has
[19:55:05] mastyd: I'll change it to 100
[19:56:29] jgpawletko: has joined #RubyOnRails
[19:57:54] michael_mbp: has joined #RubyOnRails
[19:58:10] lsCoolJ: has joined #RubyOnRails
[19:59:30] smathy: has joined #RubyOnRails
[20:02:52] matt_d: mastyd: so each rails process contains its own connection pool for threads. each proccess shouldn't exceed the connection pool number set.
[20:03:03] matt_d: mastyd: sorry if i don't make sense, trying to do five things at the same time.
[20:08:50] mostlybadfly: has joined #RubyOnRails
[20:11:30] sargas: has joined #RubyOnRails
[20:12:03] frek818: has joined #RubyOnRails
[20:12:36] Wolland: has joined #RubyOnRails
[20:12:49] Spami: has joined #RubyOnRails
[20:14:31] willharrison: has joined #RubyOnRails
[20:14:32] smathy: has joined #RubyOnRails
[20:14:38] roolo: has joined #RubyOnRails
[20:16:14] __butch__: has joined #RubyOnRails
[20:16:23] Scripore: has joined #RubyOnRails
[20:16:54] m3_del: has joined #RubyOnRails
[20:16:56] jenrzzz: has joined #RubyOnRails
[20:17:23] eggoez: has joined #RubyOnRails
[20:17:52] idd2d: has joined #RubyOnRails
[20:17:53] qejk: has joined #RubyOnRails
[20:20:34] mroutis: has joined #RubyOnRails
[20:20:50] m3_del_: has joined #RubyOnRails
[20:26:00] brain_shim: has joined #RubyOnRails
[20:26:09] idd2d: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[20:29:04] fandi: has joined #RubyOnRails
[20:30:46] lessless: has joined #RubyOnRails
[20:31:10] blackmesa: has joined #RubyOnRails
[20:32:38] fgo: has joined #RubyOnRails
[20:32:41] findaway: has joined #RubyOnRails
[20:33:51] Limix: has joined #RubyOnRails
[20:35:49] benlieb: has joined #RubyOnRails
[20:36:01] Limix: Hi, how can I switch from development db to the ???test??? db depending on the incoming request? I would like to set a flag as a query param: /contacts?testing=true
[20:36:36] Limix: or better yet: test.localbox.dev:3000 should pull from the test db
[20:36:58] Limix: and dev.localbox.dev would pull from the development db
[20:37:35] erich: has joined #RubyOnRails
[20:38:32] meoblast001: has joined #RubyOnRails
[20:39:12] sankaber: has joined #RubyOnRails
[20:44:09] jordanstorz: has joined #RubyOnRails
[20:45:28] jarray52: has left #RubyOnRails: ()
[20:45:56] nfk: has joined #RubyOnRails
[20:46:59] norc: has joined #RubyOnRails
[20:47:01] bf4: has joined #RubyOnRails
[20:47:57] dopie: http://www.rubydoc.info/gems/rspec-rails/RSpec/Rails/Matchers#be_new_record-instance_method
[20:48:03] dopie: what should i use other than be_new_record
[20:48:25] Guest7741: has left #RubyOnRails: ()
[20:49:06] norc: has joined #RubyOnRails
[20:49:13] gambl0re: has joined #RubyOnRails
[20:49:13] norc: Hi. I have started to use a pattern, where I pass a parameter partial: "true" to requests, while the controller render a partial instead (this is primarily for Ajax loading snippets into other views) if it detects that parameter being used.
[20:49:20] norc: This however feels so wrong somehow.
[20:50:17] smathy: has joined #RubyOnRails
[20:50:19] norc: Should I rather just request the data as JSON, and have the Ajax callback build the presentation from it?
[20:54:22] nyanz: has joined #RubyOnRails
[20:57:30] ght: Question: https://gist.github.com/anonymous/f02dc5d3478f4f3aa05d
[20:58:00] chouhoulis: has joined #RubyOnRails
[20:58:13] ght: I have a working jsfiddle that detects a change to a select tag within a table, as well as a button, but within my rails 4.2.x project, the button is working but the select tag detection is not.
[20:58:20] nyanz: has left #RubyOnRails: ()
[20:58:38] ght: I kept the code as brief as possible, does anyone have any idea what is incorrect here?
[21:00:01] kadoppe: has joined #RubyOnRails
[21:00:47] eggoez: has joined #RubyOnRails
[21:03:20] rhizome: norc: why are the two so different for one action?
[21:03:25] Sehryn: has joined #RubyOnRails
[21:03:53] mando: has joined #RubyOnRails
[21:03:55] norc: rhizome: I dont want to load the entire layout every time
[21:05:14] rhizome: so don't render the layout if you don't need it
[21:05:40] norc: rhizome: I also have the use case where I want to present these models with layout
[21:07:25] norc: Ah well I guess json is the right way to approach this anyway
[21:07:45] norc: It is the other view that decides how the data should be presented.
[21:13:15] disperso: has joined #RubyOnRails
[21:14:10] bruno-: has joined #RubyOnRails
[21:16:06] hd1: has left #RubyOnRails: ()
[21:16:37] drPoggs: has joined #RubyOnRails
[21:17:02] elektronaut: has joined #RubyOnRails
[21:17:51] maia: has joined #RubyOnRails
[21:20:14] Scripore: has joined #RubyOnRails
[21:20:42] maia: Hello. When creating a new db in postgres with rake db:schema:load I noticed all my created_at, updated_at cols are "timestamp without time zone". In my old posgres db they all are "timestamp with time zone". Is there a problem with db:schema:load and postgres?
[21:21:28] bin_005: has joined #RubyOnRails
[21:22:26] _blizzy_: has joined #RubyOnRails
[21:22:43] _blizzy_: hello, I am getting https://gist.github.com/NotBlizzard/4e80ce89be9b839bfd50 ActionController::UnknownFormat in Devise::RegistrationsController#new
[21:22:44] _blizzy_: and IDK why. I'm using rails 4.2.3
[21:23:22] mando: has joined #RubyOnRails
[21:26:04] Travis-42: has joined #RubyOnRails
[21:26:24] Hates_: _blizzy_: what format is being requested?
[21:26:42] Hates_: _blizzy_: would help to see the stacktrace
[21:27:32] cornerma1: has joined #RubyOnRails
[21:28:07] _blizzy_: Hates_, here you go. http://pastie.org/10272121
[21:29:30] Quacko: has joined #RubyOnRails
[21:29:53] _blizzy_: apparently adding respond_to :html works
[21:29:57] _blizzy_: to application.rb that is
[21:30:07] _blizzy_: *application_controller.rb
[21:30:25] _blizzy_: I never had this problem with other rails versions.
[21:31:04] Hates_: _blizzy_: ahhh, sadly I don't have a 4.2. app to compare :(
[21:31:23] _blizzy_: Hates_, ah, it's ok. thanks for the help though.
[21:33:27] findaway: has joined #RubyOnRails
[21:33:49] Pupeno: has joined #RubyOnRails
[21:34:31] nettoweb: has joined #RubyOnRails
[21:39:21] x-light: has joined #RubyOnRails
[21:39:29] Schalla: has joined #RubyOnRails
[21:40:13] Schalla: Good evening! I am creating a rails application which is only an API, now I know that I can set the default format to json per resource, is there an way to do so in general?
[21:40:20] Schalla: Google didn't help me really.
[21:45:48] Travis-42: has joined #RubyOnRails
[21:46:28] JoshL: has joined #RubyOnRails
[21:47:30] silverdust: has joined #RubyOnRails
[21:49:20] merryfett: has joined #RubyOnRails
[21:51:32] findaway: has joined #RubyOnRails
[21:52:33] Earthnail: has joined #RubyOnRails
[21:52:47] blackmesa: has joined #RubyOnRails
[21:54:00] Earthnail: How do I cache a low-level object in Rails when I don't know the expiry date beforehand? The expiry date is only found out in the block that is executed when there is a cache miss.
[21:54:30] Earthnail: Use case: generate and cache an OAuth token for querying a third-party API. The OAuth token has an expiry date, which I obviously don't know before I generate the token.
[21:54:54] moeabdol: has joined #RubyOnRails
[21:56:32] slash_nick: Earthnail: pseudocode... you're saying you want to do something like rails.cache.fetch { token = get_token; expiry = token.expiry ; token } .... vs rails.cache(expiry: 37.seconds) do { token = get_token }
[21:57:32] slash_nick: Earthnail: break it up... do a `cache.read || get_token and cache.write`
[21:57:49] slash_nick: still pseudocode :)
[22:03:51] DLSteve: has joined #RubyOnRails
[22:04:04] workmad3: has joined #RubyOnRails
[22:04:36] smathy: has joined #RubyOnRails
[22:06:07] balr0g: has joined #RubyOnRails
[22:07:17] benlieb: has joined #RubyOnRails
[22:09:17] NiVanc: has joined #RubyOnRails
[22:11:10] jhass: has joined #RubyOnRails
[22:14:21] fighella: has joined #RubyOnRails
[22:19:41] bruno-: has joined #RubyOnRails
[22:22:11] disperso: has joined #RubyOnRails
[22:22:48] rhizome: norc: render :layout => false if request.xhr?
[22:23:01] bf4: has joined #RubyOnRails
[22:25:28] Earthnail: has joined #RubyOnRails
[22:25:34] Earthnail: slash_nick: works like a charm =)
[22:26:32] workmad3: has joined #RubyOnRails
[22:29:12] djbkd: has joined #RubyOnRails
[22:29:23] blackmesa: has joined #RubyOnRails
[22:30:07] DEA7TH: has joined #RubyOnRails
[22:30:26] slash_nick: Earthnail: bravo
[22:32:39] m3_del: has joined #RubyOnRails
[22:33:50] fgo: has joined #RubyOnRails
[22:35:07] arm_itsust: has joined #RubyOnRails
[22:37:33] fighella: has joined #RubyOnRails
[22:37:36] arm_itsust: hello there!
[22:39:03] arm_itsust: okay...what is the best frontend JS framework for RoR? speacially if it is a site where many data is coming and going..
[22:39:38] Anaxagoras: has joined #RubyOnRails
[22:39:44] null__: look into react or ember I guess
[22:39:55] null__: you're asking a vague question so v0v
[22:40:48] arm_itsust: does angularJS fit less than emberJS?
[22:41:11] arm_itsust: my first priority is performance
[22:42:04] Papierkorb: has joined #RubyOnRails
[22:42:14] dopie: has joined #RubyOnRails
[22:42:39] Anaxagoras: has left #RubyOnRails: ()
[22:48:13] asheinfeld: has joined #RubyOnRails
[22:48:33] pgatt: has joined #RubyOnRails
[22:53:29] fryguy: arm_itsust: both would work
[22:53:49] bf4: has joined #RubyOnRails
[22:56:07] willharrison: has joined #RubyOnRails
[22:57:30] _utah_: has joined #RubyOnRails
[22:57:58] asheinfeld: has joined #RubyOnRails
[22:58:45] chouhoulis: has joined #RubyOnRails
[22:59:12] idd2d: has joined #RubyOnRails
[22:59:55] Elion: hello, what's the right syntax to do this : Modela.includes(:modelbs).where(modelbs: ['date < ?', Time.now]), of course the problem is between the []
[22:59:55] owenjones: has joined #RubyOnRails
[23:02:08] fryguy: Elion: what are you trying to do
[23:02:14] billy_ran_away: has joined #RubyOnRails
[23:03:08] fryguy: maybe something like Modela.includes(:modelbs).references(:modelb).where('modelb.date < ?', Time.now)
[23:03:16] billy_ran_away: Can anyone tell me why rails server would work but rails console wouldn't?
[23:03:17] billy_ran_away: http://pastebin.com/TRHZ4L4p
[23:03:40] billy_ran_away: http://pastie.org/10272227
[23:04:08] idd2d: Is there a way to use gist anonymously?
[23:04:16] Elion: fryguy: salut, j'essaye de filtrer par date sur une relation belongs to de modela
[23:04:34] fryguy: billy_ran_away: did you install the missing gem?
[23:04:41] billy_ran_away: No, but I found the answer on this: http://stackoverflow.com/questions/26322532/rails-console-not-working-searching-for-wrong-gems
[23:04:46] billy_ran_away: Had to run bin/spring stop
[23:05:38] Elion: fryguy: hi, i try to filter by date the attribute modelbs and recover all modela that belongs to that modelb
[23:05:45] fighella: has joined #RubyOnRails
[23:06:30] toydestroyer: has joined #RubyOnRails
[23:06:43] idd2d: has joined #RubyOnRails
[23:07:00] Elion: fryguy: your .references... do the trick, thanks a lot
[23:09:21] findaway: has joined #RubyOnRails
[23:09:33] Schalla: Greetings! Got a small question regarding performance and hyper-optimization which I shouldn't worry really about.
[23:09:47] Schalla: Lets assume I use "resource" for my routing and there are a few routes I dont need, is it better to create them manually?
[23:12:10] baweaver: has joined #RubyOnRails
[23:13:54] ght: Does anyone have any idea what the solution to this question is? http://stackoverflow.com/questions/31214848/select-tag-jquery-change-detection-working-fine-in-script-not-working-in-rails
[23:14:24] roolo_: has joined #RubyOnRails
[23:15:04] DoctorMonocular: has joined #RubyOnRails
[23:16:56] hanss: has joined #RubyOnRails
[23:17:39] ariedler: has joined #RubyOnRails
[23:18:32] ariedler: I have been looking at alternatives to using ActiveRecord as my data layer is no longer Database Centric; anyone suggest alternatives? I know of Data Mapper, Sequel, ...
[23:18:34] fryguy: Schalla: you should use only: and except: to exclude routes from resources that you don't need
[23:18:35] djbkd: has joined #RubyOnRails
[23:19:01] Schalla: fryguy: Ah, thanks!
[23:23:06] arBmind: has joined #RubyOnRails
[23:23:28] bin_005_j: has joined #RubyOnRails
[23:23:41] toydestroyer: has joined #RubyOnRails
[23:23:50] Scripore: has joined #RubyOnRails
[23:28:48] eggoez: has joined #RubyOnRails
[23:29:16] jordanstorz: has joined #RubyOnRails
[23:31:32] jenrzzz: has joined #RubyOnRails
[23:32:08] acti0nman: has joined #RubyOnRails
[23:32:38] disperso: has joined #RubyOnRails
[23:32:48] drPoggs: has joined #RubyOnRails
[23:34:00] balr0g: has joined #RubyOnRails
[23:34:33] Pupeno: has joined #RubyOnRails
[23:34:36] fgo: has joined #RubyOnRails
[23:34:48] steve_mc: has joined #RubyOnRails
[23:35:01] phrozen77: has joined #RubyOnRails
[23:36:01] wsmoak: has joined #RubyOnRails
[23:36:01] wsmoak: has joined #RubyOnRails
[23:36:20] Travis-42: has joined #RubyOnRails
[23:36:47] findaway: has joined #RubyOnRails
[23:38:17] zack6849: has joined #RubyOnRails
[23:38:17] zack6849: has joined #RubyOnRails
[23:42:44] nobitanobi: has joined #RubyOnRails
[23:48:56] michael_mbp: has joined #RubyOnRails
[23:49:53] willharrison: has joined #RubyOnRails
[23:51:53] rickmasta: has joined #RubyOnRails
[23:53:18] lindii_: any idea how to fix this https://stackoverflow.com/questions/31210745/dynamic-selects-lose-functionality-after-ajax-request-in-rails
[23:55:01] chipotle: has joined #RubyOnRails
[23:57:21] arooni-mobile: has joined #RubyOnRails
[23:58:58] fryguy: lindii_: recall the function that you have bound to document.on(ready), or change the .change function to be .on(change) so that it live binds instead
[23:59:11] moeabdol: has joined #RubyOnRails
[23:59:39] asheinfeld: has joined #RubyOnRails