« Back to channel list

#RubyOnRails - 20 November 2015

« Back 1 day Forward 1 day »
[00:00:54] manfrin_: has joined #RubyOnRails
[00:01:26] renews: has joined #RubyOnRails
[00:01:47] tfitts: has joined #RubyOnRails
[00:03:59] machuga: has joined #RubyOnRails
[00:03:59] machuga: has joined #RubyOnRails
[00:04:04] AlHafoudh: has joined #RubyOnRails
[00:04:07] Pazician: has joined #RubyOnRails
[00:04:16] rafaelfranca: has joined #RubyOnRails
[00:05:19] fschuindt1: has left #RubyOnRails: ()
[00:05:19] ismaelga: has joined #RubyOnRails
[00:05:41] fschuindt: has joined #RubyOnRails
[00:05:46] notnoyyyyy: has joined #RubyOnRails
[00:06:02] darrencauthon: has joined #RubyOnRails
[00:06:21] fschuindt: Guys, how can I reduce the ABC Complexity of the :filter method in this controller? https://gist.github.com/fschuindt/2ca2f844852f1163aa4c
[00:06:53] Jagular: has left #RubyOnRails: ()
[00:06:56] roxtrongo: has joined #RubyOnRails
[00:11:08] pawnbox: has joined #RubyOnRails
[00:12:09] Yomero2: has joined #RubyOnRails
[00:12:29] Radar: My goodness it's magical.
[00:12:44] Radar: I will tinker.
[00:13:19] smathy: fschuindt, well for a start, @report = Report.filtered @date_from, @date_to
[00:13:50] fschuindt: smathy: well, thats tricky hahaha, ty
[00:13:57] Radar: fschuindt: strftime('%-dth %B, %Y') will show "21th November" btw.
[00:14:42] smathy: fschuindt, you also want that to be a flash.now - so it's not still hanging around on the NEXT response.
[00:14:46] s2013: has joined #RubyOnRails
[00:15:14] benlieb_: has joined #RubyOnRails
[00:15:37] matthewd: fschuindt: Your indentation's off on 34 & 35
[00:15:43] matthewd: ACTION "contributes"
[00:16:01] smathy: Teamwork!
[00:16:16] tubbo: fschuindt: modify .rubocop.yml to allow for a higher AbcComplexity value. ;)
[00:16:24] helpa: YOLO driven development - https://gist.github.com/3979145
[00:17:18] skiz: has joined #RubyOnRails
[00:17:21] slash_nick: fschuindt: might dry that range up a bit... is there anything besides @date_from..@date_to + 1.day there?
[00:18:06] tuelz: has joined #RubyOnRails
[00:18:50] fschuindt: slash_nick: sorry, can express yourself again?
[00:18:52] exadeci: has joined #RubyOnRails
[00:19:38] slash_nick: i liked that version
[00:19:59] matthewd: That range doesn't sound right, actually... I suspect you want Report.where(created_at: @date_from...@date_to + 1.day)
[00:20:09] matthewd: Note bonus '.'
[00:20:22] matthewd: .. but that still doesn't help your ABC.
[00:21:21] fschuindt: Oh yes, I see now, the foo..bar range doesn't include foo or bar, just what's between, but foo...bar does, right?
[00:21:37] Radar: fschuindt: https://gist.github.com/radar/7cc0aeea3e27ce297870
[00:21:41] Radar: fschuindt: Where do I send the invoice?
[00:21:45] matthewd: foo..bar includes both; foo...bar only includes foo
[00:23:28] fschuindt: You guys are awesome, thanks so much for the help!
[00:23:43] Radar: fschuindt: My paypal address is radarlistener@gmail.com btw
[00:23:54] Radar: I will write up an invoice now and send it your email address which I have on file
[00:23:58] sankaber: has joined #RubyOnRails
[00:23:58] Radar: 14 day terms good for you?
[00:24:42] fschuindt: hahaha, are u acepting those happy faces today? I have some ^^
[00:24:46] fschuindt: like that? :D
[00:25:24] fschuindt: I saw your talk about multi tenacy
[00:25:33] fschuindt: Greeat talk btw
[00:25:39] Radar: Thank you :)
[00:25:59] Aeyrix: I saw your talk about why the Ruby community needs to be more accomodating
[00:26:03] Aeyrix: oh wait nvm, your talk wasn't accomodated
[00:26:24] Aeyrix: ACTION is still slightly irritated about that.
[00:26:28] Scriptonaut: has joined #RubyOnRails
[00:26:37] Radar: Aeyrix: Membership to that particular club is open to all ;)
[00:26:59] Scriptonaut: Could somebody tell me why the first entry in my gist is generating that broken html? I want to pass the options to will_paginate, but it's not working: https://gist.github.com/robins35/9f1f2174e43d7bff369b
[00:27:10] Scriptonaut: The second file is the output (html)
[00:27:31] Scriptonaut: I want to set the data-anchor attribute, that's what started this
[00:27:41] Radar: Scriptonaut: no idea. My guess is that will_paginate doesn't process nested data attributes like that
[00:27:47] rickmasta: has joined #RubyOnRails
[00:28:00] Radar: Scriptonaut: try :'data-anchor' => "#incomplete-tasks" instead
[00:28:18] Radar: Scriptonaut: my paypal is radarlistener@gmail.com just in case you didn't see it mentioned before
[00:28:47] Scriptonaut: hey thanks that worked :)
[00:28:49] rickmasta: has joined #RubyOnRails
[00:28:54] Scriptonaut: haha, you taking handouts?
[00:29:07] Radar: Scriptonaut: A man's gotta eat.
[00:29:16] Scriptonaut: aren't you rich from writing those rails books?
[00:29:24] Scriptonaut: weren't you the guy that wrote a couple books?
[00:29:37] Scriptonaut: iirc you literally listed how much money you made on your blog ;)
[00:30:00] smathy: slash_nick, chaching is when your caching rubs and causes an irritation?
[00:30:12] Aeyrix: 11:29 AM <Scriptonaut> aren't you rich from writing those rails books?
[00:30:14] Aeyrix: hahahahahahahaah
[00:30:16] Aeyrix: ahahahahahaha
[00:30:24] slash_nick: smathy: it's the sound a cash register makes
[00:30:27] Radar: Scriptonaut: I was about to reply, but Aeyrix did it for me.
[00:30:39] Radar: Scriptonaut: I think the working out for the work on the books comes out to about $4-6/hr.
[00:30:45] smathy: slash_nick, ohhhhh, heh :)
[00:31:00] Scriptonaut: that's not so great
[00:31:08] Radar: Scriptonaut: The money I earned from Rails 3 in Action allowed me to furnish my (then new apartment) and not much else.
[00:31:18] Radar: The money since then has paid for electricity bills and... well, it's nice having it :)
[00:31:20] slash_nick: Meanwhile he also keeps quite a presence, helping folks here...
[00:31:30] Scriptonaut: do you work a normal person job?
[00:31:54] jamto11: has joined #RubyOnRails
[00:32:01] Radar: Scriptonaut: I have to in order to be able to live. I don't make even close to a living wage off writing books and helping people in here.
[00:32:06] smathy: Writing books is a PR exercise, not a "for the money" exercise.
[00:32:11] Radar: what smathy said
[00:32:20] Scriptonaut: well you do help quite a bit in here
[00:32:28] Scriptonaut: hopefully karma treats you nicely
[00:32:34] smathy: ...and because you think the other books are crap and that irks your OCD.
[00:33:01] allcentury: has joined #RubyOnRails
[00:33:03] Radar: Scriptonaut: so far so good :D
[00:35:10] Radar: Alrighty, time to head out for a bit. ttyl.
[00:36:16] Coldblackice: has joined #RubyOnRails
[00:36:37] arooni: has joined #RubyOnRails
[00:37:46] bambanx: slash_nick, you speak spanish?
[00:38:21] yoongkang: has joined #RubyOnRails
[00:39:24] slash_nick: bambanx: not fluently, no
[00:43:53] Scriptonaut: has left #RubyOnRails: ()
[00:43:57] djbkd: has joined #RubyOnRails
[00:44:43] krramos__: has joined #RubyOnRails
[00:50:28] sypheren: has joined #RubyOnRails
[00:50:32] pawnbox: has joined #RubyOnRails
[00:51:44] alex88: has joined #RubyOnRails
[00:54:13] nickenchuggets: has joined #RubyOnRails
[00:54:13] nickenchuggets: has joined #RubyOnRails
[00:55:02] manfrin: has joined #RubyOnRails
[00:55:41] pydave6367: has joined #RubyOnRails
[00:59:37] DLSteve: has joined #RubyOnRails
[01:01:49] nya: has joined #RubyOnRails
[01:06:57] baweaver: has joined #RubyOnRails
[01:07:08] one_zero: has joined #RubyOnRails
[01:07:16] darrencauthon: has joined #RubyOnRails
[01:07:21] htmldrum: has joined #RubyOnRails
[01:09:03] th_masv: has joined #RubyOnRails
[01:10:43] DrShoggoth: has joined #RubyOnRails
[01:11:57] rubyonrailed: has joined #RubyOnRails
[01:12:23] yfeldblum: has joined #RubyOnRails
[01:12:37] s2013: has joined #RubyOnRails
[01:12:44] th_masv: has left #RubyOnRails: ()
[01:13:07] maxzzz: has joined #RubyOnRails
[01:13:56] quazimodo: has joined #RubyOnRails
[01:14:26] sevenseacat: has joined #RubyOnRails
[01:14:27] maxzzz: Hi, I have people in a database. I have an array of names = ["max", "joe"], and 10 people in a database.. whats the best way for me to get a hash of all the names and true/false if they're in the database? so if I supply max/joe and max is in the database but joe isn't, i want to get: { max: true, joe: false }
[01:15:03] maxzzz: I tried using People.exists?(name: ["max", "joe"]), but all it returns is true or false, do I have to do an EXISTS query for each name?
[01:16:20] rhizome: zip the results with the array of names
[01:17:40] maxzzz: hmmm, i don't follow rhizome
[01:17:53] fschuindt: Now codeclimate is blaming the model with a high ABC complexity x.x
[01:18:01] slash_nick: maxzzz: why not Name.where(whatever: ["max", "joe"]).pluck(:whatever).uniq
[01:18:18] slash_nick: it's not a hash... but... i think it'd give you what you'd need to know
[01:18:40] baweaver: has joined #RubyOnRails
[01:18:55] maxzzz: wow nick, thanks... that works a lot
[01:18:57] rromanchuk: has joined #RubyOnRails
[01:19:37] slash_nick: Radar's radarlistener@gmail.com just in case you didn't see it mentioned before
[01:19:49] slash_nick: aw, would've been funnier if i hadn't goofed it up
[01:20:08] slash_nick: his paypal is that
[01:21:19] duncannz: has joined #RubyOnRails
[01:22:59] roxtrongo: has joined #RubyOnRails
[01:23:46] danieldocki: has joined #RubyOnRails
[01:23:51] bruce_lee: has joined #RubyOnRails
[01:25:45] fschuindt: The complexity just jumped from the controller to the model: https://gist.github.com/fschuindt/acff1e5eaaf0d9ec2111
[01:25:55] rromanchuk: has joined #RubyOnRails
[01:26:06] fschuindt: :for_all and :for_range ABC blamed
[01:26:46] fschuindt: I'm going to kill myself
[01:26:57] rhizome: maxzzz: names.zip(User.exists?(names))
[01:26:58] slash_nick: it's the BAC that'll cill you
[01:27:19] baash05: has joined #RubyOnRails
[01:27:20] rhizome: my landlord
[01:27:37] w0rd-driven: has joined #RubyOnRails
[01:27:50] baash05: Hey guys.. anyone know if you can use friendly find to handle wrong case searches?
[01:27:52] slash_nick: rhizome: what if names.length is large? same?
[01:28:04] Radar: fschuindt: no dying please kthx
[01:28:11] slash_nick: baash05: which db do you use?
[01:28:12] Radar: baash05: !explain
[01:28:12] helpa: baash05: Please explain your problem better as we are having trouble understanding what you mean. A Gist (http://gist.github.com) is always helpful!
[01:28:30] slash_nick: (case insensitive search)
[01:28:36] baash05: I have a difficult api user who insists on sending slugs in upper case.. though the api indicates they must be exactly what I send him
[01:28:38] rhizome: 10 people in a database"
[01:28:45] baash05: we've got pg on the back end
[01:29:04] slash_nick: baash05: psql has ilike
[01:29:27] shinnya: has joined #RubyOnRails
[01:29:45] rhizome: downcase all the things
[01:29:50] baash05: Yeah.. I can downcase(slug)
[01:30:04] baash05: before I do the search..
[01:30:30] baash05: but now I'm getting others who are asking me to store the slug in upper case.
[01:30:52] baash05: I know I tried to explain to them how silly that request is.
[01:30:59] rhizome: huh? case sensitive or case insensitive, there is no other
[01:31:29] baash05: I'd like the friendly.find to search case insensitive.
[01:31:37] [SaM]: has joined #RubyOnRails
[01:31:42] quarters: has joined #RubyOnRails
[01:31:52] rhizome: and they're asking for sensitive
[01:32:01] slash_nick: Foo.where("your_field ilike ?", yo_slug)
[01:32:16] baash05: One group is asking for the storage of all new recoreds to be upper
[01:32:19] quarters: hello. I was wondering if rbenv can be used with linux. If not, is there a recommended alternative?
[01:32:37] baash05: But old records have it downcase (as it should be)
[01:32:57] rhizome: what diff do they say it makes?
[01:33:17] baash05: I have no idea... I got tired of arguing how silly it is.
[01:34:02] baash05: And how the slug is not an ID and how the slug is part of the url, and how it should not be used to hold meaningful data, but instead point to a way to get meaningful data.
[01:34:13] rgtk: has joined #RubyOnRails
[01:34:15] FailBit: quarters: yes
[01:34:19] baash05: After a few days explaining, I am just going to do it.
[01:34:24] lemur: has joined #RubyOnRails
[01:34:31] Radar: baash05: Downcase the slugs before they get queried?
[01:34:35] Radar: baash05: This sounds like a controller concern.
[01:34:46] quarters: FailBit: cool. Thank you
[01:34:48] Radar: quarters: What OS exactly? Ubuntu or something else?
[01:34:57] quarters: Radar: arch linux
[01:34:57] rhizome: the request is to store the attr upcased
[01:35:02] baash05: They want the reports the run off the database to report the slug as uppercase
[01:35:07] Radar: quarters: Ok, I'd still recommend to use chruby + ruby-install for that.
[01:35:16] Radar: baash05: Push back. That is unreasonable.
[01:35:24] Radar: Slugs are standardised as lowercase in the system.
[01:35:26] rhizome: baash05: so you can just display it in uppercase without changing anything else?
[01:35:48] rhizome: edit template, done.
[01:35:57] baash05: Nope.. they want the CIO of our clients company to be able to see them as uppercase
[01:36:07] quarters: Radar: thank you
[01:36:11] rhizome: what does that mean
[01:36:24] baash05: "why are these in lowercase?" We should store them in uppercase
[01:36:27] FailBit: I don't think it really matters
[01:36:32] baash05: smack to the head.
[01:36:34] FailBit: chruby / rbenv / whatever
[01:36:42] FailBit: as long as the end result is ruby
[01:37:05] ewnd9: has joined #RubyOnRails
[01:37:36] rromanchuk: has joined #RubyOnRails
[01:37:40] njero: has joined #RubyOnRails
[01:39:05] yoongkang: has joined #RubyOnRails
[01:41:55] wilsonc91: has joined #RubyOnRails
[01:42:39] Rubie: has joined #RubyOnRails
[01:45:37] beauby: has joined #RubyOnRails
[01:45:55] baash05: is there a create_or_find method?
[01:45:57] allcentury: has joined #RubyOnRails
[01:46:05] baash05: on a model?
[01:46:26] sevenseacat: its called find_or_create, but yes
[01:46:27] baash05: Not a find_or_create which does two calls to the db and suffers race conditions
[01:46:43] baash05: but something that does one call to the database and fills in the record
[01:46:54] sevenseacat: err... how would that work
[01:47:40] rhizome: you get a database with find_or_create built-in
[01:47:45] Miron_: has joined #RubyOnRails
[01:48:12] baash05: create where not exist and then find.
[01:48:44] baash05: Still two calls I suppose, but the difference is critical.
[01:49:20] baash05: Here's the create... (contrived)
[01:49:22] baash05: INSERT INTO users (email)
[01:49:22] baash05: SELECT 'smurf@gmail.com'
[01:49:22] baash05: WHERE NOT EXISTS (
[01:49:23] baash05: SELECT * FROM users WHERE email='smurf@gmail.com'
[01:49:23] baash05: ) returning *
[01:49:45] pawnbox: has joined #RubyOnRails
[01:50:31] sevenseacat: didnt know that was possible in sql
[01:50:34] baash05: I was just wondering if there was a method.. I'm about to implement it for myself.. but I'd rather use canned.
[01:50:36] craysiii: has joined #RubyOnRails
[01:51:23] sevenseacat: dear selenium - fucking bite me. love, sevenseacat.
[01:54:36] VeryBewitching: I think that brought a tear to me eye
[01:56:21] davidmst: has joined #RubyOnRails
[01:56:49] davidmst: Hey guys! Hopefully a quick question here
[01:57:25] davidmst: I'm starting to write unit tests for a controller, but `action_name` and `params[:action]` don't seem to be made available to the controller via the tests
[01:57:41] davidmst: Anyone know if this is the expected behaviour (and how to resolve it) or if I'm just doing something wrong
[01:57:48] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[01:57:55] sevenseacat: also, we're not all guys here, just so you know.
[01:58:22] Miron_: has joined #RubyOnRails
[01:59:14] SteenJobs: has joined #RubyOnRails
[01:59:37] davidmst: Sorry about that, friends (gender-neutral!)
[02:00:33] davidmst: SSC, the test file is what is spat out after running rails generate scaffold XYZ
[02:00:48] davidmst: With no changes at all
[02:01:11] sevenseacat: and your error is?
[02:01:23] sevenseacat: i also have no idea what the scaffold generator spits out these days, so
[02:01:39] davidmst: No error as such, but both `action_name` and `params[:action]` are unpopulated/nil
[02:01:48] baash05: I like "mate" dave
[02:01:53] Aeyrix: Step 1: Don't use scaffolds.
[02:02:06] davidmst: Whereas when running the application (ie. ./bin/rails server) both of those are populated as expected
[02:02:22] sevenseacat: ok, so you've made some change because you're referencing them when the code previously wasnt
[02:02:25] tubbo: Aeyrix: that's not step 1
[02:02:28] sevenseacat: so please gist what code you're working with
[02:02:33] sevenseacat: so we can see what you're doing
[02:02:35] gdeglin: has joined #RubyOnRails
[02:02:39] Aeyrix: tubbo: Step 0?
[02:03:13] axl_: has left #RubyOnRails: ()
[02:04:53] Pazician: has joined #RubyOnRails
[02:05:03] davidmst: Will get a gist up shortly!
[02:05:31] gdeglin: Hi all. Are there any common ways to split up the functionality of a large model aside from Concerns? Concerns seem to be best used for sharing logic between models, but I'm more interested in just better organizing functions by their purpose
[02:05:36] sevenseacat: though tbh that behaviour wouldnt surprise me
[02:06:35] sevenseacat: gdeglin: if their purpose isn't 'persisting and managing the attributes of the model' then they're probably in the wrong place.
[02:07:34] darrenca_: has joined #RubyOnRails
[02:08:55] nertzy2: has joined #RubyOnRails
[02:11:28] gdeglin: sevenseacat: What about something like a function that notifies a 3rd party api of an event related to the object represented by the model?
[02:11:41] sevenseacat: definitely not related to the model
[02:11:56] sevenseacat: your models shouldnt be hitting third party APIs
[02:12:00] tubbo: gdeglin: split the model up into more single-responsiblity classes
[02:12:03] tubbo: also what sevenseacat
[02:12:12] tubbo: sorry i've been working for like 14 hours :P
[02:12:29] sevenseacat: if you need to couple hitting an API with changing some data in your model, wrap those calls up together in a service object
[02:14:20] renews: has joined #RubyOnRails
[02:14:20] davidmst: Ughhhh, so I figured out my issue... for whatever reason the test seems to be doubling up on requests on each action
[02:14:37] davidmst: The first request has no action information associated, the second does
[02:15:00] krramos__: has joined #RubyOnRails
[02:15:16] gdeglin: Thanks for the service object suggestion, that definitely looks like a good way to organize some of my code
[02:17:38] hardtail: has joined #RubyOnRails
[02:18:04] bambanx: https://vimeo.com/14984618
[02:23:07] RegulationD: has joined #RubyOnRails
[02:23:16] mary5030: has joined #RubyOnRails
[02:25:26] matthewd: baash05: citext may be relevant to your interests
[02:25:34] renews: has joined #RubyOnRails
[02:25:47] ismaelga: has joined #RubyOnRails
[02:28:24] baash05: What do you mean?
[02:29:06] pawnbox: has joined #RubyOnRails
[02:29:06] baash05: Anyone know where the source code for activerecord::where lives?
[02:29:19] matthewd: baash05: For case insensitive slug lookupery
[02:29:33] matthewd: relation/finders.rb, I think?
[02:29:51] tubbo: lookupery haha
[02:29:59] tubbo: that is what the arel gem should have been called
[02:30:22] LambdaSource: has joined #RubyOnRails
[02:30:40] matthewd: baash05: relation/query_methods.rb
[02:33:30] fedexo: has joined #RubyOnRails
[02:33:48] matthewd: baash05: If you want to normalize something before the 'where' lookup, you might want https://github.com/rails/rails/blob/master/activerecord/lib/active_record/attributes.rb -- secretly usable in 4.2 with some slight naming variations: https://nvisium.com/blog/2015/06/22/using-rails-5-attributes-api-today-in/
[02:34:18] jamto11: has joined #RubyOnRails
[02:34:55] annlewis: has joined #RubyOnRails
[02:35:06] baweaver: has joined #RubyOnRails
[02:35:40] Rubie: has joined #RubyOnRails
[02:36:14] baash05: I was actually thinking of using the arel table generation on a where to figure out what the fields and values are for my insert query.. .
[02:38:41] roxtrongo: has joined #RubyOnRails
[02:39:21] sarink: has joined #RubyOnRails
[02:39:51] baash05: so instead of calling the where, figuring out how it take the args and makes the sql.. then with that mutate the sql it generates to be an insert instead of a select.. Once I have the sql in hand I'd run find_by_sql(sql) || find_by(args)
[02:40:28] baash05: the first find_by_sql would insert the record and return it if created, or nil
[02:40:45] baash05: This would save me from the race conditions.
[02:41:51] koprom: has joined #RubyOnRails
[02:42:36] matthewd: Wouldn't a constraint be easier?
[02:43:04] baash05: What do you mean?
[02:43:49] sevenseacat: so... anyone seen capybara and selenium just not check checkboxes? https://gist.github.com/sevenseacat/0bdd606084685d900f4b https://www.dropbox.com/s/bw61p2emgd6i9jj/checkbox.png?dl=0
[02:43:52] baash05: I like easier
[02:44:38] matthewd: baash05: I guess it depends why you're trying to avoid the race condition
[02:45:10] matthewd: Are you worried about the one request that could theoretically hit a conflict = error, or are you just worried about ensuring your DB remains sane/consistent afterwards?
[02:45:14] baash05: I have an api user that attempts to create the same user three times on three different threads
[02:45:30] pydave6367: has joined #RubyOnRails
[02:45:34] baash05: and I have three servers that are catching these three different api calls
[02:45:34] rhizome: disable the submit button
[02:45:57] baash05: and tada.. I have race..
[02:46:04] baash05: what is a submit button?
[02:46:19] matthewd: A constraint would keep your database consistent (one row), but would mean requests 2 & 3 [could] get errors, instead of just seeing that row
[02:46:31] baash05: Oh.. they are getting errors
[02:46:41] baash05: there is a constraint on the db.
[02:46:42] rhizome: oh, api. use find_or_create to make it idempotent
[02:46:45] matthewd: But even then, you can just rescue the constraint error, re-query because you now know it's there, and continue
[02:46:55] baash05: find or create is two calls to the db.
[02:46:59] baash05: and we are using it.
[02:47:02] rhizome: oh it's you again
[02:47:02] baash05: and it is failing
[02:47:23] Cache_Money: has joined #RubyOnRails
[02:47:44] matthewd: 'insert select' isn't going to be sufficient without holding an exclusive lock on the table, I don't think
[02:47:46] baash05: it's failing in production today.. Which is why I'm working on a work around, that uses the db
[02:48:11] baash05: it will have to hold a lock on the db..
[02:48:13] matthewd: And if you're prepared to take said lock, it seems easiest to just still do the two queries inside it ??\_(???)_/??
[02:48:26] SteenJobs: has joined #RubyOnRails
[02:48:37] baash05: How does one do that?
[02:48:59] matthewd: lock the table, then do find_or_create
[02:49:43] matthewd: tada lock contention instead of race :)
[02:50:26] baash05: Yeah.. but wouldn't that 422 all the same?
[02:50:34] Fire-Dragon-DoL: are there any _more efficient_ way to create 10k records if each is not found? Like if record {X: 1, Y: 2} is found, don't do anything, otherwise create it. Right now I'm looping over an array and running create for each not found
[02:51:09] baash05: Fire-Dragon-DoL: Upsert
[02:51:20] maxx88_: has joined #RubyOnRails
[02:51:21] rhizome: Fire-Dragon-DoL: find_or_create
[02:51:38] Fire-Dragon-DoL: baash05: I don't need to update, upsert doesn't fit
[02:51:59] matthewd: rhizome: That's not more efficient, just less typing :)
[02:52:13] Fire-Dragon-DoL: rhizome: I don't need the "find" part, I mean, I have to discover if it exist, but I don't need to load it in Rails, so I'm using a where clause for the moment
[02:53:12] rhizome: it's efficient enough, 10K isn't that many
[02:53:28] njero: Fire-Dragon-DoL: how about unique constraint with exception catching
[02:53:52] baash05: You could convert the lines into sql where clause and select where not exists.
[02:54:20] baash05: https://github.com/seamusabshere/upsert
[02:54:36] baash05: Even though you don't need to update the records, this could be the fastest way to get it done.
[02:54:42] baash05: I mean code wise.
[02:55:04] baash05: and it wouldn't be changing things if they aren't changed.
[02:55:47] baash05: ps.. don't use find_or_create. it's way to slow.. one record at a time.. Not effecient.
[02:57:53] dopie: has joined #RubyOnRails
[02:58:41] pawnbox: has joined #RubyOnRails
[03:00:09] jaequery: has joined #RubyOnRails
[03:02:32] jaequery: has joined #RubyOnRails
[03:08:32] seank_: has joined #RubyOnRails
[03:09:08] None: has joined #RubyOnRails
[03:11:34] joshkovach: has joined #RubyOnRails
[03:12:00] danieldocki: has joined #RubyOnRails
[03:12:38] joshkovach: has joined #RubyOnRails
[03:13:22] joshkovach: has joined #RubyOnRails
[03:14:24] joshkovach: has joined #RubyOnRails
[03:15:16] xlegoman: has joined #RubyOnRails
[03:16:19] Fire-Dragon-DoL: I was thinking about where.any? (which performs the select but doesn't fetch any column) and then create
[03:16:59] sevenseacat: Fire-Dragon-DoL: or exists?
[03:17:05] ruurd: has joined #RubyOnRails
[03:17:54] rickmasta: has joined #RubyOnRails
[03:18:23] Fire-Dragon-DoL: sevenseacat: yeah something along those lines
[03:18:44] maxx88_: has joined #RubyOnRails
[03:19:25] Uptime: has joined #RubyOnRails
[03:20:52] Axsuul: has joined #RubyOnRails
[03:22:32] moei: has joined #RubyOnRails
[03:22:33] chipotle: has joined #RubyOnRails
[03:26:27] annlewis: has joined #RubyOnRails
[03:28:17] m0nge: has joined #RubyOnRails
[03:28:52] pydave6367: has joined #RubyOnRails
[03:29:33] Ryan1013: has joined #RubyOnRails
[03:30:10] Ryan1013: has left #RubyOnRails: ()
[03:31:10] ruurd: has joined #RubyOnRails
[03:31:45] DLSteve: has joined #RubyOnRails
[03:32:42] None: has joined #RubyOnRails
[03:33:12] gambl0re: has joined #RubyOnRails
[03:33:51] dopie: anyone here ever use RETS gem?
[03:34:58] jamto11: has joined #RubyOnRails
[03:35:05] nertzy2: has joined #RubyOnRails
[03:35:14] rgtk: has joined #RubyOnRails
[03:35:55] baweaver: has joined #RubyOnRails
[03:36:21] gusrub: has joined #RubyOnRails
[03:37:54] pawnbox: has joined #RubyOnRails
[03:38:12] darrencauthon: has joined #RubyOnRails
[03:38:31] owenjones: has joined #RubyOnRails
[03:40:26] rubyonrailed: has joined #RubyOnRails
[03:41:38] baweaver: has joined #RubyOnRails
[03:42:29] Uptime: has joined #RubyOnRails
[03:43:55] eggoez: has joined #RubyOnRails
[03:44:31] lowsider_afk: has left #RubyOnRails: ()
[03:46:06] djbkd: has joined #RubyOnRails
[03:46:45] VeryBewitching: has joined #RubyOnRails
[03:47:47] mary5030: has joined #RubyOnRails
[03:48:58] Hobbes: has joined #RubyOnRails
[03:51:17] sankaber: has joined #RubyOnRails
[03:52:03] Hobbes: has left #RubyOnRails: ()
[03:53:23] The_Phoenix: has joined #RubyOnRails
[03:53:41] rickmasta: has joined #RubyOnRails
[03:53:47] hobbes_78: has joined #RubyOnRails
[03:54:35] hobbes_78: has left #RubyOnRails: ()
[03:58:10] wilsonc91: has joined #RubyOnRails
[03:58:12] ruurd: has joined #RubyOnRails
[03:58:28] hobbes_78: has joined #RubyOnRails
[04:00:42] pydave6367: has joined #RubyOnRails
[04:00:53] Cache_Money: has joined #RubyOnRails
[04:01:32] codelahoma: has joined #RubyOnRails
[04:02:00] rakm: has joined #RubyOnRails
[04:05:40] Pazician: has joined #RubyOnRails
[04:06:32] LambdaSo_: has joined #RubyOnRails
[04:06:35] dopie: has joined #RubyOnRails
[04:08:18] RedDwarf: has joined #RubyOnRails
[04:09:29] roxtrongo: has joined #RubyOnRails
[04:09:47] Guest3421: has joined #RubyOnRails
[04:10:53] ismaelga: has joined #RubyOnRails
[04:11:18] nyaa: has joined #RubyOnRails
[04:11:43] Fire-Dragon-DoL: has joined #RubyOnRails
[04:13:08] braincras: has joined #RubyOnRails
[04:13:47] Guest50: has joined #RubyOnRails
[04:20:29] chouhoul_: has joined #RubyOnRails
[04:21:55] arup_r: has joined #RubyOnRails
[04:25:55] ruurd: has joined #RubyOnRails
[04:26:17] nya: has joined #RubyOnRails
[04:26:47] shinenelson: has joined #RubyOnRails
[04:27:12] annlewis: has joined #RubyOnRails
[04:31:27] pydave6367: has joined #RubyOnRails
[04:32:27] rubyonra_: has joined #RubyOnRails
[04:32:31] lemur: has joined #RubyOnRails
[04:33:40] baweaver_: has joined #RubyOnRails
[04:35:38] nya: has joined #RubyOnRails
[04:37:04] michaeldeol: has joined #RubyOnRails
[04:39:18] workmaster2n: has joined #RubyOnRails
[04:40:57] yoongkang: has joined #RubyOnRails
[04:42:07] arup_r: I want to provide the custom confirm message when deleting for a specific model using i18n. How to write in the en.yml?
[04:42:22] arup_r: http://thelazylog.com/custom-dialog-for-data-confirm-in-rails/ ( while deleting )
[04:42:43] sevenseacat: thats just a string in your view
[04:42:54] sevenseacat: what does your code look like atm?
[04:43:04] bambanx_: has joined #RubyOnRails
[04:43:06] VeryBewitching: arup_r: t('some.key.to.translation') if it's in a view
[04:43:37] arup_r: sevenseacat: = link_to "Delete List", distribution_list_path(@distribution_list), method: :delete, remote: true, class: ['btn', 'btn-danger', 'btn-margin-right'], data: { confirm: "Deleting distribution list is permanent. Are you sure?" }
[04:43:50] arup_r: and it is lot of places.. so I am trying to use i18n
[04:43:52] sevenseacat: so replace that confirm text with a translation
[04:43:59] helpa: http://guides.rubyonrails.org/i18n.html - Guide on i18n by Sven Fuchs and Karel Minařík
[04:44:52] arup_r: I found this http://stackoverflow.com/a/24178853/2767755 but I want it to be model specific. so dunno know how the structure should be
[04:45:08] VeryBewitching: arup_r: It can be whatever you want it to be
[04:45:30] VeryBewitching: I do views.model.<ad-hoc-here>
[04:46:54] ur5us: has joined #RubyOnRails
[04:50:34] nya: has joined #RubyOnRails
[04:50:42] rubyonrailed: has joined #RubyOnRails
[04:52:33] krz: has joined #RubyOnRails
[04:53:27] ruurd: has joined #RubyOnRails
[04:54:17] arup_r: VeryBewitching: views.model means ? I don't get the structure .. how about view_name.key?
[04:54:30] ewnd9: has joined #RubyOnRails
[04:54:34] VeryBewitching: One sec, I'll gist
[04:56:15] VeryBewitching: https://gist.github.com/bewitchingme/40adae0964d3ef130535
[04:56:35] owenjones: has joined #RubyOnRails
[04:57:06] VeryBewitching: There are some trees that ActiveRecord picks up on, see https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/en.yml
[04:58:09] arup_r: VeryBewitching: thank you very much.. full makes sense now
[05:00:06] danieldocki: has joined #RubyOnRails
[05:00:57] arup_r: VeryBewitching: that structure is pretty nice
[05:01:30] VeryBewitching: It's easy to remember ;)
[05:05:35] nya: has joined #RubyOnRails
[05:07:09] trosborn: has joined #RubyOnRails
[05:09:42] michaeldeol: has joined #RubyOnRails
[05:09:54] Cache_Money: has joined #RubyOnRails
[05:10:00] hahuang65: has joined #RubyOnRails
[05:12:45] freezevee: has joined #RubyOnRails
[05:13:01] pawnbox: has joined #RubyOnRails
[05:15:43] hahuang65: has joined #RubyOnRails
[05:15:51] juddey: has joined #RubyOnRails
[05:19:08] tubbo: i18n is one of my fav parts of rials
[05:19:36] safety_cut: has joined #RubyOnRails
[05:19:51] VeryBewitching: I like that RubyMine interpolates the values in the IDE
[05:19:59] VeryBewitching: Makes reading views really stupid easy
[05:20:33] nya: has joined #RubyOnRails
[05:21:07] safety_c_: has joined #RubyOnRails
[05:22:36] Jasaka: has joined #RubyOnRails
[05:22:52] nya: has joined #RubyOnRails
[05:23:10] VeryBewitching: https://dl.dropboxusercontent.com/u/1422687/rm_i18n_interpolate.png
[05:26:23] trosborn: has joined #RubyOnRails
[05:26:30] gusrub: has joined #RubyOnRails
[05:27:56] Jasaka|NA: has joined #RubyOnRails
[05:27:57] annlewis: has joined #RubyOnRails
[05:29:07] nya: has joined #RubyOnRails
[05:30:17] rromanchuk: has joined #RubyOnRails
[05:30:49] rromanch_: has joined #RubyOnRails
[05:32:38] yfeldblum: has joined #RubyOnRails
[05:34:39] BogdanB: has joined #RubyOnRails
[05:35:18] nyaa: has joined #RubyOnRails
[05:35:28] axl_: has joined #RubyOnRails
[05:36:01] rgtk: has joined #RubyOnRails
[05:36:16] djbkd: has joined #RubyOnRails
[05:36:36] jamto11: has joined #RubyOnRails
[05:37:03] axl_: has left #RubyOnRails: ()
[05:37:31] BogdanB: has left #RubyOnRails: ()
[05:38:23] Guest50: has joined #RubyOnRails
[05:39:08] draig: has joined #RubyOnRails
[05:39:49] yfeldblum: has joined #RubyOnRails
[05:42:43] BogdanB: has joined #RubyOnRails
[05:45:17] pawnbox_: has joined #RubyOnRails
[05:46:24] chouhoulis: has joined #RubyOnRails
[05:47:57] yfeldblum: has joined #RubyOnRails
[05:48:03] Mia: has joined #RubyOnRails
[05:48:03] Mia: has joined #RubyOnRails
[05:50:35] Miron_: has joined #RubyOnRails
[05:50:55] BogdanB: Hi all, I'm a photographer that has been learning basics of coding for the past month and a half. I want to rebuild my website and possibly to make a cms for it. Is it ruby the right path?
[05:51:14] sevenseacat: there is no right or wrong path
[05:51:57] BogdanB: i was hoping for an easy path and one that is suitable for this type of website
[05:52:26] sevenseacat: well if you want an easy path, install wordpress
[05:52:34] sevenseacat: don't build your own CMS
[05:52:42] BogdanB: someone did that and I payed for
[05:53:01] BogdanB: I think the question is different
[05:53:04] sevenseacat: *shrug* then you might have to be a bit more specific about your requirements
[05:53:05] njero: has joined #RubyOnRails
[05:53:09] creature: If your goal is "I want a portfolio", rather than "I want to learn some coding", then consider Squarespace.
[05:53:17] sevenseacat: instead of just 'i want to build a website'
[05:53:20] krramos__: has joined #RubyOnRails
[05:53:27] BogdanB: i want to build my portfolio
[05:53:46] gambl0re: where are all my aussie brothers and sisters??..
[05:55:30] BogdanB: I hate going thru templates. I actually managed to write some stuff with html, css and js
[05:56:55] sevenseacat: how is your CMS going to work if it doesnt use templates?
[05:57:42] BogdanB: I have translated an Illustrator design into a page with a toggle menu
[05:58:07] chipotle: has joined #RubyOnRails
[05:58:41] BogdanB: all this started when I tried to rebuild it using wix and stumbled upon a limitation, and yes a stupid wordpress issue that I can't solve on the existing one
[05:58:57] codezomb: has joined #RubyOnRails
[05:59:12] baash05: has joined #RubyOnRails
[05:59:40] baash05: Hey all.. anyone have a hard time installing nokogiri recently?
[05:59:55] helpa: Nope. No one. Ever. In the history of the world.
[06:00:03] BogdanB: the issue my menu has 2 steps and on wix I had only one submenu option
[06:00:18] baash05: II did put recently.. I suppose that's subjective
[06:00:21] sevenseacat: wix uses wordpress? nice.
[06:00:29] baash05: I'm running against this error.
[06:00:31] baash05: libxml2 version 2.6.21 or later is required!
[06:00:51] BogdanB: I tried wix by myself
[06:00:59] baash05: However I'm running 2.9.2.4
[06:01:00] sevenseacat: then how did you have a... never mind
[06:01:20] sevenseacat: baash05: !debug
[06:01:20] helpa: baash05: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[06:01:23] baash05: I did a prestine
[06:01:25] BogdanB: my website: http://www.bogdanbordeianu.ro
[06:01:30] BogdanB: now on wordpress
[06:01:54] BogdanB: the copyleft link at the bottom refuses to work
[06:02:01] baash05: I am attempting to get this gem install nokogiri -v 1.6.6.2 -- --use-system-libraries
[06:02:23] baash05: I encounter an error
[06:02:25] baash05: Building nokogiri using system libraries.
[06:02:25] baash05: libxml2 version 2.6.21 or later is required!
[06:02:31] StaticVoid: has joined #RubyOnRails
[06:02:55] sevenseacat: your system libraries are probably in a place it cant find. i wouldnt bother using them, tbh.
[06:03:01] sevenseacat: nokogiri bundles itself with what it needs to ork
[06:03:11] sevenseacat: BogdanB: !rule12
[06:03:11] helpa: BogdanB: Do not PM members of the channel without first asking if that is OK.
[06:03:27] BogdanB: I just asked in the pm
[06:03:38] sevenseacat: BogdanB: if you want help building a rails app, we can help you. a bunch of this other stuff doesnt really matter.
[06:03:55] BogdanB: is a website an app?
[06:03:57] sevenseacat: we can't tell you why your wix site had a limitation or why your wordpress links don't work
[06:04:06] baash05: without the system libs
[06:04:08] baash05: checking for gzdopen() in -lz... no
[06:04:09] baash05: zlib is missing; necessary for building libxml2
[06:04:17] sevenseacat: baash05: install zlib?
[06:05:13] baash05: Package zlib-1.2.8-7.fc22.x86_64 is already installed, skipping.
[06:05:14] baash05: Package zlib-1.2.8-7.fc22.i686 is already installed, skipping.
[06:05:46] sevenseacat: you need the devel packages.
[06:05:56] sevenseacat: you always need the devel packages for compiling against.
[06:06:29] Pazician: has joined #RubyOnRails
[06:06:50] baash05: Package zlib-devel-1.2.8-7.fc22.i686 is already installed, skipping.
[06:07:12] rvanlieshout: has joined #RubyOnRails
[06:07:51] BogdanB: @sevenseacat I get that with rails you build apps, but what I want is a simple website with a great cms that would allow me to arrange the thumbnails like I would arrange images in Illustrator whenever I upload a new project
[06:08:01] sevenseacat: BogdanB: great. install wordpress.
[06:08:15] BogdanB: doesn't do what I need
[06:08:49] BogdanB: evwry time I upload I have to find a file modify the thumbnail size etc
[06:08:50] rvanlieshout: there is no such thing as a 'great cms'
[06:08:59] spijet_: has joined #RubyOnRails
[06:09:02] sevenseacat: you're never going to find a prebuilt CMS that lets you design things like in illustrator.
[06:09:02] quarters: has joined #RubyOnRails
[06:09:13] doge__: Haven't you heard of drupal?
[06:09:23] BogdanB: should I use rails to make one?
[06:09:30] BogdanB: in 2 years time
[06:09:53] baash05: though it will only be great for you :)
[06:10:15] roxtrongo: has joined #RubyOnRails
[06:10:20] sevenseacat: sure. have fun :)
[06:10:36] baash05: More thoughts on nokogiri?
[06:10:40] quarters: I was trying to install chruby but am not sure how to run it. It looks like it's installed but typing "chruby" doesn't do anything
[06:10:44] BogdanB: I'll look into drupal
[06:10:45] sevenseacat: baash05: !debug
[06:10:45] helpa: baash05: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[06:11:06] sevenseacat: quarters: did you reload your shell after installing it?
[06:11:25] baash05: What do you mean more info?
[06:11:43] quarters: sevenseacat: would that involve logging out of my DE?
[06:11:49] quarters: or just completely rebooting
[06:11:57] sevenseacat: quarters: no, it involves reopening your terminal.
[06:12:02] quarters: I tried opening a new terminal session
[06:12:20] quarters: yes, I did try reopening my terminal
[06:12:23] baash05: I'm still getting checking for gzdopen() in -lz... no
[06:12:23] baash05: zlib is missing; necessary for building libxml2
[06:12:28] sevenseacat: did you install it correctly and source it and everything?
[06:13:01] quarters: sevenseacat: I guess that's what I'm wondering. My package manager shows it to be installed. I haven't done much configuring after installation though
[06:13:07] quarters: I don't know what sourcing it is
[06:13:24] sevenseacat: ...package manager?
[06:13:28] matthewd: baash05: You have x86_64 *and* i686 packages installed?
[06:14:36] spijet_: Hi guys! I have a question regarding Rails forms and AJAX. At the moment I have a text_field_tag to which the user enters a CIDR notation of a network ("192.168.1.0/30" for example). This notation is then passed to a controller's "ipscan" action as params[:subnet]. The output (at the moment) is a ruby array of usable ip addresses (given as strings). How can I change select field's options to this array's
[06:14:38] quarters: sevenseacat: pacman in arch linux
[06:14:48] sevenseacat: spijet_: !guys
[06:14:48] helpa: spijet_: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[06:15:04] sevenseacat: quarters: uninstall that, and install it using the instructions here: https://github.com/postmodern/chruby/
[06:15:17] baash05: matthewd: It looks like it..
[06:15:19] NBarnes: has joined #RubyOnRails
[06:15:34] baash05: Not sure how that happened.. I didn't stipulate which one to install.
[06:15:45] spijet_: sevenseacat: Sorry, I thought that sometimes "guys" could be non-gender-specific in English internets (I'm from Russia). :(
[06:15:55] sevenseacat: it's not, but now you know for next time :)
[06:16:13] matthewd: baash05: Which arch are you actually running? Do you have the devel package for that one?
[06:16:37] spijet_: sevenseacat: Yeah, thanks for clearing this out for me. :)
[06:16:47] matthewd: ACTION may be about to demonstrate that for a Red Hat employee, his knowledge of rpm is... limited.
[06:17:11] baash05: matthewd: I'm on F22
[06:17:11] jaequery: has joined #RubyOnRails
[06:18:14] matthewd: That's not an architecture. What's `uname -i`?
[06:18:53] baash05: sorry.. x86_64
[06:18:55] rubyonrailed: has joined #RubyOnRails
[06:19:02] baash05: arch.. threw me
[06:19:21] matthewd: Ah, yep, sorry. Yay ambiguity :)
[06:19:38] matthewd: So it sounds like you still need zlib-devel for x86_64
[06:19:39] baash05: macbook pro. 4 months old
[06:20:23] baash05: cool.. noob question.. since dnf install didn't grab the right version, how do I grab the right version
[06:20:41] sevenseacat: yeah they only mentioned having the i686 version of the devel package above
[06:21:34] matthewd: baash05: .. and we've hit the limit of my rpm knowledge :/
[06:21:44] matthewd: baash05: To the Googles? ??\_(???)_/??
[06:21:58] VeryBewitching: Shouldn't yum figure that crap out?
[06:22:11] dhjondoh: has joined #RubyOnRails
[06:22:15] baash05: it should..
[06:22:31] baash05: or well dnf should (does)
[06:22:39] VeryBewitching: So Fedora is still lulz, good to know
[06:22:47] baash05: but still I'm left with no nokogiri
[06:23:03] VeryBewitching: Download it and compile from source.
[06:23:34] baash05: crap bit is, It was up and running until I hit prestine
[06:23:50] corioliss: has joined #RubyOnRails
[06:24:15] sevenseacat: never had a problem getting rails up and running on fedora - i wrote about doing it for rails 4 in action
[06:24:24] sevenseacat: though it wasnt fc22 at the time i dont believe *checks
[06:24:48] sevenseacat: yeah i used fc21
[06:24:50] raunicolae: has joined #RubyOnRails
[06:24:52] baash05: I too have had a good time of it..
[06:25:06] baash05: Though I did write a gist for myself.
[06:25:08] baash05: https://gist.github.com/baash05/28477f4d0eca2eff7d7c
[06:25:15] spijet_: I uploaded my app to GitHub: https://github.com/spijet/irk-slick.
[06:25:17] VeryBewitching: baash05: It's not too much of a road block, if you know the library and the version number you need, grabbing the source and compiling it should only take about 20 minutes, depending on the system.
[06:25:49] sevenseacat: ruby and rails from yum ;_; yeah good luck
[06:26:00] baash05: Sure.. but there were a few if's in there.
[06:26:05] spijet_: baash05: maybe you should try rvm?
[06:26:07] VeryBewitching: sevenseacat: I meant his missing dep for nokogiri
[06:26:30] sevenseacat: ACTION stays far away from that shit
[06:26:42] rhizome: like libxml2-dev
[06:26:46] matthewd: baash05: So have you managed to install the right devel package now?
[06:28:35] baash05: I don't know what you mean.. How would I install the right dev package?
[06:28:35] dopie: = f.time_select :time, placeholder: "Time", class: "full-width text-center", ampm: true giives me a the range from 12am to 11pm but when i view it my index page it shows it off an example of 19:07 PM instead of 7:07 PM
[06:28:35] dopie: how can i fix this?
[06:29:00] baash05: I think I'm a bit lost.
[06:29:04] annlewis: has joined #RubyOnRails
[06:29:07] spijet_: dopie: probably with time format strings or something
[06:29:15] matthewd: baash05: Do you understand what you're missing?
[06:29:39] VeryBewitching: dopie: http://brendankemp.com/essays/handling-time-zones-in-rails/
[06:30:14] baash05: Sorry.. Nope.. Just that I'm missing the dev for zlib
[06:30:39] baash05: but you say I should have an 64 and that's not what I got.
[06:31:03] Spami: has joined #RubyOnRails
[06:31:21] matthewd: Sounds like something in the vicinity of `dnf install zlib-devel.x86_64` might do a thing?
[06:31:51] kp666: has joined #RubyOnRails
[06:32:04] matthewd: (though I really don't know why it would be defaulting to a different architecture in the first place)
[06:32:19] baash05: that seemed to do something nice.
[06:32:44] baash05: Woot Woot woot.
[06:32:53] baash05: matthewd: That did it.
[06:32:55] matthewd: This may be why nokogiri wasn't happy with your system libxml etc, btw
[06:32:58] baash05: after I ran that.
[06:33:15] baash05: gem install nokogiri -v 1.6.6.2 Worked perfectly
[06:33:38] baash05: and bundle install worked.
[06:33:58] matthewd: baash05: And now we back away slowly ;)
[06:34:14] krramos__: has joined #RubyOnRails
[06:34:54] baash05: Now I note that dnf in my gist.
[06:34:55] VeryBewitching: ACTION pets apt-get
[06:35:11] baash05: and do a very quite bundle update
[06:36:40] dopie: VeryBewitching, thanks
[06:36:52] dopie: also... is there a way with time_select to select a different time zone?
[06:37:17] jamto11: has joined #RubyOnRails
[06:38:04] VeryBewitching: dopie: I usually operate with the user in their time and save their TZ info with the user model.
[06:38:21] None: has joined #RubyOnRails
[06:38:36] VeryBewitching: Unless there was some particular reason as to why they would be roaming between time zones frequently.
[06:38:36] dopie: VeryBewitching, just that client needs different timezones for his events
[06:38:49] dopie: yep he does
[06:39:34] Miron: has joined #RubyOnRails
[06:40:14] rhizome: will those times need to be compared to times in other time zones?
[06:40:53] VeryBewitching: OK, ActiveSupport::TimeZone.all is how you'd get a list. Check out https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime too
[06:41:54] VeryBewitching: rhizome's question is one to consider too.
[06:42:25] yoongkang: has joined #RubyOnRails
[06:44:03] spijet_: I sorted my question out by generating a "<select><option....." string in the controller and then render plain: output it to AJAX response. After that, $('#pe_addr').html(output). :)
[06:45:54] spijet_: This is awfully hacky, I know. D:
[06:46:06] rafaelfranca: has joined #RubyOnRails
[06:47:38] chouhoulis: has joined #RubyOnRails
[06:48:15] danieldocki: has joined #RubyOnRails
[06:48:35] norc: has joined #RubyOnRails
[06:49:00] arup_r: say, I have @users = User.all_users where all_users is a scope,. Can I unscope it later ?
[06:49:16] arup_r: and add a new scope in the chain
[06:49:40] mloy: has joined #RubyOnRails
[06:50:02] tagrudev: has joined #RubyOnRails
[06:51:01] matthewd: arup_r: There are some limited methods of removing conditions from the scope.. but in general it suggests you're doing something you shouldn't be
[06:52:20] arup_r: ok.. fine. Then can I do something like say inside my index action @users = User.scope # which will give a empty scope which is chainable.. later I will call on it correct scope as I need
[06:53:00] Guest50: has joined #RubyOnRails
[06:53:31] norc: arup_r: It looks like you could do something http://api.rubyonrails.org/classes/ActiveRecord/Relation.html#method-i-scoping
[06:53:53] arup_r: found http://api.rubyonrails.org/classes/ActiveRecord/Associations/CollectionProxy.html#method-i-scope .. but it is giving argument error if I call User.scope
[06:54:15] AnhMV: has joined #RubyOnRails
[06:54:32] arup_r: oh yeah, let me try. I used the one just above of it
[06:54:42] crdpink2: has joined #RubyOnRails
[06:54:57] norc: arup_r: I meant if you look at the implementation there.
[06:56:38] arup_r: what is @association
[06:57:25] norc: arup_r: Sorry that was a mispaste actually
[06:57:31] Miron_: has joined #RubyOnRails
[06:57:53] SalexW: has joined #RubyOnRails
[06:58:03] norc: arup_r: Look at the next method #scoping
[06:58:25] sevenseacat: mis...paste...
[06:59:01] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[06:59:27] arup_r: main idea is. If you have @users = User.all .. and inside a view, can you remove the `.all` and add a scope on @users ?
[07:00:01] arup_r: I can't do User.scope or User.scoping or User.all.scoping .. if I could do, all problem is probably solved
[07:00:19] norc: arup_r: Nevermind what I said.
[07:00:19] sevenseacat: @users.your_scope_name_here ?
[07:00:22] arup_r: User.all.scoping makes no sense.. avoid it
[07:01:11] juddey: has joined #RubyOnRails
[07:02:05] AzaToth: has joined #RubyOnRails
[07:03:11] arup_r: sevenseacat: yes.. I didn't think that.. I thought I can't add scope after that .all :D
[07:03:16] krz: has joined #RubyOnRails
[07:03:29] sevenseacat: in rails 4, .all is lazy loaded so yes, you can continue chaining onto it
[07:03:41] arup_r: I saw some where in some gem they used a method `scoped`.. but that is no Rails core I see.. :)
[07:03:50] jessemcgilallen: has joined #RubyOnRails
[07:03:55] arup_r: yes,, that is a new addition to me
[07:03:58] arup_r: thanks again
[07:04:08] sevenseacat: thats rails 3
[07:05:48] alaing: has joined #RubyOnRails
[07:06:14] lele: has joined #RubyOnRails
[07:06:28] alaing: good morning how do i convert a cucumber example table value before it looks for a definition?
[07:06:41] arBmind: has joined #RubyOnRails
[07:06:46] alaing: my cucumber step is "And I have 1 "#{state}" claims"
[07:07:49] alaing: sorry that was my definition
[07:07:55] alaing: this is my step Given(/^I have (\d+) "(.*?)" claims$/) do |number,state|
[07:09:16] NaN: has joined #RubyOnRails
[07:10:28] norc: Anyone here who speaks Japanese to quickly summarize a rails article that google translate just fails to translate=
[07:11:58] AnhMV: has joined #RubyOnRails
[07:12:14] emilkarl: has joined #RubyOnRails
[07:12:43] rvanlieshout: there is no en equivalent?
[07:12:50] jessemcgilallen: has joined #RubyOnRails
[07:13:19] ivanyk: has joined #RubyOnRails
[07:14:31] Pazician: has joined #RubyOnRails
[07:14:40] norc: rvanlieshout: Honestly I haven't had much faith in Japanese translation tools.
[07:16:42] DoubleMalt: has joined #RubyOnRails
[07:19:45] arBmind1: has joined #RubyOnRails
[07:29:50] annlewis: has joined #RubyOnRails
[07:33:00] sinkensabe: has joined #RubyOnRails
[07:35:08] darutoko: has joined #RubyOnRails
[07:35:34] ewnd9: has joined #RubyOnRails
[07:37:00] rgtk: has joined #RubyOnRails
[07:37:22] tetraktys: has joined #RubyOnRails
[07:37:28] ss_much: has joined #RubyOnRails
[07:38:05] jamto11: has joined #RubyOnRails
[07:38:59] _djbkd: has joined #RubyOnRails
[07:40:31] defsdoor: has joined #RubyOnRails
[07:42:37] ewnd9: has joined #RubyOnRails
[07:43:07] Miron: has joined #RubyOnRails
[07:43:40] yoongkang: has joined #RubyOnRails
[07:44:39] gremly: has joined #RubyOnRails
[07:44:47] Miro___: has joined #RubyOnRails
[07:48:27] chouhoulis: has joined #RubyOnRails
[07:53:23] cgfbee: has joined #RubyOnRails
[07:53:52] emilkarl: has joined #RubyOnRails
[07:56:29] sdwrage: has joined #RubyOnRails
[07:57:17] ibouvousaime: has joined #RubyOnRails
[07:58:41] RegulationD: has joined #RubyOnRails
[08:00:48] xlegoman: has joined #RubyOnRails
[08:01:10] krz: has joined #RubyOnRails
[08:01:32] aganov: has joined #RubyOnRails
[08:01:47] quazimodo: has joined #RubyOnRails
[08:03:11] comrad: has joined #RubyOnRails
[08:06:42] tvw: has joined #RubyOnRails
[08:10:57] roxtrongo: has joined #RubyOnRails
[08:13:18] rromanch_: has joined #RubyOnRails
[08:13:19] rromanch_: has joined #RubyOnRails
[08:14:10] srinidhi: has joined #RubyOnRails
[08:14:17] Rubie: has joined #RubyOnRails
[08:15:42] apotry: has joined #RubyOnRails
[08:15:54] krz: params[:sort] returns 'name,age'. with params[:sort].split(',').each { |field| puts field }. why does puts field return an enumerator?
[08:16:06] krz: this is in a controller btw
[08:17:21] krz: gah nvm
[08:17:33] krz: figured it out
[08:19:17] freezevee: has joined #RubyOnRails
[08:20:03] Palsson: has joined #RubyOnRails
[08:20:23] build22: has joined #RubyOnRails
[08:20:25] marr: has joined #RubyOnRails
[08:20:44] armyriad: has joined #RubyOnRails
[08:20:57] rvanlieshout: krz: puts field doesn't return an enumerator
[08:21:13] nickenchuggets: has joined #RubyOnRails
[08:24:16] yoongkang: has joined #RubyOnRails
[08:25:36] neanderslob: has joined #RubyOnRails
[08:26:00] The_Phoenix: has joined #RubyOnRails
[08:26:03] quazimodo: has joined #RubyOnRails
[08:26:43] norc: I am sharing a table with another application that does not use a sequence/trigger mechanism to set the ID of the table. So I am forced to do SELECT MAX(id) FROM table and set my ID manually.
[08:26:50] trosborn: has joined #RubyOnRails
[08:27:07] norc: So I was thinking of locking the table in question in SHARE in before_create, get that ID and set my attribute id in the model
[08:27:11] norc: then release the lock in after_save
[08:27:18] norc: Any opinions?
[08:28:06] jto: has joined #RubyOnRails
[08:29:22] rvanlieshout: opinion: add the sequencething
[08:30:19] bmalum: has joined #RubyOnRails
[08:30:36] jto: hi all! I have a index.jst.eco.erb template which is localized. However, this file is cached and previous language is used. It seems that Rails.cache.clear does not clear javascript templates. Any idea how to clear cached file?
[08:30:37] annlewis: has joined #RubyOnRails
[08:30:39] matthewd: norc: A share lock isn't sufficient, because it's.. well.. shared
[08:31:06] vasilakisFiL: has joined #RubyOnRails
[08:34:57] norc: matthewd: Good point. SHARE ROW EXCLUSIVE. :-)
[08:36:28] danieldocki: has joined #RubyOnRails
[08:36:30] vasilakisFiL: has joined #RubyOnRails
[08:37:53] chipotle: has joined #RubyOnRails
[08:41:03] ewnd9: has joined #RubyOnRails
[08:42:08] artto: has joined #RubyOnRails
[08:42:43] benlieb: has joined #RubyOnRails
[08:43:02] norc: matthewd: Or actually I think SHARE is enough
[08:43:10] norc: because there cannot be concurrent updates while the SHARE lock is held.
[08:43:19] norc: Which is what I need for the select max(id)
[08:43:42] matthewd: But two processes can do max(id) at the same time, then both go to insert
[08:43:53] None: has joined #RubyOnRails
[08:44:42] matthewd: I guess that'd "just" deadlock on the lock upgrade, but still probably not what you want :)
[08:47:27] yfeldblum: has joined #RubyOnRails
[08:48:35] mentero: has joined #RubyOnRails
[08:49:06] chouhoulis: has joined #RubyOnRails
[08:51:51] norc: matthewd: Good point I suppose. :)
[08:52:03] teclator: has joined #RubyOnRails
[08:52:41] lipoqil: has joined #RubyOnRails
[08:55:11] adac: has joined #RubyOnRails
[08:58:57] Gustavo: has joined #RubyOnRails
[08:59:33] matthewd: You're also limited by how effectively your "partner" application is handling its half of the locking
[08:59:52] matthewd: Given you have the "not using sequences" problem in the first place, I'm not sure I like your chances :|
[09:00:44] trosborn: has joined #RubyOnRails
[09:08:49] krz: has joined #RubyOnRails
[09:10:27] pawnbox: has joined #RubyOnRails
[09:10:46] arBmind: has joined #RubyOnRails
[09:11:43] roxtrongo: has joined #RubyOnRails
[09:12:20] FunkyJunky: has joined #RubyOnRails
[09:13:30] Fery: has joined #RubyOnRails
[09:13:54] Rikle_S: has joined #RubyOnRails
[09:14:06] Ergo: has joined #RubyOnRails
[09:14:23] chipotle: has joined #RubyOnRails
[09:14:54] norc: matthewd: I know for a fact that it doesn't do any locking, so it is a race condition.
[09:15:02] norc: But at least the finger wont be pointed at me when things go wrong.
[09:15:31] jsrn_: has joined #RubyOnRails
[09:17:00] agit0: has joined #RubyOnRails
[09:17:01] Rikle_S: I'm considering swithing from php (laravel) to ruby (ROR) and I'm wondering if rails has a built in feature like so : http://laravel.com/docs/5.1/validation#form-request-validation
[09:17:16] juddey: has joined #RubyOnRails
[09:17:58] Rikle_S: Actually, nothing in the controller method is executed until validation rules are not true, definding by the injected class
[09:18:00] norc: Rikle_S: It pretty much works out of the box with everything that scaffold_generators do.
[09:18:18] annlewis: has joined #RubyOnRails
[09:18:25] matthewd: norc: I wonder if you could use an insert trigger to bump the sequence -- that'd allow your app to be "normal"
[09:18:38] krramos__: has joined #RubyOnRails
[09:19:16] norc: matthewd: Already tried a bunch of trigger hacks, the application is sanity resistant unfortunately.
[09:20:12] Rikle_S: norc: I don't see any request validator when I use scaffolding
[09:20:29] norc: Rikle_S: Just add the validation to your model. :)
[09:20:31] rubyonrailed: has joined #RubyOnRails
[09:21:50] jetpackjoe: has joined #RubyOnRails
[09:22:09] norc: Rikle_S: http://guides.rubyonrails.org/active_record_validations.html
[09:22:52] ibouvousaime: has joined #RubyOnRails
[09:23:02] Rikle_S: norc: it's not exactly the same
[09:23:08] norc: matthewd: I mean my app cannot behave "normally" because the table is hidden behind views, which makes it impossible for the oracle adapter to guess the sequence.
[09:23:41] Rikle_S: norc: imagine I need to make stuff that don't directly interact with a model
[09:24:05] Rikle_S: some part of my controller method will be executed
[09:24:17] Rikle_S: I want to prevent this
[09:24:33] jetpackjoe: there wouldn't be anyone familar with mongoid/MongoDB here by any chance?
[09:24:38] richb__: has joined #RubyOnRails
[09:24:54] matthewd: Rikle_S: No, Rails doesn't have an exact match for that; you'd have to do the check yourself in a before_action or something
[09:25:25] norc: Rikle_S: The point is, the validation occurs during an action in a controller. It cannot happen before that, because there is no before.
[09:25:34] matthewd: norc: Sounds like fun indeed
[09:26:18] norc: matthewd: It is fine though, I have plugged all the glue and hackery into a concern. My models are none the wiser. :-)
[09:26:19] dramagods: has joined #RubyOnRails
[09:26:32] dideler: has joined #RubyOnRails
[09:27:01] skiz: has joined #RubyOnRails
[09:27:08] norc: Rikle_S: AR just provides a framework to validate things on the model. There is also other validations commonly happening in the controller:
[09:27:10] norc: Strong Parameters.
[09:27:29] norc: Or authentication. Authorization. All of that happens in the controller.
[09:27:39] roshanavand: has joined #RubyOnRails
[09:27:40] xlegoman: has joined #RubyOnRails
[09:30:26] roshanavand: Hey guys, can anyone give a link to selenium/rails best practices? I'm gonna read a bit more before I start using selenium
[09:34:16] ziyadb: has joined #RubyOnRails
[09:37:49] rgtk: has joined #RubyOnRails
[09:38:48] trosborn: has joined #RubyOnRails
[09:41:05] djbkd: has joined #RubyOnRails
[09:42:10] jas02: has left #RubyOnRails: ()
[09:42:25] dramagods: has joined #RubyOnRails
[09:44:55] n1ck7: has joined #RubyOnRails
[09:45:55] toomus: has joined #RubyOnRails
[09:46:00] dramagods: has joined #RubyOnRails
[09:46:00] NBarnes: has joined #RubyOnRails
[09:47:07] toomus: Why i can't do string interpolation with '?' in find_by_sql() method?
[09:49:24] rvanlieshout: toomus: because that method doesn't support that
[09:49:30] rvanlieshout: a) because you mostly don't need find_by_sql
[09:49:51] chouhoulis: has joined #RubyOnRails
[09:50:01] rvanlieshout: b) http://api.rubyonrails.org/classes/ActiveRecord/Sanitization/ClassMethods.html
[09:50:13] toomus: rvanlieshout: I have some problem, where I need to get 'groupwise max'
[09:50:25] jetpackjoe: has joined #RubyOnRails
[09:50:40] toomus: rvanlieshout: I can't find other way in RoR to do that
[09:51:31] matthewd: http://api.rubyonrails.org/classes/ActiveRecord/Calculations.html#method-i-maximum ?
[09:52:01] rgtk: has joined #RubyOnRails
[09:53:50] pramodas23: has joined #RubyOnRails
[09:53:59] toomus: rvanlieshout: I have comment table, each user of course can have multiple comments for post. And I need to get list of unique comments authors, but each record must have reference to latest comment of this user.
[09:54:32] rvanlieshout: toomus: what would the query be?
[09:54:53] htmldrum: has joined #RubyOnRails
[09:54:54] Megamos: has joined #RubyOnRails
[09:55:00] toomus: rvanlieshout: so results must be grouped by user_id. But the problem is, that GROUP BY returns first maching record
[09:55:28] toomus: rvanlieshout: But first maching record is first comment of each user
[09:55:47] toomus: rvanlieshout: and you can't sort table before GROUP BY
[09:55:54] rvanlieshout: you can if you subselect it
[09:55:59] toomus: rvanlieshout: so there must be nested query
[09:56:06] rvanlieshout: and order by is executed before group
[09:57:31] matthewd: User.joins(:comments).order('users.id', 'comments.created_at DESC').select('DISTINCT ON (users.id) users.*, comments.id AS latest_comment_id')
[09:57:56] rvanlieshout: and what exactly do you want?
[09:57:58] Rikle_S: matthewd & norc pretty sad. It's very useful to separate logic
[09:58:11] toomus: rvanlieshout: simplest solution I found is: SELECT * FROM (SELECT * FROM my_table WHERE post_id=10 ORDER BY updated_at DESC) GROUP BY user_id
[09:58:25] norc: Rikle_S: What do you mean?
[09:58:52] Rikle_S: I only code services in my controllers, and I like when they are only executed when request is ok
[09:59:02] rvanlieshout: and it's possibel to create subqueries with arel
[09:59:10] andrewvos: has joined #RubyOnRails
[09:59:31] Scripore: has joined #RubyOnRails
[09:59:35] norc: Rikle_S: In Rails the controller is what takes your HTTP request based on routing.
[09:59:41] pawnbox: has joined #RubyOnRails
[09:59:47] matthewd: Rikle_S: Make a gem that implements it? ??\_(???)_/??
[09:59:57] norc: Rikle_S: There just is no code in between.
[10:00:26] rodfersou: has joined #RubyOnRails
[10:00:30] norc: Rikle_S: You seem to have a very different concept of what a "controller" is, and expect Rails controllers to behave the same.
[10:01:05] Megamos: has joined #RubyOnRails
[10:01:57] rvanlieshout: toomus: so could you please explain what you want to get once more? just in english
[10:02:01] matthewd: toomus: Oh, you might want that to be a left join, depending on whether you want users with no comments
[10:02:14] norc: Rikle_S: Rails does exactly what you want, you just want it to be called differently.
[10:02:17] matthewd: toomus: But otherwise, I think the above might do what you want
[10:03:10] matthewd: norc: I'm not sure that's true... it sounds like strong-params-with-type/format-enforcement, which just isn't a thing we do
[10:04:03] Luis__: has joined #RubyOnRails
[10:04:33] TPBallbag: has joined #RubyOnRails
[10:04:42] toomus: rvanlieshout: OK :) I have comments table, which contain comments for posts.
[10:04:46] pawnbox: has joined #RubyOnRails
[10:05:25] matthewd: Hmm... actually, you might be right. "Form requests are custom request classes that contain validation logic"... sounds a lot like an activemodel class.
[10:05:26] toomus: rvanlieshout: And I want to get list of unique comments authors (unique user_id)
[10:05:43] rvanlieshout: Comment.pluck('DISTINCT user_id')
[10:06:03] rvanlieshout: User.where(id: Comment.select(:id).uniq)
[10:06:07] matthewd: toomus: Does the query I gave you do what you want, or not?
[10:06:17] FunkyJunky: has joined #RubyOnRails
[10:06:18] toomus: rvanlieshout: but returned record should be reference to latest comment of each returned user
[10:06:29] rvanlieshout: toomus: there is no reference to any comment
[10:07:32] rvanlieshout: if you want all latest comments per user you'll need a Comment.group('user_id').having('created_at = MAX(created_at)')
[10:08:57] toomus: rvanlieshout: OK, I will try this. THX :)
[10:09:11] matthewd: toomus: Are you ignoring me for any particular reason?
[10:09:20] norc: matthewd: Indeed, and every time you want to have modeless validations, you end up creating a pseudo-model including ActiveModel and stuff out of convenience.
[10:09:33] norc: I mean the main purpose may be ActiveRecord, but luckily this is Ruby. :-)
[10:09:46] toomus: matthewd: No, sorrry If I you feel ignored :)
[10:09:54] supergeek: has joined #RubyOnRails
[10:10:00] matthewd: toomus: Have you tried the query I gave you?
[10:10:07] loispt: has joined #RubyOnRails
[10:10:54] Scripore: has joined #RubyOnRails
[10:11:00] zpe: has joined #RubyOnRails
[10:11:02] toomus: matthewd: Ah, OK, let me try this :)
[10:11:15] DoubleMalt: has joined #RubyOnRails
[10:11:40] beauby: has joined #RubyOnRails
[10:12:06] Rikle_S: is it a common error ?
[10:12:07] Rikle_S: /usr/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'railties' (>= 0) among 12 total gem(s) (Gem::LoadError)
[10:12:10] Rikle_S: Checked in 'GEM_PATH=/home/francois/.rvm/gems/ruby-2.1.2:/home/francois/.rvm/gems/ruby-2.1.2@global', execute `gem env` for more information
[10:12:26] roxtrongo: has joined #RubyOnRails
[10:12:49] BlackCoyote: has joined #RubyOnRails
[10:13:23] matthewd: Rikle_S: What did you run?
[10:13:31] Rikle_S: rails new app
[10:14:22] matthewd: Sounds like you have some messed up paths... there's a ruby 2.2 and a ruby 2.1 involved.
[10:16:51] FernandoBasso: has joined #RubyOnRails
[10:17:26] Rikle_S: matthewd: I only have this line in my path /home/francois/.gem/ruby/2.2.0/bin
[10:17:50] rvanlieshout: Rikle_S: but you're also using rvm
[10:18:25] Rikle_S: I've installed ruby with rvm
[10:18:52] rvanlieshout: so your setup is broken
[10:18:57] matthewd: So you probably don't want that (non-rvm) directory in your path
[10:18:59] rvanlieshout: cause .gem/ruby/2.2.0/bin is not the rvm path
[10:19:00] Megamos: Rikle_S: tried bin/rails new app?
[10:19:22] rvanlieshout: ^ there is no bin/rails unless you have an app
[10:19:27] Megamos: oups me silly
[10:19:36] Megamos: I read my own line..... :)
[10:19:43] rvanlieshout: Megamos: reinstall or remove rvm
[10:20:24] trosborn: has joined #RubyOnRails
[10:20:27] Megamos: Guess I should get out of bed and wake up before trying to help ppl here
[10:21:50] Peg-leg: has joined #RubyOnRails
[10:22:17] Megamos: has left #RubyOnRails: ("Leaving...")
[10:22:54] Coldblackice: has joined #RubyOnRails
[10:22:56] Rikle_S: if I delete it from the PATH, rails is not available anymore
[10:23:06] rvanlieshout: that's because your rvm installation is broken
[10:23:23] rvanlieshout: you won't fix it just by removing that path entry
[10:24:27] Rikle_S: rvanlieshout: so I just have to run \curl -sSL https://get.rvm.io | bash -s stable again ?
[10:24:36] danieldocki: has joined #RubyOnRails
[10:24:38] rvanlieshout: at least something to fix your installation
[10:24:43] rvanlieshout: rvm surely has a faq
[10:25:19] roshanavand: has joined #RubyOnRails
[10:27:36] samuel02: has joined #RubyOnRails
[10:27:47] annlewis: has joined #RubyOnRails
[10:27:49] artto: has joined #RubyOnRails
[10:27:53] phildkim: has joined #RubyOnRails
[10:28:10] roshanavand: has joined #RubyOnRails
[10:28:35] xlegoman: has joined #RubyOnRails
[10:28:39] Rikle_S: ok, so I know there is something to fix
[10:30:41] danieldocki: has joined #RubyOnRails
[10:33:58] sinkensabe: has joined #RubyOnRails
[10:34:49] boombadaroomba: has joined #RubyOnRails
[10:34:55] lacrymology: has joined #RubyOnRails
[10:41:55] Axsuul: has joined #RubyOnRails
[10:42:51] Detch: has joined #RubyOnRails
[10:50:37] chouhoulis: has joined #RubyOnRails
[10:51:34] danieldocki: has joined #RubyOnRails
[10:51:44] trosborn: has joined #RubyOnRails
[10:53:32] dramagods: has joined #RubyOnRails
[10:54:03] spiman: has joined #RubyOnRails
[10:55:37] ldnunes: has joined #RubyOnRails
[10:56:30] AliasLStoRM: has joined #RubyOnRails
[10:58:50] Cervajz: has joined #RubyOnRails
[10:58:52] roshanavand: has joined #RubyOnRails
[10:59:13] trosborn: has joined #RubyOnRails
[11:01:17] spiman: hello, i just found out that if i pass a hash with symbol keys to a sidekiq worker (via redis) the hash will not "survive" the serialization. if i switch the hash keys to strings they will though. i really don't understand why, can anyone eli5?
[11:01:36] rvanlieshout: spiman: because redis doesn't support hashes
[11:02:34] spiman: i'm using a hash with string keys and it works though. it's the symbols it has problems with
[11:02:50] rvanlieshout: and it shouldn't matter
[11:03:03] rvanlieshout: redis is just a key value store
[11:03:10] rvanlieshout: it stores a serialized version of what you put in there
[11:03:15] afroboy: has joined #RubyOnRails
[11:03:22] rvanlieshout: it would be similar if you convert your hash to json and back
[11:03:42] rvanlieshout: that's why a HashWithIndifferentAccess is created
[11:07:01] Spami: has joined #RubyOnRails
[11:07:18] spiman: but if i pass a symbol to JSON.dump isn't it converted to a string?
[11:07:49] dramagods: has joined #RubyOnRails
[11:07:51] spiman: so i should be able to access it in my worker using the string key, right? i'm just trying to get a hang of how symbol serialization works
[11:08:11] krz: has joined #RubyOnRails
[11:10:35] Gustavo: has joined #RubyOnRails
[11:10:40] rvanlieshout: spiman: you should be able to access it using the string field
[11:10:40] alaing: has joined #RubyOnRails
[11:10:50] rvanlieshout: or symbol if you convert it to a HashWithIndifferentAccess
[11:11:30] TPBallbag: has joined #RubyOnRails
[11:11:50] alaing: has joined #RubyOnRails
[11:11:53] alaing: whats the best way to look for a radio button using cucumber?
[11:12:04] rvanlieshout: alaing: the way written in the documentation
[11:13:01] alaing: rvanlieshout: i've tried this expect(page).to have_selector('[name="message[claim_action]"]')
[11:13:24] alaing: and it works when the radio button is on the page
[11:13:59] alaing: however if I change the expect to '.to_not' and there isn't a radio button on the page it is returning false instead of true
[11:14:34] alaing: i've done a save and open page and comfirm the radio button is not on the page
[11:14:44] moeabdol: has joined #RubyOnRails
[11:14:53] alaing: so I'm not sure why the .to_not is returning false
[11:16:12] rvanlieshout: that's weird.. but this is capybara right?
[11:16:29] spiman: has joined #RubyOnRails
[11:17:11] adre: has joined #RubyOnRails
[11:17:27] alaing: yes, (not 100% sure i'm still new to rails/ruby/cucumber)
[11:18:01] stamina: has joined #RubyOnRails
[11:18:32] arup_r: has joined #RubyOnRails
[11:19:23] hoodow: has joined #RubyOnRails
[11:19:25] trosborn: has joined #RubyOnRails
[11:20:00] roshanavand: has joined #RubyOnRails
[11:23:29] dramagods: has joined #RubyOnRails
[11:23:42] krzkrz: has joined #RubyOnRails
[11:26:53] alaing: rvanlieshout: ^
[11:27:48] htmldrum: has joined #RubyOnRails
[11:28:32] annlewis: has joined #RubyOnRails
[11:30:22] ddv: ditch cucumber
[11:30:47] ddv: nobody uses it and clients don't give a *** what you write down there
[11:31:15] tetraktys: has joined #RubyOnRails
[11:31:41] NBarnes: has joined #RubyOnRails
[11:33:41] lacrymology: has joined #RubyOnRails
[11:36:54] Pazician: has joined #RubyOnRails
[11:37:17] nya: has joined #RubyOnRails
[11:40:38] jamto11: has joined #RubyOnRails
[11:40:55] roshanavand: has joined #RubyOnRails
[11:40:59] bruce_lee: has joined #RubyOnRails
[11:42:31] Or1on: has joined #RubyOnRails
[11:43:03] djbkd: has joined #RubyOnRails
[11:43:14] roxtrongo: has joined #RubyOnRails
[11:45:20] rvanlieshout: alaing: i was away for a while
[11:45:30] rvanlieshout: and kinda agree with ddv :)
[11:46:05] alaing: how do you test javascript and frontend functionality then?
[11:47:08] rvanlieshout: you're now writing cucumber + translating that cucumber to something sane
[11:47:12] rvanlieshout: why not just write something sane?
[11:48:41] dramagods: has joined #RubyOnRails
[11:49:00] alaing: any suggests on what to replace cucumber with? I need to test the frontend/js functionality of my app
[11:49:37] alaing: ideally something that can integrate with TRAVIS CI
[11:50:20] moeabdol: has joined #RubyOnRails
[11:51:19] chouhoulis: has joined #RubyOnRails
[11:52:10] yoongkang: has joined #RubyOnRails
[11:52:19] rvanlieshout: just remove cucumber
[11:52:21] rvanlieshout: and use rspec
[11:54:01] Pazician: has joined #RubyOnRails
[11:55:24] Megamos: has joined #RubyOnRails
[11:55:41] trosborn: has joined #RubyOnRails
[11:56:24] Fery: has joined #RubyOnRails
[11:57:15] sarink: has joined #RubyOnRails
[11:57:32] roshanavand: has joined #RubyOnRails
[11:58:54] Fery: has left #RubyOnRails: ()
[11:59:58] yoongkang: has joined #RubyOnRails
[12:00:12] AliasLStoRM: has joined #RubyOnRails
[12:01:17] nettoweb: has joined #RubyOnRails
[12:03:01] sevenseacat: has joined #RubyOnRails
[12:04:59] Fery: has joined #RubyOnRails
[12:05:03] Fery: has left #RubyOnRails: ()
[12:07:04] Fery: has joined #RubyOnRails
[12:07:56] moeabdol: has joined #RubyOnRails
[12:12:52] njero: has joined #RubyOnRails
[12:14:30] kp666: has joined #RubyOnRails
[12:15:21] Antoine59: has joined #RubyOnRails
[12:17:51] pawnbox: has joined #RubyOnRails
[12:21:01] darrencauthon: has joined #RubyOnRails
[12:23:11] Antoine59: has joined #RubyOnRails
[12:24:52] adre: has joined #RubyOnRails
[12:24:55] qejk: has joined #RubyOnRails
[12:25:16] freezevee: has joined #RubyOnRails
[12:27:58] eXist: has joined #RubyOnRails
[12:28:33] arup_r: pass Fery
[12:28:42] krz: has joined #RubyOnRails
[12:28:59] pawnbox: has joined #RubyOnRails
[12:29:21] annlewis: has joined #RubyOnRails
[12:29:50] arup_r: Anybody used http://www.dropzonejs.com/#configuration-options with Rails. I am not able to stop its Ajax submission. Used this config(https://github.com/enyo/dropzone/wiki/Combine-normal-form-with-Dropzone), still when I am dropping the file, it is making Ajax form submission
[12:30:32] NullVoxPopuli: has joined #RubyOnRails
[12:30:33] xlegoman: has joined #RubyOnRails
[12:31:15] NullVoxPopuli: Hello, I made a gem to help slim down controllers, and further divide logic: https://github.com/NullVoxPopuli/skinny_controllers/ Just curious what others think.
[12:32:21] artto: has joined #RubyOnRails
[12:32:57] Gustavo: has joined #RubyOnRails
[12:34:02] allcentury: has joined #RubyOnRails
[12:35:05] ddv: my controllers are usually not big
[12:35:29] FailBit: my controller is huge but that's because what it does is necessarily complex
[12:35:36] FailBit: not because it's avoidably big
[12:35:47] rvanlieshout: ^ then it's still wrong
[12:35:53] rvanlieshout: a controller shouldn't do complex things
[12:35:55] rvanlieshout: you use services for that
[12:35:57] jottr: has joined #RubyOnRails
[12:36:12] NullVoxPopuli: imo, controllers should just be responsible for rendering
[12:36:23] rvanlieshout: and for controlling what happens
[12:36:28] rvanlieshout: that's why they are called 'controllers'
[12:36:42] FailBit: ...which is what it does
[12:36:53] rvanlieshout: it should control things. not perform the actual logic
[12:37:08] rvanlieshout: the downside of having that logic in a controller is that you cannot use it from e.g. the console
[12:37:13] rvanlieshout: a service would allow you to use it anywhere
[12:37:28] FailBit: I'll go elsewhere with my opinion
[12:37:54] rvanlieshout: you're allowed to have your own opinion
[12:38:02] NullVoxPopuli: the pattern that my gem provides allows for more unit tests, and less controller tests.
[12:38:21] NullVoxPopuli: Failbit, for me, it's just ease of testing
[12:38:24] adre: has joined #RubyOnRails
[12:38:41] NullVoxPopuli: I prefer unit tests over controller tests, as they don't require as much of the rails env to be loaded for a particular test
[12:38:57] rvanlieshout: that's because they don't test the same code
[12:39:04] ddv: sounds reasonable, but I prefer integration tests over unit tests
[12:39:12] FailBit: they still require rails' biggest nightmare to be loaded
[12:39:37] rvanlieshout: run it on CI.. you don't have to wait for it
[12:41:44] rvanlieshout: ok. weekend. till next week
[12:41:55] ddv: rvanlieshout: prettig weekend toegewenst!
[12:42:01] roxtrongo: has joined #RubyOnRails
[12:44:02] annlewis: has joined #RubyOnRails
[12:45:21] FernandoBasso: Just started maintaining a rails app and to my complete amazement, the user passwords are stored plain in the database.
[12:46:29] edward__: has joined #RubyOnRails
[12:47:22] CodingWolf: has joined #RubyOnRails
[12:47:37] ddv: FernandoBasso: ok fix it?
[12:48:35] rgtk: has joined #RubyOnRails
[12:50:24] beauby: has joined #RubyOnRails
[12:50:57] Sigfrid: has joined #RubyOnRails
[12:52:04] chouhoulis: has joined #RubyOnRails
[12:55:10] lacrymology: I inherited a project, I'm new at rails. One of the models defines `def self.for_dates(start, end)` which returns a couple of .where clauses as needed. This would be better as a scope, right?
[12:56:14] jkamenik: has joined #RubyOnRails
[12:57:00] non: has joined #RubyOnRails
[12:57:18] matthewd: lacrymology: A scope is just a class method (what you've got) by another name
[12:58:03] smoitra: has joined #RubyOnRails
[12:58:09] matthewd: I think it's pretty common to consider scopes for simple arg-less definitions, but fall back to proper methods once parameters get involved
[12:59:38] edward__: has joined #RubyOnRails
[13:01:15] benhuda: has joined #RubyOnRails
[13:01:17] edward__: has joined #RubyOnRails
[13:01:41] doodlehaus: has joined #RubyOnRails
[13:02:33] edward__: Hello. Could you please have a look? http://stackoverflow.com/questions/33822136/rails-4-javascript-doesnt-work-after-the-deployment-on-heroku
[13:03:22] NBarnes: has joined #RubyOnRails
[13:03:35] quazimodo: has joined #RubyOnRails
[13:03:41] smoitra: has joined #RubyOnRails
[13:05:43] artto: has joined #RubyOnRails
[13:07:25] dramagods: has joined #RubyOnRails
[13:07:54] rodfersou: has joined #RubyOnRails
[13:08:01] moeabdol: has joined #RubyOnRails
[13:08:18] arup_r: has joined #RubyOnRails
[13:09:44] MachbooSS: has joined #RubyOnRails
[13:10:11] Ergo^: has joined #RubyOnRails
[13:10:57] chipotle: has joined #RubyOnRails
[13:12:15] lacrymology: matthewd: k thanks
[13:13:12] lacrymology: what's the right place to put some mixins for my models? I'm thinking of a very simple 'FilterableByDate' mixn that adds this for_dates method
[13:13:19] ismaelga: has joined #RubyOnRails
[13:15:43] dramagods: has joined #RubyOnRails
[13:19:52] filipechagas: has joined #RubyOnRails
[13:22:28] Axsuul: has joined #RubyOnRails
[13:23:53] s2013: has joined #RubyOnRails
[13:24:45] chipotle: has joined #RubyOnRails
[13:27:02] Antoine59: has joined #RubyOnRails
[13:31:37] smoitra: has joined #RubyOnRails
[13:31:48] dtordable: has joined #RubyOnRails
[13:31:48] lacrymology: has joined #RubyOnRails
[13:32:57] surrealanalysis: has joined #RubyOnRails
[13:35:08] matthewd: app/models/concerns/ ?
[13:35:16] The_Phoenix: has joined #RubyOnRails
[13:36:15] Ergo^: has joined #RubyOnRails
[13:36:56] Tempesta: has joined #RubyOnRails
[13:36:58] Pazician: has joined #RubyOnRails
[13:37:01] Antoine59: has joined #RubyOnRails
[13:37:36] roshanav_: has joined #RubyOnRails
[13:37:54] lacrymology: matthewd: sorry, was that for me? I got disconnected
[13:37:57] roxtrongo: has joined #RubyOnRails
[13:38:09] matthewd: lacrymology: Yeah
[13:38:52] lacrymology: matthewd: why concerns?
[13:39:17] mary5030: has joined #RubyOnRails
[13:40:38] lacrymology: just wondering
[13:40:43] matthewd: If you can define the difference between a concern and a mixin, you're doing better than me.
[13:40:53] lacrymology: maybe I don't know what a concern is
[13:41:03] lacrymology: I'm not even being able to define this mixin, anyways
[13:42:02] cpt: has joined #RubyOnRails
[13:42:30] jamto11: has joined #RubyOnRails
[13:42:33] lacrymology: this is (perhaps unsurprisingly) not working http://dpaste.com/15A879G
[13:42:39] TPBallbag: has joined #RubyOnRails
[13:42:55] Megamos: has joined #RubyOnRails
[13:43:55] lacrymology: maybe it needs to be extend,not include
[13:44:04] Gustavo: has joined #RubyOnRails
[13:44:17] matthewd: and definitely not require ;)
[13:44:28] lacrymology: yes, I just realized that
[13:44:30] matthewd: But yes, it does need to be extend
[13:44:36] lacrymology: because class methods
[13:44:38] matthewd: .. and you need to lose the "self." on the method definitions
[13:45:02] matthewd: Regular methods in the module, then you apply the module to the class (extend) instead of its instances (include)
[13:45:15] lacrymology: I can't define class methods and instance methods in the same mixin?
[13:45:17] djbkd: has joined #RubyOnRails
[13:45:30] matthewd: See ActiveSupport::Concern
[13:45:39] matthewd: It uses a nested ClassMethods module to give you both
[13:48:47] mary5030: has joined #RubyOnRails
[13:50:39] FCser: has joined #RubyOnRails
[13:51:24] annlewis: has joined #RubyOnRails
[13:51:43] spiman_: has joined #RubyOnRails
[13:51:54] lacrymology: matthewd: ah, activesupport::concern is nice. I'm guessing I should be using it, right
[13:52:08] lacrymology: instead of 'standard' module?
[13:52:49] chouhoulis: has joined #RubyOnRails
[13:52:54] matthewd: If you don't need any of the extra, it doesn't really matter. The only obvious "advantage" here would be that you can include the result, instead of needing to care about include vs extend on a case by case basis.
[13:54:35] lacrymology: matthewd: also, it seems I'd be able to use scope within the module
[13:55:21] matthewd: Yes, if you want to do that, Concern will make things easier
[13:55:32] renews: has joined #RubyOnRails
[13:56:39] sankaber: has joined #RubyOnRails
[13:57:39] akshat: has joined #RubyOnRails
[13:57:49] dramagods: has joined #RubyOnRails
[13:59:57] xhoy: hi! i have a list of invoices, and a "send" datetime, most times they are send in batches(same datetime) is there an easyway of list only the "groups" (so the send date?)
[14:00:12] xhoy: with out having to to some use query
[14:00:20] NullVoxPopuli_: has joined #RubyOnRails
[14:01:24] xhoy: ow i can use select!
[14:01:45] defsdoor: xhoy - so you have all the records back and you want to /then/ group them by send ?
[14:01:59] xhoy: well, i only like to list the dates we send them
[14:02:03] sankaber: has joined #RubyOnRails
[14:02:08] xhoy: (its a dropdown to resend them :)
[14:02:25] defsdoor: so you need get distinct send date from invoices
[14:02:34] andrewvos: has left #RubyOnRails: ("WeeChat 0.4.2")
[14:02:51] defsdoor: make sure it's indexed
[14:03:00] xhoy: Record.select("distinct send_at")
[14:03:08] xhoy: thanks :)
[14:03:34] shapeshifter: I have this rails application (spree derivative) and I'm working on a staging env (I use capistrano for deployment). Suddenly, after the last deployment, the frontend is not accessible anymore and there's an error in the log: "RoutingError (no Route matches [GET] "/stylesheets/spree/frontend/all.css"). I don't understand this at all, as I haven't changed a single thing regarding this. I only chan
[14:03:40] shapeshifter: ged two view erb files... The backend of the application is still reachable.
[14:04:00] xhoy: have you updated to 3? (with asset pipeline?)
[14:04:31] GJdan: has joined #RubyOnRails
[14:04:38] xhoy: Shapeshifter: look in your git if something changed seems like your asset path is in the wrong place?
[14:04:38] rickmasta: has joined #RubyOnRails
[14:04:46] xhoy: have you compiled your assets?
[14:05:00] dramagods: has joined #RubyOnRails
[14:05:40] rubyonrailed: has joined #RubyOnRails
[14:05:44] shapeshifter: xhoy: yes, I tried manually compiling the assets (although capistrano always did this). I did notice that normally, capistrano would print a lot of lines during the asset compilation step (containing the paths to files). Now, the asset compilation doesn't print anything and takes around 60 seconds to complete. Same duration as before, but no output.
[14:06:06] bmalum: has joined #RubyOnRails
[14:06:07] roshanavand: has joined #RubyOnRails
[14:06:16] shapeshifter: xhoy: 3 what? I'm using ruby 2.2.3, rails 4.2.4
[14:07:09] shapeshifter: xhoy: you mean capistrano 3? Yes, I have 3.4.0.
[14:07:17] xhoy: well both :)
[14:07:21] xhoy: rails 3 and capistrano 3
[14:07:25] xhoy: but have one of them changed?
[14:07:37] xhoy: (rails version, capistrano, some other gem?)
[14:07:44] shapeshifter: xhoy: nothing has changed. You know I'll just try rolling back changes to see if it does anything.
[14:07:55] xhoy: i have had simmilar issues and i hate does!
[14:08:11] xhoy: you can deploy another build
[14:08:19] xhoy: look at your deploy.rb if anything changed there
[14:08:33] xhoy: they are a real pain to fix :(
[14:08:51] xhoy: look at your tmp dir and clean them (rake assets:clear rake tmp:clean)
[14:09:56] xhoy: just some random toughts that worked for me
[14:10:05] arup_r: When using carrierwave . I should keep public/uploads/ file in the .gitignore file right? Just got confused :D
[14:10:21] banister: has joined #RubyOnRails
[14:10:25] xhoy: arup_r: i would, but only if you like to deploy the uploads :)
[14:10:49] shibabu: has joined #RubyOnRails
[14:11:57] arup_r: yes, thanks for supporting me
[14:12:07] arup_r: brin stopped working now
[14:12:12] xhoy: have fun coding :>
[14:12:13] bmalum: has joined #RubyOnRails
[14:12:28] Gustavo: has joined #RubyOnRails
[14:12:45] agit0: has joined #RubyOnRails
[14:12:59] arup_r: xhoy: Are you xavier shay ? just asking.. it seems so
[14:13:18] xhoy: no i am not, atleast not that i know of:)
[14:13:43] arup_r: oh. :) He is a Rspec contributor. I took a wild guess
[14:13:47] weckl: has joined #RubyOnRails
[14:15:05] jgpawletko: has joined #RubyOnRails
[14:16:37] TPBallbag: has joined #RubyOnRails
[14:16:57] FCser: has joined #RubyOnRails
[14:18:07] xlegoman: has joined #RubyOnRails
[14:18:12] zpe: has joined #RubyOnRails
[14:19:05] NBarnes: has joined #RubyOnRails
[14:19:59] Rubie: has joined #RubyOnRails
[14:20:55] mag42c: has joined #RubyOnRails
[14:21:27] tetraktys: has joined #RubyOnRails
[14:21:58] flip_digits: has joined #RubyOnRails
[14:25:47] trekky_: has joined #RubyOnRails
[14:27:34] Cervajz_: has joined #RubyOnRails
[14:28:02] RubyOnRails005: has joined #RubyOnRails
[14:30:55] trekky_: has joined #RubyOnRails
[14:32:14] th_masv: has joined #RubyOnRails
[14:32:53] sdwrage: has joined #RubyOnRails
[14:35:41] atomical: has joined #RubyOnRails
[14:37:00] orolo: has joined #RubyOnRails
[14:37:18] arup_r1: has joined #RubyOnRails
[14:37:56] atomical: has joined #RubyOnRails
[14:39:03] paolodoors: has joined #RubyOnRails
[14:39:29] paolodoors: has left #RubyOnRails: ()
[14:41:00] shapeshifter: xhoy: so apparently this file, which I created in app/views/spree/shared/_taxonomies.html.erb to override an existing view, causes the problem. I still don't know why, though... http://pastie.org/private/dbelshzl5xhfm02hyexsa
[14:41:20] shapeshifter: What a useless error message, too
[14:41:55] rgtk: has joined #RubyOnRails
[14:42:09] shapeshifter: And it works fine, locally
[14:42:40] mustmodify_: has joined #RubyOnRails
[14:42:42] matthewd: Shapeshifter: How have you proven that's the problem?
[14:42:57] spiman: has joined #RubyOnRails
[14:43:12] jamto11: has joined #RubyOnRails
[14:43:34] allcentury: has joined #RubyOnRails
[14:43:45] shapeshifter: matthewd: I reverted the change (removed the file) and redeployed. everything works. re-created this file, redeployed: frontend not working with "No route matches [GET] "/stylesheets/spree/frontend/all.css")
[14:44:49] adre: has joined #RubyOnRails
[14:45:03] uri: has joined #RubyOnRails
[14:45:49] roshanavand: has joined #RubyOnRails
[14:46:04] shinnya: has joined #RubyOnRails
[14:46:11] darrencauthon: has joined #RubyOnRails
[14:46:39] doodleha_: has joined #RubyOnRails
[14:47:05] atomical_: has joined #RubyOnRails
[14:47:21] NullVoxPopuli: has joined #RubyOnRails
[14:47:57] Mia: has joined #RubyOnRails
[14:48:58] cornerma1: has joined #RubyOnRails
[14:49:10] mary5030: has joined #RubyOnRails
[14:52:09] annlewis: has joined #RubyOnRails
[14:52:14] arup_r: Shapeshifter: Does they have view specific stylesheet ? Which is missing probably in your overridden file.
[14:52:27] malcolmva: has joined #RubyOnRails
[14:52:37] hardtail: has joined #RubyOnRails
[14:53:28] jon2: has joined #RubyOnRails
[14:53:35] chouhoulis: has joined #RubyOnRails
[14:53:57] shapeshifter: arup_r: no I don't think so. I'm now incrementally adding statements to the view to see what the problem is, exactly. Just the max_level assignment works fine.
[14:54:45] hardtail: has joined #RubyOnRails
[14:55:12] shapeshifter: I'll report back when I know whats up just fyi
[14:56:16] mustmodify_: has left #RubyOnRails: ()
[14:56:28] adre: has joined #RubyOnRails
[14:57:07] NBarnes: has joined #RubyOnRails
[14:57:15] moeabdol: has joined #RubyOnRails
[14:57:48] jkamenik1: has joined #RubyOnRails
[14:58:36] NullVoxPopuli_: has joined #RubyOnRails
[14:59:40] bryanculver: has joined #RubyOnRails
[14:59:41] Rubie: has joined #RubyOnRails
[14:59:58] artto: has joined #RubyOnRails
[15:02:33] Gustavo: has joined #RubyOnRails
[15:02:52] arup_r: has joined #RubyOnRails
[15:03:26] edward_: has left #RubyOnRails: ()
[15:03:34] carlosd: has joined #RubyOnRails
[15:04:10] shapeshifter: I've narrowed it down to the presence of the while loop...
[15:04:21] shapeshifter: i gtg, maybe I'll report back later
[15:04:50] edward_: has joined #RubyOnRails
[15:05:11] edward_: has left #RubyOnRails: ()
[15:05:15] edward_: has joined #RubyOnRails
[15:05:29] edward_: Is this not a valid line? validates :transport, inclusion: { in: Trip.transports.keys }
[15:05:37] edward_: This is in the trip model
[15:05:39] njero: has joined #RubyOnRails
[15:06:22] yoongkang: has joined #RubyOnRails
[15:06:43] arup_r: Edward_: What error you are getting ?
[15:06:54] tbuehlmann: Edward_, you are missing something: `validates :transport, inclusion: {in: {Trip.transports.keys}}`
[15:07:24] tbuehlmann: oops, wrongy there
[15:07:27] tbuehlmann: totally misread
[15:07:28] arup_r: tbuehlmann: what that inner `{}` ?
[15:08:41] momomomomo: has joined #RubyOnRails
[15:12:38] jimbeaudoin: has joined #RubyOnRails
[15:14:06] doodlehaus: has joined #RubyOnRails
[15:16:30] njero: hey, is there a way in cancan to retrieve one of the users permissions for a specific model? or like retrieve record which it has access to?
[15:17:37] chouhoulis: has joined #RubyOnRails
[15:17:51] treehug88: has joined #RubyOnRails
[15:17:59] th_masv: has joined #RubyOnRails
[15:18:43] axl_: has joined #RubyOnRails
[15:20:23] dkphenom: has joined #RubyOnRails
[15:21:47] matthewd: n_e_o: accessible_by
[15:22:14] adavia_: has joined #RubyOnRails
[15:22:33] roshanavand: has joined #RubyOnRails
[15:22:42] workmaster2n: has joined #RubyOnRails
[15:23:15] joshkovach: has joined #RubyOnRails
[15:23:58] ismaelga: has joined #RubyOnRails
[15:24:45] njero: matthewd: awesome.. Thanks :)
[15:24:58] bratsche: has joined #RubyOnRails
[15:25:59] mdel: has joined #RubyOnRails
[15:26:30] njero: matthewd: one more doubt, is there a location where the migration commands of gems usually go?
[15:26:38] njero: i mean within source code
[15:27:28] momomomomo: has joined #RubyOnRails
[15:29:18] medright: has joined #RubyOnRails
[15:30:18] htmldrum: has joined #RubyOnRails
[15:31:59] arup_r: has joined #RubyOnRails
[15:33:50] gambl0re: has joined #RubyOnRails
[15:36:15] darrenca_: has joined #RubyOnRails
[15:37:41] Gustavo: has joined #RubyOnRails
[15:37:46] B1n4r10: has joined #RubyOnRails
[15:38:04] Aswebb_: has joined #RubyOnRails
[15:39:08] _HombreTepic: has joined #RubyOnRails
[15:39:48] NullVoxPopuli: has joined #RubyOnRails
[15:40:43] gremly: Hi everybody, i would know if use controllers inheritance is a recommended way to reuse code?. Or is there a better way to reuse some methods from an existent controllers?
[15:41:12] s2013: has joined #RubyOnRails
[15:41:17] gremly: May any of you give me some hint, please?
[15:41:23] lacrymology: has joined #RubyOnRails
[15:44:56] jamto11: has joined #RubyOnRails
[15:45:16] jamto11: has joined #RubyOnRails
[15:45:21] voker57: has joined #RubyOnRails
[15:45:23] ismaelga: has joined #RubyOnRails
[15:45:48] NullVoxPopuli: has joined #RubyOnRails
[15:46:00] rgtk: has joined #RubyOnRails
[15:46:11] thejoecarroll: has joined #RubyOnRails
[15:47:12] djbkd: has joined #RubyOnRails
[15:47:28] edward_: gremly, yes use controllers
[15:47:32] edward_: inheritance is fine
[15:47:42] lacrymol1gy: has joined #RubyOnRails
[15:47:55] jamto11_: has joined #RubyOnRails
[15:48:26] gremly: Edward_: Thanks a lot! :)
[15:48:38] nettoweb: has joined #RubyOnRails
[15:48:40] edward_: gremly, don't go crazy with it or it will get very complex
[15:50:13] ismaelga: has joined #RubyOnRails
[15:50:40] pawnbox: has joined #RubyOnRails
[15:52:24] roshanav_: has joined #RubyOnRails
[15:52:57] annlewis: has joined #RubyOnRails
[15:53:22] ElSif: has joined #RubyOnRails
[15:56:38] pawnbox: has joined #RubyOnRails
[16:00:02] MachbooSS: I am having bad interpreter: No such file or directory when i run rails s I think its did something to the path when i tried installing the the developement environment how to I reset it back?
[16:00:13] [Butch]: has joined #RubyOnRails
[16:00:57] arup_r: When you think to upgrade some gems to their latest stable versions, what are the steps you follow so that you don't break anything ? can you share some thoughts ?
[16:03:56] MachbooSS: I follow this http://installrails.com/
[16:05:04] jottr_: has joined #RubyOnRails
[16:05:07] Edawrd: has joined #RubyOnRails
[16:05:09] matthewd: arup_r: Run your tests?
[16:05:47] arup_r: I never did, but had been asked to do, so seeking for advises.. so that I don't blow up stuffs..
[16:06:01] arup_r: ok thanks matthewd
[16:06:14] s2013: has joined #RubyOnRails
[16:09:46] s2013: has joined #RubyOnRails
[16:10:45] alex88: has joined #RubyOnRails
[16:11:16] edward__: has joined #RubyOnRails
[16:11:28] NullVoxPopuli_: has joined #RubyOnRails
[16:11:41] Gustavo: has joined #RubyOnRails
[16:11:48] Lectus: has joined #RubyOnRails
[16:12:07] MachbooSS: ok i just relalized i have to bundle everytime i restart the server
[16:12:15] edward__: Hello. I have the problem with javascript on Heroku. Could you please have a look? http://stackoverflow.com/questions/33822136/rails-4-javascript-doesnt-work-after-the-deployment-on-heroku
[16:12:18] eXist: has joined #RubyOnRails
[16:12:18] MachbooSS: so never mind :)
[16:13:00] bmalum: has joined #RubyOnRails
[16:13:13] Lectus: Hi! What's the best way set a default value for a field for the new action in rails?
[16:13:18] gambl0re: has joined #RubyOnRails
[16:14:43] annlewis: has joined #RubyOnRails
[16:14:49] marcosantoniocar: has joined #RubyOnRails
[16:14:52] shibabu: has joined #RubyOnRails
[16:15:13] njero: has joined #RubyOnRails
[16:16:54] RegulationD: has joined #RubyOnRails
[16:17:21] arup_r: Lectus: field means what ?
[16:18:52] Lectus: like an input in a view
[16:19:24] tbuehlmann: Lectus, if you're talkig about an AR model, either use the schema (db) or set it in the model using the after_initialize callback. like this: https://gist.github.com/tbuehlmann/ce195ebfb3b1d07e219e
[16:20:17] tbuehlmann: if you just want it in a form, set the value of the field using something like `f.object.that_field || 'default'`
[16:20:54] gambl0re: has joined #RubyOnRails
[16:21:09] Lectus: yeah... I just realized I need a migration to add a default value
[16:21:15] Lectus: I think this solves the problem
[16:21:38] ismaelga: has joined #RubyOnRails
[16:22:27] arup_r: MachbooSS: that's not we do. Every time bundle when restart server.. you mean in Production ?
[16:24:52] dopie: has joined #RubyOnRails
[16:25:02] theblang: has joined #RubyOnRails
[16:25:05] Cache_Money: has joined #RubyOnRails
[16:26:56] MachbooSS: i might have msged you wrongly sorry
[16:28:36] Rubie: has joined #RubyOnRails
[16:31:06] jahbrewski: has joined #RubyOnRails
[16:32:26] ismaelga: has joined #RubyOnRails
[16:34:09] GeorgesLeYeti: has joined #RubyOnRails
[16:34:37] GeorgesLeYeti: I'm becoming really mad against turbolinks
[16:35:37] alaing: has joined #RubyOnRails
[16:36:26] jalcine: has joined #RubyOnRails
[16:37:18] GeorgesLeYeti: I made a js recorder using getUserMedia. But when I change page impossible to unload my recorder. That means it records audio of user on every page. So i made something really ugly in background js process i just verify if my class record exist on the page.
[16:38:02] Fery: has left #RubyOnRails: ()
[16:40:45] freezevee: has joined #RubyOnRails
[16:44:05] qejk: has joined #RubyOnRails
[16:44:26] tubbo: GeorgesLeYeti: read the docs for turbolinks, tells you how to use it properly. that said, turbolinks *can* cause problems with 3rd-party JS that isn't ready for it. that's why jquery-turbolinks exists.
[16:45:17] jottr: has joined #RubyOnRails
[16:48:31] jkamenik: has joined #RubyOnRails
[16:48:35] alaing: has joined #RubyOnRails
[16:49:15] alaing: I've put a "puts" in the controller to see if its calling but I do not see it in the terminal when i run my tests
[16:49:34] Gustavo: has joined #RubyOnRails
[16:49:44] alaing: I have a console.log() that outputs the url to my terminal and that does appear to be pointing to the correct path
[16:50:25] jottr_: has joined #RubyOnRails
[16:50:58] Frem: has joined #RubyOnRails
[16:51:22] atomical: has joined #RubyOnRails
[16:52:04] dici: has joined #RubyOnRails
[16:52:24] goodcodeguy: has joined #RubyOnRails
[16:52:30] arup_r: alaing: puts works in only development mode. use Rails.logger.info "Hi.." it will print
[16:53:06] arup_r: alaing: console.log is a JS thing, how it is helping you in Rails ? :D
[16:53:18] Cache_Money1: has joined #RubyOnRails
[16:53:51] renews: has joined #RubyOnRails
[16:55:04] livecano: has joined #RubyOnRails
[16:55:33] roshanavand: has joined #RubyOnRails
[16:56:05] atomical: has joined #RubyOnRails
[16:56:27] alaing: arup_r so just stick Rails.logger.info straight into the controller?
[16:56:56] safety_cut: has joined #RubyOnRails
[16:57:23] arup_r: any where you want to dump some output ..
[16:58:12] Rodya_: has joined #RubyOnRails
[16:58:20] alaing: arup_r: thanks for the tip. I've just dont that and there is no output of "Hi..." in my terminal
[16:59:04] arup_r: oh.. run the tail -f log/test.log and run the test.. you will see
[16:59:12] tildes: has joined #RubyOnRails
[16:59:22] arup_r: there.. in the log file..
[16:59:40] safety_cut: has joined #RubyOnRails
[17:00:55] jkamenik: has joined #RubyOnRails
[17:01:28] zpe: has joined #RubyOnRails
[17:03:10] alaing: arup_r: thanks i need to head off but I'll be back in a bit to give that a try.
[17:04:14] Cache_Money: has joined #RubyOnRails
[17:04:40] andrew-l: has joined #RubyOnRails
[17:05:17] jaequery: has joined #RubyOnRails
[17:06:00] Scriptonaut: has joined #RubyOnRails
[17:07:02] Cervajz__: has joined #RubyOnRails
[17:09:22] aarkerio: has joined #RubyOnRails
[17:09:51] yoongkang: has joined #RubyOnRails
[17:11:31] allcentury: has joined #RubyOnRails
[17:12:20] xcesariox: has joined #RubyOnRails
[17:14:47] stannard: has joined #RubyOnRails
[17:14:52] carlosd: has joined #RubyOnRails
[17:14:57] pawnbox: has joined #RubyOnRails
[17:17:39] towski_: has joined #RubyOnRails
[17:18:15] safety_cut: has joined #RubyOnRails
[17:19:17] nickenchuggets: has joined #RubyOnRails
[17:22:28] baweaver: has joined #RubyOnRails
[17:23:21] ismaelga: has joined #RubyOnRails
[17:23:25] momomomomo: has joined #RubyOnRails
[17:27:49] alaing: has joined #RubyOnRails
[17:29:41] Antoine59: has joined #RubyOnRails
[17:29:58] alaing: has joined #RubyOnRails
[17:30:07] alaing: arup_r: where do i run the command you mentioned eariler
[17:30:11] alaing: 16:59 (arup_r) oh.. run the tail -f log/test.log and run the test.. you will see
[17:30:30] arup_r: in your terminal
[17:30:40] tater: has joined #RubyOnRails
[17:30:40] tater: has joined #RubyOnRails
[17:30:42] dtordable: has joined #RubyOnRails
[17:32:57] bambanx: has joined #RubyOnRails
[17:33:10] atomical: has joined #RubyOnRails
[17:33:59] Cervajz_: has joined #RubyOnRails
[17:34:03] xcesariox: has joined #RubyOnRails
[17:37:48] dstarh: has joined #RubyOnRails
[17:38:19] disgrntld: has joined #RubyOnRails
[17:39:30] alaing: is it alright to delete/clear my logs/test.log file?
[17:39:36] alaing: its currently 4.5GB
[17:39:39] Megamos: has joined #RubyOnRails
[17:40:39] SteenJobs: has joined #RubyOnRails
[17:43:04] lacrymology: has joined #RubyOnRails
[17:43:36] goodcodeguy: has joined #RubyOnRails
[17:45:30] orolo: has joined #RubyOnRails
[17:45:55] EminenceHC: has joined #RubyOnRails
[17:48:42] alaing: arup_r: hmmmm Completed 404 Not Found in 17ms (ActiveRecord: 1.9ms)
[17:49:01] alaing: might explain why its not hitting the endpoint
[17:49:09] _djbkd: has joined #RubyOnRails
[17:49:35] Papierkorb: alaing: you can rm log files as you please
[17:50:06] alaing: Papierkorb: thanks i've discovered rake log:clear
[17:50:27] alaing: actually it is talking to my controller and method
[17:51:35] alaing: where can i paste my output
[17:51:52] Papierkorb: alaing: gist.github.com or pastie.org
[17:53:47] alaing: https://gist.github.com/aliuk2012/a9eec8804d719cfc3c6d
[17:55:58] n1ck7: has joined #RubyOnRails
[17:56:36] Cervajz__: has joined #RubyOnRails
[17:57:12] jamto11: has joined #RubyOnRails
[17:57:20] carlosd: has joined #RubyOnRails
[17:57:52] EminenceHC: has joined #RubyOnRails
[17:58:49] jottr_: has joined #RubyOnRails
[17:59:03] alaing: I've added more detail to that gist
[17:59:18] alaing: some of my controller and routes.rb file
[17:59:36] jamto11_: has joined #RubyOnRails
[18:00:00] alaing: arup_r Papierkorb: https://gist.github.com/aliuk2012/a9eec8804d719cfc3c6d
[18:00:58] wldcordeiro: has joined #RubyOnRails
[18:01:21] baweaver: has joined #RubyOnRails
[18:02:43] baweaver: has joined #RubyOnRails
[18:02:45] smathy: has joined #RubyOnRails
[18:02:57] B1n4r10: has joined #RubyOnRails
[18:04:03] bambanx: cool alaing
[18:05:04] alaing: dont understand why the controller action is being called but 404 is being returned
[18:05:22] alaing: and no signs of puts or Rails.logger
[18:05:39] drewdfw: has joined #RubyOnRails
[18:06:14] alaing: Anyway I need to get off the train thanks for your help
[18:06:34] cyle: has joined #RubyOnRails
[18:06:35] bambanx: bye man good luck
[18:06:37] solars: what's the method to use instead of select('fo as bar') if I have no aliased field bar?
[18:06:41] solars: that returns an array
[18:08:05] ur5us: has joined #RubyOnRails
[18:11:19] Tref: has joined #RubyOnRails
[18:11:57] phildkim: has joined #RubyOnRails
[18:14:47] shinenelson: has joined #RubyOnRails
[18:15:29] SteenJobs: has joined #RubyOnRails
[18:17:14] shibabu: has joined #RubyOnRails
[18:17:26] djbkd: has joined #RubyOnRails
[18:18:34] nozpheratu: has joined #RubyOnRails
[18:20:45] gusrub: has joined #RubyOnRails
[18:21:05] ibouvousaime_: has joined #RubyOnRails
[18:21:29] VeryBewitching: has joined #RubyOnRails
[18:23:39] lemur: has joined #RubyOnRails
[18:23:54] nozpheratu: has joined #RubyOnRails
[18:26:55] chouhoulis: has joined #RubyOnRails
[18:27:04] arup_r: Why rake db:create is giving my unknown db error? https://gist.github.com/aruprakshit/e46b6c5102086b545487
[18:27:42] arup_r: I never saw thise, the rake command which is supposed to create a DB, is itself is looking for the DB to already exist
[18:28:02] solars: how can I actually return date with a query like this: ArTrack.where('created_at > ?', Date.yesterday).select("date('created_at') as date").group('date')
[18:28:13] solars: it tries to instantiate the object which has no date field/attr
[18:28:17] solars: what to use instead?
[18:30:10] mustmodify_: has joined #RubyOnRails
[18:30:50] mustmodify_: can't think of a word. What's the word people say that means "we don't always have to do the academically-right thing when it doesn't make business sense" but what they really mean is "I'm too cheap to do this correctly"?
[18:31:04] mustmodify_: Ah... pragmatic.
[18:32:39] s2013: has joined #RubyOnRails
[18:32:55] arup_r: any light on me ?
[18:32:58] shinnya: has joined #RubyOnRails
[18:36:00] Antoine59: has joined #RubyOnRails
[18:36:03] ismaelga: has joined #RubyOnRails
[18:38:28] Meow-J: has joined #RubyOnRails
[18:39:09] phildkim: has left #RubyOnRails: ()
[18:39:35] b2zeldafreak: has joined #RubyOnRails
[18:39:36] Gustavo: has joined #RubyOnRails
[18:39:37] bambanx: good day VeryBewitching
[18:40:11] carlosd: has joined #RubyOnRails
[18:40:20] b2zeldafreak: What's the best way to monitor a Rails server? I'd like to have a website where I can view the health and log
[18:41:12] phildkim: has joined #RubyOnRails
[18:41:24] rakm: has joined #RubyOnRails
[18:41:28] VeryBewitching: arup_r: Which database type?
[18:42:25] VeryBewitching: How's the day bambanx?
[18:42:41] bambanx: is very nice day VeryBewitching lot of magic on the air
[18:43:15] VeryBewitching: bambanx: Friday rocks.
[18:43:32] solars: can anyone tell me how to use .select('fu as bar') and get the colum bar back?
[18:43:43] benlieb_: has joined #RubyOnRails
[18:44:02] DoubleMalt: has joined #RubyOnRails
[18:44:42] Tref: has joined #RubyOnRails
[18:44:56] rakm: has joined #RubyOnRails
[18:45:30] mustmodify_: b2zeldafreak: newrelic
[18:45:32] phildkim: has left #RubyOnRails: ()
[18:46:16] adac: has joined #RubyOnRails
[18:46:17] b2zeldafreak: mustmodify, I'll look into it, thanks
[18:46:30] rodfersou: has joined #RubyOnRails
[18:46:34] phildkim: has joined #RubyOnRails
[18:47:39] bmalum: has joined #RubyOnRails
[18:48:09] VeryBewitching: solars: If you're using plain SQL it would be: select table.field as "new_name" from table, so try select('table.field as "new_name"')
[18:49:00] mustmodify_: b2zeldafreak: Here's what the dashboard looks like for one of my clients' sites: https://url.upwork.com/_01MPr-OwWzrOmL6XAF1hRRhkNUW4hseJZ6
[18:49:07] solars: VeryBewitching, the problem is not the query but active record, select tries to instantiate fields, bar obviously doesn't exist on the model so it does not return it
[18:49:12] srinidhi: has joined #RubyOnRails
[18:49:18] solars: *instantiate rows
[18:50:42] VeryBewitching: This may help http://stackoverflow.com/questions/18750196/rails-active-record-add-extra-select-column-to-findall
[18:50:49] b2zeldafreak: mustmodify, How is the lite version of that?
[18:52:08] FailBit: b2zeldafreak: mostly the same
[18:52:16] SteenJobs: has joined #RubyOnRails
[18:52:22] FailBit: mustmodify_: ow, that response time
[18:52:30] b2zeldafreak: Thanks, I'll have to check it out. It looks pretty easy to set up too
[18:52:30] hardtail: has joined #RubyOnRails
[18:52:34] FailBit: I think you may want to consider indexes
[18:54:15] mustmodify_: FailBit: yeah, it's suboptimal for most situations. Strangely, this client is not interested in my investing time in the infrastructure necessary to correct it.
[18:54:31] FailBit: indexes are cheap
[18:54:52] mustmodify_: b2zeldafreak: this is the lite version. They won't pay for the pro version.
[18:54:52] FailBit: takes about a minute to figure out what to index and gives a massive perf boost
[18:55:28] b2zeldafreak: mustmodify, Ah that's great! Free tools are the best
[18:55:55] FailBit: I don't have my computer on me but this is mobile NR https://i.imgur.com/DqiSpLV.jpg
[18:56:27] VeryBewitching: Holy Elasticsearch
[18:56:46] solars: VeryBewitching, unfortunately this doesn't work... the SQL equivalent of what I want to do is: SELECT count( * ) , cast( created_at as date ) as date FROM `ar_tracks` WHERE created_at > '2015-11-18' GROUP BY DATE
[18:57:20] FailBit: VeryBewitching: https://github.com/liamwhite/elasticsearch-newrelic/
[18:57:48] raunicolae: has joined #RubyOnRails
[18:58:05] FailBit: (as you can see our app performance used to suck a lot more)
[18:58:13] renews: has joined #RubyOnRails
[18:58:41] mustmodify_: has left #RubyOnRails: ()
[18:59:05] VeryBewitching: Nice to see Redis performing so well
[18:59:35] VeryBewitching: solars: Which database are you using?
[18:59:54] FailBit: we used to use 100% redis for caching, it performed really badly iirc
[19:00:07] rakm: has joined #RubyOnRails
[19:00:21] FailBit: so memcached took its place for HTML caching, and redis is used for caching DNSBL hits
[19:00:48] b2zeldafreak: mustmodify_, does newrelic work with Rails 4.0.0?
[19:00:55] FailBit: b2zeldafreak: it does
[19:01:09] raunicolae: has left #RubyOnRails: ()
[19:01:10] b2zeldafreak: ok thanks. Their website only goes up to 3
[19:01:14] jkamenik: has joined #RubyOnRails
[19:01:25] FailBit: I'm using it on 4.2.5
[19:01:34] FailBit: but it did work on 4.0
[19:01:58] VeryBewitching: solars: ARTrack.select('count(*), cast(ar_track.created_at as date) as "the_date"').where(...)
[19:02:10] b2zeldafreak: Yeah I'll just set the config for Rails 3 on the website and then update the file manually if I need to
[19:03:27] b2zeldafreak: Separate question, how do you handle scrubbing API keys from Git and then re-adding them when you deploy?
[19:03:42] FailBit: I have cap copy them in from shared/
[19:03:46] pawnbox: has joined #RubyOnRails
[19:03:53] FailBit: other people set them in the environment
[19:03:53] havenwood: has joined #RubyOnRails
[19:05:07] b2zeldafreak: We don't have Capistrano set up yet
[19:05:17] b2zeldafreak: We're just using Phusion with a few simple deploy scripts
[19:05:37] FailBit: you should set up something like cap as soon as you can
[19:05:48] solars: VeryBewitching, mysql
[19:06:02] VeryBewitching: The above worked for me in Postgres.
[19:06:15] FailBit: it makes deployment easy (one line on a client) and safe (easy rollbacks in the event of failure)
[19:06:27] VeryBewitching: solars: So what you need is possible, you just have to sort out any differences between MySQL and PSQL
[19:06:41] b2zeldafreak: I agree. This is my senior capstone and I'm dealing with the work last years teams did. Unfortunatley, our advisors are pushing us towards new features more than things like fixing the deploy method
[19:06:52] FailBit: postgresql masterrace, VeryBewitching
[19:07:05] VeryBewitching: FailBit: jsonb ftw!
[19:07:18] VeryBewitching: FailBit: I really <3 Postgres
[19:07:25] pyemkey: has joined #RubyOnRails
[19:07:41] FailBit: I use it for array types
[19:07:55] FailBit: (and gin indexes on those array types)
[19:07:59] VeryBewitching: I'm using it for tree matches
[19:08:08] VeryBewitching: GIN indexes for me too
[19:08:23] solars: VeryBewitching, the problem is not the sql, the problem is the active record instantiation, you get back something like this: #<ArTrack:0x0000009d7edbd0 id: nil - without the custom field
[19:08:41] gambl0re: has joined #RubyOnRails
[19:08:43] VeryBewitching: solars: Have you tried obj.the_custom_field ?
[19:09:17] solars: didn't work for me..
[19:09:17] VeryBewitching: Just because the inspect isn't showing you expect, doesn't mean the field isn't there.
[19:09:25] solars: I'll try again rewriting my query
[19:09:33] VeryBewitching: Try a simpler one, to start.
[19:09:51] VeryBewitching: select('"ar_tracks"."field" AS "name"')
[19:10:57] jottr_: has joined #RubyOnRails
[19:12:17] adavia_: did anyone try this gem Semantic-UI-Rails-LESS
[19:12:28] VeryBewitching: solars: My IRB session playing https://gist.github.com/bewitchingme/5ae8ed4fad340df93805
[19:13:23] solars: VeryBewitching, you were right, it's working!
[19:13:27] hardtail: has joined #RubyOnRails
[19:13:28] nettoweb: has joined #RubyOnRails
[19:13:39] solars: VeryBewitching, just one more thing.. can I order the result by date in sql? not sure if that works
[19:13:48] solars: by the calculated column
[19:14:27] solars: I assume I have to order it on the actual column
[19:16:36] pyemkey: Hello. I'm looking for project which use affiliate program. Anyone knows something?
[19:16:38] Guest50: has joined #RubyOnRails
[19:17:15] pyemkey: has joined #RubyOnRails
[19:17:29] pyemkey: Hello. I'm looking for project which use affiliate program. Anyone knows something?
[19:18:10] baweaver: has joined #RubyOnRails
[19:18:31] peter1111: has joined #RubyOnRails
[19:18:50] slash_nick: what do you mean affiliate program?
[19:19:12] Regulati_: has joined #RubyOnRails
[19:22:30] build22_: has joined #RubyOnRails
[19:23:04] Gustavo: has joined #RubyOnRails
[19:23:10] quazimodo: has joined #RubyOnRails
[19:23:18] pyemkey: I mean program where by some product recommendation I can give someone points which will be exchange on money :)
[19:23:28] pyemkey: @slash_nick up
[19:24:15] VeryBewitching: solars: Yes, you should be able to .order('"new_column"')
[19:24:22] jkamenik: has joined #RubyOnRails
[19:24:26] lemur: has joined #RubyOnRails
[19:26:01] s2013: has joined #RubyOnRails
[19:26:14] User458764: has joined #RubyOnRails
[19:29:58] moeabdol: has joined #RubyOnRails
[19:30:18] solars: VeryBewitching, ah, rails seems to check the columns if I use symbols
[19:31:44] djbkd: has joined #RubyOnRails
[19:34:00] djbkd: has joined #RubyOnRails
[19:34:01] Mia: has joined #RubyOnRails
[19:34:01] Mia: has joined #RubyOnRails
[19:34:13] lapide_viridi: has joined #RubyOnRails
[19:34:37] stannard: has joined #RubyOnRails
[19:40:00] xcesariox: has joined #RubyOnRails
[19:40:35] kies: has joined #RubyOnRails
[19:41:26] kadoppe: has joined #RubyOnRails
[19:44:41] doodlehaus: has joined #RubyOnRails
[19:46:15] njero: has joined #RubyOnRails
[19:47:17] djbkd: has joined #RubyOnRails
[19:47:18] arup_r: has joined #RubyOnRails
[19:47:46] skiz: has joined #RubyOnRails
[19:48:42] Coldblackice: has joined #RubyOnRails
[19:49:02] pvertenten: has joined #RubyOnRails
[19:50:19] pyemkey: has joined #RubyOnRails
[19:50:31] sbarg: has joined #RubyOnRails
[19:51:36] B1n4r10: has joined #RubyOnRails
[19:52:08] skyjumper: is there a good way to skip specific model validations in a test?
[19:52:12] Rephiax: has joined #RubyOnRails
[19:53:42] njero: has joined #RubyOnRails
[19:58:31] arup_r: skyjumper: yes, just calse .save(false)
[19:58:56] skyjumper: that's tricky if the .save is being done in the code being tested
[20:01:22] Antoine59: has joined #RubyOnRails
[20:01:26] Tref: has joined #RubyOnRails
[20:05:26] pyemkey: has joined #RubyOnRails
[20:05:28] arup_r: skyjumper: something like http://railsguides.net/skip-callbacks-in-tests/
[20:05:56] arup_r: but that is callback, not validations. Wanna to show you the ideas
[20:06:59] workmaster2n: has joined #RubyOnRails
[20:10:11] yfeldblum: has joined #RubyOnRails
[20:12:48] donkeyluke: has joined #RubyOnRails
[20:13:04] arBmind: has joined #RubyOnRails
[20:14:10] B1n4r10: has joined #RubyOnRails
[20:14:41] marr: has joined #RubyOnRails
[20:14:53] IrishGringo: has joined #RubyOnRails
[20:19:37] shibabu: has joined #RubyOnRails
[20:20:10] pyemkey: has joined #RubyOnRails
[20:21:32] ur5us: has joined #RubyOnRails
[20:21:36] draken: Would would the reason be for the /form ending prematurly before the <%end%>
[20:21:58] rakm: has joined #RubyOnRails
[20:25:05] baweaver: has joined #RubyOnRails
[20:27:11] chouhoul_: has joined #RubyOnRails
[20:27:45] alaing: has joined #RubyOnRails
[20:28:17] alaing: Hi arup_r
[20:28:33] alaing: https://gist.github.com/aliuk2012/a9eec8804d719cfc3c6d
[20:28:35] arup_r: hello alaing
[20:29:00] djbkd: has joined #RubyOnRails
[20:29:06] alaing: any idea why the logs aren't showing the "Hi" etc and triggering 404 error?
[20:30:48] arup_r: alaing: looking into it. But it should show up there, that is how I also inspect
[20:31:55] asianMike: has joined #RubyOnRails
[20:33:39] FCser: has joined #RubyOnRails
[20:34:51] alaing: arup_r: thanks just let me know if you need more details
[20:35:24] benlieb: has joined #RubyOnRails
[20:35:30] alaing: arup_r: i'spent about 5 hours today trying to resolve this and its driving me mad
[20:36:23] asianMike: has joined #RubyOnRails
[20:37:00] baweaver: has joined #RubyOnRails
[20:38:02] arup_r: alaing: http://stackoverflow.com/questions/11770552/how-to-get-rails-logger-printing-to-the-console-stdout-when-running-rspec/32628272#32628272
[20:38:05] arup_r: see this ^^
[20:39:31] benlieb: has joined #RubyOnRails
[20:39:55] darrencauthon: has joined #RubyOnRails
[20:40:17] lacuna: has joined #RubyOnRails
[20:40:18] lacuna: has joined #RubyOnRails
[20:41:50] jkamenik: has joined #RubyOnRails
[20:42:11] roxtrongo: has joined #RubyOnRails
[20:42:24] alaing: arup_r: so add the code config/environment/test.rb and then i should be able to do LOG_LEVEL=debug bundle exec cucumber ?
[20:42:56] roxtrongo: has joined #RubyOnRails
[20:45:21] lacuna: has joined #RubyOnRails
[20:46:27] arup_r: alaing: yes
[20:46:40] arup_r: and then run the spec and look at the log
[20:46:49] Silox|: has joined #RubyOnRails
[20:47:03] renews: has joined #RubyOnRails
[20:47:13] phildkim: has joined #RubyOnRails
[20:47:25] Silox|: Is there a way to stub environments in Rails 4 tests without rspec? I have some development backdoors and I'd like to test that their not available in production mode
[20:48:10] Rodya_: has joined #RubyOnRails
[20:49:30] chouhoulis: has joined #RubyOnRails
[20:50:39] tubbo: Silox|: define "stub environments"
[20:50:52] pyemkey: has joined #RubyOnRails
[20:52:04] Silox|: tubbo: I use a before_filter which returns a bad request unless Rails.env.development?
[20:52:25] sankaber: has joined #RubyOnRails
[20:52:27] Silox|: So in my tests, I'd like to stub the result of that method
[20:52:32] colleenmcguckin: has joined #RubyOnRails
[20:53:15] Silox|: Rspec does it like: `allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("production"))` but the application I'm working on does not use rspec
[20:54:26] tubbo: Silox|: you can use Mocha
[20:56:18] ur5us: has joined #RubyOnRails
[20:56:45] szhem: has joined #RubyOnRails
[20:57:00] njero: has joined #RubyOnRails
[20:58:16] rhizome: if you're only checking on Rails.env.development then it should also not be available in test
[20:58:44] agit0: has joined #RubyOnRails
[20:58:53] szhem: has left #RubyOnRails: ()
[21:01:03] johnhalowang: has joined #RubyOnRails
[21:03:06] Silox|: rhizome: True, but I'd like to explicitly test it for production
[21:03:12] Silox|: It's a login backdoor so I want to be sure
[21:03:39] Silox|: Came across http://blog.thefrontiergroup.com.au/2011/06/stubbing-out-rails-env/ so I'll use that instead of using a full blown mocking framework
[21:04:01] dikaio: has joined #RubyOnRails
[21:04:16] Axsuul: has joined #RubyOnRails
[21:04:43] Gustavo: has joined #RubyOnRails
[21:05:35] Gustavo: has joined #RubyOnRails
[21:05:36] slash_nick: test, production, fluffball... all would satisfy the condition "not development"
[21:05:45] slash_nick: ACTION shrugs
[21:06:08] Gustavo: has joined #RubyOnRails
[21:08:04] colleenmcguckin: has joined #RubyOnRails
[21:08:44] jetpackjoe: has joined #RubyOnRails
[21:09:01] pyemkey: has joined #RubyOnRails
[21:09:04] atomical_: has joined #RubyOnRails
[21:09:39] markkraemer: has joined #RubyOnRails
[21:09:40] baweaver: has joined #RubyOnRails
[21:11:05] flip_digits: has joined #RubyOnRails
[21:11:58] jottr_: has joined #RubyOnRails
[21:15:52] juddey: has joined #RubyOnRails
[21:16:14] bambanx: what u use here for paste guys?
[21:16:14] teaearlgraycold: has joined #RubyOnRails
[21:16:24] tubbo: bambanx: !gist
[21:16:24] helpa: bambanx: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:16:41] tubbo: slash_nick: RAILS_ENV=fleabag
[21:16:45] teaearlgraycold: Rails claims that it doesn't have the translation for en.distance when I call: number_to_human distance, units: :distance
[21:17:00] teaearlgraycold: I though I18n came standard
[21:18:42] bambanx: guys i am doing a tutorial , this is my code https://github.com/ivan-vilches/rail4-dropzone , here the tutorial, how i can create the controller for select the images with a checkbox and delete?
[21:19:06] pyemkey: has joined #RubyOnRails
[21:19:55] bambanx: i wish start for the controller
[21:22:18] teaearlgraycold: bambanx: I use dropzone in rails
[21:22:26] teaearlgraycold: Here's my "upload" action http://pastie.org/private/tv0k280owa5ijnfsagbzq
[21:22:29] bambanx: i am using too
[21:22:36] sdwrage: has joined #RubyOnRails
[21:22:55] bambanx: you can delete ?
[21:24:58] teaearlgraycold: And I suppose this is more or less what you need for the JS side: http://pastie.org/private/gx39ultxxofm2wc753dig
[21:25:17] Megamos: has joined #RubyOnRails
[21:25:24] teaearlgraycold: bambanx: if you're using scaffolding the delete action will work for you as is
[21:25:36] bambanx: i didnt used
[21:25:47] bambanx: sould i create controller first?
[21:25:54] baweaver: has joined #RubyOnRails
[21:26:01] lacrymology: has joined #RubyOnRails
[21:26:05] bambanx: im thiunking on create a edit controller
[21:26:13] teaearlgraycold: All you need is an action that calls (in my case) Blob.destroy
[21:26:30] teaearlgraycold: You shouldn't need a seperate controller for editing. That's something an action can do
[21:26:38] bambanx: but i wanna list the image in a page and allow to select with a checkbox for delete
[21:27:00] teaearlgraycold: YOu should have an action for listing images
[21:27:18] teaearlgraycold: Then in the view just list everything in a table and have a part of each row for a delete button
[21:27:36] teaearlgraycold: If you use scaffolding a lot of this is already done for you
[21:28:20] bambanx: def destroy_multiple
[21:28:20] bambanx: @upload.destroy(params[:upload_posts])
[21:28:57] RegulationD: has joined #RubyOnRails
[21:29:29] teaearlgraycold: If you want to select multiple to destroy you should probably do Upload.where(<some parameters here>).destroy
[21:30:04] teaearlgraycold: So if you're sending a list of Upload IDs it'd be something like Upload.where(id: [list of IDs]).destroy
[21:30:20] benlieb: has joined #RubyOnRails
[21:30:37] teaearlgraycold: POST data won't be in a list format, so you'll need to parse it into a list
[21:30:49] colleenmcguckin: has joined #RubyOnRails
[21:31:12] teaearlgraycold: You could send something formatted in JSON, or because it's all just integers you could just list a bunch seperated by spaces or commas
[21:31:38] bambanx: it is my controller https://gist.github.com/ivan-vilches/4a9d94817f72cc97cb91
[21:32:40] chipotle: has joined #RubyOnRails
[21:33:22] skiz: has joined #RubyOnRails
[21:35:05] EminenceHC: has joined #RubyOnRails
[21:35:37] nozpheratu: has joined #RubyOnRails
[21:38:06] teaearlgraycold: bambanx: well you've already got a destroy action there
[21:38:08] phildkim: has left #RubyOnRails: ()
[21:38:44] phildkim: has joined #RubyOnRails
[21:40:06] Scriptonaut: has left #RubyOnRails: ()
[21:40:33] baweaver: has joined #RubyOnRails
[21:44:30] donkeyluke: has left #RubyOnRails: ()
[21:44:57] angeloc: has joined #RubyOnRails
[21:45:03] s2013: hello beautiful people
[21:45:20] chipotle: has joined #RubyOnRails
[21:45:33] teclator: has joined #RubyOnRails
[21:46:18] angeloc: awesome... it's amazing to be here
[21:46:33] rhizome: has joined #RubyOnRails
[21:47:12] angeloc: people over here got some really good brain.. ????????
[21:47:24] jottr_: has joined #RubyOnRails
[21:47:28] benlieb: has joined #RubyOnRails
[21:47:50] s2013: interesting
[21:49:35] ur5us: has joined #RubyOnRails
[21:50:52] pyemkey: has joined #RubyOnRails
[21:52:32] mloy: has joined #RubyOnRails
[21:52:42] Phelps: has left #RubyOnRails: ("Leaving")
[21:53:41] B1n4r10: has joined #RubyOnRails
[21:54:32] akshat: has joined #RubyOnRails
[21:55:15] rubyonrailed: has joined #RubyOnRails
[21:55:55] adavia_: did anyone try this gem Semantic-UI-Rails-LESS
[21:56:26] havenwood: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[21:56:42] arkiver: has joined #RubyOnRails
[21:57:02] slash_nick: 16k downloads... someone did
[21:58:37] bmalum: has joined #RubyOnRails
[21:59:18] rhizome: they all deleted it instantly
[21:59:31] adavia_: well anyways im not clear about how customizing a component
[21:59:43] rubyonra_: has joined #RubyOnRails
[22:00:51] stannard: has joined #RubyOnRails
[22:01:03] rhizome: that gem seems weird to me
[22:01:19] rhizome: i think i just don't agree with it
[22:01:51] stannard: has joined #RubyOnRails
[22:01:56] adavia_: i think is from the original creator of the framework
[22:02:13] rhizome: sure, but there's a lot of those kinds of gems these days
[22:02:20] rhizome: each with a slightly different approach
[22:02:41] pyemkey: has joined #RubyOnRails
[22:02:49] adavia_: there is a sass versioned gem also
[22:04:18] rhizome: i just mean responsive grid gems
[22:04:28] safety_cut: has joined #RubyOnRails
[22:05:44] Oog: has joined #RubyOnRails
[22:06:01] tubbo: what a time to be alive
[22:06:15] Oog: i have an Invoice model with has_many :line_items, :dependent => :destroy when the Invoice is closed i want to prevent line_items from being created. is there a callback I cna hook into?
[22:06:26] tubbo: Oog: define 'closed'
[22:06:29] Oog: does it have to be a validation on the LineItem
[22:06:39] Oog: tubbo invoice.closed = true
[22:06:52] Oog: i would prefer to put a validation or something on the Invoice if possible
[22:07:29] tubbo: Oog: if it's not going to affect data persistence, you can always before_save :prevent_line_items_from_being_created, if: { |invoice| invoice.closed }
[22:07:48] tubbo: Oog: or that `if:` can be a method name, so `if: :closed?` would run invoice.closed?
[22:07:59] tubbo: !callbacks
[22:07:59] helpa: The Active Record Callbacks Guide - http://guides.rubyonrails.org/active_record_callbacks.html - Written by Jaime Iniesta
[22:08:17] Oog: tubbo but that is a callback on LineItem right?
[22:08:34] rhizome: Oog: def readonly? self.closed? end
[22:08:59] Oog: rhizome cool that can go on Invoice?
[22:09:08] rhizome: yes, the model
[22:09:14] p8m: has joined #RubyOnRails
[22:09:31] rhizome: http://apidock.com/rails/ActiveRecord/Base/readonly%3F
[22:09:44] Scripore: has joined #RubyOnRails
[22:09:46] rhizome: looks like apidock is making some UI "improvements"
[22:10:00] Oog: rhizome didnt work
[22:10:17] trosborn: has joined #RubyOnRails
[22:10:26] Oog: l = LineItem.new; l.invoice = Invoice.first; l.save succeeded
[22:10:42] Oog: def readonly?; return true; end; is in Invoice
[22:10:45] tubbo: Oog: you probably want to do it on the invoice, a before_create :denied, if: { |model| model.invoice.closed? }
[22:10:54] tubbo: i'm sorry, not the INvoice...the LineItem
[22:10:59] tubbo: make LineItems be "idempotent" in this case
[22:11:03] rhizome: i think i don't 100% understand your setup
[22:11:14] Oog: ok yeah i know how to do it with a callback on LineItem - i wanted to do it on Invoice
[22:11:59] phildkim: has left #RubyOnRails: ()
[22:12:21] jessemcgilallen: has joined #RubyOnRails
[22:15:13] skiz: has joined #RubyOnRails
[22:18:47] jwillis: has joined #RubyOnRails
[22:19:33] Oog: has joined #RubyOnRails
[22:20:27] rgtk: has joined #RubyOnRails
[22:20:38] pyemkey: has joined #RubyOnRails
[22:20:53] b2zeldafreak: has joined #RubyOnRails
[22:22:31] shibabu: has joined #RubyOnRails
[22:22:39] juddey: has joined #RubyOnRails
[22:23:32] kitsuneyo: has joined #RubyOnRails
[22:24:36] s2013: sup tubbo
[22:24:55] EminenceHC: has joined #RubyOnRails
[22:25:13] jwillis: I'm running into a rails migration problem with the sqlite3 gem. This stackoverflow question addresses it pretty well: http://stackoverflow.com/questions/17350837/ruby-on-rails-add-gem-sqlite3-to-your-gemfile, but none of the answers nor googling i have done has produced a resolution to the problem
[22:26:13] smathy: jwillis, spring stop
[22:27:01] s2013: hows it going
[22:27:13] rhizome: bad. real bad.
[22:27:22] s2013: why rhizome? wanna talk about it?
[22:27:38] rhizome: well it all started when my parents met
[22:27:48] s2013: are you sure they met?
[22:27:54] slash_nick: rhizome: that's actually how all my problems started too
[22:27:54] smathy: Take it to -OT
[22:28:04] jwillis: smathy, command not found
[22:28:32] s2013: its ok rhizome we are all here for you
[22:28:38] smathy: jwillis, !gist your Gemfile
[22:28:38] helpa: jwillis: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[22:28:39] kitsuneyo: has joined #RubyOnRails
[22:32:57] Oog: has joined #RubyOnRails
[22:33:05] ewnd9: has joined #RubyOnRails
[22:34:40] safety_cut: has joined #RubyOnRails
[22:35:51] renews: has joined #RubyOnRails
[22:36:43] nya: has joined #RubyOnRails
[22:36:52] Wolfram74: has joined #RubyOnRails
[22:37:28] Wolfram74: I'm trying to apply data tags to some of my fields in a form helper
[22:37:51] Wolfram74: http://dpaste.com/3FWG9N8
[22:38:13] Wolfram74: I'm kind of stuck on where to go from here if this is the case
[22:39:31] baweaver: has joined #RubyOnRails
[22:39:43] rhizome: wolfram74: shouldn't it be f.text_field ?
[22:39:54] teaearlgraycold: wolfram74: what do you want the HTML to look like?
[22:40:08] teaearlgraycold: rhizome: well it could be f.input :email, type: 'text' ...
[22:40:09] Rodya_: has joined #RubyOnRails
[22:40:22] rhizome: well, but it isn't.
[22:40:37] teaearlgraycold: idk just saying an alternative
[22:40:38] Wolfram74: rhizome: i'm using semtantic_form_for from the formtastic gem, so there's a bit of assumptions being made
[22:40:49] rhizome: oh. no idea than.
[22:41:15] Wolfram74: i'm trying to set some data tags which allow for bootstrap's tool tips to work properly
[22:41:16] yfeldblum: has joined #RubyOnRails
[22:41:21] Wolfram74: /the way i want
[22:41:42] teaearlgraycold: Try html: {"data-fuz" => "rage"} as a parameter
[22:41:51] kitsuneyo: has joined #RubyOnRails
[22:41:53] [Butch]: has joined #RubyOnRails
[22:42:36] teaearlgraycold: So f.input :email, placeholder: 'bob@wombat.io', html: {"data-fuz" => "rage"}
[22:43:03] Wolfram74: negative results, thanks for the suggestion though
[22:43:14] teaearlgraycold: Can you not just use the normal form_for?
[22:43:26] rhizome: try putting the placeholder inside the html options
[22:43:55] Wolfram74: the placeholder is working find
[22:44:13] teaearlgraycold: wolfram74: you can use a different selector when calling the bootstrap method
[22:44:38] Wolfram74: this was the result from some hand written html without use of the helpers http://dpaste.com/3V6V8EJ
[22:45:15] kies: has joined #RubyOnRails
[22:45:17] teaearlgraycold: Actually nevermind that
[22:45:25] slava_: has joined #RubyOnRails
[22:45:57] livecano: has joined #RubyOnRails
[22:47:06] slava_: hey guys, I am trying to host my rails app in a sub directory domain.com/sub-dir-app/, is there anyway to tell rails to treat the /sub-dir-app/ as the root directory? especially making request.url not include the /sub-dir-app/ portion?
[22:47:38] teaearlgraycold: slava_: well I think you want something like nginx for that. Are you using and reverse-proxy?
[22:47:40] Wolfram74: so nobody has any ideas on how to go about using the extant helper methods to get there?
[22:47:50] slava_: teaearlgraycold, I am using Apache
[22:48:25] teaearlgraycold: wolfram74: I've tried using form helpers like that before but they never seems to give you enough control so I just manually make all of the stuff in templates myself
[22:48:47] teaearlgraycold: So my recommendation would be to use the vanilla form_for
[22:49:32] teaearlgraycold: slava_: http://stackoverflow.com/questions/7809694/deploy-a-rails-application-in-a-sub-directory-with-passenger
[22:49:48] Wolfram74: bleh, http://i.imgur.com/5Pveps8.gifv teaearlgraycold
[22:50:01] Wolfram74: but thank you
[22:50:12] teaearlgraycold: So that + the BaseURI setting thing should be what you want, slava_
[22:50:31] teaearlgraycold: wolfram74: yeah. It's a sad world out there when it comes to Rails form generators
[22:50:35] qejk: has joined #RubyOnRails
[22:50:40] atrius_: has joined #RubyOnRails
[22:50:51] teaearlgraycold: I've had to bypass a couple gems' auto-generated forms
[22:51:13] slava_: teaearlgraycold, the selected answer?
[22:52:07] teaearlgraycold: Well basically then answers are "read the docs" for Passenger
[22:52:11] teaearlgraycold: So I guess install Passenger
[22:52:38] jmaya: has joined #RubyOnRails
[22:52:43] benlieb: has joined #RubyOnRails
[22:56:06] roshanavand: has joined #RubyOnRails
[22:56:18] quazimodo: has joined #RubyOnRails
[22:57:55] sinkensabe: has joined #RubyOnRails
[23:06:43] yoongkang: has joined #RubyOnRails
[23:07:48] kitsuneyo: has joined #RubyOnRails
[23:09:43] fedor: has joined #RubyOnRails
[23:17:20] sdwrage: has joined #RubyOnRails
[23:21:19] Radar: GOOD MORNING
[23:21:55] Axsuul: has joined #RubyOnRails
[23:25:46] patrick2: has joined #RubyOnRails
[23:26:24] FailBit: https://www.youtube.com/watch?v=L-IpCQp5Wdw
[23:26:42] SteenJobs: has joined #RubyOnRails
[23:28:27] baweaver: has joined #RubyOnRails
[23:29:18] stannard: has joined #RubyOnRails
[23:31:52] shinenelson: has joined #RubyOnRails
[23:33:42] bmalum: has joined #RubyOnRails
[23:35:19] jjarmoc: has joined #RubyOnRails
[23:36:21] dkphenom: has joined #RubyOnRails
[23:36:41] renews: has joined #RubyOnRails
[23:36:56] baweaver: has joined #RubyOnRails
[23:38:39] juddey: has joined #RubyOnRails
[23:39:43] Rubie: has joined #RubyOnRails
[23:40:03] AnomalousBit: has joined #RubyOnRails
[23:40:27] s2013: morning Radar
[23:41:18] njero: has joined #RubyOnRails
[23:41:22] tubbo: Radar: good night
[23:42:38] tildes: has joined #RubyOnRails
[23:44:16] AnomalousBit: Hello! I'm hoping for some philosophical advice. I'm at the crossroads between simplicity/complexity and WET/DRY code. I'm tempted to implement a nasty function as a concern and slap it on my rails models (DRY, reusable, at least until something else comes along and breaks the concept), or keep a more simple version of this concern inside three or four of my models, but it will be mostly WET code at that point, some repetition,
[23:44:16] AnomalousBit: easier to comprehend. Thoughts?? Which would you rather come across in a code base?
[23:44:39] Radar: AnomalousBit: !ncnh
[23:44:39] helpa: AnomalousBit: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[23:45:37] AnomalousBit: Sure, give me a minute to make a pastebin. My apologies.
[23:45:44] angeloc: has joined #RubyOnRails
[23:45:57] tubbo: told client to put up a maintenence page
[23:46:00] tubbo: their site is now 500ing
[23:46:15] tubbo: worst maintenence page ever
[23:46:24] rakm: has joined #RubyOnRails
[23:48:00] Radar: AnomalousBit: Gist please.
[23:48:02] Radar: AnomalousBit: !giast
[23:48:04] Radar: AnomalousBit: !gist
[23:48:04] helpa: AnomalousBit: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[23:48:11] Radar: tubbo: hahaha
[23:48:13] AnomalousBit: you got it! one minute.
[23:48:41] Coldblackice: has joined #RubyOnRails
[23:51:29] Rubie: has joined #RubyOnRails
[23:53:23] paradisaeidae: has joined #RubyOnRails
[23:54:16] Radar: It has now been one minute.
[23:54:22] Radar: (a very long minute)
[23:55:29] bambanx: hello radar
[23:55:57] AnomalousBit: hahah sorry Radar, i'm trying to write a little documentation so i don't get a complete WTF are you doing from you guys lol
[23:56:09] Radar: AnomalousBit: That is a breath of fresh air :)
[23:56:35] AnomalousBit: I may still get that though, without seeing my whole app this may not make any sense at all due to the various relationships.
[23:56:54] bambanx: guys am a little confused, when i create a controller can i call it as i want?
[23:57:37] FailBit: well, I mean, you can
[23:57:40] FailBit: you're not supposed to
[23:57:52] FailBit: the routing magic is supposed to take care of that
[23:58:26] FailBit: if you have external concerns that controllers are doing, make them into actual concerns
[23:58:39] FailBit: app/controllers/concerns/
[23:58:50] bambanx: how many lines i can paste here?
[23:58:58] bambanx: 3 lines is allowed?
[23:59:00] Radar: bambanx: !gist if you're having those questions
[23:59:00] helpa: bambanx: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[23:59:25] SteenJobs: has joined #RubyOnRails