« Back to channel list

#RubyOnRails - 30 December 2015

« Back 1 day Forward 1 day »
[00:00:06] mices: o never mind i found it, you have to use edit_user_registration you can't just edit password (seemingly i dunno)
[00:00:45] ellisTAA: why does it look like this migration is repeating lines 3 - 7 on line 9? https://github.com/discourse/discourse/blob/master/db/migrate/20120615180517_create_bookmarks.rb
[00:01:05] Mediogre: has joined #RubyOnRails
[00:01:26] [dmp]: ellistaa: specifies which columns they want the database to use for the index 'bookmarks'
[00:02:20] [dmp]: ellistaa: http://stackoverflow.com/questions/2955459/what-is-an-index-in-sql
[00:02:30] ellisTAA: [dmp]: thanks
[00:04:29] Oliphaunte: has joined #RubyOnRails
[00:08:14] wethu: has joined #RubyOnRails
[00:10:24] Oliphaunte: has joined #RubyOnRails
[00:10:58] bePolite: has joined #RubyOnRails
[00:14:23] xardion_: has joined #RubyOnRails
[00:15:19] kies^: has joined #RubyOnRails
[00:15:55] Papierkorb: smathy_afk: Great! I expected it to be something simple, but not *that* simple :3
[00:17:09] pawnbox: has joined #RubyOnRails
[00:21:01] lethjakman: has joined #RubyOnRails
[00:22:58] dopie: has joined #RubyOnRails
[00:24:15] neanderslob_: has joined #RubyOnRails
[00:25:21] osiutino: has joined #RubyOnRails
[00:25:36] quazimodo: has joined #RubyOnRails
[00:29:12] mices: how do i access a parent record through the child
[00:29:23] mices: nested resources
[00:29:49] mices: not through child, just parent
[00:31:23] djbkd: has joined #RubyOnRails
[00:35:37] atomical: has joined #RubyOnRails
[00:39:57] atomical_: has joined #RubyOnRails
[00:43:18] atomical_: has joined #RubyOnRails
[00:46:37] shanemcd: has joined #RubyOnRails
[00:47:46] prereflect: has joined #RubyOnRails
[00:49:57] mices: never mind i found it in the docs
[00:52:12] DLSteve: has joined #RubyOnRails
[00:53:04] ZiggyTheHamster: has joined #RubyOnRails
[00:53:22] ZiggyTheHamster: Is there a better alternative than where('').arel if I want what used to be scoped.arel?
[00:54:11] dopie: has joined #RubyOnRails
[00:54:52] mices: how do i say age year old gendre in a view where age and gendre are variables
[00:55:46] dstarh: has joined #RubyOnRails
[00:58:11] k1t: has joined #RubyOnRails
[00:58:36] Sawbones: has joined #RubyOnRails
[00:59:04] banister: has joined #RubyOnRails
[01:00:33] mices: nevermind i found it
[01:00:52] Megamos: has joined #RubyOnRails
[01:00:58] Oliphaunte: has joined #RubyOnRails
[01:00:58] mices: best way "string plus #{variable}"
[01:01:32] doodlehaus: has joined #RubyOnRails
[01:04:31] prereflect: has joined #RubyOnRails
[01:06:43] lethjakman: has joined #RubyOnRails
[01:07:22] _Tariq: has joined #RubyOnRails
[01:14:19] noodman: has joined #RubyOnRails
[01:14:23] paradisaeidae: has joined #RubyOnRails
[01:17:06] prereflect: has joined #RubyOnRails
[01:21:45] pyemkey: has joined #RubyOnRails
[01:26:03] bradleyprice: has joined #RubyOnRails
[01:26:35] noodman: I trying to write a betting server - when bets come in (with a given time period set), what would be the best method of scheduling these events so that they run (settle and send response) after the given amount of time? Cron job that runs through a table of bets every second?
[01:28:08] Papierkorb: noodman: Use sidekiq
[01:28:48] Majadon: has joined #RubyOnRails
[01:30:17] tad_chaganty: anybody use will_paginate? when i use the :inner_window => 2 option, i get a undefined method `apply_finder_options'. did anyone else run in to it
[01:30:36] llimllib: has joined #RubyOnRails
[01:31:35] sankaber: has joined #RubyOnRails
[01:32:31] darkxploit: has joined #RubyOnRails
[01:34:27] quazimodo: and my team now tests things almost properly
[01:34:39] quazimodo: <- like a happy grandfather watching his more experienced minions learn
[01:34:47] quazimodo: it's weird and awesome
[01:35:02] quazimodo: zeus test, all green, deploy without shitting pants
[01:35:06] celly: has joined #RubyOnRails
[01:35:10] llimllib: has left #RubyOnRails: ()
[01:35:55] FailBit: 3 years in, nobody writes tests
[01:38:38] quazimodo: FailBit: i have these guys doing pretty ok testing, all behavioural, they're learning to build AR graphs in memory rather than db, it' all good :)
[01:38:52] rgtk: has joined #RubyOnRails
[01:41:10] wethu: has joined #RubyOnRails
[01:41:31] paradisaeidae: has joined #RubyOnRails
[01:41:53] shibabu: has joined #RubyOnRails
[01:47:06] raldu: has joined #RubyOnRails
[01:48:02] rgrmatt: has joined #RubyOnRails
[01:51:48] Oliphaunte: has joined #RubyOnRails
[01:51:52] prereflect: has joined #RubyOnRails
[01:53:29] joshkovach: has joined #RubyOnRails
[01:54:04] ellisTAA: has joined #RubyOnRails
[01:54:41] shanemcd: has joined #RubyOnRails
[01:58:44] atumzin: has joined #RubyOnRails
[01:59:06] rgrmatt: has joined #RubyOnRails
[02:00:23] neanderslob: has joined #RubyOnRails
[02:01:19] Hans267: has joined #RubyOnRails
[02:02:03] lethjakman: has joined #RubyOnRails
[02:13:22] RegulationD: has joined #RubyOnRails
[02:21:05] dopie: has joined #RubyOnRails
[02:23:28] DrShoggoth: has joined #RubyOnRails
[02:28:26] ewnd9: has joined #RubyOnRails
[02:30:34] _Tariq: has joined #RubyOnRails
[02:30:38] dopie: has joined #RubyOnRails
[02:35:51] uberjar: has joined #RubyOnRails
[02:39:35] uberjar: I want to put a website I'm building behind cloudflare but I am worried that users of my API will see captchas when they're trying to programattically access the API. Does anyone have any experinece with this ?
[02:44:27] Yomero2: has joined #RubyOnRails
[02:46:15] pontiki: has joined #RubyOnRails
[02:47:50] pawnbox: has joined #RubyOnRails
[02:52:20] rubyonrails047: has joined #RubyOnRails
[02:53:48] atumzin: has joined #RubyOnRails
[02:53:55] blackhuey: has joined #RubyOnRails
[02:55:35] rubyonrails047: Anyone around ?
[02:55:54] rubyonrails047: Need help with rspec issue related to using a middleware
[03:10:25] Radar: rubyonrails047: !ask
[03:10:25] helpa: rubyonrails047: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[03:11:52] mices: in console if users has_one profile and profiles has_many schools, should i be able to see schools at u.profile.schools where u is the user object
[03:12:46] Miron_: has joined #RubyOnRails
[03:13:48] Radar: Why is profile a separate entity from user?
[03:22:01] Puffball: has joined #RubyOnRails
[03:23:13] celly: has joined #RubyOnRails
[03:23:36] pyemkey: has joined #RubyOnRails
[03:27:44] Rodya_: has joined #RubyOnRails
[03:37:52] pawnbox: has joined #RubyOnRails
[03:40:39] duncannz: has joined #RubyOnRails
[03:41:57] alex88: has joined #RubyOnRails
[03:43:38] one_zero: has joined #RubyOnRails
[03:44:35] shibabu: has joined #RubyOnRails
[03:45:42] osiutino: has joined #RubyOnRails
[03:47:36] ziggy: has joined #RubyOnRails
[03:47:36] ziggy: has joined #RubyOnRails
[03:47:41] highsen: has joined #RubyOnRails
[03:53:38] one_zero: has joined #RubyOnRails
[04:00:03] RegulationD: has joined #RubyOnRails
[04:01:28] dideler: has joined #RubyOnRails
[04:05:34] shanemcd: has joined #RubyOnRails
[04:05:42] startupality: has joined #RubyOnRails
[04:07:44] AntiSpamMeta: has joined #RubyOnRails
[04:11:52] pawnbox: has joined #RubyOnRails
[04:17:47] braincrash: has joined #RubyOnRails
[04:26:03] tad_chaganty: you there mices
[04:27:09] mices: i got everything working so far, my only confusion is can i use singulars and plurals in has_many and belongs to for the model names
[04:28:07] mices: all belongs_to should be singular model references like user ?
[04:28:17] mices: or plural?
[04:28:18] JusticeFries: has joined #RubyOnRails
[04:28:25] Radar: mices: !associations
[04:28:25] helpa: mices: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[04:28:45] Radar: Big yellow box under Section 2.1.
[04:31:34] osiutino_: has joined #RubyOnRails
[04:37:37] Miron_: has joined #RubyOnRails
[04:45:49] Rodya_: has joined #RubyOnRails
[04:46:35] shibabu: has joined #RubyOnRails
[04:48:30] sarink: has joined #RubyOnRails
[04:49:45] Rodya_: has joined #RubyOnRails
[04:52:50] Mia: has joined #RubyOnRails
[04:52:50] Mia: has joined #RubyOnRails
[04:52:53] Guest80820: has joined #RubyOnRails
[04:54:07] osiutino: has joined #RubyOnRails
[04:56:34] arup_r: has joined #RubyOnRails
[04:58:41] gambl0re: are there any aussies in the house?..
[04:59:08] tad_chaganty: i'm an oz expat.
[04:59:18] braincra-: has joined #RubyOnRails
[04:59:25] gambl0re: cool...where in aus are you from
[05:02:11] gambl0re: have you been to perth?
[05:02:24] tad_chaganty: i havent actually
[05:03:05] tad_chaganty: i dont know anybody there (except you :)
[05:04:11] gambl0re: you should come...its awesome
[05:05:11] krz: has joined #RubyOnRails
[05:05:13] ss_much: has joined #RubyOnRails
[05:06:20] startupality: has joined #RubyOnRails
[05:07:52] Pazician: has joined #RubyOnRails
[05:08:58] Sawbones: has joined #RubyOnRails
[05:10:35] Brackson: has joined #RubyOnRails
[05:10:41] Brackson: Why does calling "@order.save" on "@order = @customer.orders.new(order_date: Time.now)" raise "NoMethodError - undefined method `save?' for #<Order:0x5442828>:"
[05:10:50] Brackson: I can make a paste of it if needed.
[05:11:27] celly: has joined #RubyOnRails
[05:12:59] mices: <%= link_to 'Edit', edit_user_profile_school_path(current_user, school) %> No route matches {:action=>"edit", :controller=>"schools", :id=>nil, :user_id=>"3"} missing required keys: [:id]
[05:15:05] mices: https://gist.github.com/mices/d9a593fff6f0aafd9282
[05:18:02] Brackson: https://gist.github.com/brackson/3481d2ffb66b288d1899
[05:18:23] SteenJobs: has joined #RubyOnRails
[05:19:49] atumzin: has joined #RubyOnRails
[05:19:49] atumzin: has joined #RubyOnRails
[05:21:05] startupality: has joined #RubyOnRails
[05:21:58] DavidDudson: has joined #RubyOnRails
[05:22:46] Brackson: Nevermind, resolved my issue.
[05:25:07] startupality: has joined #RubyOnRails
[05:25:14] mices: Radar: https://gist.github.com/mices/d9a593fff6f0aafd9282
[05:26:30] pyemkey: has joined #RubyOnRails
[05:27:41] AntiSpamMeta: has joined #RubyOnRails
[05:28:21] atumzin: has joined #RubyOnRails
[05:35:19] DavidDudson: has joined #RubyOnRails
[05:38:50] atumzin: has joined #RubyOnRails
[05:42:00] ZiggyTheHamster: has joined #RubyOnRails
[05:42:01] ZiggyTheHamster: has joined #RubyOnRails
[05:44:44] Cervajz: has joined #RubyOnRails
[05:48:46] Cervajz_: has joined #RubyOnRails
[05:50:31] sarink: has joined #RubyOnRails
[05:51:08] Cervajz: has joined #RubyOnRails
[05:52:00] arooni-mobile: has joined #RubyOnRails
[05:52:32] nerium: How do I manually set a counter cache column for a model?
[05:58:37] yfeldblum: has joined #RubyOnRails
[06:00:51] RegulationD: has joined #RubyOnRails
[06:02:03] arup_r: has joined #RubyOnRails
[06:04:07] rhizome: nerium: what do you mean?
[06:04:32] nerium: rhizome: I want to set the counter cache column to a certain value
[06:04:54] rhizome: well you'd want to set it to the actual count, right?
[06:05:34] nerium: rhizome: Yes
[06:06:05] kies^: has joined #RubyOnRails
[06:07:37] tildes: has joined #RubyOnRails
[06:07:47] rhizome: Foo.find_each { |f| Foo.reset_counters(f.id, :your_column)
[06:08:23] rhizome: can do .pluck(:id) instead of find_each
[06:08:33] rhizome: pluck(:id).each
[06:08:42] rhizome: slightly faster
[06:09:06] bradleyprice: has joined #RubyOnRails
[06:09:30] Miron_: has joined #RubyOnRails
[06:09:52] nerium: rhizome: reset_counters takes a relation, not a column. I dont have relation which means that the column isn???t actally changed
[06:10:10] nerium: The relation exists, but is an sql view, not a model
[06:13:23] kings: has joined #RubyOnRails
[06:13:58] yashinbasement: has joined #RubyOnRails
[06:13:59] rhizome: now you tell me
[06:14:09] pawnbox: has joined #RubyOnRails
[06:15:26] nerium: rhizome: I just want to set the column to an arbitrary value
[06:15:30] rhizome: 22:06 < nerium> rhizome: I want to set the counter cache column to a certain value, in an SQL view, not a model.
[06:15:34] rhizome: do that next time
[06:16:13] rhizome: well, UPDATE the row's column, then
[06:16:23] nerium: rhizome: That???s wrong. The counter cache column isn???t in an sql view
[06:16:36] nerium: the relation is an sql view, the column is a regular column
[06:16:40] rhizome: then i'm out of my depth. i've never heard of such a thing.
[06:16:50] yashinbasement: Hi , I was downloading a file from a file and saving that file on local machine(outside of rails app /home/usr/Document/files" , when the downloading done then it gave me following exception
[06:16:52] yashinbasement: Encoding::UndefinedConversionError: "\xAA" from ASCII-8BIT to UTF-8
[06:16:58] nerium: I was hoping to avoid plain sql
[06:17:07] nerium: but I guess that???s the only way
[06:17:10] yashinbasement: is that the issue that i am writing outside rails app
[06:17:14] rhizome: nerium: are you saying you're looking for view support in rails?
[06:17:33] rhizome: yashinbasement: wut
[06:17:44] nerium: rhizome: No. I just need to set a column to an arbitrary value which happens to be used as a cache column
[06:17:59] rhizome: nerium: so a regular UPDATE?
[06:18:07] nerium: I can???t use update_column, update, update_attributes and so on as the column is set to readonly
[06:18:24] nerium: Yeah, I guess that???s the only way
[06:18:31] rhizome: right, because it's not a model, so you have to use SQL
[06:18:54] rhizome: dunno if i've ever heard of a third way to interact with the database from rails
[06:19:03] yashinbasement: sorry rhizome , I was trying to say Hi , I was downloading a file from a website and saving that file on local machine(outside of rails app /home/usr/Document/files" , when the downloading done then it gave me following exception
[06:19:06] rhizome: aside from other ORMs
[06:19:59] rhizome: nerium: also, you can create a class to deal with this without having it inherit from AR
[06:21:15] derick_skibotn: has joined #RubyOnRails
[06:23:28] nerium: rhizome: it is a model
[06:24:58] nerium: rhizome: the cached column is for an sql view
[06:25:17] rhizome: i guess i just don't understand
[06:28:39] Scripore: has joined #RubyOnRails
[06:31:55] redeeem: has joined #RubyOnRails
[06:32:27] chouhoul_: has joined #RubyOnRails
[06:33:54] lubekpl: has joined #RubyOnRails
[06:37:01] bmalum: has joined #RubyOnRails
[06:38:33] ur5us: has joined #RubyOnRails
[06:43:37] iateadonut: has joined #RubyOnRails
[06:48:53] lxsameer: has joined #RubyOnRails
[06:49:22] shibabu: has joined #RubyOnRails
[06:59:32] celly: has joined #RubyOnRails
[06:59:34] pawnbox: has joined #RubyOnRails
[07:03:00] osiutino: has joined #RubyOnRails
[07:05:27] wethu: has joined #RubyOnRails
[07:09:00] DavidDudson: has joined #RubyOnRails
[07:09:40] solars: has joined #RubyOnRails
[07:11:55] highsen: has joined #RubyOnRails
[07:14:56] juddey: has joined #RubyOnRails
[07:15:29] Sawbones: has joined #RubyOnRails
[07:17:17] osiutino: has joined #RubyOnRails
[07:23:28] roshanavand: has joined #RubyOnRails
[07:26:27] sarink: has joined #RubyOnRails
[07:26:41] Cervajz: has joined #RubyOnRails
[07:28:27] pyemkey: has joined #RubyOnRails
[07:31:27] duncannz: has joined #RubyOnRails
[07:35:37] highsen: has joined #RubyOnRails
[07:36:02] Cohedrin: is there a callback for when a create fails in rails?
[07:36:08] Cohedrin: I feel like no
[07:36:11] Cohedrin: but I'm hopeful
[07:37:32] TvL2386: has joined #RubyOnRails
[07:38:29] comrad: has joined #RubyOnRails
[07:39:03] DavidDudson: has joined #RubyOnRails
[07:39:34] pawnbox: has joined #RubyOnRails
[07:42:17] rhizome: if Foo.create...
[07:42:27] rhizome: [your code]
[07:42:42] rhizome: oh whoops. else
[07:42:49] rhizome: see also: unless
[07:43:20] rhizome: short answer: no
[07:45:29] PedramT: has joined #RubyOnRails
[07:46:08] startupality: has joined #RubyOnRails
[07:48:59] PedramT: has joined #RubyOnRails
[07:49:36] steffkes: has joined #RubyOnRails
[07:49:37] steffkes: has joined #RubyOnRails
[07:50:09] Cervajz__: has joined #RubyOnRails
[07:51:20] shibabu: has joined #RubyOnRails
[07:52:52] jondot: has joined #RubyOnRails
[07:53:43] ur5us: has joined #RubyOnRails
[07:54:42] atumzin: has joined #RubyOnRails
[07:55:51] AzaToth: has joined #RubyOnRails
[07:59:57] MaDErroR123: has joined #RubyOnRails
[08:00:50] startupality: has joined #RubyOnRails
[08:01:38] RegulationD: has joined #RubyOnRails
[08:04:04] atumzin: has joined #RubyOnRails
[08:06:10] rubyonrails791: has joined #RubyOnRails
[08:06:24] stannard: has joined #RubyOnRails
[08:06:36] coderhut: has joined #RubyOnRails
[08:08:56] redreem: has joined #RubyOnRails
[08:09:19] redreem_: has joined #RubyOnRails
[08:09:38] constantinexvi: has joined #RubyOnRails
[08:09:43] dionysus69: has joined #RubyOnRails
[08:12:24] darutoko: has joined #RubyOnRails
[08:14:21] nevergiveup1989: has joined #RubyOnRails
[08:14:22] MaDErroR_: has joined #RubyOnRails
[08:15:11] coderhut: has joined #RubyOnRails
[08:17:24] diegoviola: has joined #RubyOnRails
[08:17:28] rgtk: has joined #RubyOnRails
[08:17:50] diegoviola: I need to get a list of data by day, by month, etc, should I use the by_star gem or is there another way to do it?
[08:18:16] tagrudev: has joined #RubyOnRails
[08:18:46] brainslug: has joined #RubyOnRails
[08:22:24] nevergiveup1989: Currently, I am using the gem searchkick in my project, and it works fine. However, now I want to give the user the ability to search by either typing their school's name or teacher's name. It means that I want to use searchkick across two models. I did some research on the internet, and they say I need to modify the searchkick query, and I have no idea what it is and how to do it
[08:23:21] nevergiveup1989: So, could somebody give me a hand how to it with my two models? Or are there any examples that use searchkick across many models?
[08:24:42] DavidDudson: has joined #RubyOnRails
[08:26:18] DavidDudson: has joined #RubyOnRails
[08:26:54] threeminutemonta: has joined #RubyOnRails
[08:28:01] defsdoor: has joined #RubyOnRails
[08:29:27] pyemkey: has joined #RubyOnRails
[08:30:32] bePolite: has joined #RubyOnRails
[08:30:32] bePolite: has joined #RubyOnRails
[08:31:33] diegoviola: I need to group by day/month, etc. should I use by_star or groupdate for that?
[08:32:28] DarkBushido: has joined #RubyOnRails
[08:33:45] moeabdol1: has joined #RubyOnRails
[08:36:42] DavidDudson: has joined #RubyOnRails
[08:37:26] startupality: has joined #RubyOnRails
[08:37:37] constantinexvi: has joined #RubyOnRails
[08:39:59] diegoviola: I guess Enumerable#group_by is one option
[08:43:01] man_in_shack: has joined #RubyOnRails
[08:43:04] man_in_shack: ACTION waves
[08:43:14] hello9: has joined #RubyOnRails
[08:43:23] man_in_shack: anyone have a suggestion for a nice CMS?
[08:44:36] hello9: hey all, Im trying to fix this n+1 query, but haven't done it in this case with multiple map calls. Here is the gist: https://gist.github.com/anonymous/8e6ad50f9315a56137c5
[08:44:42] hello9: let me know if i need to add anything, thanks
[08:44:51] uberjar: man_in_shack: some people like Radiant CMS
[08:45:31] uberjar: man_in_shack: personally I'm more into static site generators
[08:46:20] man_in_shack: e.g. on static generators?
[08:47:27] RTG`: has joined #RubyOnRails
[08:47:45] celly: has joined #RubyOnRails
[08:48:32] gaustin: has joined #RubyOnRails
[08:49:29] uberjar: man_in_shack: https://middlemanapp.com/
[08:50:13] roshanavand: has joined #RubyOnRails
[08:52:20] sarink: has joined #RubyOnRails
[08:53:10] shibabu: has joined #RubyOnRails
[08:53:51] iateadonut: has left #RubyOnRails: ()
[08:53:52] Pazician: has joined #RubyOnRails
[08:54:07] pawnbox: has joined #RubyOnRails
[08:54:12] startupality: has joined #RubyOnRails
[09:01:31] man_in_shack: radiant looks nice, but i'm not great at building nice front-end designs
[09:03:03] kmckelvin: has joined #RubyOnRails
[09:03:35] startupality: has joined #RubyOnRails
[09:04:37] agit0: has joined #RubyOnRails
[09:04:40] PedramT: has joined #RubyOnRails
[09:05:12] rgtk: has joined #RubyOnRails
[09:06:10] PedramT: has joined #RubyOnRails
[09:07:53] diegoviola: is there a simple way to order by week/day in AR or I have to use by_star gem?
[09:07:58] lacrymology: has joined #RubyOnRails
[09:08:03] diegoviola: Enumerable#group_by is going to be slow probably, no?
[09:08:07] DavidDudson: has joined #RubyOnRails
[09:09:01] SteenJobs: has joined #RubyOnRails
[09:09:04] drale2k: has joined #RubyOnRails
[09:09:08] DavidDudson: has joined #RubyOnRails
[09:09:37] PedramT: has joined #RubyOnRails
[09:10:28] diegoviola: by_star/groupdate gems means I'll also need to switch to Postgres most likely
[09:10:59] diegoviola: but maybe I should do that sooner rather than later, no?
[09:12:14] PedramT: has joined #RubyOnRails
[09:12:42] marr: has joined #RubyOnRails
[09:15:45] k1t: has joined #RubyOnRails
[09:16:12] tercenya_: has joined #RubyOnRails
[09:17:28] blackmesa: has joined #RubyOnRails
[09:17:36] Olipro: has joined #RubyOnRails
[09:18:30] mark1: has joined #RubyOnRails
[09:19:00] contradictioned: has joined #RubyOnRails
[09:21:48] kmckelvin: has joined #RubyOnRails
[09:23:54] roshanavand: has joined #RubyOnRails
[09:25:00] DavidDudson: has joined #RubyOnRails
[09:25:26] bradleyprice: has joined #RubyOnRails
[09:25:56] SteenJobs: has joined #RubyOnRails
[09:30:34] zpe: has joined #RubyOnRails
[09:33:58] rhizome: ordering and grouping are different things
[09:34:35] drale2k: any good alternative to railscasts?
[09:34:43] drale2k: anything i can find is kinda meh
[09:35:40] diegoviola: rhizome: I want to query by month, day
[09:38:33] PedramT: has joined #RubyOnRails
[09:38:51] roshanav_: has joined #RubyOnRails
[09:39:01] diegoviola: rhizome: basically what by_star does, I'm curious if this is possible to do with just plain AR though
[09:40:48] PedramT: has joined #RubyOnRails
[09:43:31] PedramT: has joined #RubyOnRails
[09:45:24] diegoviola: also, I read Radar stopped maintaining his OSS projects so I don't know if I should be adding this to my Gemfile just now
[09:46:11] Elion: has joined #RubyOnRails
[09:46:12] Elion: has joined #RubyOnRails
[09:47:02] nfk|laptop: has joined #RubyOnRails
[09:48:41] Megamos: has joined #RubyOnRails
[09:49:21] wethu: has joined #RubyOnRails
[09:52:06] diegoviola: I meant grouping
[09:52:42] diegoviola: don't just want to switch to postgres just for this yet
[10:00:39] sandstrom: has joined #RubyOnRails
[10:02:29] arup_r: has joined #RubyOnRails
[10:02:57] blackmesa: has joined #RubyOnRails
[10:03:05] Cervajz: has joined #RubyOnRails
[10:04:12] diegoviola: Correspondence.all.group_by {|x| x.ts_signature&.strftime("%m") }.keys
[10:04:19] diegoviola: for some reason this is just returning 12 and nil
[10:05:08] diegoviola: ok it's because I only have these months
[10:09:12] DavidDudson: has joined #RubyOnRails
[10:09:34] blackmesa: has joined #RubyOnRails
[10:11:06] DavidDudson: has joined #RubyOnRails
[10:15:35] blackmesa: has joined #RubyOnRails
[10:15:50] rodfersou: has joined #RubyOnRails
[10:16:00] arBmind: has joined #RubyOnRails
[10:19:50] sevenseacat: has joined #RubyOnRails
[10:23:44] spyd3r: has joined #RubyOnRails
[10:24:21] blackmesa: has joined #RubyOnRails
[10:25:38] quazimodo: has joined #RubyOnRails
[10:25:40] quazimod1: has joined #RubyOnRails
[10:25:59] quazimodo: has joined #RubyOnRails
[10:26:47] tibra: has joined #RubyOnRails
[10:27:01] ur5us: has joined #RubyOnRails
[10:31:48] tibra: has joined #RubyOnRails
[10:32:26] PedramT: has joined #RubyOnRails
[10:32:35] Palsson: has joined #RubyOnRails
[10:35:53] celly: has joined #RubyOnRails
[10:36:32] sandstrom: has joined #RubyOnRails
[10:37:02] Cervajz: has joined #RubyOnRails
[10:37:37] Pupeno: has joined #RubyOnRails
[10:40:48] sarink: has joined #RubyOnRails
[10:42:07] DavidDudson: has joined #RubyOnRails
[10:43:24] roshanavand: has joined #RubyOnRails
[10:45:00] DavidDudson: has joined #RubyOnRails
[10:47:47] pyemkey: has joined #RubyOnRails
[10:55:11] shibabu: has joined #RubyOnRails
[10:55:21] blackmesa: has joined #RubyOnRails
[10:56:44] Palsson: has joined #RubyOnRails
[10:59:09] nfk|laptop: has joined #RubyOnRails
[10:59:27] pawnbox: has joined #RubyOnRails
[11:00:03] zpe: has joined #RubyOnRails
[11:01:56] sameerynho: has joined #RubyOnRails
[11:05:21] diegoviola: Correspondence.where(status: 'Verde').group_by { |x| x.ts_signature&.strftime("%m") }
[11:05:48] diegoviola: I have this but instead of returning the array of data, I want to return the count of records
[11:05:58] lxsameer__: has joined #RubyOnRails
[11:06:01] diegoviola: I'm basically trying to find out how many records are in a month
[11:06:15] diegoviola: any ideas how to achieve this?
[11:07:05] diegoviola: bah, I'm sure there's a better way
[11:07:33] pontiki: you just want a count?
[11:08:55] pontiki: specified by year as well, or without year?
[11:10:12] gavit: Is this due to my date: '2014-01-01'? https://gist.github.com/gavit/2a47b364f176b73216a7#file-output-irb-L1
[11:12:06] sevenseacat: gavit: all of your nested attributes should likely be arrays
[11:12:13] sevenseacat: arrays of hashes
[11:12:58] gavit: sevenseacat: let me try that
[11:13:16] diegoviola: pontiki: just months for now
[11:13:35] sevenseacat: assigning a hash to a has_many association makes little sense
[11:15:05] matthewd: diegoviola: .tranform_values(&:size)
[11:15:14] pontiki: diegoviola: which database system are you using?
[11:15:27] gavit: sevenseacat: that was it! thanks
[11:15:39] matthewd: diegoviola: (but I agree this doesn't seem like the right approach... that's just a quick next step along your current path)
[11:16:25] tvw: has joined #RubyOnRails
[11:17:08] Sephyros: has joined #RubyOnRails
[11:17:16] gavit: sevenseacat: do you know how I can tell my view to only ask me once for the start_date which is required in all three models?
[11:17:48] sevenseacat: gavit: uh, you've written the view that has the form fields in it, right - change it?
[11:18:17] matthewd: diegoviola: You'd be better off with something like `Correspondence.where(status: 'Verde').group(some_sql_here).count(:all)`
[11:18:39] diegoviola: Correspondence.where(status: 'Verde').group_by { |x| x.ts_signature&.strftime("%m") }.transform_values(&:size) => {"10"=>25, "11"=>296, "12"=>296}
[11:19:34] diegoviola: this line seems error prone
[11:21:16] diegoviola: I also need to get the average from that
[11:22:00] gavit: sevenseacat: https://gist.github.com/gavit/2a47b364f176b73216a7#file-_schedule_fields-html-erb-L3
[11:22:38] sevenseacat: gavit: so whats your question?
[11:22:58] gavit: sevenseacat: sevenseacat With this I have to enter start_date 3 times
[11:23:05] sevenseacat: gavit: so remove two of the fields
[11:23:06] gavit: employment, schedule and salary
[11:23:25] gavit: sevenseacat: but then schedule/salary will have no start_date
[11:23:31] sevenseacat: gavit: so set it?
[11:23:38] sevenseacat: i'm not seeing the problem here
[11:23:41] gavit: sevenseacat: in the controller?
[11:23:57] sevenseacat: that wpuld be the most obvious place.
[11:24:39] roshanavand: has joined #RubyOnRails
[11:24:46] meoblast001: has joined #RubyOnRails
[11:25:46] gavit: hmm, thought I had to manipulate the view
[11:25:53] gavit: in the controller it is probably easier :)
[11:26:16] diegoviola: matthewd: using Enumerable#group_by would be slow, so it's better to do this in the DB you mean?
[11:27:25] jsrn_: has joined #RubyOnRails
[11:27:26] diegoviola: I'm worried about having to write SQL and then switching to postgres later and my SQL not working because I'm using SQLite
[11:27:32] diegoviola: so I wonder if I should just switch to postgres now
[11:27:54] centrx: has joined #RubyOnRails
[11:28:26] Thomas-0725: has joined #RubyOnRails
[11:28:55] lxsameer__: has left #RubyOnRails: ()
[11:29:08] sevenseacat: use whatever youre using in prod, in dev.
[11:29:30] matthewd: (and you shouldn't use sqlite in production)
[11:30:09] diegoviola: postgres makes this so easy: ORDER BY date_trunc('month', col)
[11:30:35] akshat: has joined #RubyOnRails
[11:30:37] diegoviola: I like sqlite also, though
[11:31:22] sevenseacat: too many reasons to fit in a single IRC post
[11:31:48] sevenseacat: mainly, i see no reason to use it
[11:31:55] sevenseacat: when better alternatives exist
[11:32:09] jondot: has joined #RubyOnRails
[11:32:26] diegoviola: yeah that's a good reason
[11:33:36] diegoviola: where I see that SQLite has shined for me is that I can simply send the development.sqlite3 to my client and he will simply drop to the db dir and it will just work
[11:33:59] diegoviola: postgres deployment is also easier for me, but I have to see how my client will respond when I tell him I have changed
[11:34:16] spyd3r: I am new to Ruby + Rails, completed the typical newbie projects of blogging, job board etc. Is there something more exciting out there that I can jump into?
[11:34:45] lacrymology: has joined #RubyOnRails
[11:34:47] centrx: Pornography
[11:35:26] diegoviola: spyd3r: just start working on a project
[11:35:34] yos7ph: has joined #RubyOnRails
[11:36:11] gavit: anyone know why my simple_form creates a class: 'col-sm-3' for my labels and class: class: 'col-sm-9' for my input, but not for my nested field labels/input fields? https://gist.github.com/gavit/2a47b364f176b73216a7#file-output-html-L56
[11:37:12] Palsson: has joined #RubyOnRails
[11:37:29] sevenseacat: gavit: you didnt just paste 150 lines of code and ask us to find a single issue with it
[11:37:32] sevenseacat: i know you didnt
[11:38:27] gavit: sevenseacat: the output shouldn't matter as that's generated.
[11:38:41] sevenseacat: but thats what you want us to fix an issue with
[11:39:42] diegoviola: this is the second time I have tried to switch to postgres for this project, the first one I was actually able to go back to sqlite, but for this time I think I'll just make the switch
[11:40:01] sevenseacat: without telling us which fields are wrong and which ones are right, and narrowing down the differences in code, or anything
[11:40:09] sevenseacat: just slabs of code and 'why is it so'
[11:40:12] diegoviola: it's interesting how I find myself in this situation for the second time
[11:40:23] FernandoBasso: has joined #RubyOnRails
[11:40:56] gavit: well, I think its weird that f.input created a class in the form, but not in the nested
[11:41:09] tbuehlmann: diegoviola, I find it highly impressive that you are 7 years into rails and still stick to sqlite
[11:41:27] sevenseacat: diegoviola has been using rails for three years longer than i have?
[11:41:34] gavit: brb, need to get somethng
[11:41:37] sarink: has joined #RubyOnRails
[11:41:52] diegoviola: why is that impressive at all?
[11:42:10] diegoviola: I tend to stick to the defaults unless there is a very good reason to change
[11:42:22] tbuehlmann: diegoviola, corret me if I'm wrong, but I think we changed rails years some weeks ago, and I remember "7 years"
[11:43:04] tbuehlmann: diegoviola, impressive because all (!) rails dev I deal with tend to use mysql/postgresql in production
[11:43:24] tbuehlmann: not saying sticking to sqlite is a bad thing, don't get me wrong there
[11:43:54] diegoviola: yeah I also realize postgres is better
[11:44:11] diegoviola: I just want to see how far I could go with sqlite
[11:45:14] diegoviola: my experience is that sqlite is fine until you have to write some SQL, at that point I think it's better to just switch to postgres, no?
[11:46:01] diegoviola: better to just start with postgres next time
[11:46:10] PedramT: has joined #RubyOnRails
[11:48:13] PedramT: has joined #RubyOnRails
[11:48:35] Detch: has joined #RubyOnRails
[11:48:46] arup_r: diegoviola: it always good to start with right too from begining ..
[11:49:25] PedramT: has joined #RubyOnRails
[11:49:26] arup_r: Like you should right away change the DB you are thinking in future you will do..
[11:49:43] diegoviola: I agree with that
[11:50:05] diegoviola: however, isn't one of the point of AR to make switching RDBMS painless? and abstract away their differences?
[11:50:15] arup_r: For example, there are cases where indexing doesn't same with Mysql and postgresql .. dunno know about Sqlite3.. I used it when I wrote my first learning Rails app
[11:50:55] arup_r: I always used Postgres after that.. Right now I am using Mysql in one project, where many 5.5 indexings are broken Mysql 5.6
[11:50:59] Axy: has joined #RubyOnRails
[11:50:59] Axy: has joined #RubyOnRails
[11:51:31] arup_r: They changed something natively ..
[11:51:41] tbuehlmann: diegoviola, AR tries to be db-agnostic, sure. but there are times you just need to write db-specific queries
[11:51:53] arup_r: yes ^^ +1
[11:52:14] puria: has joined #RubyOnRails
[11:52:20] diegoviola: tbuehlmann: yes, like the situation I'm currently in
[11:52:40] diegoviola: tbuehlmann: so I'll just switch to PostgreSQL now
[11:52:41] PedramT: has joined #RubyOnRails
[11:53:36] diegoviola: I also like how easy rails makes to switch RDBMS
[11:54:18] diegoviola: the fact AR is agnostic but you can still use RDBMS features is pretty cool
[11:54:20] tetraktys: has joined #RubyOnRails
[11:56:01] sevenseacat: i think its agnosticity is overrated
[11:56:42] remjih: has joined #RubyOnRails
[11:57:01] shibabu: has joined #RubyOnRails
[11:57:04] sevenseacat: it means that most of the time we get the lowest common denominator of support
[11:57:19] spyd3r_: has joined #RubyOnRails
[11:58:14] Pazician: has joined #RubyOnRails
[11:58:38] gavit: anyone know why my simple_form creates a class: 'col-sm-3' for my labels and class: class: 'col-sm-9' for my input, but not for my nested field labels/input fields? https://gist.github.com/gavit/2a47b364f176b73216a7#file-output-html-L7 (cleaned up)
[11:59:42] sevenseacat: gavit: whats your horizontal_form wrapper look like?
[12:00:23] nocontrol: has joined #RubyOnRails
[12:01:45] sevenseacat: gavit: ps, you should try using simple_fields_for instead of fields_for
[12:02:57] lacrymology: has joined #RubyOnRails
[12:03:12] RegulationD: has joined #RubyOnRails
[12:03:28] gavit: sevenseacat: it's the simple_fields_for
[12:04:12] Mia: has joined #RubyOnRails
[12:04:12] Mia: has joined #RubyOnRails
[12:05:31] gavit: sevenseacat: s/fields_for/simple_fields_for solved my issue
[12:05:45] mostlybadfly: has joined #RubyOnRails
[12:05:56] gavit: horizontal_form etc is all from simple_form
[12:06:03] gavit: I didn't change a thing
[12:09:06] diegoviola: just switch to postgres
[12:10:03] pwnd_nsfw: install gentoo
[12:10:32] diegoviola: I prefer Arch
[12:10:55] MaDErroR123: has joined #RubyOnRails
[12:14:12] drale2k: has joined #RubyOnRails
[12:15:48] diegoviola: nothing against Gentoo, Arch just seems better for what I need
[12:15:57] pwnd_nsfw: http://knowyourmeme.com/memes/install-gentoo
[12:16:10] k1t: has joined #RubyOnRails
[12:16:43] atumzin: has joined #RubyOnRails
[12:16:56] atumzin: has joined #RubyOnRails
[12:17:49] Thomas-0725: has joined #RubyOnRails
[12:18:17] sandstrom: has joined #RubyOnRails
[12:18:34] noodman: has joined #RubyOnRails
[12:19:18] Axy: has joined #RubyOnRails
[12:19:18] Axy: has joined #RubyOnRails
[12:19:47] aligo: has joined #RubyOnRails
[12:19:57] roshanavand: has joined #RubyOnRails
[12:20:13] akshat: has joined #RubyOnRails
[12:21:35] atumzin: has joined #RubyOnRails
[12:21:35] atumzin: has joined #RubyOnRails
[12:22:21] rgtk: has joined #RubyOnRails
[12:22:50] diegoviola: some people say Arch Linux is hard to use, but even my printer works better in Linux these days than it does on Windows, that's amazing
[12:23:31] pawnbox: has joined #RubyOnRails
[12:23:59] celly: has joined #RubyOnRails
[12:24:15] centrx: It took 30 years for Microsoft to get Windows to where it is today, and it's still merely "okay"
[12:24:26] roshanav_: has joined #RubyOnRails
[12:25:23] tbuehlmann: I'm happy with it and what it does
[12:25:50] atumzin: has joined #RubyOnRails
[12:25:50] atumzin: has joined #RubyOnRails
[12:26:38] pacMakaveli: has joined #RubyOnRails
[12:27:47] bradleyprice: has joined #RubyOnRails
[12:27:52] raldu: has joined #RubyOnRails
[12:28:47] pawnbox: has joined #RubyOnRails
[12:30:37] diegoviola: tbuehlmann: happy with windows?
[12:30:41] akshat: has joined #RubyOnRails
[12:31:02] tbuehlmann: yeah, but let's not open just another discussion
[12:31:14] mdw: has joined #RubyOnRails
[12:31:38] Mia: has joined #RubyOnRails
[12:31:40] peeja: has joined #RubyOnRails
[12:33:31] pwnd_nsfw: I'm also happy with windows, until it comes to dev
[12:33:53] pwnd_nsfw: I just ssh into linux box to run code, I still write code on my windows machine lol
[12:34:39] FooMunki: has joined #RubyOnRails
[12:35:51] qejk: has joined #RubyOnRails
[12:36:00] shanemcd: has joined #RubyOnRails
[12:36:37] gavit: is there a preferred way on declaring a class method (of the three ways)?
[12:37:04] diegoviola: pwnd_nsfw: how do you use git on windows, do you also have a reliable shell?
[12:37:10] diegoviola: pwnd_nsfw: on your development machine
[12:37:25] pwnd_nsfw: git bash, but I do all that on linux box anywho
[12:37:47] diegoviola: pwnd_nsfw: on your linux server?
[12:37:51] iateadonut: has joined #RubyOnRails
[12:38:14] pwnd_nsfw: conemu is pretty good too
[12:38:19] pwnd_nsfw: and it's not so much a server
[12:38:19] tbuehlmann: gavit, when it comes to rails contributions: "Prefer class << self over self.method for class methods."
[12:39:12] atumzin: has joined #RubyOnRails
[12:39:12] atumzin: has joined #RubyOnRails
[12:40:26] Axy: has joined #RubyOnRails
[12:40:26] Axy: has joined #RubyOnRails
[12:41:31] ruid: has joined #RubyOnRails
[12:41:31] ruid: has joined #RubyOnRails
[12:41:36] naavinm: has joined #RubyOnRails
[12:41:37] akshat: has joined #RubyOnRails
[12:42:12] Axsuul: has joined #RubyOnRails
[12:42:22] pawnbox_: has joined #RubyOnRails
[12:43:34] mdw7: has joined #RubyOnRails
[12:45:34] arup_r: Coverage report generated for RSpec to /Users/arup/admin/coverage. 3739 / 6427 LOC (58.18%) covered. ( pretty low ) :p
[12:47:27] ql6wlld: has joined #RubyOnRails
[12:48:57] banister: has joined #RubyOnRails
[12:48:58] atumzin: has joined #RubyOnRails
[12:51:43] krz: has joined #RubyOnRails
[12:53:01] thejamespinto_: has joined #RubyOnRails
[12:55:32] leksster: has joined #RubyOnRails
[12:59:49] jsrn__: has joined #RubyOnRails
[13:02:12] hahuang65: has joined #RubyOnRails
[13:06:05] zpe: has joined #RubyOnRails
[13:06:36] triptec: has joined #RubyOnRails
[13:06:53] dionysus69: has joined #RubyOnRails
[13:07:12] netzfisch: has joined #RubyOnRails
[13:09:52] spyd3r: has joined #RubyOnRails
[13:17:40] remjih: has joined #RubyOnRails
[13:22:33] bob_f: Hi, I'm proxying `render` - is there a way to tell if the call came from a view or a controller action ?
[13:23:05] bob_f: Trying to figure out how Rails knows to look for partials when called from a view, and non-partials when called from a controller action, or if I've misunderstood this whole thing.
[13:24:28] diegoviola: SELECT avg(cnt) FROM (SELECT ... count(*) AS cnt ...) t;
[13:24:31] diegoviola: I want to do this in AR
[13:24:43] diegoviola: how can I do the SELECT with AR?
[13:24:43] bob_f: Maybe I should be just try rendering the thing instead of checking its existence for, let `render` do its magic.
[13:25:35] matthewd: diegoviola: You're not going to have much luck doing that via the API. You'd be better off doing a raw query, IMO.
[13:25:42] pontiki: bob_f: i'm not sure how to answer your question, exactly, but there are render methods defined in ActionController and in ActionView
[13:26:00] bob_f: pontiki: Yeah, it's a weird question, I know ... :)
[13:26:02] matthewd: diegoviola: (or just calculate the average in ruby... you're surely doing other things with the values anyway)
[13:26:07] arup_r: diegoviola: http://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-from
[13:26:23] arup_r: ^^ this is for your inner select query
[13:26:24] pontiki: bob_f: can you tell what it is you're trying to do that you need to know?
[13:26:39] arup_r: and AR has .select() method to select columns
[13:26:53] matthewd: bob_f: Define 'proxying'? (aka, "code plz")
[13:26:58] bob_f: pontiki: What I'm finding is that if I call my render proxy method from either a controller or a view and then return `render ...` from that method, everything seems to work. It's just the template finding that's a bit tricky.
[13:27:38] fgo: has joined #RubyOnRails
[13:28:13] bob_f: matthewd: pontiki: I have an application where each user has a certain attribute that causes the template path to be different. So I have written a helper method `render_delegate` which receives "sessions/new" and returns "#{attribute}/sessions/new".
[13:28:21] bob_f: (Simplified for clarity).
[13:28:34] remjih: has joined #RubyOnRails
[13:28:38] bob_f: So can I use the same method for both controllers and views, or do I need a separate one for each ?
[13:29:25] dstarh: has joined #RubyOnRails
[13:29:43] diegoviola: [4] pry(main)> Correspondence.where(status: 'Verde').group("date_trunc('month', ts_signature)").count
[13:29:44] diegoviola: => {2015-11-01 00:00:00 UTC=>296, 2015-10-01 00:00:00 UTC=>28, 2015-12-01 00:00:00 UTC=>296}
[13:29:47] diegoviola: I need to get the average from this
[13:29:52] sarink: has joined #RubyOnRails
[13:31:07] pawnbox: has joined #RubyOnRails
[13:31:28] arup_r: average of month ?
[13:32:08] diegoviola: month counts
[13:32:50] diegoviola: basically, I'm trying to show in my view the percentage of successful shippings by month and day
[13:33:10] matthewd: bob_f: prepend_view_path
[13:33:26] atomical: has joined #RubyOnRails
[13:34:12] diegoviola: I have a field that tells me if a shipping has been successful, so :status
[13:34:23] diegoviola: but I don't know how else to calculate that
[13:34:24] bob_f: matthewd: Interesting, may be what I need as I also need optional various levels of delegation with a default, looks like this simplifies things a lot.
[13:34:26] matthewd: diegoviola: ... then why do you need the average number of shippings per month?
[13:34:27] bob_f: Thanks a bunch.
[13:34:28] diegoviola: by month I mean
[13:35:26] arup_r: diegoviola: Ok, you can calculate the average from the returned hash..
[13:35:53] arup_r: like res = Correspondence.where(status: 'Verde').group("date_trunc('month', ts_signature)").count ; res.values.sum / res.size
[13:38:14] diegoviola: matthewd: because that's what my client is asking me to do
[13:38:22] benanne: has joined #RubyOnRails
[13:38:26] Scripore: has joined #RubyOnRails
[13:39:14] diegoviola: matthewd: they said I should add something like this in the view: "34% shipped in a day" and "24% shipped in a month"
[13:39:28] rgtk: has joined #RubyOnRails
[13:40:06] diegoviola: I asked how I'm supposed to calculate this to the client, they said "Just get all the values from the entire year and find the total average"
[13:41:04] diegoviola: I'm really confused now however...
[13:41:47] diegoviola: because they are expecting a 0 to 100 % range
[13:42:20] arup_r: diegoviola: what is wrong in my way ? ;)
[13:42:22] matthewd: diegoviola: That's my point... what you're describing in words is not what you seem to be calculating
[13:42:31] pontiki: percentage is not an average
[13:42:38] matthewd: diegoviola: And that example text seems to be saying something else yet again
[13:43:50] matthewd: diegoviola: So, not for the first time, I think you need to worry about exactly what problem you're trying to solve, before you go too far trying to come up with solution
[13:44:06] DoubleMalt: has joined #RubyOnRails
[13:44:46] sevenseacat: *ding ding dingding ding
[13:45:29] matthewd: bob_f: You're very welcome. I think the answer to your original question would be "make a module that calls super, and mix it into several places", but as in many things, the most obvious solution isn't always the nicest, or easiest to implement :)
[13:45:31] diegoviola: yes, I would like to sit and relax and time some time to think more about this but my client is being too annoying expecting me to finish this task today
[13:45:46] bmalum: has joined #RubyOnRails
[13:45:53] diegoviola: take some time*
[13:46:06] sevenseacat: *dingdingdingdingding
[13:46:56] matthewd: diegoviola: I.. don't know how to respond to that.
[13:47:48] helpa: http://i.imgur.com/m9m3wr9.gif
[13:47:53] bob_f: matthewd: Absolutely ! I just deleted my ~30 lines of mess and replaced with 3 lines and a before_filter; it works perfectly. Thanks again.
[13:48:03] bob_f: before_action, I mean.
[13:48:38] ramortegui: has joined #RubyOnRails
[13:51:42] diegoviola: uhm, I'm really confused
[13:52:09] diegoviola: I blame the client because he's being too vague
[13:52:29] sevenseacat: ACTION 's dinging device explodes from overuse
[13:52:50] diegoviola: sevenseacat: sorry about that
[13:53:18] arup_r: diegoviola: you should relax.. Or go away from computer for some mins.. and don't talk anything.. And after that come back and think again
[13:53:42] centrx: has joined #RubyOnRails
[13:53:45] diegoviola: arup_r: the client will call me by the end of the day to know if I finished this task including 10 other ones
[13:55:29] ql6wlld: has joined #RubyOnRails
[13:55:34] akshat: has joined #RubyOnRails
[13:56:50] diegoviola: but yes, that's a good advice, I'll do that
[13:57:20] drale2k: has joined #RubyOnRails
[14:00:24] sdwrage: has joined #RubyOnRails
[14:01:02] shibabu: has joined #RubyOnRails
[14:01:51] bob_f: diegoviola: Wish your client a happy new year and open a beer. :)
[14:02:36] diegoviola: they actually gave me a beer the other day for my bday
[14:02:55] diegoviola: or was it for xmas, I don't know
[14:03:11] bob_f: Did you just accidentally tell everyone you're Jesus ?
[14:03:34] mary5030: has joined #RubyOnRails
[14:03:42] diegoviola: bob_f: no way
[14:03:57] RegulationD: has joined #RubyOnRails
[14:04:39] diegoviola: I don't like beer
[14:07:15] centrx: Do you like bears
[14:07:41] diegoviola: I never saw one in person
[14:08:03] diegoviola: there are no bears where I live
[14:09:57] Palsson_: has joined #RubyOnRails
[14:11:15] worknick: has joined #RubyOnRails
[14:11:45] centrx: https://i.ytimg.com/vi/k2vJNNAQZlg/maxresdefault.jpg
[14:11:51] kitsuneyo: has joined #RubyOnRails
[14:12:10] kitsuneyo: merry xmas to those who celebrate it
[14:12:10] celly: has joined #RubyOnRails
[14:12:13] worknick: I am doing @album = albums.create(name: "Default", coverimg_file_name: File.open('public/my/path/original/j.jpg', 'rb')) which gives error can't cast File to string. how to make it string? this is for paperclip.
[14:12:34] doodlehaus: has joined #RubyOnRails
[14:12:47] rwsq1: has joined #RubyOnRails
[14:13:19] zpe: has joined #RubyOnRails
[14:13:21] worknick: shall i odd to_s to file.open()?
[14:14:02] tbuehlmann: worknick, maybe this helps: http://stackoverflow.com/a/1397499/384293
[14:14:43] centrx: file_name != the file?
[14:15:01] mary5030: has joined #RubyOnRails
[14:15:20] worknick: tbuehlmann: thanks.
[14:15:24] dionysus69: has joined #RubyOnRails
[14:15:43] Guest80820: has joined #RubyOnRails
[14:18:33] tetraktys: has joined #RubyOnRails
[14:19:26] treehug88: has joined #RubyOnRails
[14:20:10] hello9: has joined #RubyOnRails
[14:20:14] pacMakaveli: has anyone tried Devise in Rails 5 successfully?
[14:20:53] hello9: hey, anyone know if I can fix this n+1 query using includes in Rails 2 ( where it seems to be an option for .find) ? https://gist.github.com/anonymous/8e6ad50f9315a56137c5
[14:21:47] centrx: hello9, Use the 'include' option in the find
[14:22:02] centrx: hello9, http://stackoverflow.com/questions/15482768/mix-select-with-include-in-find-method-rails-2
[14:22:12] centrx: hello9, (that's just for examples
[14:22:21] nfk|laptop: has joined #RubyOnRails
[14:23:11] hello9: thankssss
[14:23:12] kitsuneyo: has joined #RubyOnRails
[14:24:10] centrx: Is it just me or is Basecamp wierd
[14:24:13] centrx: It has no issue tracker!?
[14:25:37] diegoviola: I just talked with my client, he said I need the % of total shippings by the current month
[14:25:49] diegoviola: completely different to what I was trying to do... sigh
[14:26:02] pawnbox_: has joined #RubyOnRails
[14:28:08] sevenseacat: centrx: its not meant for issue tracking.
[14:28:33] sevenseacat: well, unless you count shitty todo lists.
[14:29:21] centrx: yeah it's wierd
[14:29:27] centrx: That's like a half-issue tracker
[14:29:40] centrx: Why doesn't it have an issue tracker? That seems like the most essential thing
[14:29:45] sevenseacat: then again, i dislike basecamp immensely
[14:30:00] sevenseacat: so we're all probably just 'doing it wrong'(TM)
[14:30:03] centrx: and what is a todo list useful for if you have an issue tracker, it's a half-assed issue tracker
[14:30:09] centrx: ok good, then we're both right
[14:30:14] centrx: Basecamp is still wierd
[14:30:23] centrx: many years now
[14:30:25] sarink: has joined #RubyOnRails
[14:30:29] centrx: they still haven't left the basecamp and reached the summit
[14:30:40] centrx: sevenseacat, What do you use for project management/issue tracking?
[14:31:04] prereflect: has joined #RubyOnRails
[14:32:14] epochwolf: I think basecamp is project management, not bug tracking. The bug tracker is an external tool that would integrate with basecamp.
[14:33:02] epochwolf: Basecamp is a level of abstraction higher than something like JIRA.
[14:33:19] centrx: basecamp seems like "collaboration"
[14:33:24] centrx: but why would I want to do that!!?
[14:33:27] sevenseacat: centrx: we use pivotal tracker for issue tracking
[14:33:39] Oliphaunte: has joined #RubyOnRails
[14:33:44] diegoviola: I don't like basecamp either, pivotal tracker also seemed confusing to me
[14:33:46] epochwolf: centrx: Most collaboration takes place in email or google docs.
[14:33:51] treehug88: has joined #RubyOnRails
[14:34:05] epochwolf: centrx: Basecamp is basically an advanced wiki.
[14:34:22] sevenseacat: basecamp in my experience ends up as a pile of longwinded message threads detailing everything under the sun, or 5000 documents with no rhyme or reason between any of them
[14:34:31] thejamespinto: has joined #RubyOnRails
[14:34:45] treehug88: has joined #RubyOnRails
[14:34:46] centrx: flabbergasting that this was Engine Yard's main product, and now it's spin out as its own company
[14:34:47] peeja: has joined #RubyOnRails
[14:34:51] centrx: and this is version 3 of it
[14:34:56] epochwolf: sevenseacat: that's what happens with any tool that people use without someone coordinating and setting standards.
[14:35:04] sevenseacat: 'omg i put <important item X> on basecamp why didnt you do it?' (after an hour of hunting finds it on page 32 of some unrelated word document)
[14:35:05] diegoviola: my client is using podio.com which I also find confusing
[14:35:13] sevenseacat: diegoviola: you find everything confuding.
[14:35:15] Audrius: has joined #RubyOnRails
[14:35:27] centrx: sevenseacat, Do you like Pivotal?
[14:35:51] sevenseacat: centrx: it does the job for the most part. i havent found anything i like more for task tracking.
[14:35:57] epochwolf: basecamp doesn't solve people problems. :P
[14:36:09] diegoviola: I don't find everything confusing, I like when things are simple and intuitive
[14:36:22] diegoviola: or when I don't have to reason too much to understand something that should be simple
[14:36:27] epochwolf: diegoviola: simple and intuitive is not simple and intuitive.
[14:36:56] _Tariq: has joined #RubyOnRails
[14:37:01] epochwolf: project management and issue tracking will never be simple because everyone has a different idea what they need.
[14:37:10] arup_r: has joined #RubyOnRails
[14:37:18] sevenseacat: indeed. i dont think anyone has cracked it yet
[14:37:25] epochwolf: It's a people problem.
[14:37:36] epochwolf: That's why basecamp exists.
[14:37:38] sevenseacat: different levels of abstraction
[14:37:49] epochwolf: It works for some workflows.
[14:37:57] sevenseacat: devs typically work at a finer-grained level than people discussing random shit on basecamp
[14:38:10] epochwolf: I don't think basecamp is for dev's daily use.
[14:38:17] epochwolf: It's for project managers.
[14:38:22] roshanavand: has joined #RubyOnRails
[14:38:23] sevenseacat: neither do i, but at past jobs, i've had to
[14:38:41] superlou: has joined #RubyOnRails
[14:38:51] sevenseacat: because we gave clients write access to PT and they turned it into a dumping ground
[14:38:52] epochwolf: sevenseacat: that's because some knuckle dragger decided one universe system would cure all ills.
[14:39:19] sevenseacat: no argument here
[14:39:57] sevenseacat: and my PMs approach to PM was pretty much 'i lined up this work for you to do. here's the client's details. go figure it out.'
[14:40:15] epochwolf: Basecamp is for coordinating people. Issue tracking should probably be external to that because you don't want people to have too much information they don't understand.
[14:40:24] arup_r: Well.. I got too long stack trace,, not able to understand from where the error actually spits.. Can you point me or tech me some tricks when you get such long stacktrace from where to start https://gist.github.com/aruprakshit/db60f5ef02181ac317e5#file-error-txt-L21 .. I am not able to help myself
[14:40:38] FooMunki: has joined #RubyOnRails
[14:40:43] sevenseacat: arup_r: https://gist.github.com/aruprakshit/db60f5ef02181ac317e5#file-error-txt-L24
[14:41:05] hello9: @centrx when I try using include all i seem to get is the parent records, not the included ones ;/
[14:41:07] epochwolf: arup_r: ActiveAdmin? Oh... honey.
[14:41:09] arup_r: yes, I see this line https://gist.github.com/aruprakshit/db60f5ef02181ac317e5#file-error-txt-L31
[14:41:27] sevenseacat: typically you start with the first line of a stacktrace that refers to your application code.
[14:41:40] arup_r: I am confused because how the error comes from 2 different line when using an Interpreted language
[14:41:41] epochwolf: arup_r: please 2 include app/admin/reports/report_support_plans.rb in gist?
[14:42:02] sevenseacat: arup_r: because its impossible for one line to call another line, right?
[14:42:03] arup_r: why not sure epochwolf .. I wanted to learn debugging.. including
[14:42:11] epochwolf: arup_r: it's not two lines, it's a stack trace. Each level of the stack is represented. Just like C or Java.
[14:42:41] sevenseacat: oh right, i misinterpreted what he said
[14:42:42] centrx: hello9, not sure what you mean
[14:42:55] centrx: hello9, the included ones still have to be accessed, the same way you are accessing them now
[14:43:09] centrx: hello9, but the include ensures that they are retrieved all at once, efficiently (without the n+1 problem)
[14:43:30] centrx: hello9, The Rails Guide describes it in more detail - http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
[14:43:33] hello9: @centrx oh so I still call a map after the includes?
[14:43:36] centrx: hello9, (Syntax is different for Rails 2)
[14:43:43] centrx: hello9, right
[14:43:53] hello9: @centrx :-D
[14:45:42] arup_r: nvm, I need a break... I was on wrong file.. Now I am on correct page.. so line numbers of errors making sense to me.. :p Need some coffee ..
[14:45:50] c355E3B: has joined #RubyOnRails
[14:46:31] epochwolf: arup_r: I'd bring you a cup but I'm fresh out. :(
[14:46:51] arup_r: thanks for saying though.. :)
[14:47:02] epochwolf: ACTION pokes his empty Panera cup.
[14:47:12] centrx: Is there an intern around
[14:47:47] sandstrom: has joined #RubyOnRails
[14:48:02] Pazician: has joined #RubyOnRails
[14:48:32] arup_r: wow nice centrx .. :) thanks for asking.. I can recall someone couple of days back was looking for
[14:48:33] epochwolf: I haven't seen one but they have been skiddish lately.
[14:49:11] centrx: arup_r, You we need you to get us some coffee, thx
[14:49:31] polishdub: has joined #RubyOnRails
[14:49:44] arup_r: what do you mean ?
[14:50:09] centrx: Why did you say "thanks for asking"?
[14:50:35] arup_r: for that.. you meant what you said.. ? nice!!
[14:50:37] centrx: Interns get the coffee, when they're not absorbing knowledge by overhearing the more senior people
[14:51:52] Spami: has joined #RubyOnRails
[14:52:12] arup_r: centrx: I thought, you have some job openings .. so you were asking.. I think pretty straight forward..
[14:53:39] arup_r: But centrx, don't play such jokes.. I didn't take your joke as joke... Its international channel.. so there is a difference ... or evenif you do such jokes again, don't mention directly infront of all..
[14:54:08] centrx: I'M SORRY
[14:54:18] sarink: has joined #RubyOnRails
[14:54:26] arup_r: sevenseacat: as you are a mod, I was expected something different from you on this..
[14:54:33] centrx: I was just trying to help get the coffee beans flowing
[14:54:38] arup_r: anyway thanks..
[14:54:38] treehug88: has joined #RubyOnRails
[14:54:56] centrx: arup_r, It's all in good fun, didn't mean to confuse
[14:55:08] dionysus69: has joined #RubyOnRails
[14:55:16] matthewd: arup_r: I'm not clear which comment you're referring to
[14:55:22] sankaber: has joined #RubyOnRails
[14:55:28] centrx: I think he doesn't like coffee
[14:55:30] epochwolf: The day I'm not allowed to be sarcastic on IRC is the day I leave.
[14:56:03] epochwolf: I'm on IRC so I can be informal and have a little fun and maybe help people out from time to time.
[14:56:16] epochwolf: IRC is the watercooler of the internet.
[14:56:53] netzfisch: has joined #RubyOnRails
[14:57:56] centrx: So, how about that local sports team?
[14:57:57] Palsson: has joined #RubyOnRails
[14:58:40] k1t: has joined #RubyOnRails
[14:59:07] epochwolf: centrx: what about it? It's there and it better stay over there where I don't care about it. :P
[14:59:21] diegoviola: Correspondence.where("correspondences.status = 'Verde' AND ts_print > ?", Time.zone.now - 1.month).count
[14:59:40] diegoviola: is there a way for me to say status: 'Verde', and still have that condition with the ts_print?
[15:00:04] roshanavand: has joined #RubyOnRails
[15:00:07] arup_r: ok, I need help, I am not getting what is wrong in line# 34 .. https://gist.github.com/aruprakshit/db60f5ef02181ac317e5#file-report_support_plans-rb-L34 that it throws argumenterror .. :/
[15:00:13] epochwolf: diegoviola: Correspondence.where(status: Verde).where("ts_print > ?", 1.month.ago)
[15:00:51] diegoviola: epochwolf: cool, I didn't know I could have more than one .where
[15:01:04] sevenseacat: arup_r: what did i do?
[15:01:04] epochwolf: arup_r: @accounts is an AR Relation, sum takes an SQL snippet, not a block.
[15:01:04] MaDErroR123: has joined #RubyOnRails
[15:01:25] centrx: sevenseacat, you said 'hah' (major offense)
[15:01:31] arup_r: sevenseacat: nothing.. all is good.. misunderstanding happened..
[15:02:43] centrx: hey at least you didn't say 'guys'
[15:02:55] arup_r: humm,, it is not an array ..
[15:03:00] epochwolf: arup_r: if you want to use Enumerable#sum, you'll want to convert the relation to an array using to_a
[15:03:14] Oliphaunte: has joined #RubyOnRails
[15:03:32] arup_r: epochwolf: yeah, done.. I was seeing it an array,,, :)
[15:04:13] shibabu: has joined #RubyOnRails
[15:04:18] epochwolf: arup_r: AR Relations generally can act as arrays, there's a few methods that have the same name as array methods but do different things.
[15:04:30] kitsuneyo: i'm trying to set up capybara but i guess i'm doing something wrong... i added the gem and put "require 'capybara/rails'" in my test_helper
[15:04:45] arup_r: all is green.... epochwolf, yes for few mins I was lost..
[15:05:08] arup_r: kitsuney_: u are not using Rspec right ?
[15:05:18] sevenseacat: kitsuney_: continue
[15:05:22] kitsuneyo: arup_r, i'm using minitest
[15:05:23] arup_r: if you do, then it will go to spec_helper.rb
[15:06:49] kitsuneyo: sevenseacat, i tried to use 'visit admin_places_path' in an integration test and got an error "undefined method `visit'"
[15:06:57] sevenseacat: kitsuneyo: !debug
[15:06:57] helpa: kitsuneyo: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[15:07:59] sankaber: has joined #RubyOnRails
[15:08:50] Secretmapper: has joined #RubyOnRails
[15:08:58] adavia: has joined #RubyOnRails
[15:11:00] diegoviola: finally, got this task sorted out
[15:11:17] diegoviola: and it was easier than I thought, no complex SQL or anything
[15:11:27] kitsuneyo: got it, i missed something in setup
[15:11:29] diegoviola: I just needed to understand the problem more
[15:12:36] chipotle: has joined #RubyOnRails
[15:14:39] tibra: has joined #RubyOnRails
[15:15:36] thejamespinto: has joined #RubyOnRails
[15:16:33] stannard: has joined #RubyOnRails
[15:17:37] krz: has joined #RubyOnRails
[15:21:32] startupality: has joined #RubyOnRails
[15:21:43] Oliphaunte: has joined #RubyOnRails
[15:22:54] hello9: is there something better than map here? on the first includes I get back an array of arrays, and that causes n+1 for the nested includes. https://gist.github.com/anonymous/3638994ac42df9386b06
[15:28:08] marr: has joined #RubyOnRails
[15:28:15] centrx: hello9, Why don't you query for Sizes that have that account id, instead of querying for Account ?
[15:28:24] centrx: hello9, Let the query handle that logic
[15:28:43] futilegames: has joined #RubyOnRails
[15:29:01] marr: has joined #RubyOnRails
[15:29:34] hello9: @centrx size doesnt have an account_id field and I dont really want to dirty it up
[15:29:40] chelbs: has joined #RubyOnRails
[15:30:41] centrx: It seems like an odd DB design
[15:30:58] centrx: Why do titles of posts have their own table?
[15:31:13] chelbs: has left #RubyOnRails: ()
[15:31:28] centrx: and what does the sizes table have in it really? Is it just integers containing the length of the title?
[15:31:53] hello9: @centrx, not is isnt that bad :)
[15:33:16] centrx: hello9, Size.joins(titles: { posts: :accounts }).where('accounts.id = ?', @account.id)
[15:33:27] centrx: hello9, that's all you need it seems like, with adjustment for the Rails 2 syntax
[15:33:55] hello9: ah okaaay thanks
[15:34:44] RegulationD: has joined #RubyOnRails
[15:35:45] prereflect: has joined #RubyOnRails
[15:38:18] roshanavand: has joined #RubyOnRails
[15:39:44] theblang: has joined #RubyOnRails
[15:41:25] bmalum: has joined #RubyOnRails
[15:42:22] rgtk: has joined #RubyOnRails
[15:43:05] kies^: has joined #RubyOnRails
[15:45:47] nertzy: has joined #RubyOnRails
[15:48:11] cyfr0n: has joined #RubyOnRails
[15:48:17] centrx: has joined #RubyOnRails
[15:49:53] roshanav_: has joined #RubyOnRails
[15:50:14] roshanavand: has joined #RubyOnRails
[15:50:46] constantinexvi: has joined #RubyOnRails
[15:51:33] treehug88: has joined #RubyOnRails
[15:51:40] FernandoBasso: has joined #RubyOnRails
[15:53:28] gaustin: has joined #RubyOnRails
[15:54:06] alfie_max15: has joined #RubyOnRails
[15:55:03] chipotle_: has joined #RubyOnRails
[15:55:07] Xentil: has joined #RubyOnRails
[15:59:31] Yomero2: has joined #RubyOnRails
[15:59:45] doodlehaus: has joined #RubyOnRails
[16:02:10] Xentil: Can anyone help me to solve this error? : http://46.21.221.228:3000/subdomains/new
[16:03:14] Secretmapper: has joined #RubyOnRails
[16:03:20] fox_mulder_cp: Xentil: new - method to POST new created object
[16:03:35] fox_mulder_cp: you must use create to GET form for creation
[16:04:39] kitsuneyo: i want to select a different driver for capybara and i'm following the instructions at https://github.com/jnicklas/capybara#using-capybara-with-testunit ... i'm not sure where to put this line: Capybara.default_driver = :selenium
[16:04:46] Guest80820: has joined #RubyOnRails
[16:04:48] rgtk: has joined #RubyOnRails
[16:07:49] k1t: has joined #RubyOnRails
[16:08:36] n1lo: has joined #RubyOnRails
[16:08:40] RegulationD: has joined #RubyOnRails
[16:09:47] diegoviola: my client gets angry so easily
[16:09:50] diegoviola: when I ask him questions
[16:10:21] fox_mulder_cp: diegoviola: make a game :)
[16:10:33] Axsuul: has joined #RubyOnRails
[16:10:46] diegoviola: "You should know how to do this by yourself"
[16:10:56] alfie_max15: has left #RubyOnRails: ("Ex-Chat")
[16:11:08] diegoviola: I say "I should know how to do this but it's your data and you are being vague"
[16:11:13] Axsuul: has joined #RubyOnRails
[16:11:42] fox_mulder_cp: diegoviola: i'm strategis - architect, i said 'what', but not 'how' :)
[16:12:16] fox_mulder_cp: diegoviola: oh, clients make me cry
[16:19:06] jscheel: has joined #RubyOnRails
[16:19:15] iateadonut: has joined #RubyOnRails
[16:19:21] iateadonut: has left #RubyOnRails: ()
[16:19:37] ritic: has joined #RubyOnRails
[16:20:02] kmckelvin: has joined #RubyOnRails
[16:20:15] bob_f: Where did all these .!xxxxx!....png files appear from in my assets directories ?
[16:20:24] bob_f: git is sad.
[16:20:35] Xentil: fox_mulder_cp: i must use create method to get form? i thought the new method is for getting form for new record
[16:20:38] diegoviola: fox_mulder_cp: so do you just carry a handkerchief?
[16:20:42] ritic: i've created a devise user table with uuid v4 as the id/primary key, but the uuid isn't being generated. any suggestions?
[16:20:55] diegoviola: fox_mulder_cp: or what do you do
[16:21:00] mag42c: has joined #RubyOnRails
[16:21:57] fox_mulder_cp: ritic: use http://blog.arkency.com/2014/10/how-to-start-using-uuid-in-activerecord-with-postgresql/
[16:22:24] ritic: fox_mulder_cp: exactly what i was using as reference
[16:23:04] arup_r: has joined #RubyOnRails
[16:23:25] fox_mulder_cp: Xentil: yes. create - GET form. new - POST new obj
[16:24:02] fox_mulder_cp: Xentil: exec `rake routes` and see its output
[16:24:51] fox_mulder_cp: ritic: hm, u reaaly do all steps for migration fix before exec rake db:migrate?
[16:26:03] The_Phoenix: has joined #RubyOnRails
[16:26:21] Xentil: fox_mulder_cp: [...] new_subdomain GET /subdomains/new(.:format) subdomains#new [...]
[16:26:37] ritic: fox_mulder_cp: i believe so. this is what i'm getting: https://gist.github.com/jshakespear/06f89970206e9641d549
[16:29:21] ritic: other tables with uuid columns seem to be generating fine
[16:30:21] fox_mulder_cp: Xentil: hm. sorry, i really mistake. in my new app new_article_path GET /articles/new(.:format) articles#new
[16:30:32] Xentil: fox_mulder_cp: so i am using right HTTP method for right controller method, so what is the problem ?
[16:31:10] joshkovach: has joined #RubyOnRails
[16:31:25] chouhoulis: has joined #RubyOnRails
[16:31:45] fox_mulder_cp: Xentil: you fail the MVC arch
[16:32:14] ewnd9: has joined #RubyOnRails
[16:32:26] fox_mulder_cp: view - only view, your 'f.select :domain, :domain_id, Domain.all.collect { |d| [d.name, d.id] }, {include_blank: 'None'}' must be in controller
[16:32:49] bob_f: 293 files changed, 1305 insertions(+), 7137 deletions(-)
[16:32:52] bob_f: Bye bye SLOC bonus. :(
[16:33:06] fox_mulder_cp: Xentil: undefined method `merge' for [["vgr.pl", 1], ["lublin.pl", 2]]:Array - method not implemented
[16:33:45] fox_mulder_cp: bob_f: what is sloc bonus?
[16:34:22] bob_f: fox_mulder_cp: I'm kidding. We don't get a SLOC-based bonus. :)
[16:35:18] fox_mulder_cp: bob_f: i don't think this joke. but commit is crazy, as for me :)
[16:35:41] bob_f: fox_mulder_cp: Big refactor, mostly just views. It's not as scary as it looks. ;)
[16:36:15] fox_mulder_cp: bob_f: i'm newbie in rails, but grats )
[16:36:38] prereflect: has joined #RubyOnRails
[16:38:22] alex88: has joined #RubyOnRails
[16:38:24] FailBit: tips for new rails developers:
[16:38:36] FailBit: 1. listen to other people when they say not to do/use X
[16:38:39] FailBit: 2. don't use mongodb ever
[16:38:45] FailBit: 3. have fun
[16:39:09] celly: has joined #RubyOnRails
[16:39:25] b0o_: has joined #RubyOnRails
[16:39:51] fox_mulder_cp: FailBit: why don't use mongo?
[16:39:56] celly_: has joined #RubyOnRails
[16:40:08] FailBit: mongodb is optimized for write performance
[16:40:13] FailBit: read performance is mostly a secondary concern
[16:40:25] centrx: so is consistency and reliability
[16:40:42] Papierkorb: Also, relational != document-oriented
[16:40:50] fox_mulder_cp: but if i want crazy quick cache?
[16:40:56] Papierkorb: fox_mulder_cp: Redis
[16:40:56] FailBit: use memcached
[16:41:23] fox_mulder_cp: so, algo for cache read pg -> save to redis -> show user?
[16:41:30] Papierkorb: fox_mulder_cp: especially for stuff like caches you usually want in-memory databases
[16:41:36] FailBit: mongodb is not a hash table
[16:41:40] FailBit: memcached and redis are hash tables
[16:41:50] Papierkorb: fox_mulder_cp: DON'T do that. That's a bad idea in 99% of the cases
[16:41:54] leksster: has joined #RubyOnRails
[16:42:09] fox_mulder_cp: Papierkorb: and how my data moved to cache from pg?
[16:42:33] FailBit: using Rails.cache or ActionView's #cache helper
[16:42:37] Papierkorb: fox_mulder_cp: ???There are only two things that are hard in programming: 1) Caching things 2) Naming things???
[16:43:05] fox_mulder_cp: FailBit: so, how to activate rails.chache?
[16:43:07] Papierkorb: fox_mulder_cp: don't over-cache stuff. And make sure that your server just doesn't suck.
[16:43:24] FailBit: Rails.cache is already active
[16:43:24] smathy: has joined #RubyOnRails
[16:43:37] FailBit: you might want to use gems and config to change the hashtable implementation
[16:43:46] Xentil: fox_mulder_cp: yes, i understand this message
[16:44:04] FailBit: the default is an in-memory store which is the fastest, but has no persistence (it gets wiped every time the server restarts)
[16:44:37] fox_mulder_cp: oh. ok. now i write blogapp from rails agile dev by DHH/Ruby. i want add articles and comments to rails.cache.
[16:44:38] FailBit: it can be changed to use memcached, and there are plugins (dalli & redis) to change cache implementations
[16:45:07] fox_mulder_cp: oh, blogapp from rails guides
[16:48:50] FernandoBasso: has joined #RubyOnRails
[16:50:59] b0o_: i'm working with paperclip, having issues with CSRF, i think. the issue only occurs when i'm trying to upload a file, otherwise the request processes fine.
[16:51:19] b0o_: i've been beating my head on the desk for a while here. any input would be hugely appreciated.
[16:55:08] sarink: has joined #RubyOnRails
[16:57:44] dkelman: has joined #RubyOnRails
[16:58:01] fox_mulder_cp: oh. procrastination mode on :(
[16:58:35] FailBit: https://github.com/schneems/let_it_go
[16:58:37] FailBit: the name of this repo
[16:59:12] Xentil: has left #RubyOnRails: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[17:03:14] Sawbones: has joined #RubyOnRails
[17:05:50] PedramT: has joined #RubyOnRails
[17:05:50] shibabu: has joined #RubyOnRails
[17:06:06] roshanavand: has joined #RubyOnRails
[17:07:33] andrew9184: has joined #RubyOnRails
[17:08:19] ciree: rspec, whats the syntax for expect(myHash).to include(:a, :b, c: {:d})
[17:08:45] ciree: I just want to assert the keys are there, but also some of the keys might be a hash that I want to assert their keys
[17:09:14] diegoviola: my client is such an asshole
[17:09:18] fox_mulder_cp: FailBit: oh. add <% cache do %> <% @articles.each do |a|%> <% end%> but wee, that sql selection to sqlite again retries
[17:09:58] diegoviola: "You only made this today? You are TOO late"
[17:10:12] diegoviola: "I was hoping we would talk about this other feature by 5pm"
[17:10:32] joshkovach: has joined #RubyOnRails
[17:10:38] diegoviola: "OK then let's talk at 5pm and I hope to see everything else done by then"
[17:12:27] b0o_: ciree: you mean that you have a nested hash?
[17:13:19] fox_mulder_cp: diegoviola: some days ago my client says 'why you make this feature today?'. but in plan we associate this feature today %)
[17:13:32] b0o_: ciree: so, like: expect(yourHash) to include(:a, :b, :c[:key])
[17:14:22] diegoviola: fox_mulder_cp: I'm honestly very tired of his crap
[17:15:26] fox_mulder_cp: diegoviola: u can change project?
[17:16:49] PedramT: has joined #RubyOnRails
[17:17:02] joshkovach: has joined #RubyOnRails
[17:18:01] Oliphaunte: has joined #RubyOnRails
[17:18:28] kitsuneyo: has joined #RubyOnRails
[17:18:44] markh: has joined #RubyOnRails
[17:20:04] roshanavand: has joined #RubyOnRails
[17:20:42] PedramT: has joined #RubyOnRails
[17:22:58] chipotle: has joined #RubyOnRails
[17:24:33] arup_r: I have more than 100 controllers in activeadmin. :) Now, I made a single shared example to run the index action for each controller inside the admin/ so that I don't need to write same code every time. All is good no failure. The only things none of the index action spec is not being displayed in the coverage report ( Simplecov) .. Can you tell me what configuration I need there to include those specs inside the report ?
[17:24:42] arup_r: https://gist.github.com/aruprakshit/695246d20106b9e7c931
[17:24:51] tetraktys: has joined #RubyOnRails
[17:25:09] dkelman: has joined #RubyOnRails
[17:25:33] arup_r: s/is not being/being
[17:26:19] epochwolf: holy shit...
[17:28:31] mrchris: has joined #RubyOnRails
[17:28:35] arup_r: The report is showing I don't have spec for index action.. but I have as you see.
[17:29:43] celly: has joined #RubyOnRails
[17:30:29] mrchris: Where would be a good file location for libs used in Capistrano deploy.rb ?
[17:30:34] ruid: has joined #RubyOnRails
[17:30:34] ruid: has joined #RubyOnRails
[17:30:34] MaDErroR123: has joined #RubyOnRails
[17:32:52] joshkovach: has joined #RubyOnRails
[17:34:32] amil: has joined #RubyOnRails
[17:35:31] Guest80820: has joined #RubyOnRails
[17:36:31] mdw: has joined #RubyOnRails
[17:37:28] FailBit: why does ruby have so many damn obscure globals
[17:37:35] shibabu: has joined #RubyOnRails
[17:39:05] hnanon: has joined #RubyOnRails
[17:39:52] chelbs: has joined #RubyOnRails
[17:40:05] Papierkorb: FailBit: found a new one? :P
[17:40:24] Papierkorb: Or: "For them not to be used" - I make an exception for $1..9 ...
[17:40:41] FailBit: I use Regexp.last_match
[17:40:43] Papierkorb: Regexp.last_match[1] or what it was is just not readable to me
[17:40:58] arooni-mobile: has joined #RubyOnRails
[17:41:07] FailBit: and the perl way is just not readable to me
[17:41:19] prereflect: has joined #RubyOnRails
[17:41:32] Papierkorb: or rather, I'd do if m = "foo".match(/bar/) ... baz = m[1] + m[2]
[17:41:42] Papierkorb: Which I might actually do thinking about it.
[17:41:44] FailBit: that is the best way to do it, yes
[17:41:54] FailBit: because then you avoid TLS altogether
[17:41:58] nfk|laptop: has joined #RubyOnRails
[17:42:35] w0bni: has joined #RubyOnRails
[17:43:11] kmckelvin: has joined #RubyOnRails
[17:45:35] B1n4r10: has joined #RubyOnRails
[17:45:52] celly_: has joined #RubyOnRails
[17:45:56] Palsson: has joined #RubyOnRails
[17:51:23] bmalum: has joined #RubyOnRails
[17:51:37] Cervajz: has joined #RubyOnRails
[17:53:02] ruid: I have model associations like so: Town :has_many Years & Year belongs_to Town
[17:53:07] rgtk: has joined #RubyOnRails
[17:53:09] Sawbones: has joined #RubyOnRails
[17:53:10] ruid: so I can to Town.first.years
[17:53:15] ruid: and get a list of years for that town
[17:53:30] ruid: but, Year.first.town returns nil on the query
[17:53:56] epochwolf: ruid: looks like you have a year without a town
[17:54:15] Oliphaunte: has joined #RubyOnRails
[17:54:33] mrchris: How do you make it clear that a method yields?
[17:54:48] mrchris: adding &_block to the args is not required
[17:54:56] epochwolf: __chris: do_something(&block)
[17:55:08] Papierkorb: __chris: using the &block argument. Documenting it.
[17:55:12] mrchris: epochwolf, the linter is complaining that block is not used
[17:55:19] FailBit: then write &_block
[17:55:23] FailBit: that should shut it up
[17:55:27] mrchris: haha thanks
[17:55:43] FailBit: instead of yield
[17:55:43] ruid: epochwolf, not the case
[17:55:47] FailBit: use block.call
[17:55:48] ruid: there is something wrong with the linkage
[17:55:49] ruid: http://pastebin.com/3086cZP9
[17:56:14] sdwrage: has joined #RubyOnRails
[17:56:23] FailBit: ruid: town_id?
[17:56:37] hobodave: has joined #RubyOnRails
[17:56:39] epochwolf: ruid: what's Year.first.town_id ?
[17:56:52] ruid: FailBit, they are linked by the town name
[17:56:59] ruid: epochwolf, error
[17:57:15] epochwolf: oh, missed that detail.
[17:57:17] ruid: No Method error
[17:57:22] FailBit: is the town name also its pkey?
[17:57:44] ruid: it kind of has to be that way
[17:58:03] ruid: I know it is not ideal, but it should be dooable
[17:58:04] epochwolf: I don't think the Town model has the primary key configured properly.
[17:58:31] ruid: did you look at the paste? http://pastie.org/10661051
[17:58:43] epochwolf: Town needs self.primary_key = "name"
[17:58:44] ruid: I thought I configured that correctly
[17:59:46] ruid: humm... doesnt work... do I need to dbmigrate?
[18:00:11] ruid: err do I need to generate a migration for that
[18:00:21] epochwolf: ruid: try reversing foreign_key and primary_key in belongs_to
[18:01:06] ruid: epochwolf, that did it
[18:01:15] epochwolf: ACTION tries to puzzle through the docs on belongs_to
[18:01:16] ruid: perfect thanks
[18:01:28] ruid: that doesnt seem right though....
[18:01:31] ruid: but... it works
[18:01:45] epochwolf: Yeah, I think you had those reversed.
[18:01:53] epochwolf: It wants the primary key of the other table.
[18:02:09] epochwolf: which makes sense.
[18:02:19] epochwolf: It knows the proper primary key for the model it's in.
[18:02:34] ruid: I would have thought the foreign key referred to the PK of the other model/table
[18:02:54] epochwolf: No, that's the primary key.
[18:03:14] epochwolf: The foreign key is the primary key of another table. (In general)
[18:03:28] startupality: has joined #RubyOnRails
[18:03:38] epochwolf: From both sides, Year.town_name is the foreign key
[18:04:13] ruid: but town has not "town_name" column, only "name"
[18:04:36] epochwolf: ruid: that's because Town.name is the primary key.
[18:04:59] ruid: Well thanks for the help
[18:05:05] epochwolf: You're welcome. :)
[18:05:33] epochwolf: ruid: Year.town_name is called foreign because the value isn't originally from that table.
[18:06:11] celly: has joined #RubyOnRails
[18:06:13] Jasaka: has joined #RubyOnRails
[18:06:21] epochwolf: ruid: hope that helps. :)
[18:06:41] sleungcy: has joined #RubyOnRails
[18:06:51] ruid: epochwolf, a little bit... I'll have to play with it some before I completely understand
[18:07:05] epochwolf: ruid: think of Year.town_name as a pointer.
[18:07:30] epochwolf: (Assuming you've worked with lower level things like pointers)
[18:08:28] tvw: has joined #RubyOnRails
[18:08:34] arup_r: who is using Simplecov except me also ? :) I don't get their report. I have specs, but it is showing some lines are covered, some are missing.. not able to understand what it is telling me.. Who added it in this project.
[18:09:50] [Butch]: has joined #RubyOnRails
[18:10:12] FailBit: the report tells you which lines in your app code have been hit as a % of all lines
[18:10:15] ruid: epochwolf, it does, I write mostly C, so the RoR magic is new to me
[18:10:35] FailBit: hey I used to write mostly C
[18:10:37] FailBit: welcome to the club
[18:11:13] FailBit: arup_r: typically this would be accomplished using set_trace_func but there might be some native-code magic to speed it up
[18:11:50] arup_r: FailBit: I can see, I have code, but the report is saying I don't have.. I can't believe it.. :(
[18:12:15] epochwolf: ruid: it may look like magic but all it really is is naming conventions and some meta programming. It's all discoverable with enough time. :)
[18:13:09] arup_r: What I need to do so that I see all are green.. Very new in this SimpleCov thing..
[18:13:17] FailBit: yeah here we go
[18:13:19] FailBit: https://github.com/ruby/ruby/blob/ruby_2_2/ext/coverage/coverage.c
[18:14:01] matthewd: arup_r: Are you looking at coverage of your spec files, or your real code?
[18:14:07] arup_r: FailBit: I have this gem https://github.com/colszowka/simplecov ...
[18:14:15] arup_r: spec files matthewd
[18:14:27] arup_r: If you want I can show you some screenshots
[18:14:36] sleungcy: has joined #RubyOnRails
[18:15:14] tvw: has joined #RubyOnRails
[18:15:20] matthewd: https://github.com/colszowka/simplecov#string-filter
[18:15:22] arup_r: No, I meant in gist.. you will see I have all specs for all controller actions and the report from simplecov shows I don't have :(
[18:15:45] arup_r: here is a gist though https://gist.github.com/aruprakshit/695246d20106b9e7c931
[18:15:48] sandstrom: has joined #RubyOnRails
[18:16:41] ratnikov: has joined #RubyOnRails
[18:17:04] FailBit: it's not realistic to have 100% coverage
[18:17:15] FailBit: I mean you could, if every line was a code path, but that's not true of sane projects
[18:17:57] Doted: has joined #RubyOnRails
[18:18:02] matthewd: arup_r: Okay, and a screenshot of the surprising coverage report?
[18:18:11] arup_r: sure... giving
[18:18:31] matthewd: I think the answer's going to be "activeadmin"
[18:18:47] arup_r: FailBit: My coverage is showing 52% .. I expected it to go atleast 80%
[18:20:14] w0bni: has joined #RubyOnRails
[18:20:15] matthewd: arup_r: More context in spec_helper.rb, too, please
[18:20:51] arup_r: ok.. Can I attach screenshot directly here ? Not seeing anything in my limechat client though
[18:21:15] arup_r: Learning curve all over the place..
[18:21:18] Spami: has joined #RubyOnRails
[18:22:01] matthewd: arup_r: No, you need to upload it somewhere then paste the URL. Or drop it in a comment on the gist.
[18:23:23] ratnikov: arup_r, might help focusing on a specific file that's not covered in coverage that you feel should and figuring out why not.
[18:23:46] arup_r: yes doing it.. give me some mins
[18:26:33] arup_r: matthewd: and ratnikov here is updated gist: https://gist.github.com/aruprakshit/695246d20106b9e7c931/edit
[18:27:19] Sawbones: has joined #RubyOnRails
[18:28:30] dfr|wfh: arup_r, do you have tests that check those controller actions? They look like admin stuff that you just install
[18:28:36] kmckelvi1: has joined #RubyOnRails
[18:29:04] bradleyprice: has joined #RubyOnRails
[18:29:06] arup_r: dfr|wfh: this is the test https://gist.github.com/aruprakshit/695246d20106b9e7c931#file-common_controller_action_spec-rb-L15
[18:29:49] ruid: is there a rails'ey way for me to snapshot my database so that I can rollback to a previous version of data if I screw something up?
[18:30:09] ruid: I am about to import a bunch of data into a table that already has some data.... and want a ripcord
[18:30:47] FailBit: just use your database's backup tools
[18:31:20] ruid: FailBit, k thanks
[18:31:26] dfr|wfh: arup_r, does the index test actually run? e.g. if you s/200/201 does it break during running coverage?
[18:31:41] dfr|wfh: maybe s/200/500 ;)
[18:31:59] arup_r: yes it will break.. Let me run that specfic file and show you,.. my all tests are green..
[18:32:05] PedramT: has joined #RubyOnRails
[18:32:38] dfr|wfh: arup_r, but all of that aside, I don't think it's worth to tests to test the default setup of the plugin you're using just for sake of coverage.
[18:33:05] dfr|wfh: arup_r, if you start modifying it heavily or start seeing bugs: sure. But probably best to not spend that time up-front.
[18:33:47] arup_r: yes, it is not default really.. there are many index actions which has some kind of code.. we wrote kind of smoke test.. because we are splitting 1 project into 2 repos
[18:34:21] chipotle: has joined #RubyOnRails
[18:34:27] dfr|wfh: arup_r, ah, ok. Well anyhow, I'd recommend first debugging it by making sure the tests actually run :)
[18:35:21] arup_r: They run.. in GitHub circel ci is very strict.. all code went pass.. and I merged them one by one.. I ran the test for you..
[18:36:03] dfr|wfh: if you replace 200 with 500 in the example, does the coverage run break?
[18:36:04] kitsuneyo: has joined #RubyOnRails
[18:38:09] arup_r: added https://gist.github.com/aruprakshit/695246d20106b9e7c931
[18:38:22] arup_r: let me see the coverage
[18:38:46] juddey: has joined #RubyOnRails
[18:38:50] arup_r: I didn't check the coverage.. I just see it breaks with 500 when I run the index common file
[18:40:01] _Tariq: has joined #RubyOnRails
[18:42:38] arup_r: my COVERAGE=true rake spec is still going on.. I'll confirm you what you asked
[18:46:56] arup_r: dfr you logged out :( ... Ok with all those broken test with 500 my coverage still same All Files (59.53% covered at 2.99 hits/line) .. something wrong..
[18:47:17] slash_nick: I'm working on our application's logs, and I've noticed something that may be a problem with ActionController's instrumentation.. when a controller raises an exception, the exception is included in the instrumentation's payload, but the backtrace is not... https://gist.github.com/rthbound/0ac1873b5656ad961699
[18:47:51] slash_nick: matthewd: ^ ?
[18:49:02] dkelman: has joined #RubyOnRails
[18:49:35] Pazician: has joined #RubyOnRails
[18:49:52] matthewd: slash_nick: https://github.com/rails/rails/pull/16418
[18:50:12] atomical_: has joined #RubyOnRails
[18:50:30] diegoviola: my client have been complaining that I'm kinda slow, but they haven't even pay me yet, while I have 99% of their app already built
[18:50:39] diegoviola: I'm really pissed
[18:50:49] Spami: has joined #RubyOnRails
[18:50:55] diegoviola: f*cking crybaby
[18:50:56] slash_nick: matthewd: ahhh.
[18:51:23] rickmasta: has joined #RubyOnRails
[18:51:27] diegoviola: should I just git push, ask for pay and leave?
[18:53:07] tbuehlmann: diegoviola, what does your contract say?
[18:53:14] matthewd: slash_nick: Sounds like there's consensus (https://github.com/rails/rails/pull/16418#issuecomment-56880742) that we can change to store the exception object in there, if you're interested
[18:54:59] dfr|wfh: has joined #RubyOnRails
[18:55:54] slash_nick: matthewd: i'm interested... so, (from my gist there, https://gist.github.com/rthbound/0ac1873b5656ad961699#file-better-rb-L6) it'd be more like `payload[:the_actual_exception_instance] = e`?
[18:57:09] diegoviola: tbuehlmann: I don't have one
[18:57:13] diegoviola: tbuehlmann: this is more like freelance work
[18:57:21] slash_nick: diegoviola: very free :P
[18:57:26] tildes: has joined #RubyOnRails
[18:57:47] diegoviola: slash_nick: I'm doing work, and I get paid a fixed price at the end of the month, that's it
[18:57:56] diegoviola: slash_nick: but my client is acting like he is my boss
[18:58:04] diegoviola: I can leave whenever I want
[18:58:21] tbuehlmann: sounds like quasi-self-employment to mee
[18:58:34] matthewd: slash_nick: More in the vicinity of https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications/instrumenter.rb#L23, but yeah
[18:58:37] tbuehlmann: in germany, that's kind of illegal :>
[18:59:40] slash_nick: matthewd: so << e.backtrace? Isn't that exactly what #16418 is doing?
[18:59:42] tbuehlmann: diegoviola, you are having a bad mood because of this client. I can tell, I read this IRC channel a lot
[19:00:06] tbuehlmann: time to take some action, if you ask me
[19:00:25] matthewd: slash_nick: `e`, not just the backtrace
[19:00:41] matthewd: (we don't want to call #backtrace unless someone definitely wants it -- it's very expensive)
[19:01:00] slash_nick: i see, crystal clear now
[19:01:12] matthewd: The only remaining question is whether we add it as a third item in that array, replace the array with just the exception, or add a second key
[19:01:29] FernandoBasso: has joined #RubyOnRails
[19:02:03] arup_r: has joined #RubyOnRails
[19:02:46] atomical: has joined #RubyOnRails
[19:03:33] diegoviola: tbuehlmann: yes, he is giving me a bad mood
[19:03:51] rickmasta: has joined #RubyOnRails
[19:04:01] diegoviola: tbuehlmann: he has been quite passive aggressive and already apologized more than once
[19:05:33] Guest80820: has joined #RubyOnRails
[19:05:36] tbuehlmann: who knows why, but that's nothing one should direct to business partners. do you think your life would be better if you ditched that client?
[19:05:42] Zadrel: has joined #RubyOnRails
[19:05:51] alphaatom: has joined #RubyOnRails
[19:06:19] PedramT: has joined #RubyOnRails
[19:07:49] atomical_: has joined #RubyOnRails
[19:08:02] _Tariq: has joined #RubyOnRails
[19:08:25] Scripore: has joined #RubyOnRails
[19:08:46] slash_nick: matthewd: tough call... right now exception looks like ["NoMethodError","undefined method `foobar' for nil:NilClass"], right?... i know that's being used here: https://github.com/roidrage/lograge/blob/4d49ac41a38ae62a25df991964d52f72592cf91b/lib/lograge/log_subscriber.rb#L72-L74 ... the way it's used, a third element wouldn't break things
[19:09:28] axl_: has joined #RubyOnRails
[19:10:31] marcdel: has joined #RubyOnRails
[19:10:40] PedramT: has joined #RubyOnRails
[19:11:21] ur5us: has joined #RubyOnRails
[19:11:34] ur5us: has joined #RubyOnRails
[19:11:35] slash_nick: if we were to add a key instead, it seems the perfect key for storing an exception object would be "exception" (which is taken)... more worlds would be rocked by moving the :exception value to a new key, then storing the exception object in :exception (than would be rocked my using a third element in array)
[19:11:39] diegoviola: tbuehlmann: well, he's the one that has directed his rage towards me, so should get your advice as well
[19:11:45] diegoviola: tbuehlmann: but yes
[19:12:01] slash_nick: ... still though, :exception_object wouldn't be a terrible key...
[19:12:30] matthewd: slash_nick: Yeah.. I can see arguments in favour of all three. The extra array element does seem the least offensive right now. PR it and we can get a second opinion ??\_(???)_/??
[19:12:52] Zadrel: hello there! i have a brand new app in rails4 ruby 2.0.0 and i'm gettin' the error, when running "rails s",Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile, but when i run "bundle install" it shows "Using mysql2 0.4.2"
[19:12:54] matthewd: (the other thing #16418 is missing is a test, btw)
[19:13:30] matthewd: Zadrel: What's your exact Rails version?
[19:13:32] tbuehlmann: diegoviola, that's what I mean, he shouldn't direct his stress/hate/whatnot against you. if you know you are better off ditching that client, I have nothing more to ask :)
[19:13:50] matthewd: Zadrel: More exact
[19:14:03] diegoviola: tbuehlmann: the problem is I need a job and keep my sanity at the same time
[19:14:16] diegoviola: tbuehlmann: sorry, I misunderstood you, english isn't my language
[19:14:48] Zadrel: when i run "rails -v" it shows Rails 4.2.0
[19:15:00] matthewd: Zadrel: Okay, update to 4.2.5
[19:16:32] chipotle_: has joined #RubyOnRails
[19:16:42] atomical: has joined #RubyOnRails
[19:18:27] slash_nick: 10-4... *cracks knuckles*
[19:20:57] Oliphaunte: has joined #RubyOnRails
[19:21:23] Zadrel: matthewd: right, i'll try that and tell you ina a moment
[19:22:56] sandstrom: has joined #RubyOnRails
[19:23:38] baweaver: has joined #RubyOnRails
[19:24:17] manfrin: has joined #RubyOnRails
[19:24:21] axl__: has joined #RubyOnRails
[19:24:31] pawnbox: has joined #RubyOnRails
[19:26:47] thezanke: has joined #RubyOnRails
[19:29:41] Oliphaunte: has joined #RubyOnRails
[19:29:47] Zadrel: matthewd: worked, thanks
[19:29:57] Cohedrin: has joined #RubyOnRails
[19:30:22] matthewd: Zadrel: No worries :)
[19:34:40] Scripore: has joined #RubyOnRails
[19:35:26] PedramT: has joined #RubyOnRails
[19:41:53] Cervajz: has joined #RubyOnRails
[19:42:43] n00bDev: has joined #RubyOnRails
[19:43:23] roshanavand: has joined #RubyOnRails
[19:43:26] chipotle: has joined #RubyOnRails
[19:43:29] SPYGAME: has joined #RubyOnRails
[19:45:26] PedramT: has joined #RubyOnRails
[19:46:18] mdw: has joined #RubyOnRails
[19:46:36] Zadrel: hello again, now that i'e upgrade my brand new app to 4.2.5, i'm getting the same error as before but it's calling the activerecord from 4.2.0, anyone could tell me what i'm doing wrong?
[19:46:38] kies^: has joined #RubyOnRails
[19:46:52] ewnd9_: has joined #RubyOnRails
[19:47:29] Zadrel: --/home/andre/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile
[19:47:55] agit0: has joined #RubyOnRails
[19:48:35] diegoviola: this client wants me to work 15 hours per day or something
[19:50:30] fox_mulder_cp: ooh. author of Debian Ian Murdock died by messages of Docker company and Debian Community
[19:50:38] slash_nick: matthewd: https://github.com/rails/rails/pull/22856
[19:50:43] fox_mulder_cp: may be self-killed (
[19:52:21] fox_mulder_cp: FailBit: 28 dec, as wiki says
[19:52:41] fox_mulder_cp: http://blog.docker.com/2015/12/ian-murdock/
[19:53:37] rgtk: has joined #RubyOnRails
[19:53:47] chipotle: has joined #RubyOnRails
[19:54:21] FailBit: that link is ded
[19:54:28] CornishPasty: Sad news, fox_mulder_cp
[19:54:31] pawnbox: has joined #RubyOnRails
[19:55:04] fox_mulder_cp: i opened this link now
[19:55:17] alphaatom: has joined #RubyOnRails
[19:56:51] CornishPasty: https://www.reddit.com/r/linux/comments/3yktcg/ian_murdock_debian_founder_is_threatening_suicide/
[19:56:53] CornishPasty: fox_mulder_cp: ^
[19:57:46] Zadrel: anyone can help me figure out why i'm getting this-----ruby-2.0.0-p643/gems/activerecord-4.2.0/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile ----- if my Rails v4.2.5 ?
[19:58:37] Oliphaunte: has joined #RubyOnRails
[19:59:08] fox_mulder_cp: Zadrel: you must add gem 'mysql2' to Gemfile and make 'bundle install'
[19:59:15] fox_mulder_cp: and after it restart your app
[19:59:37] fox_mulder_cp: Zadrel: but i recommend learn and use postgresql :)
[19:59:49] unreal: has joined #RubyOnRails
[20:00:13] PedramT: has joined #RubyOnRails
[20:01:40] matthewd: Zadrel: Sounds like you still need to update your Gemfile, and/or run `bundle`
[20:02:03] Zadrel: fox_mulder_cp: it's added already, when i run "bundle install" the gem shows up as Using mysql2 0.4.2
[20:02:09] thejamespinto: has joined #RubyOnRails
[20:02:24] shibabu: has joined #RubyOnRails
[20:02:25] matthewd: Zadrel: (for the change in Rails version)
[20:03:23] Zadrel: matthewd: i created another folder with the new verision, maybe there's a problem with the name of hte folder?(it's the same)
[20:04:14] matthewd: Zadrel: What does your Gemfile say for rails now?
[20:04:27] Zadrel: matthewd: BUT the command "rails s" works, i'm getting this trying to run "rails g
[20:04:49] Zadrel: matthewd: 4.2.5
[20:04:56] Zadrel: for rails
[20:05:23] matthewd: `bundle exec rails [etc]` ?
[20:06:29] Zadrel: the command "bundle exec rails g --help" outputs this error
[20:07:28] Zadrel: in the error shows up "activerecord-4.2.0" it should show up as 4.2.5?
[20:08:54] matthewd: Zadrel: Yes, it should :|
[20:09:09] Zadrel: matthewd: : |
[20:09:24] ElFerna: has joined #RubyOnRails
[20:09:25] matthewd: Zadrel: You've definitely run `bundle`? Which version does Gemfile.lock have for rails / activerecord?
[20:09:30] Zadrel: matthewd: i'll try to create with another name
[20:09:35] Zadrel: and i'll see
[20:10:10] Oliphaunte: has joined #RubyOnRails
[20:11:24] Zadrel: gemlock: rails (~> 4.0);activerecord (4.2.5); and ran bundle install more than oce
[20:11:55] ElFerna: has joined #RubyOnRails
[20:13:02] matthewd: .. but `bundle exec rails g ..` run from the same directory complains about activerecord-4.2.0
[20:13:07] matthewd: This seems very strange
[20:14:59] PedramT: has joined #RubyOnRails
[20:15:06] Zadrel: matthewd: guess it was a name-related error, i created another project with another name and worked, thanks for the help :)
[20:15:40] matthewd: I'm not sure how that would've caused it, but I'll take the win :)
[20:16:30] SteenJobs: has joined #RubyOnRails
[20:17:48] Sawbones: has joined #RubyOnRails
[20:18:04] SPYGAME: has joined #RubyOnRails
[20:18:50] axl__: has joined #RubyOnRails
[20:19:42] claytonzaugg: has joined #RubyOnRails
[20:21:16] pawnbox: has joined #RubyOnRails
[20:24:01] dgynn: has joined #RubyOnRails
[20:24:25] Oliphaunte: has joined #RubyOnRails
[20:27:39] doodlehaus: has joined #RubyOnRails
[20:28:13] unreal: has joined #RubyOnRails
[20:28:23] agit0: has joined #RubyOnRails
[20:40:06] tvw: has joined #RubyOnRails
[20:49:24] vedu: Hello. How can I get the html to text
[20:50:09] veg: has joined #RubyOnRails
[20:50:53] Pazician: has joined #RubyOnRails
[20:51:19] Guest80820: has joined #RubyOnRails
[20:51:24] fox_mulder_cp: vedu: save as in your browser. or use wget/cutl
[20:51:46] gaustin: has joined #RubyOnRails
[20:52:03] FailBit: vedu: I presume you are asking "how can I get HTML-safe text from user input" ?
[20:52:23] vedu: Sorry. I am looking to convert html to text
[20:52:41] fox_mulder_cp: FailBit: model, view, webpage?
[20:52:51] FailBit: fox_mulder_cp: *buzzer* incorrect
[20:53:07] FailBit: vedu: still don't know what that means, can you elaborate?
[20:53:51] vedu: I need this: ActionController::Base.helpers.strip_tags('string')
[20:54:02] vedu: Couldn't frame it probably I guess
[20:54:21] FailBit: hmm... you would need to use an HTML parser for that
[20:54:24] fox_mulder_cp: vedu: where u need it? in model? in controller? in
[20:54:38] fox_mulder_cp: some minutes..
[20:54:49] FailBit: https://github.com/rails/rails-html-sanitizer
[20:55:08] vedu: FailBit: yep
[20:55:14] Sawbones: has joined #RubyOnRails
[20:55:34] fox_mulder_cp: include ActionView::Helpers::SanitizeHelper in model
[20:55:41] fox_mulder_cp: def check_text_field
[20:55:41] fox_mulder_cp: errors.add(:text, 'no content here') if sanitize(self.text, :tags=>[]).length == 0
[20:56:37] fox_mulder_cp: vedu: its strip all tags from field text and if it's length is 0 - add validation error
[20:57:27] Audrius: has joined #RubyOnRails
[20:57:28] gusrub: has joined #RubyOnRails
[20:58:08] fox_mulder_cp: becouse standart not_null validations fails in fielld without readable content but containing some html tags from tinymce js editor
[20:59:37] agit0: has joined #RubyOnRails
[21:01:05] Megamos: has joined #RubyOnRails
[21:02:03] DavidDudson: has joined #RubyOnRails
[21:02:38] mices: my school id's coming up nil :( https://gist.github.com/mices/e343220216bb18f82eb8
[21:03:27] diego2: has joined #RubyOnRails
[21:03:45] diego2: has joined #RubyOnRails
[21:03:46] bradleyprice: has joined #RubyOnRails
[21:04:17] Palsson: has joined #RubyOnRails
[21:04:23] mices: trying to link_to this route /users/:user_id/profile/schools/:id/edit
[21:05:00] mices: link_to 'Edit', edit_user_profile_school_path(current_user,profile)
[21:05:11] diegoviola: is there another way to handle this? https://gist.github.com/diegoviola/4393977fdc72ce9011fe#file-correspondence-rb-L14-L20
[21:05:55] diegoviola: the Float::NAN
[21:06:08] chipotle: has joined #RubyOnRails
[21:06:20] podman: has joined #RubyOnRails
[21:06:23] mrbubbles: has joined #RubyOnRails
[21:06:34] tildes: has joined #RubyOnRails
[21:07:07] rgtk: has joined #RubyOnRails
[21:08:34] FailBit: !!Float::NAN
[21:08:47] FailBit: that method will always return 0
[21:09:28] bradleyprice: has joined #RubyOnRails
[21:14:48] rhizome: diegoviola: why Float?
[21:14:57] rhizome: where is that coming from?
[21:15:03] wethu: has joined #RubyOnRails
[21:15:10] diego2: has joined #RubyOnRails
[21:15:20] PedramT: has joined #RubyOnRails
[21:15:39] diego2: has joined #RubyOnRails
[21:15:49] diegoviola: FailBit: so how can I handle this then?
[21:15:57] diegoviola: FailBit: because my client doesn't want to see NaN in there
[21:16:16] rhizome: Why is there a Float at all?
[21:16:22] diegoviola: FailBit: it's coming from a division
[21:16:47] diegoviola: from that where in line 18
[21:16:59] Scripore: has joined #RubyOnRails
[21:17:00] diegoviola: rhizome: they expect to see a float
[21:17:08] PedramT: has joined #RubyOnRails
[21:17:08] diegoviola: where(status: 'Verde').where("ts_print > ?", 1.day.ago).count.to_f / where("ts_print > ?", 1.day.ago).count * 100
[21:17:13] diegoviola: if I take the to_f from there I just get a 0
[21:17:17] rhizome: for "by_day" that seems unusual
[21:17:22] diegoviola: because they are dividing by 0
[21:17:36] rhizome: i don't get it
[21:18:13] diegoviola: don't worry, the client doesn't know what he is doing
[21:18:16] rhizome: how does by_day involve all of that math?
[21:18:23] rhizome: aren't you the one writing this?
[21:18:40] diegoviola: but the client expects this exactly
[21:18:48] FailBit: diegoviola: look at that method again
[21:18:52] rhizome: you are doing freelance wrong
[21:18:58] FailBit: if Float::NAN
[21:19:05] FailBit: this will always be true
[21:19:06] rhizome: but for the topic at hand
[21:19:07] FailBit: no. matter. what
[21:19:25] diegoviola: !Float::NAN says false
[21:19:32] FailBit: !!Float::NAN is true
[21:19:39] _Tariq: has joined #RubyOnRails
[21:19:45] rhizome: ! is not, !! is boolean evaluation
[21:19:45] diegoviola: but !Float::NAN is false
[21:19:54] FailBit: and you're testing that it's true
[21:19:58] FailBit: which it is
[21:20:02] FailBit: (truthy, anyways)
[21:20:38] FailBit: if you want to test that a number is nan
[21:20:54] FailBit: [2] pry(main)> 4.5.nan?
[21:20:59] FailBit: [3] pry(main)> Float::NAN.nan?
[21:21:41] andrew9184: has joined #RubyOnRails
[21:22:29] FailBit: I assume that you are looking for this
[21:22:33] FailBit: val = where(status: 'Verde').where("ts_print > ?", 1.day.ago).count.to_f / where("ts_print > ?", 1.day.ago).count * 100
[21:22:39] FailBit: val.nan? ? 0 : val
[21:23:02] 77CAAFJ7P: has joined #RubyOnRails
[21:23:39] diegoviola: !! is not not but ! is not, right?
[21:23:49] diegoviola: I'm confused about what the difference is
[21:23:57] FailBit: !! converts a truthy value to true
[21:24:01] FailBit: ! converts a truthy value to false
[21:24:09] diegoviola: that makes sense, thanks
[21:24:15] FailBit: truthy means "not nil or false"
[21:24:37] FailBit: similarly, falsy is "nil or false"
[21:26:57] rikkipitt: has joined #RubyOnRails
[21:27:08] FailBit: lel, ruby inherited C's IEEE behavior wrt NaN
[21:27:13] FailBit: [1] pry(main)> Float::NAN == Float::NAN
[21:27:31] FailBit: NaN isn't equal to _anything._
[21:28:00] tvw: has joined #RubyOnRails
[21:29:19] wethu: has joined #RubyOnRails
[21:30:02] Cervajz: has joined #RubyOnRails
[21:30:03] rgrmatt: has joined #RubyOnRails
[21:30:24] diegoviola: I wish I could get another job, so I could leave this one
[21:30:34] diegoviola: my client has been extremely rude and confrontational, just blaming me for everything
[21:31:13] diegoviola: FailBit: just fixed that code, thanks
[21:31:47] diegoviola: he was expecting me to work this weekend, I said I will not work this weekend
[21:32:10] blackmesa: has joined #RubyOnRails
[21:35:13] fox_mulder_cp: diegoviola: ooh
[21:38:15] Ergo: has joined #RubyOnRails
[21:39:00] neanderslob: has joined #RubyOnRails
[21:41:22] manfrin: has joined #RubyOnRails
[21:42:03] _Tariq: has joined #RubyOnRails
[21:44:08] rgtk: has joined #RubyOnRails
[21:45:23] rgtk_: has joined #RubyOnRails
[21:47:22] camilasan: has joined #RubyOnRails
[21:47:29] yfeldblum: has joined #RubyOnRails
[21:51:06] MarkTR: has joined #RubyOnRails
[21:53:23] diego2: has joined #RubyOnRails
[21:53:29] diego2: has joined #RubyOnRails
[21:56:50] bradleyprice: has joined #RubyOnRails
[21:58:23] sandstrom: has joined #RubyOnRails
[22:02:15] netzfisch: has joined #RubyOnRails
[22:02:54] shibabu: has joined #RubyOnRails
[22:03:08] rikkipitt: has joined #RubyOnRails
[22:04:53] roshanavand: has joined #RubyOnRails
[22:05:13] mices: eureka i've found it
[22:05:50] s2013: has joined #RubyOnRails
[22:05:53] doodlehaus: has joined #RubyOnRails
[22:08:55] Spami: So, I am using paperclip
[22:09:00] Spami: and I lost all images
[22:09:10] fox_mulder_cp: mices: wow. glad for you. what is reason for your probleM?
[22:09:21] TheMoonMaster: has joined #RubyOnRails
[22:09:22] bradleyprice: has joined #RubyOnRails
[22:09:44] Spami: when I try to upload files, not I get the error: "Not a directory @ dir_s_rmdir"
[22:09:48] Spami: I believe it
[22:10:09] Spami: it's because paperclip thinks that all images are still in the server
[22:10:18] Spami: anyone knows how I can reset them?
[22:11:09] bradleyprice: has joined #RubyOnRails
[22:11:34] FailBit: https://gist.github.com/liamwhite/9ee4b6d536eaf5bf62f5
[22:11:43] FailBit: I think I might have violated a few style guides here or there
[22:12:12] smathy: Spami, you're getting that error when trying to upload an image to a resource that previously had one right?
[22:12:15] centrx: has joined #RubyOnRails
[22:12:22] Spami: smathy, correct
[22:12:23] blackmesa: has joined #RubyOnRails
[22:12:49] smathy: Spami, right because your image/attachment field has a value, then Paperclip assumes there's an image to delete before uploading the new one.
[22:12:49] icecrxm: has joined #RubyOnRails
[22:13:46] smathy: Spami, if you've really lost all your images (eg. they're not just in an old release folder and not linked properly) then you will need to first NULL out all the attachment fields, so that Paperclip sees the upload as a new upload and so doesn't try to remove the old file (which no longer exists).
[22:15:12] Spami: smathy, yep, just found out
[22:15:26] Spami: damn that sucks
[22:15:35] Spami: I'm going to implement a backup script now
[22:16:18] FooMunki: has joined #RubyOnRails
[22:16:51] Megamos: has joined #RubyOnRails
[22:18:18] icecrxm: has left #RubyOnRails: ()
[22:18:26] roshanavand: has joined #RubyOnRails
[22:19:22] diego2: has joined #RubyOnRails
[22:19:23] nullwarp: has joined #RubyOnRails
[22:22:38] roshanavand: has joined #RubyOnRails
[22:23:12] diego2: has joined #RubyOnRails
[22:23:34] Jasaka: has joined #RubyOnRails
[22:24:03] smathy: Spami, yep, backups are a good idea ;)
[22:24:10] drPoggs: has joined #RubyOnRails
[22:24:15] leslie: has joined #RubyOnRails
[22:24:15] leslie: has joined #RubyOnRails
[22:24:19] Spami: smathy, I learned the very hard way
[22:24:25] Spami: I always said, yeah later in 2016
[22:24:41] kaspergrubbe: has joined #RubyOnRails
[22:24:49] smathy: I think most people have to learn the hard way before really learning.
[22:25:32] mices: has joined #RubyOnRails
[22:26:20] Leeky_: has joined #RubyOnRails
[22:26:42] markh: has joined #RubyOnRails
[22:30:25] solars: has joined #RubyOnRails
[22:31:27] rhizome: diego2: and then they were fine with you not working this weekend, right?
[22:31:29] baweaver: has joined #RubyOnRails
[22:32:04] SteenJobs: has joined #RubyOnRails
[22:34:44] neanderslob: has joined #RubyOnRails
[22:35:19] pawnbox: has joined #RubyOnRails
[22:36:13] narcan: has joined #RubyOnRails
[22:36:27] Megamosaren: has joined #RubyOnRails
[22:37:06] Guest80820: has joined #RubyOnRails
[22:42:45] celly: has joined #RubyOnRails
[22:44:44] neanderslob: has joined #RubyOnRails
[22:45:25] futilegames: has joined #RubyOnRails
[22:45:57] meoblast001: has joined #RubyOnRails
[22:47:55] gavit: I have a link_to which send extra params to my #new, but now when I go to my #new without params I get a param is missing or the value is empty: salary
[22:48:44] duderonomy: has joined #RubyOnRails
[22:50:17] leslie: has joined #RubyOnRails
[22:50:17] leslie: has joined #RubyOnRails
[22:50:42] nullwarp: has joined #RubyOnRails
[22:51:37] rgrmatt: has joined #RubyOnRails
[22:52:19] Leeky_: has joined #RubyOnRails
[22:53:02] rhizome: if your code is expecting it, you probably want to make sure it's there or has a sensible default or is coded in a completely different way. Depends on the situation.
[22:54:41] dkelman: has joined #RubyOnRails
[22:57:38] Liothen: has joined #RubyOnRails
[22:57:38] Liothen: has joined #RubyOnRails
[22:57:54] b0o_: has joined #RubyOnRails
[22:59:04] kaspergrubbe: has joined #RubyOnRails
[22:59:09] thejamespinto_: has joined #RubyOnRails
[23:01:32] neanderslob: hi all; I'm using multiple instances of cocoon to add sever fields to a form; it's all working fine but with multiple "add field" buttons on one page, it starts to make the form a bit confusing
[23:02:55] neanderslob: I've been looking around for a few design examples to tidy up dynamic field generation but can't really find any
[23:03:13] wethu: has joined #RubyOnRails
[23:03:51] blackhuey: has joined #RubyOnRails
[23:04:12] ascarter: has joined #RubyOnRails
[23:04:28] shibabu: has joined #RubyOnRails
[23:04:36] Sawbones: has joined #RubyOnRails
[23:04:41] neanderslob: can anyone think of any good examples of front-end design using cocoon or similar dynamic functionality?
[23:05:55] rikkipitt: has joined #RubyOnRails
[23:06:42] b0o_: hi. i've got a form with a file upload field. i'm trying to handle the uploaded file via paperclip. any time i try to pass a file with the form data, i get a CSRF validation error. otherwise, the form submits fine.
[23:06:45] b0o_: any ideas?
[23:06:47] Scripore: has joined #RubyOnRails
[23:07:25] doodlehaus: has joined #RubyOnRails
[23:09:49] fox_mulder_cp: b0o_: csrf token in raw html is present?
[23:11:24] Surt_Q: has joined #RubyOnRails
[23:12:02] b0o_: fox_mulder_cp: the CSRF meta is in the page header. would you propose including it in the form another way?
[23:13:01] doodlehaus: has joined #RubyOnRails
[23:15:23] baweaver: has joined #RubyOnRails
[23:16:48] rgrmatt: has joined #RubyOnRails
[23:17:14] lemur: has joined #RubyOnRails
[23:18:06] Cervajz: has joined #RubyOnRails
[23:20:07] Pupeno: has joined #RubyOnRails
[23:23:02] rgrmatt: has joined #RubyOnRails
[23:23:32] narcan: has joined #RubyOnRails
[23:24:46] Sawbones: has joined #RubyOnRails
[23:26:39] kadoppe: has joined #RubyOnRails
[23:31:40] zpe: has joined #RubyOnRails
[23:39:40] mices: has joined #RubyOnRails
[23:39:52] mices: Unknown key: :through. Valid keys are: :class_name, :anonymous_class, :foreign_key ... belongs_to :profile, through: :school
[23:43:22] ur5us: has joined #RubyOnRails
[23:46:01] Guest80820: has joined #RubyOnRails
[23:47:05] duncannz: has joined #RubyOnRails
[23:49:26] chelbs: has joined #RubyOnRails
[23:50:54] mices: dependent destroy doesn't go with belongs_to right?
[23:51:12] mices: only has_on or has_many ?
[23:52:02] wethu: has joined #RubyOnRails
[23:52:40] doodlehaus: has joined #RubyOnRails
[23:53:04] manfrin: has joined #RubyOnRails
[23:53:39] neruda: has joined #RubyOnRails
[23:54:07] ewnd9_: has joined #RubyOnRails
[23:54:11] fox_mulder_cp: mices: dependent destroy - is optionally
[23:54:30] tbuehlmann: mices, read this: http://guides.rubyonrails.org/association_basics.html
[23:54:34] fox_mulder_cp: if you want - you can add
[23:54:35] mices: belongs_to through is invalid?
[23:54:52] fox_mulder_cp: mices: read guides
[23:55:16] mary5030_: has joined #RubyOnRails
[23:55:17] fox_mulder_cp: ooh. start rails5 app and has auth token error tooo (((
[23:55:30] mices: i have referred to that page a lot, i guess i've just about read the whole page by now
[23:55:34] ElFerna: has joined #RubyOnRails
[23:55:45] pyemkey: has joined #RubyOnRails
[23:55:56] Radar: show where on that page it uses a belongs_to :through association please
[23:56:10] Radar: it is silly to have a profile object that is attached to your user object
[23:56:13] Radar: the user object should have the profile details
[23:56:20] Radar: this profile model is making it more complex than it needs to be
[23:59:17] gavit: scope :active, lambda {|requested_date| where("start_date <= :requested_date AND (end_date >= :requested_date OR end_date is NULL)", requested_date: requested_date)} <- how do I do this for a 'year' rather than a date?