« Back to channel list

#RubyOnRails - 19 April 2016

« Back 1 day Forward 1 day »
[00:00:03] Megamos: smathy, Yeh, sorry I changed around to try something new. So am I.
[00:00:08] blindMoe: here is an example of what I have tried: https://gist.github.com/blindMoe/cbf88388ce87e794762c2cc84595bd5b
[00:02:55] smathy: Megamos, umm, ok, so not sure what you want me to do, my answer to the code you're showing is - that's not how you specify something can accept an array of scalars: http://devdocs.io/rails~4.2/actioncontroller/parameters#method-i-permit
[00:04:16] yfeldblum: has joined #RubyOnRails
[00:04:29] twilling: has joined #RubyOnRails
[00:04:29] smathy: blindMoe, you can call methods using strings or symbols with send or public_send
[00:04:46] smathy: blindMoe, http://devdocs.io/ruby~2.2/object#method-i-send
[00:05:16] triptec: has joined #RubyOnRails
[00:05:43] havenwood: ruby --dump parsetree_with_comment -e 'nil&.omgwtfbbq'
[00:05:47] FailBit: mrbubbles: http://mitrev.net/ruby/2015/11/13/the-operator-in-ruby/
[00:06:13] bronson: has joined #RubyOnRails
[00:08:22] Megamos: smathy, taking away :occasions from permit function still does not create "Unpermitted warning"
[00:10:15] blindMoe: smathy: thanks I'll take a look
[00:10:21] wethu: has joined #RubyOnRails
[00:10:46] jhass: blindMoe: smells like http://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html#method-i-serialize might be worth a look too
[00:10:53] Megamos: smathy, I'm permitting an other array like this "{:instructor_ids => []}", so a hash with arrays would be like this? "occasions: [{:o1 => []},{:o2 => []},{:o3 => []},{:o4 => []},{:o5 => []},{:o6 => []},{:o7 => []}]"
[00:11:50] egray: has joined #RubyOnRails
[00:12:22] macsteps: has joined #RubyOnRails
[00:12:23] jhass: blindMoe: or http://blog.plataformatec.com.br/2014/07/rails-4-and-postgresql-arrays/
[00:12:48] blindMoe: jhass: the problem is that the size of the array is unknown
[00:13:02] blindMoe: also this is coming from a REST API and not the db
[00:13:40] jhass: you got an API that returns you "foo1", "foo2", "foo3" for an array like structure? ugh
[00:13:49] blindMoe: yeap .. Shopify
[00:14:03] jhass: hard to believe they fucked that up so badly...
[00:14:11] blindMoe: yeah it is pretty annoying
[00:14:32] blindMoe: not really sure how I could use "send" to get the value of that property
[00:15:33] Megamos: smathy, it works as should if I just "if @practice.update(practice_params.merge(occasions))" guess I can add some regex to check formation of strings before merging
[00:15:59] Megamos: just tired of strong parameters for now
[00:16:25] FailBit: blindMoe: send is one way to do it but it's not that great
[00:16:53] FailBit: it's really best to use an array but ¯\_(ツ)_/¯
[00:16:58] blindMoe: FailBit: have a suggestion to replace it? I can't get it to work anyway :)
[00:17:16] blindMoe: well the problem is that I don't have a way to turn it into an array that wouldn't require doing the same thing
[00:17:33] quazimodo: has joined #RubyOnRails
[00:17:34] quazimod1: has joined #RubyOnRails
[00:17:53] FailBit: why is yoru code design so screwy
[00:18:07] FailBit: like, can you update the gist with the product model code
[00:18:17] sypheren: has joined #RubyOnRails
[00:18:19] blindMoe: FailBit: like I said this is not my code design.. pulling product data from the Shopify API .. there is no Product Model
[00:18:22] jhass: blindMoe: API docs seems to suggest it's always "option1", "option2", "option3", either present or null?
[00:18:41] FailBit: well that's one way to not design an API
[00:19:14] blindMoe: jhass: yeah but there can technically be more than 3 options
[00:19:46] blindMoe: I guess right now I am just more curious as to why I can just pull variable data with a dynamic name
[00:20:00] jhass: "A product may have a maximum of 3 options. 255 characters limit each."
[00:20:25] blindMoe: hrmm maybe they put a limit to the 3 but I know for sure I have been able to create more options than 3 in the past
[00:20:30] FailBit: I really don't know why they decided to do that and not just make options be Array
[00:20:54] blindMoe: They have an options array that is the info on the options, not the value
[00:20:55] triptec: has joined #RubyOnRails
[00:21:09] FailBit: okay then it should be a hash
[00:21:25] blindMoe: so I am still curious how I could actually do what I am looking to do
[00:22:14] jhass: so @product.options.map {|option| option[:name] }.zip([variant.option1, variant.option2, variant.option3]).each do |name, value|
[00:22:14] blindMoe: I can get around the problem by just hoping / relying on the fact that the product is limited to three options but I feel like there should be a somewhat simple way to grab data from a property whos name is stored in a variable
[00:22:50] jhass: "property" is not well defined
[00:23:34] jhass: the need to do so indicates fucked up design in 98% of the cases and calls for an array or hash instead
[00:23:56] jhass: the workaround depends on what and how exactly was used instead
[00:24:25] jhass: in this case what kind of object variant is actually (or more specifically how that's implemented)
[00:24:49] King_Rex: has joined #RubyOnRails
[00:25:33] blindMoe: I see what your doing and the code makes sense but it still relies on the fact that there are only 3 options
[00:26:18] jhass: I gotta see the implementation of variant's .class in order to suggest anything else
[00:26:30] jhass: not even sure the above works for all I know of it
[00:27:13] pawnbox: has joined #RubyOnRails
[00:27:17] King_Rex: has joined #RubyOnRails
[00:28:46] blindMoe: jhass: it's no big deal... I can just work around it for now
[00:28:50] blindMoe: thanks for the tips though
[00:28:56] blindMoe: .zip() is pretty nice to know about
[00:30:36] jhass: if @product's class is your doing, a method on it that takes a variant and returns something sane would be good, else this calls for a view helper
[00:31:09] jhass: well actually maybe better one on variant
[00:31:19] zave: has joined #RubyOnRails
[00:31:23] jhass: but don't monkey patch
[00:32:03] blindMoe: jhass: yeah if I really need to break it apart in the future ( like if they do allow a dynamic number of options ) then I will create a helper function and build the array in the contructor
[00:32:22] Devalo: has joined #RubyOnRails
[00:33:51] nickenchuggets: has joined #RubyOnRails
[00:34:38] triptec: has joined #RubyOnRails
[00:36:14] HenriettaSalt: has joined #RubyOnRails
[00:37:51] SteenJobs: has joined #RubyOnRails
[00:38:04] nickenchuggets: has joined #RubyOnRails
[00:39:24] lemur: has joined #RubyOnRails
[00:39:58] crdpink: has joined #RubyOnRails
[00:40:27] twilling: has joined #RubyOnRails
[00:42:47] Sawbones: has joined #RubyOnRails
[00:44:00] zave: has joined #RubyOnRails
[00:45:10] diegoaguilar: has joined #RubyOnRails
[00:46:41] stannard: has joined #RubyOnRails
[00:47:27] KnownSyntax: has joined #RubyOnRails
[00:47:38] aloneintheworld: has joined #RubyOnRails
[00:48:14] one_zero: has joined #RubyOnRails
[00:50:12] triptec: has joined #RubyOnRails
[00:53:30] mwcmitchell: has joined #RubyOnRails
[00:54:23] beilabs: has joined #RubyOnRails
[00:54:44] daivyk: has joined #RubyOnRails
[00:55:48] RegulationD: has joined #RubyOnRails
[01:03:42] pawnbox: has joined #RubyOnRails
[01:06:49] quazimodo: has joined #RubyOnRails
[01:06:53] quazimod1: has joined #RubyOnRails
[01:08:42] ur5us: has joined #RubyOnRails
[01:09:37] shanson: has joined #RubyOnRails
[01:10:06] Ropeney: has joined #RubyOnRails
[01:12:00] sevenseacat: has joined #RubyOnRails
[01:13:38] silverdust: has joined #RubyOnRails
[01:13:53] Sawbones: has joined #RubyOnRails
[01:14:07] FailBit: Radar: is there a recommended way to "neuter" a policy class so it will always return true (the user is an admin) other than hacks like method_missing?
[01:14:32] IrishGringo: has joined #RubyOnRails
[01:15:56] Radar: FailBit: yes
[01:16:19] Radar: FailBit: https://github.com/rubysherpas/r4ia_examples/blob/master/ticketee/app/policies/project_policy.rb
[01:16:57] Radar: Actually, I'm not sure if that does it.
[01:17:05] Radar: It's at least the way that we do it within Rails 4 in Asction.
[01:17:08] Radar: can't type today
[01:17:30] FailBit: I'm just gonna use a return guard for now
[01:17:38] Radar: I'd probably move the user.try(:admin?) into its own method so it would be admin? || record.has_member?(user)
[01:17:45] FailBit: yeah, that's what I ddi
[01:20:52] FailBit: is it kosher to pass a model object to the policy method?
[01:21:07] FailBit: (I only need this in a few instances)
[01:22:31] jenrzzz: has joined #RubyOnRails
[01:23:34] crdpink2: has joined #RubyOnRails
[01:26:17] theunraveler: has joined #RubyOnRails
[01:29:58] crystal77: has joined #RubyOnRails
[01:30:01] Cohedrin_: has joined #RubyOnRails
[01:30:40] ensyde: has joined #RubyOnRails
[01:31:31] blindMoe: If there a way to pass an array or hash to a model for attribute assignment and have the model not do anything with attributes that it does not have but are in the array or hash that was passed in?
[01:32:15] blindMoe: basicaly I am trying to do something like: model1.assign_attributes @model2.attributes but the problem is that model2 contains some fields that model1 does not and rails errors out
[01:33:03] FailBit: that's gonna fuck up its id
[01:33:04] sevenseacat: slice out only the attributes you want
[01:33:17] sevenseacat: eg. model2.attributes.slice(:name, :address, :whatever)
[01:33:26] quazimodo: has joined #RubyOnRails
[01:33:30] blindMoe: sevenseacat: trying to avoid having to specify each and every attribute
[01:33:48] FailBit: then use Hash#except (ActiveSupport)
[01:34:02] blindMoe: was thinking of something kind of like this but since I suck at rails I can't quite accomplish it yet: https://gist.github.com/blindMoe/c5b2cac964d5711e59045defb1567271
[01:35:23] tjbiddle: has joined #RubyOnRails
[01:36:43] diegoaguilar: has joined #RubyOnRails
[01:40:07] aurum_infide: has joined #RubyOnRails
[01:42:39] Sawbones: has joined #RubyOnRails
[01:43:21] Radar: blindMoe: @product[attribute] = value
[01:43:55] FailBit: Radar: is it okay to pass a model object to a policy or is that a nono?
[01:44:14] blindMoe: Radar: oh damn that did the trick. Thank you very much. I through I tried that first but I guess not
[01:44:16] Radar: FailBit: Why not?
[01:44:42] FailBit: just wanted to make sure
[01:45:05] crdpink: has joined #RubyOnRails
[01:45:35] macsteps: has joined #RubyOnRails
[01:51:16] wij32: has joined #RubyOnRails
[01:51:17] quazimodo: has joined #RubyOnRails
[01:51:21] quazimod1: has joined #RubyOnRails
[01:53:29] Arcaire: I kind of wonder how many people in here are using ten year-old modems.
[01:53:43] Arcaire: At least one
[01:54:08] Ropeney: Arcaire, Im using 10 year old routers if that counts
[01:54:28] shanson: has joined #RubyOnRails
[01:54:31] Arcaire: Is it a Linksys or a Netgear?
[01:54:32] wij32: so I had a question, I have a rails scaffold object called test, when you create a new test you set the student name which is fine. But I also have a list of students with a button saying "create test". how can I automaticlaly go to the new test form with the student name populated from this
[01:54:47] newjersey: has joined #RubyOnRails
[01:55:18] newjersey: has joined #RubyOnRails
[01:55:26] Ropeney: 2 good old 1721's
[01:56:10] nickenchuggets: has joined #RubyOnRails
[01:56:10] nickenchuggets: has joined #RubyOnRails
[01:57:29] FailBit: Arcaire, mine is probably 10 years old
[01:57:32] FailBit: fuck verizon
[01:57:47] FailBit: I hate this goddamn internet monopoly
[01:58:03] FailBit: the only other choice here is comcast and I will not choke down their dick I mean service
[01:58:12] Ropeney: I have a pfsense box... I'm waiting to setup
[01:59:33] SteenJobs: hey guys - i’m trying to login to my app using curl but i keep getting the CSRF authenticity error - how can i get past that besides disabling it temporarily? (i keep trying to supply the CSRF token but it ain’t workin)
[01:59:47] sevenseacat: *hey everyone
[02:00:31] newjersey: has joined #RubyOnRails
[02:00:34] hxegon: has joined #RubyOnRails
[02:00:35] IrishGringo: has joined #RubyOnRails
[02:01:44] yfeldblum: has joined #RubyOnRails
[02:01:50] tfitts: SteenJobs: you need to either supply the right token or disable it for the action.
[02:02:24] SteenJobs: sevenseacat: ugh sorry
[02:02:27] SteenJobs: i should know better
[02:02:39] SteenJobs: although i think guys applies universally, although perhaps it shouldn't
[02:02:52] SteenJobs: in most languages that have masculine and feminine, the masucline plural is all inclusive
[02:02:59] FailBit: it pretty much does at this point but I refuse to get involved in this
[02:02:59] macsteps: has joined #RubyOnRails
[02:03:02] SteenJobs: tfitts: ya, so i get the cookie, grep the csrf, and include it
[02:03:14] SteenJobs: FailBit: oh don’t get me wrong, i’ll concede to whatever sevenseacat says
[02:03:53] SteenJobs: tfitts: but i keep getting can’t verify CSRF. i’ve tried including it as a header, as a param, i’m out of options so far
[02:05:00] sevenseacat: http://jvns.ca/blog/2013/12/27/guys-guys-guys/
[02:05:07] Ropeney: SteenJobs, are you sending the cookie?
[02:06:07] bruno-: has joined #RubyOnRails
[02:06:48] SteenJobs: ropeney: yea…, using —cookie-jar, although if the cookies are generated by devise will that possibly not work?
[02:07:20] SteenJobs: it should work i think…and i’m including it in my req
[02:07:35] SteenJobs: ropeney: *meant to say —cookie-jar is how i got it, wrote it to file, and including
[02:08:54] newjersey: has joined #RubyOnRails
[02:10:28] Ropeney: SteenJobs, maybe https://github.com/lynndylanhurley/devise_token_auth/issues/167 will put you in the right direction
[02:10:40] SteenJobs: oh sick find
[02:10:55] joshkovach: has joined #RubyOnRails
[02:11:19] smathy: wij32, basically you need to include the student id in your URL/request and look it up if it's there in the controller action that receives that.
[02:16:24] smathy: How is that blog article a good reference for arguing that "hey guys" is gender specific sevenseacat ?
[02:16:57] smathy: ...actually, wrong channel.
[02:16:59] sevenseacat: because it shows that there are decent percentages that see it that way
[02:17:26] Rixius: has joined #RubyOnRails
[02:18:55] SteenJobs: ropeney: https://gist.github.com/jesiegel1/1012b436a86e337f603ef79f9aac0d40
[02:19:35] SteenJobs: meaning despite the fact that it’s not technically gender specific, i’m sure using it that way can shape people’s perspectives to some degree
[02:21:44] Axy: has joined #RubyOnRails
[02:21:58] Ropeney: SteenJobs, shouldn't your second one be -b or --cookie?
[02:22:35] SteenJobs: ha thank you sir
[02:22:37] SteenJobs: for that catch
[02:25:40] SteenJobs: ropeney: just trying to get the syntax for my login creds right, but no more CSRF issue
[02:25:43] SteenJobs: thank you sir!
[02:26:06] SteenJobs: i figured with some of my manual tests, being able to curl from terminal will make my life infinitely easier
[02:27:10] chagel: has joined #RubyOnRails
[02:27:44] zave: has joined #RubyOnRails
[02:28:25] SteenJobs: ropeney: we have liftoff! (i forgot to set content-type in the header, so it was yelling at me)
[02:28:52] tfitts: SteenJobs: you might try postman too for sending manual Params
[02:29:21] SteenJobs: tfitts: cool, thanks
[02:29:30] pawnbox: has joined #RubyOnRails
[02:29:38] SteenJobs: sucks when you miss one of those single quotes in terminal ha
[02:29:41] Arcaire: sevenseacat: I think that image doesn't really illustrate your point.
[02:29:46] Arcaire: People are going to point that out, fwiw.
[02:29:57] baweaver: has joined #RubyOnRails
[02:30:00] sevenseacat: I think it says a lot about the people that say that
[02:30:05] tfitts: SteenJobs: you using pry?
[02:30:07] Arcaire: ... I know I just did, so this is a fulfilling prophecy, but I was meaning in terms of in order to refute it.
[02:30:12] SteenJobs: tfitts: yep, always :)
[02:30:20] Arcaire: sevenseacat: Not really, honestly.
[02:30:28] SteenJobs: tfitts: are you about to tell me i can send these reqs thru pry?
[02:30:34] SteenJobs: and somehow it’ll make my life easier?
[02:31:05] Arcaire: If you link a statistic showing how many people are voting for Trump per state (presently, twice as much as any other candidate), saying "WOW PEOPLE HATE TRUMP", someone is going to question how well you've interpreted your source.
[02:31:23] Ropeney: Arcaire, yet no one did
[02:31:26] Arcaire: That doesn't "say a lot about the people who say that", the only thing it says is that they can interpret the source better.
[02:31:29] Arcaire: Actually they apparently did.
[02:33:14] Ropeney: feels arguing for the sake of arguing, its clear in this room people find it ambiguous so probably best to leave it at that :)
[02:33:18] Arcaire: This is a better source: https://www.quora.com/Is-the-word-guys-gender-neutral
[02:33:21] smathy: Let's bring this back on topic please.
[02:33:26] Arcaire: The answer-er is a language teacher.
[02:33:43] FailBit: >using quora to defend a point
[02:34:04] Devalo: has joined #RubyOnRails
[02:34:43] mwlang: that article seems to say “guys” is gender neutral in social settings, but quite biased in a programming setting.
[02:35:01] quazimodo: has joined #RubyOnRails
[02:35:03] quazimod1: has joined #RubyOnRails
[02:35:11] smathy: mwlang, ropeney FailBit - enough please, on-topic or be quiet(ened).
[02:35:13] mfilipe_: how do I convert an TemplateCategory model to :template_category?
[02:35:34] FailBit: mfilipe_: wot
[02:35:44] smathy: mfilipe_, .underscore
[02:35:49] FailBit: @tc.class.to_s.underscore
[02:36:39] mfilipe_: smathy, FailBit thanks guys! :D
[02:37:11] mwlang: heh…just came in. :-/ Anyway, how do I get the response status code (200, 404, etc.) after using WebDriver to navigate to a page? Selenium::WebDriver.for(:phantomjs).navigate.to “http://google.com”
[02:38:10] mwlang: mfilipe_: Is TemplateCategory an ActiveRecord model?
[02:38:43] mwlang: or PORO with ActiveModel::Naming mixed in?
[02:38:54] tfitts: SteenJobs: not send them but make sure they are being received as you think. Not as helpful for csrf but most other Params.
[02:39:45] mfilipe_: mwlang, an activerecord model
[02:42:29] mwlang: mfilipe_: Directly off the class: TemplateCategory..name.demodulize.underscore.to_sym
[02:42:55] mwlang: oops… only one ‘.’ where you see ‘..'
[02:43:32] mwlang: TemplateCategory.name.demodulize.underscore.to_sym … and if you have an instance already: TemplateCategory.new.class.name.demodulize.underscore.to_sym
[02:43:46] mwlang: demodularize is only needed if you’ve namespaced and want to be safe.
[02:46:31] tjbiddle: has joined #RubyOnRails
[02:47:26] pawnbox: has joined #RubyOnRails
[02:48:51] w09x: has joined #RubyOnRails
[02:49:32] SteenJobs: can’t manage to find the devise auth token anywhere in the response
[02:50:25] Chagel_: has joined #RubyOnRails
[02:50:39] sarink: has joined #RubyOnRails
[02:52:22] SteenJobs: because otherwise current_user is nil and most of my GET reqs fail
[02:52:24] dopie: Does anyone have any experience with cloud66 ?
[02:52:26] emachnic: has joined #RubyOnRails
[02:52:26] SteenJobs: (from terminal)
[02:53:20] w09x: has joined #RubyOnRails
[02:54:06] mwlang: Is there any good documentation on selenium-webdriver? What I can find via the source code and github seems very sparse…I’m thinking I’m looking in the wrong places.
[02:54:42] jobewan: has joined #RubyOnRails
[02:55:42] mwlang: seems strange I can access driver.title, but not driver.headers or driver.body, etc.
[02:56:13] w09x: has joined #RubyOnRails
[03:00:16] enitiz: has joined #RubyOnRails
[03:01:50] triptec: has joined #RubyOnRails
[03:12:07] flashpoint9: has joined #RubyOnRails
[03:13:16] braincrash: has joined #RubyOnRails
[03:15:15] mwlang: nevermind the selenium-webdriver questions…just went up another level of abstraction to Capybara and getting all the functionality I need now.
[03:15:24] arBmind: has joined #RubyOnRails
[03:15:26] FailBit: has left #RubyOnRails: ("WeeChat 0.4.2")
[03:21:02] w09x: anyone know what's going on here? http://pastie.org/10803067 - The PaginateResponder does set the @resources variable but when the view seems to render the original @sites
[03:21:09] DoctorMonocular: has joined #RubyOnRails
[03:21:24] w09x: maybe setting @resources is not doing what I had hoped.
[03:22:31] blindMoe: has joined #RubyOnRails
[03:23:54] w09x: has joined #RubyOnRails
[03:24:32] zave: has joined #RubyOnRails
[03:26:56] pawnbox: has joined #RubyOnRails
[03:27:41] w09x: has joined #RubyOnRails
[03:30:43] rafaelfranca: has joined #RubyOnRails
[03:33:09] smoitra: has joined #RubyOnRails
[03:34:39] Devalo: has joined #RubyOnRails
[03:35:43] tweeeaks: has joined #RubyOnRails
[03:35:45] devn: has joined #RubyOnRails
[03:35:49] hoylemd: has joined #RubyOnRails
[03:35:50] smathy: w09x, why would setting @resources have any impact?
[03:36:01] monoprotic: has joined #RubyOnRails
[03:37:17] smathy: w09x, seems very unlikely to be that a relation would have a total_entries method on it.
[03:38:28] bphogan: has joined #RubyOnRails
[03:38:51] wmoxam: has joined #RubyOnRails
[03:40:33] SteenJobs: has joined #RubyOnRails
[03:43:24] w09x: smathy: will paginate
[03:46:11] smathy: w09x, ok, and where's .search and .relation come from?
[03:47:45] snowy: has joined #RubyOnRails
[03:49:59] quazimodo: has joined #RubyOnRails
[03:50:00] quazimod1: has joined #RubyOnRails
[03:56:42] w09x: smathy: thats metasearch
[03:57:12] w09x: bit of a gnarly mix here of MetaSearch, Custom Responder and Jbuilder going on
[04:01:38] w09x: smathy: ah! controller.instance_variable_set("@#{controller.controller_name}", ::PaginateResponder::Paginator.new(self).paginate!) was the answer incase you are interested
[04:02:31] smathy: ACTION backs away slowly :)
[04:02:49] tildes: has joined #RubyOnRails
[04:04:43] aloneintheworld: Anyone using React? How can I use react components that are available as NPM packages in a Rails project?
[04:04:53] aloneintheworld: like https://github.com/enkidevs/react-search-input
[04:07:06] smathy: aloneintheworld, don't you just dump those files: https://github.com/enkidevs/react-search-input/tree/master/src into your app/assets/javascripts and do the right asset pipeline stuff with them?
[04:08:08] bronson: has joined #RubyOnRails
[04:08:24] null__: has joined #RubyOnRails
[04:09:12] beilabs_: has joined #RubyOnRails
[04:09:22] aloneintheworld: not sure if Rails is going to understand this import Fuse from 'fuse.js'
[04:09:38] aloneintheworld: fuse.js is not even present in the src
[04:10:26] TheMoonMaster: has joined #RubyOnRails
[04:10:35] USvER: has joined #RubyOnRails
[04:10:51] GriffinHeart: has joined #RubyOnRails
[04:10:54] USvER: Good morning!
[04:12:46] smathy: aloneintheworld, Rails shouldn't run the JS.
[04:13:03] USvER: Any advice on how to make SQL LIKE for array using OR, and put it as scope. ?
[04:13:32] smathy: USvER, "for array"?
[04:13:32] aloneintheworld: I know, I just want to know how to include that package into my rails project
[04:13:37] aloneintheworld: which is using react
[04:14:40] smathy: aloneintheworld, well, the browser is using react, so really your question boils down to "How do I get this JS to the browser?" - which is the question I answered above.
[04:14:44] USvER: smathy: Model.name_contains(["123", "abc"])
[04:15:01] USvER: smathy: where name_contains is a scope
[04:15:07] smathy: USvER, !code
[04:15:07] helpa: USvER: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[04:15:09] Technodrome: has joined #RubyOnRails
[04:16:51] aloneintheworld: smathy: Rails is bringing my JS assets to the browser actually
[04:17:22] aloneintheworld: so I want to know how Rails can bring NPM JS modules to the browser
[04:18:03] lxsameer: has joined #RubyOnRails
[04:18:41] Radar: aloneintheworld: You would need to use something such as https://github.com/rharriso/bower-rails
[04:20:43] USvER: smathy: https://gist.github.com/USvER/2d47caf7e045a06b70109ab970166c23
[04:21:18] USvER: smathy: this is what i try to achive
[04:22:40] smathy: Oh, I assumed he was using https://github.com/reactjs/react-rails
[04:23:44] dionysus69: has joined #RubyOnRails
[04:24:03] USvER: smathy: can't understand how i can chain where clauses each after another ant return that from scope
[04:24:52] tweeeaks: has joined #RubyOnRails
[04:25:40] smathy: USvER, even if your code worked .each returns the original list AND it would just return an array of `where`s AND even if an array of `where`s worked they'd be ANDed not ORed.
[04:26:17] USvER: smathy: yes it's a quick pseudocode
[04:26:34] DragonPunch: has joined #RubyOnRails
[04:27:08] USvER: smathy: but i have problems with understanding how it can be done =\
[04:27:17] smathy: USvER, I just commented with what I think will work
[04:28:14] technicallyrite: has joined #RubyOnRails
[04:28:20] beilabs: has joined #RubyOnRails
[04:28:32] smathy: Oh sorry that won't work either, we need to actually interpolate it ourselves, hang on...
[04:30:31] USvER: The problem with interpolation is that %% symbols are escaped when ruby strings interpolation is used
[04:31:45] USvER: also it should be properly sanitized, it's done only when rails interpolation on where clause is used
[04:33:48] diegoaguilar: has joined #RubyOnRails
[04:34:29] null__: has joined #RubyOnRails
[04:35:51] TheMoonMaster: has joined #RubyOnRails
[04:37:24] smathy: USvER, done.
[04:38:07] smathy: USvER, ...and yes, all those things you mentioned are taken care of.
[04:38:35] USvER: Thanks!!!! That is obvious not my level of rails =\
[04:38:40] smathy: ...and some that you didn't ;)
[04:38:51] smathy: USvER, most of that is just ruby, but yes - it's ugly and complex.
[04:39:19] smathy: Rails5 puts some of this to bed, also you can use gems like Squeel to get a nicer interface to most (all?) of the Arel backend.
[04:39:39] USvER: i'm on Rails5 beta 3
[04:40:13] smathy: Oh, well that has an .or helper, although actually I'm not sure how much (or even whether) it can help with this sort of thing.
[04:40:20] smathy: ...because the .or API has to be nested.
[04:40:40] USvER: ... yeah chained
[04:41:03] USvER: also LIKE is still not there
[04:42:25] smathy: USvER, anyway, all we're really doing there is making a string like: "name = '%s' OR name = '%s'" which is as many "elements" long as the incoming `filter` array, and then we're making an array with that string as the first element and the elements of the `filter` array (all "LIKE" escaped) as the remaining elements, and then passing that array to sanitize_sql_array
[04:43:32] USvER: Thanks. Need to read about that asterisk for the last argument of the function
[04:43:52] smathy: USvER, called the splat operator.
[04:45:42] triptec: has joined #RubyOnRails
[04:45:55] AnoHito: has joined #RubyOnRails
[04:47:14] hxegon: has joined #RubyOnRails
[04:51:57] tweeeaks: has joined #RubyOnRails
[04:53:58] USvER: smathy: thanks, it works!!! so this splat operator unrolls the array ar arguments for where clause... smart...
[04:54:29] smathy: USvER, yep, you're welcome.
[04:54:49] USvER: smathy: also thanks for showing me this sanitize_sql_like
[04:55:22] USvER: smathy: no more dirty ruby interpolation for this
[04:55:25] smathy: USvER, np - uep.
[04:57:40] krzkrz: has joined #RubyOnRails
[04:57:41] RegulationD: has joined #RubyOnRails
[04:58:33] sarink: has joined #RubyOnRails
[05:00:12] Sawbones: has joined #RubyOnRails
[05:01:49] jetpack_joe: has joined #RubyOnRails
[05:18:07] fourcolors: has joined #RubyOnRails
[05:22:24] Devalo: has joined #RubyOnRails
[05:22:54] KensoDev: has joined #RubyOnRails
[05:28:53] PedramT: has joined #RubyOnRails
[05:30:06] darutoko: has joined #RubyOnRails
[05:32:11] PedramT_: has joined #RubyOnRails
[05:34:23] GriffinHeart: has joined #RubyOnRails
[05:35:59] PedramT: has joined #RubyOnRails
[05:36:08] sp1rs: has joined #RubyOnRails
[05:36:42] yardenbar: has joined #RubyOnRails
[05:37:04] duncannz: has joined #RubyOnRails
[05:37:25] Synthbread: has joined #RubyOnRails
[05:41:15] agent_white: has joined #RubyOnRails
[05:42:00] chagel: has joined #RubyOnRails
[05:42:27] Palsson: has joined #RubyOnRails
[05:43:04] hello9: has joined #RubyOnRails
[05:45:16] SteenJobs: do you have a preferred method of passing args to a rake task
[05:45:36] crdpink: has joined #RubyOnRails
[05:45:50] hello9: hey, running into a weiiird issue with using a scope and sorting. When I write out the full command in console it works with asc/desc, but when I put it in the scope (even hard coding) it doesn't work gist: https://gist.github.com/anonymous/4e5d111953d1d9161d287f0ec170aebd
[05:46:54] hello9: the third example that isn't an arg, its a comment in the parenthesis...sorry bout that
[05:47:02] segy: has joined #RubyOnRails
[05:47:24] ZerGabriel: has joined #RubyOnRails
[05:48:14] chagel: has joined #RubyOnRails
[05:49:05] wasane: has joined #RubyOnRails
[05:50:45] hello9: nevermind! all good here
[05:50:52] hello9: just more ruby on rails conventions etc.....
[05:51:05] hello9: thx anyone that checked it out
[05:53:11] pawnbox: has joined #RubyOnRails
[05:53:52] sp1rs: has joined #RubyOnRails
[05:57:32] PedramT: has joined #RubyOnRails
[06:00:37] sarink: has joined #RubyOnRails
[06:05:10] GriffinHeart: has joined #RubyOnRails
[06:05:58] arup_r: has joined #RubyOnRails
[06:12:18] mices: has joined #RubyOnRails
[06:15:33] pawnbox: has joined #RubyOnRails
[06:16:26] rodfersou: has joined #RubyOnRails
[06:18:19] PedramT: has joined #RubyOnRails
[06:18:19] AimlessRAven: has joined #RubyOnRails
[06:18:41] AimlessRAven: https://gist.github.com/anonymous/37abf5f06752b76ed0c2c8b53b3b7785
[06:19:12] AimlessRAven: can i unite this routes to use 1 action
[06:22:41] sp1rs: has joined #RubyOnRails
[06:22:42] Ropeney: 1 action in controller? sure. Wouldn't recommend it though
[06:22:43] Ropeney: you just do if request.post? .... elsif request.get? ... end
[06:24:01] AimlessRAven: ropeney: how this would be looks like
[06:24:10] Ropeney: i just showed?
[06:24:42] anna`: has joined #RubyOnRails
[06:24:44] AimlessRAven: yeah with some example
[06:24:57] Ropeney: in your action, thats how you check if its a get or post
[06:25:16] Ropeney: you then point both your routes at that action, and then I'm sure you can work out rest
[06:25:19] Ropeney: this is ugly though
[06:27:35] artto: has joined #RubyOnRails
[06:29:51] rvanlieshout: has joined #RubyOnRails
[06:31:28] sp1rs: has joined #RubyOnRails
[06:32:04] nerium: has joined #RubyOnRails
[06:33:54] sp1rs: has joined #RubyOnRails
[06:34:33] dopie: has anyone here worked with the gem faye and ssl?
[06:35:47] sp1rs: has joined #RubyOnRails
[06:36:23] pawnbox: has joined #RubyOnRails
[06:37:25] krzkrz: has joined #RubyOnRails
[06:41:22] PedramT: has joined #RubyOnRails
[06:41:48] mbreedlove: has joined #RubyOnRails
[06:41:59] sarink: has joined #RubyOnRails
[06:42:43] PedramT: has joined #RubyOnRails
[06:42:48] pLaToOn: has joined #RubyOnRails
[06:46:51] pawnbox: has joined #RubyOnRails
[06:47:19] crdpink2: has joined #RubyOnRails
[06:47:30] AimlessRAven: has joined #RubyOnRails
[06:47:43] AimlessRAven: how to validate form_tag fields, i dont have model
[06:47:49] AimlessRAven: just 3 fields and route
[06:48:09] ornerymoose: has joined #RubyOnRails
[06:51:04] sp1rs: has joined #RubyOnRails
[06:52:39] Ropeney: do it in your controller, but your going about things difficultly.
[06:52:49] SteenJobs: i think they’re gone
[06:53:06] SteenJobs: was about to say the same thing
[06:53:14] Ropeney: hmm does look that way, ah well
[06:53:34] SteenJobs: rake tasks turned out to be surprisingly helpful for generating data during development on an as needed basis
[06:53:41] SteenJobs: and now time to call it a night
[06:55:40] Spami: has joined #RubyOnRails
[06:56:35] artto: has joined #RubyOnRails
[06:57:15] pawnbox: has joined #RubyOnRails
[06:58:46] SteenJobs: has joined #RubyOnRails
[06:59:55] tjvc: has joined #RubyOnRails
[06:59:55] tjvc: has joined #RubyOnRails
[07:00:53] arup_r: good night!
[07:02:19] brunto: has joined #RubyOnRails
[07:05:50] Pumukel: has joined #RubyOnRails
[07:07:19] yfeldblum: has joined #RubyOnRails
[07:09:49] artto: has joined #RubyOnRails
[07:13:26] solars: has joined #RubyOnRails
[07:14:33] shilon: has joined #RubyOnRails
[07:15:07] atzorvas: has joined #RubyOnRails
[07:15:52] atzorvas: with rails 3.2.22.2 (from 3.2.13) I'm getting weird encoding errors with strings that I'm parsing from a .po file. any idea on this one? http://i.imgur.com/2IWoBLX.png
[07:17:28] nfk: has joined #RubyOnRails
[07:19:44] blindMoe: has joined #RubyOnRails
[07:19:58] artto: has joined #RubyOnRails
[07:20:00] Devalo: has joined #RubyOnRails
[07:20:28] mark_66: has joined #RubyOnRails
[07:21:45] zpe: has joined #RubyOnRails
[07:21:50] snowy: has joined #RubyOnRails
[07:25:31] antgel: has joined #RubyOnRails
[07:26:12] brunto: has joined #RubyOnRails
[07:26:13] sarink: has joined #RubyOnRails
[07:26:16] tildes: has joined #RubyOnRails
[07:30:53] mauro1254: has joined #RubyOnRails
[07:31:39] mikecmpbll: has joined #RubyOnRails
[07:36:58] edwinvdgraaf: has joined #RubyOnRails
[07:39:22] arup_r: has joined #RubyOnRails
[07:42:09] aganov: has joined #RubyOnRails
[07:42:57] matthias_: has joined #RubyOnRails
[07:45:42] universa1_: has joined #RubyOnRails
[07:45:58] crdpink: has joined #RubyOnRails
[07:48:22] krzkrz: has joined #RubyOnRails
[07:49:00] mices: has joined #RubyOnRails
[07:51:43] mauro1254: Hi guys. I have a dozen of apps sharing the same session. Is there a way to scope flash messages?
[07:52:08] mauro1254: I don't want flashes for app A to appear on app B (user with multiple app opened).
[07:53:42] atzorvas: it seems that this changeset is causing me the issues with the encoding : https://github.com/rails/rails/compare/v3.2.13...v3.2.14
[07:53:44] tildes: mauro1254: from what the api looks like (http://api.rubyonrails.org/classes/ActionDispatch/Flash.html) instead of flash[:notice] = 'My important message for app A' could be scoped as flash[:appA][:notice]
[07:54:01] tildes: mauro1254: add comparable condition in your views, and voilá
[07:54:55] mauro1254: tildes: I'm using this approach with session, but I'm wondering if there is a better solution or a gem ...
[07:55:13] pawnbox: has joined #RubyOnRails
[07:57:45] helpa-bot: has joined #RubyOnRails
[07:59:50] helpa: has joined #RubyOnRails
[08:00:11] mauro1254: tildes: I have a doze of apps sharing the same session (subdomains)
[08:01:43] mikecmpbll: has joined #RubyOnRails
[08:02:13] RegulationD: has joined #RubyOnRails
[08:04:44] bruno-: has joined #RubyOnRails
[08:06:27] pawnbox: has joined #RubyOnRails
[08:07:04] atzorvas: could anyone help me with this change? https://github.com/rails/rails/commit/c910388587220e962682b0b9187e79b8f1641c17
[08:07:14] tagaulap: has joined #RubyOnRails
[08:08:52] petor: has joined #RubyOnRails
[08:09:34] AimlessRAven: has joined #RubyOnRails
[08:09:46] AimlessRAven: how to set successful message in my remote: true form
[08:09:56] JulienITARD: has joined #RubyOnRails
[08:10:46] drptbl: has joined #RubyOnRails
[08:11:39] myntcake: has joined #RubyOnRails
[08:13:48] n008f4g_: has joined #RubyOnRails
[08:15:04] sp1rs: has joined #RubyOnRails
[08:16:25] AimlessRAven: someone knows ?
[08:18:18] jsrn: has joined #RubyOnRails
[08:19:38] ur5us: has joined #RubyOnRails
[08:19:41] crdpink2: has joined #RubyOnRails
[08:23:14] smoitra_: has joined #RubyOnRails
[08:26:09] crdpink: has joined #RubyOnRails
[08:28:23] moeabdol: has joined #RubyOnRails
[08:30:31] and0: has joined #RubyOnRails
[08:30:38] njero: has joined #RubyOnRails
[08:32:56] pawnbox: has joined #RubyOnRails
[08:34:57] ql6wlld: has joined #RubyOnRails
[08:36:10] arup_r: AimlessRaven: read the SO answers http://stackoverflow.com/questions/23967390/rails-flash-notice-via-ajax .. google first? :)
[08:37:30] arup_r: or complete answer here -> http://ashleyangell.com/2010/10/handling-rails-flash-message-with-ajax-requests/
[08:39:11] sypheren: has joined #RubyOnRails
[08:40:01] loglaunch: has joined #RubyOnRails
[08:40:19] myntcake: has joined #RubyOnRails
[08:41:15] arup_r: has joined #RubyOnRails
[08:43:07] mices: i wanna render form for new object with one of the fields populated, where do i pass the variable, in the view's link to the controller, in the default view for the controller action's render 'form' statement, or in the controller ?
[08:43:10] chouhoulis: has joined #RubyOnRails
[08:43:21] arBmind: has joined #RubyOnRails
[08:43:42] mices: i've been trying every way, the form always loads without the field populated
[08:46:43] crdpink2: has joined #RubyOnRails
[08:46:54] mices: o never mind i got it working
[08:49:06] and0: has joined #RubyOnRails
[08:50:59] Chagel_: has joined #RubyOnRails
[08:55:11] crdpink: has joined #RubyOnRails
[08:55:14] edwinvdgraaf: has joined #RubyOnRails
[08:57:20] edwinvdgraaf: has joined #RubyOnRails
[08:57:29] skislak: has joined #RubyOnRails
[08:57:43] chagel: has joined #RubyOnRails
[08:58:48] srinidhi: has joined #RubyOnRails
[08:58:49] tvw: has joined #RubyOnRails
[09:01:10] rohit_: has joined #RubyOnRails
[09:05:33] yfeldblum: has joined #RubyOnRails
[09:05:47] bruno-: has joined #RubyOnRails
[09:09:55] mices: if i render a partial form and pass variables that aren't fields in the form will the variables be passed to the controller i guess as hidden fields when the form's submitted?
[09:10:33] tbuehlmann: mices: how do you pass variables to a form that aren't fields?
[09:12:14] n008f4g_: has joined #RubyOnRails
[09:12:19] artto: has joined #RubyOnRails
[09:12:35] stupidystupid: has joined #RubyOnRails
[09:13:13] mices: tbuehlmann: with render partial in a view before the form which renders the form passing any variables i want
[09:13:49] sarink: has joined #RubyOnRails
[09:13:51] flav_: has joined #RubyOnRails
[09:15:19] tbuehlmann: only form fieds are submitted to the controller, so if you don't have them as hidden fields, they are not submitted
[09:16:11] mices: when populating fields the value= gets printed to the form so why not hidden fields being automatically printed
[09:17:41] mices: <%= render 'form' :file_name => params[:file_name] :file => params[:file] %> here file_name is the name of the file and file isn't a field in the form, it's the path to the file so the file can be moved from one directory to another after the record which catalogs the file is created
[09:18:18] mices: i haven't tried it yet
[09:18:19] tbuehlmann: that's passing variables to a partial, the form itself has nothing to do with that
[09:18:42] tbuehlmann: you'll need to add hidden fields for `file_name` and `file` in order to submit them
[09:19:10] mices: the variables are gonna be used with the form gets rendered as a partial
[09:20:44] mices: trying to use the same form for this and the regular create action
[09:21:40] mices: records are added by clicking a list of files in a directory
[09:21:42] Weavel: has joined #RubyOnRails
[09:22:29] tbuehlmann: btw, there's a missing `locals:`, right?
[09:22:30] fairyeye: has joined #RubyOnRails
[09:23:00] njero: !trouble :(
[09:23:01] tbuehlmann: well, by calling `render 'form', locals {file_name: params[:file_name], file: params[:file]}` you make the objects params[:file_name] and params[:file] available as local variables "file_name" and "file" inside the partial, nothing else
[09:23:20] tbuehlmann: mices: would you gist your code so we can have a look?
[09:23:48] crdpink2: has joined #RubyOnRails
[09:23:48] Jasaka|NA: has joined #RubyOnRails
[09:23:48] eisi: has joined #RubyOnRails
[09:23:48] wopi: has joined #RubyOnRails
[09:23:48] hypnosb: has joined #RubyOnRails
[09:23:48] mlitwiniuk: has joined #RubyOnRails
[09:23:48] flopsec: has joined #RubyOnRails
[09:23:49] flopsec: has joined #RubyOnRails
[09:24:33] hypnosb: has joined #RubyOnRails
[09:24:53] flopsec: has joined #RubyOnRails
[09:26:24] ferr: has joined #RubyOnRails
[09:27:59] errakeshpd: has joined #RubyOnRails
[09:30:09] solars: is there anything I can use to get a debugging console in a controller if it's json? web-console doesn't seem to like that
[09:30:43] mikecmpbll: er, stupid question of the day, how do i require a file in lib/ from application.rb? :/
[09:31:23] Ergo: has joined #RubyOnRails
[09:31:26] AimlessRAven: has joined #RubyOnRails
[09:31:34] AimlessRAven: how to validate single input .. i dont have model
[09:31:35] solars: mikecmpbll, e.g. config.autoload_paths << Rails.root.join('lib/channels/livetest')
[09:31:37] hervie: has joined #RubyOnRails
[09:31:45] mikecmpbll: solars : nah i don't want it autoloaded
[09:32:04] Ropeney: AimlessRaven, you asked that before
[09:32:05] solars: I only wanted to show you how to use Rails.root
[09:32:26] solars: mikecmpbll, just use it with require
[09:32:57] arpegius: has joined #RubyOnRails
[09:36:10] rohit_: has joined #RubyOnRails
[09:36:28] arpegius: has joined #RubyOnRails
[09:36:31] tbuehlmann: mikecmpbll: you don't want to add lib to the autoload_paths/eager_load_paths but only want to require one file?
[09:36:42] mikecmpbll: tbuehlmann : indeedio
[09:37:13] mikecmpbll: i ended up sticking it in initializers :/ seems the rails loadpath isn't properly set up when application.rb is parsed. i could just do a `load` i guess.
[09:37:37] workmad3: solars: I prefer to do `Rails.root + 'lib/channels/livetest'` personally :)
[09:38:16] mikecmpbll: Rails.root.join("lib", "channels", "livetest"), surely? :p
[09:38:51] workmad3: mikecmpbll: ruby has taken a pretty firm stance that, internally, `/` will always be the file-path separator
[09:39:02] workmad3: mikecmpbll: so I don't see the point of doing things like that :)
[09:39:06] hervie_: has joined #RubyOnRails
[09:39:40] blash1: has joined #RubyOnRails
[09:39:49] tbuehlmann: I prefer joining over using '/'
[09:40:18] workmad3: mikecmpbll: btw, you could potentially do `require_relative "../lib/file"` too, unless you're on a fairly ancient version of ruby
[09:40:33] tbuehlmann: yeah, that's what I was about to suggest
[09:40:45] mikecmpbll: ah yes, require_relative. my old friend.
[09:40:47] mikecmpbll: thanks I'll do that :)
[09:40:55] tbuehlmann: also, I like this: Rails.root / 'lib' / 'channels' / 'livetest'
[09:41:03] blash1: is there a shortcut to write a query with multiple ANDs like Model.where(a: ['b','c']) will product where in (), but that is like an OR. I need 'b' AND 'c' AND ...
[09:41:09] workmad3: tbuehlmann: ooh, Pathname overrides /
[09:41:13] workmad3: I like that :)
[09:41:16] crdpink: has joined #RubyOnRails
[09:43:05] tbuehlmann: also, if you're inside Rails::Application, config.root will do instead of Rails.root
[09:43:15] tbuehlmann: in case of fire or something
[09:43:57] blackhuey: has joined #RubyOnRails
[09:45:52] marr: has joined #RubyOnRails
[09:47:13] pawnbox: has joined #RubyOnRails
[09:48:09] pawnbox: has joined #RubyOnRails
[09:48:41] matthias_: has joined #RubyOnRails
[09:53:07] krzkrz: has joined #RubyOnRails
[09:53:24] emachnic: has joined #RubyOnRails
[09:59:28] moeabdol: has joined #RubyOnRails
[10:01:04] yfeldblum: has joined #RubyOnRails
[10:10:54] bronson: has joined #RubyOnRails
[10:15:31] konsolebox: has joined #RubyOnRails
[10:25:40] GriffinHeart: has joined #RubyOnRails
[10:26:43] stuarta: has joined #RubyOnRails
[10:27:39] petor: has joined #RubyOnRails
[10:30:36] egray: has joined #RubyOnRails
[10:35:29] artto: has joined #RubyOnRails
[10:42:06] zpe: has joined #RubyOnRails
[10:49:43] Detch: has joined #RubyOnRails
[10:50:07] mikeiniowa: has joined #RubyOnRails
[10:56:33] krzkrz: has joined #RubyOnRails
[10:56:43] arup_r1: has joined #RubyOnRails
[11:00:32] moeabdol: has joined #RubyOnRails
[11:03:00] pawnbox: has joined #RubyOnRails
[11:03:12] baweaver: has joined #RubyOnRails
[11:04:20] krzkrz: has joined #RubyOnRails
[11:05:47] GodFather: has joined #RubyOnRails
[11:08:56] neanderslob_: has joined #RubyOnRails
[11:13:45] dionysus69: has joined #RubyOnRails
[11:14:16] moeabdol: has joined #RubyOnRails
[11:16:36] bruno-: has joined #RubyOnRails
[11:21:23] moeabdol: has joined #RubyOnRails
[11:26:26] matthias_: has joined #RubyOnRails
[11:27:03] trinaldi: has joined #RubyOnRails
[11:28:30] beilabs: has joined #RubyOnRails
[11:28:35] trinaldi: has left #RubyOnRails: ()
[11:32:25] ldnunes: has joined #RubyOnRails
[11:35:20] artto: has joined #RubyOnRails
[11:39:37] njero: Hey can anyone point me to something which shows how rails url helpers grabs path variables from a model object?
[11:40:21] nfk: has left #RubyOnRails: ("Try memory.free_dirty_pages=true in about:config")
[11:46:48] arup_r1: n_e_o: http://ryanbigg.com/2012/03/polymorphic-routes/
[11:48:34] Ropeney: i think actually https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/mapper.rb#L779
[11:48:50] artto: has joined #RubyOnRails
[11:49:37] Ropeney: or I really need to find time to read all the source
[11:50:01] njero: :) arup___ ropeney thanks
[11:51:22] njero: i'm getting a weird reaction from urlgenerator helper
[11:51:22] njero: https://gist.github.com/NeoElit/916284644ec17a14a12ca3f822bc9b94
[11:52:37] siaW: has joined #RubyOnRails
[11:52:58] Ropeney: whats weird
[11:53:21] njero: i thought the helper will read from the object params
[11:53:28] njero: may be :P
[11:53:50] Ropeney: how would it know special event has the place
[11:53:52] ornerymoose: has joined #RubyOnRails
[11:54:04] siaW: i am using a callback to get svg images from the internet before saving my models, is there a better way you’d write this model? https://github.com/siaw23/devsnap/blob/master/app/models/developer.rb
[11:54:24] renegadeandy: has joined #RubyOnRails
[11:54:36] Ropeney: i think you could do polymorphic_path([@special_event.place, @special_event])
[11:54:48] njero: ropeney: that's y i thought readup first.. My thought was it will search for corresponding attrs from model
[11:55:04] Ropeney: if it does, awesome :D
[11:55:09] crystal77: has joined #RubyOnRails
[11:55:12] Ropeney: but i don't think so
[11:56:24] sp1rs: has joined #RubyOnRails
[11:58:43] Ropeney: n_e_o, http://edgeguides.rubyonrails.org/routing.html#shallow-nesting
[12:02:37] krzkrz: has joined #RubyOnRails
[12:03:23] njero: ropeney: but shallow will change ma routes,, don't wanna do that.. :l
[12:03:43] RegulationD: has joined #RubyOnRails
[12:03:59] njero: it's k i'll go with providing seperate place_id and id.. not a big deal
[12:06:59] Ropeney: n_e_o, you don't actually have to write id do you?
[12:07:04] sevenseacat: has joined #RubyOnRails
[12:07:22] Ropeney: admin_place_special_event_path(@special_event, @special_event.place) ?
[12:07:36] njero: yup that's ll
[12:08:05] Ropeney: yeah idk if u can get shorter
[12:08:51] njero: ropeney: if but i'm not loading preloading place, so thought pluck place_id directly.. saves my db :)
[12:12:56] newjersey: has joined #RubyOnRails
[12:13:58] moeabdol: has joined #RubyOnRails
[12:14:24] srinidhi: has joined #RubyOnRails
[12:14:54] w1lson: has joined #RubyOnRails
[12:15:59] AntiSpamMeta: has joined #RubyOnRails
[12:17:19] bruno-: has joined #RubyOnRails
[12:19:00] King_Rex: has joined #RubyOnRails
[12:20:11] crameth: has joined #RubyOnRails
[12:21:24] solars: has joined #RubyOnRails
[12:22:24] emachnic: has joined #RubyOnRails
[12:25:20] moep: has joined #RubyOnRails
[12:25:33] Devalo: has joined #RubyOnRails
[12:25:59] Bloomer: has joined #RubyOnRails
[12:30:40] ornerymoose: has joined #RubyOnRails
[12:32:05] crystal77: has joined #RubyOnRails
[12:32:39] IrishGringo: has joined #RubyOnRails
[12:36:20] Abhijit: has joined #RubyOnRails
[12:36:34] CodaBrink: has joined #RubyOnRails
[12:37:57] stannard: has joined #RubyOnRails
[12:38:25] arBmind1: has joined #RubyOnRails
[12:39:38] ornerymoose: has joined #RubyOnRails
[12:40:03] matthias_: has joined #RubyOnRails
[12:40:55] ishamo: has joined #RubyOnRails
[12:45:45] someish: has joined #RubyOnRails
[12:46:36] zpe: has joined #RubyOnRails
[12:47:26] vedu: has joined #RubyOnRails
[12:48:37] hervie: has joined #RubyOnRails
[12:49:15] Ergo: has joined #RubyOnRails
[12:50:05] Abhijit: arup_r, you got my pm that day?
[12:50:20] nickenchuggets: has joined #RubyOnRails
[12:50:29] arup_r: yes.. :) I talked.. but didn't find interesting..
[12:50:44] arup_r: but thanks for the pm Abhijit
[12:52:08] ql6wlld: has joined #RubyOnRails
[12:52:16] AlexJakeGreen: has joined #RubyOnRails
[12:52:48] daveomcd: I have a model named, "Statistic" - is that a reserved keyword in rails? I'm getting this error when trying to access it via an association: NoMethodError: undefined method `relation_delegate_class' for Statistic:Module
[12:53:59] avelldiroll: has joined #RubyOnRails
[12:54:16] workmad3: daveomcd: afaik, it's not a reserved name in rails (it's not a keyword either... keywords are part of the language)... from your error message, it sounds like something else has already defined `Statistic` as a module though
[12:54:44] daveomcd: workmad3, ok I'll dig around and see if I can't find where that is. Thanks!
[12:54:48] workmad3: daveomcd: if you're using the name as a namespace as well as a class, you could double-check you didn't introduce a typo in the filename
[12:55:20] workmad3: daveomcd: because something like `app/models/statistic/foobar.rb` would expect a `class Statistic::Foobar` and would automatically create that module
[12:55:35] workmad3: (if there wasn't a file to autoload it from)
[12:59:41] tildes: daveomcd: are you using polymorphic associations, like OP here https://github.com/rails/rails/issues/15811
[13:00:22] flashpoint9: has joined #RubyOnRails
[13:01:15] someish: has joined #RubyOnRails
[13:02:11] JakFrist: has joined #RubyOnRails
[13:03:21] daveomcd: just found it, I had a module i had previously defined in my concerns folder wayyyyyyyyyyyy back when i started my project. I dont use it anymore but forgot to remove it :-/ -- sorry
[13:03:30] GodFather: has joined #RubyOnRails
[13:03:55] ramortegui: has joined #RubyOnRails
[13:04:25] aegis3121: has joined #RubyOnRails
[13:04:54] tildes: daveomcd: good to know you found the issue
[13:07:02] marr: has joined #RubyOnRails
[13:07:09] Cervajz: has joined #RubyOnRails
[13:08:58] Cervajz_: has joined #RubyOnRails
[13:10:33] Cervajz__: has joined #RubyOnRails
[13:10:34] n008f4g_: has joined #RubyOnRails
[13:12:02] willwright: has joined #RubyOnRails
[13:12:26] petor: has joined #RubyOnRails
[13:14:03] yuujinlee: has joined #RubyOnRails
[13:14:30] willwright: has left #RubyOnRails: ()
[13:15:56] drbayer: has joined #RubyOnRails
[13:18:02] tvw: has joined #RubyOnRails
[13:18:48] bruno-: has joined #RubyOnRails
[13:19:15] zpe: has joined #RubyOnRails
[13:20:32] moeabdol: has joined #RubyOnRails
[13:21:08] arpegius: has joined #RubyOnRails
[13:22:42] godzillaenlacasa: has joined #RubyOnRails
[13:24:06] Megamos: has joined #RubyOnRails
[13:27:43] beilabs: has joined #RubyOnRails
[13:29:17] shanson: has joined #RubyOnRails
[13:30:26] Ergo^: has joined #RubyOnRails
[13:32:42] robbyoconnor: has joined #RubyOnRails
[13:32:44] yardenbar: has joined #RubyOnRails
[13:33:12] eljimmy: has joined #RubyOnRails
[13:33:25] DragonPunch: has joined #RubyOnRails
[13:35:01] jobewan: has joined #RubyOnRails
[13:35:54] krzkrz: has joined #RubyOnRails
[13:36:26] hive-mind: has joined #RubyOnRails
[13:36:57] alienaut: has joined #RubyOnRails
[13:37:39] alienaut: Hello, does timestamps working on join tables, if it has no model?
[13:38:14] bruno-: has joined #RubyOnRails
[13:44:58] jschoolcraft: has joined #RubyOnRails
[13:45:23] context: im guessing not
[13:45:35] tildes: alienaut: I don't understand the question
[13:45:39] context: make the model if you are already concerned about it
[13:45:48] context: how would you access the timestamps anyway ?
[13:46:01] chouhoulis: has joined #RubyOnRails
[13:46:09] context: tildes: m2m join table, he cares about it having created_at/updated_at
[13:46:17] macsteps: has joined #RubyOnRails
[13:46:47] sevenseacat: you wouldnt be able to access them
[13:46:57] tildes: context: yeah I figured out the join table part. not sure about a join table, without a model? or what is the problem anyway
[13:47:32] tildes: I mean sure you can have any kind of join tables, but unless it's a many-to-many thingie, no out-of-box timestamps
[13:47:52] akshat: has joined #RubyOnRails
[13:48:12] emachnic: has joined #RubyOnRails
[13:48:30] yellow5: has joined #RubyOnRails
[13:49:19] rohit: has joined #RubyOnRails
[13:51:11] zpe: has joined #RubyOnRails
[13:51:26] rickmasta: has joined #RubyOnRails
[13:52:27] rickmasta: has joined #RubyOnRails
[13:53:43] rickmasta: has joined #RubyOnRails
[13:55:45] shanson: has joined #RubyOnRails
[13:55:47] stannard: has joined #RubyOnRails
[13:57:55] ElSif: has joined #RubyOnRails
[14:00:24] solars: has joined #RubyOnRails
[14:00:30] bratsche: has joined #RubyOnRails
[14:00:36] stannard: has joined #RubyOnRails
[14:01:21] stannard: has joined #RubyOnRails
[14:03:10] hutchy: has joined #RubyOnRails
[14:04:52] quazimodo: has joined #RubyOnRails
[14:04:52] quazimod1: has joined #RubyOnRails
[14:05:19] arup_r: has joined #RubyOnRails
[14:07:35] mustmodify: has joined #RubyOnRails
[14:08:43] mustmodify: In a non-rails app I required 'active_support' but I don't get Fixnum#days ... do I specifically have to include Numeric in FixNum?
[14:09:06] szulak: has joined #RubyOnRails
[14:09:07] context: you probably need to require the file that gives you fixnum#days
[14:09:08] mustmodify: https://github.com/rails/rails/blob/ef5144d8a5529baebdaf76dbf253d1d6f2d8689b/activesupport/lib/active_support/core_ext/numeric/time.rb
[14:09:41] mustmodify: context: Never let it be said that you let that opportunity pass you by. :)
[14:10:27] nobitanobi: has joined #RubyOnRails
[14:13:15] nobitanobi: Is there any way to check if a method on an object has been called from an association? Check if I have done user.house.address vs house.address?
[14:13:52] tfitts: nobitanobi: you're still calling address directly on house when you call user.house.address
[14:14:16] nobitanobi: yep, that's what I thought. I was wondering if there was any way that I could figure out the original caller
[14:14:32] Oliphaunte: has joined #RubyOnRails
[14:14:33] njero: has joined #RubyOnRails
[14:14:46] tildes: nobitanobi: I think you can, with caller method http://apidock.com/ruby/Kernel/caller
[14:14:47] tbuehlmann: mustmodify: if you want to go all in, can could also require 'active_support/all'
[14:15:09] nobitanobi: tildes: I was looking at caller, but I don't see the `user` name in there
[14:15:18] nobitanobi: it comes from the address file
[14:16:42] mustmodify: tbuehlmann: I doubt ActiveSupport would swamp me in terms of memory usage, but I decided I didn't want to use Rails for this simple project and now I'm trying to actually avoid loading most of it. :P active_support/core_Ext/numeric/time seems to do it.
[14:17:18] mustmodify: But when I'm done with this, I seriously need to write a blog post on what I've learned about microservices.
[14:17:37] mustmodify: if for no other reason than to avoid having to learn it again.
[14:17:50] tfitts: nobitanobi: that should give you the trace down to whatever called it. The last line in the chain is going to be the same whether you call it from house.address or user.house.address but the line before will be different depending where it was called
[14:18:26] nobitanobi: tfitts: will digg into it
[14:19:16] mustmodify: tbuehlmann: it's funny... having used Rails for so long, I'm finding making technology choices exhausting. "Well then what kind of database do I want to use?" (final answer... I ended up just writing files to the hard drive because my deliverables are basically a log file of my inputs.)
[14:20:18] jhack: has joined #RubyOnRails
[14:24:11] shanson: has joined #RubyOnRails
[14:24:32] tbuehlmann: right, that's a kind of developer fatigue. yehuda katz talked about that in a keynote some years ago, can recommend
[14:25:57] mustmodify: I mean, it's probably worth it this time... because this code really does not belong in a monolyth, and I really don't need 100M+, nor a database, or views, etc to do what I'm doing... terrible waste. So this is right for this one thing, but generally, Rails has been such an amazing tool for my projects.
[14:26:20] tbuehlmann: can't agree more
[14:26:51] Devalo: has joined #RubyOnRails
[14:27:13] tbuehlmann: just recently I wrote a little slack slash commands app for a handful colleagues, using sqlite3 :)
[14:27:28] arpegius: has joined #RubyOnRails
[14:27:43] mustmodify: sometimes you gotta do that.
[14:27:59] mustmodify: if for no other reason than to appreciate Rails and TDD when you go back.
[14:27:59] renegadeandy: has joined #RubyOnRails
[14:28:12] mustmodify: "Oh yeah, that's why I go through this crazy process."
[14:29:13] theblang: has joined #RubyOnRails
[14:30:02] theblang: If I have a FooModel, and a BarModel belongs_to it, how can I use ActiveRecord to get all the FooModels that have a BarModel?
[14:30:24] t4nkD: has joined #RubyOnRails
[14:30:38] mustmodify: BarModel.where(foo_id: 3)
[14:31:06] mustmodify: ok let's use real examples so I can think.
[14:31:35] theblang: so like, Customer's have Orders. and Order belongs to a Customer. I want to use ActiveRecord rather than a query to get all Customers that have an Order
[14:31:44] mustmodify: If you have a category, and a product belongs_to it, how can you get all the categories that have a product.
[14:31:44] tfitts: Customer.first.ordres
[14:31:54] tfitts: Category.find(1).products
[14:32:02] Macaveli: has joined #RubyOnRails
[14:32:23] tfitts: in your category model you need has_many :products and in your products you need belongs_to :category
[14:32:47] mustmodify: find all customers that have an order... as opposed to those that have not ordered?
[14:32:48] sevenseacat: Customer.joins(:order)
[14:32:55] mustmodify: Customer.joins(:order)
[14:32:57] theblang: Yeah, so in my example, Customer does has_many Orders, and the Order belongs_to Customer
[14:33:14] ql6wlld: has joined #RubyOnRails
[14:33:14] tfitts: , oh you want to join them, sorry, should have read earlier
[14:33:43] mustmodify: yeah, for some stupid reason I just couldn't wrap my head around an association between FuModel and BarModel.
[14:33:45] aegis3121: has joined #RubyOnRails
[14:33:56] mustmodify: Brains are strange.
[14:33:58] tfitts: probably would be Customer.joins(:orders) unless the customer only has one order which seems unlinkely
[14:33:58] theblang: mustmodify Yeah, I know what you mean! Sorry, haha
[14:34:15] mustmodify: Well same answer from three people so that's probably it. :)
[14:34:33] sevenseacat: thats why we ask people not to use fake code examples
[14:34:35] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[14:35:05] theblang: Note taken! Thanks sevenseacat , my apologies
[14:35:08] tfitts: mustmodify: are you trying to join tables or just setup and use the associations?
[14:35:09] drptbl_: has joined #RubyOnRails
[14:35:22] tfitts: or theblang, I can't even tell who is asking the question
[14:35:35] theblang: tfitts haha, it was me
[14:38:32] mustmodify: tfitts: I was like, "I'm not even using a db right now, so... "
[14:41:29] agent_white: has joined #RubyOnRails
[14:41:33] shanson: has joined #RubyOnRails
[14:44:04] DoubleMalt: has joined #RubyOnRails
[14:45:11] Macaveli_: has joined #RubyOnRails
[14:46:28] Oliphaunte: has joined #RubyOnRails
[14:51:40] Travis-42_: has joined #RubyOnRails
[14:52:41] nobitanobi: I have a factory method in my model where I do something like def create_from(user:) create!(user: user) end - And rails is throwing a ActiveModel::MassAssignmentSecurity::Error - What is the appropriate way of solving this? I'm not even calling this from a controller.
[14:53:32] sevenseacat: where you're calling it from is irrelevant
[14:53:48] sevenseacat: mass assignment security is mass assignment security - if user is not attr_accessible, that code won't work
[14:54:00] zpe: has joined #RubyOnRails
[14:54:37] matthewd: If you're on 4.2, the appropriate way of solving it is probably to switch to strong params
[14:54:47] nobitanobi: sevenseacat: thanks!
[14:54:56] sevenseacat: +1 to strong params
[14:55:12] nobitanobi: matthewd: interesting. I had the wrong assumption strong params was controller related.
[14:55:34] sevenseacat: you call it in the controller
[14:55:43] nobitanobi: uh, what if I am not setting this model from the controller?
[14:55:55] sevenseacat: you're not using strong params in your code
[14:55:58] matthewd: Then strong params won't interfere, and you won't have a problem
[14:57:32] RegulationD: has joined #RubyOnRails
[14:57:34] nobitanobi: gotcha, thanks!
[14:59:33] theunraveler: has joined #RubyOnRails
[15:00:34] zpe: has joined #RubyOnRails
[15:00:41] aegis3121: has joined #RubyOnRails
[15:01:29] Anubix: has joined #RubyOnRails
[15:04:35] tomatoes: has joined #RubyOnRails
[15:04:59] smathy: has joined #RubyOnRails
[15:05:25] jetpack_joe: has joined #RubyOnRails
[15:05:51] Anubix: Don't u know where i find turbolinks google analytics code ? On official site there is the old one only, no universal analytics
[15:06:15] baweaver: has joined #RubyOnRails
[15:06:41] Balzrael: has joined #RubyOnRails
[15:08:00] Anubix: Well or does it worth to use turbolinks in my app when i am not able to rewrite JS code?
[15:09:04] smathy: Anubix, use the google-analytics-turbolinks gem?
[15:09:17] daveomcd: has joined #RubyOnRails
[15:11:06] Anubix: smathy: thats old one
[15:11:36] sevenseacat: "old one" implies you know of a newer one you should be using instead
[15:12:12] shanson: has joined #RubyOnRails
[15:12:21] Anubix: sevenseacat: when i am looking on GIT code, this is not universal analytics code
[15:12:37] petor: has joined #RubyOnRails
[15:12:40] sevenseacat: i dont know what you mean by that.
[15:13:15] sunya7a: is it preferably to use .constantize or Object.send? I would like to hear pros and cons for each if possible...unless there's an obvious choice in RoR apps?
[15:13:31] sevenseacat: sunya7a: uh, for what?
[15:13:50] sevenseacat: its not really an either-or thing
[15:13:57] tubbo: sunya7a: they do different things entirely.
[15:13:57] sunya7a: sevenseacat: Trying to call method on a model that i put together from a string?
[15:14:20] Anubix: sevenseacat: Universal analytics code is using async loading. Gem google-analytics-turbolinks is using old version of analytics code
[15:14:21] sunya7a: tubbo: i seee...in my case I put together a string that ends up being a model name
[15:15:08] sunya7a: i was successful using both methods....but would like to hear opinions as to which one is better in practice?
[15:15:15] sevenseacat: Anubix: in that case, have you considered contributing a patch to the gem?
[15:15:34] wldcordeiro: has joined #RubyOnRails
[15:15:47] polishdub: has joined #RubyOnRails
[15:15:56] Anubix: sevenseacat: No, because i am not good in JS, not either coffee
[15:16:28] ayonkhan: has joined #RubyOnRails
[15:16:45] bruno-: has joined #RubyOnRails
[15:17:37] smathy: sunya7a, !code please because what you're saying doesn't make sense.
[15:17:37] helpa: sunya7a: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[15:18:04] arup_r: where is the upgrade guide from rails 2 to 4? I got 2 projects built on 2.3. I see the guides from rails 3 here -> http://guides.rubyonrails.org/upgrading_ruby_on_rails.html . What you people refer while doing upgrade?
[15:18:24] arup_r: seems going to meet a dark time.. :(
[15:18:38] smathy: Anubix, you think this code is blocking something? https://github.com/joshdvir/google-analytics-turbolinks/blob/master/lib/assets/javascripts/google-analytics-turbolinks.js.coffee
[15:18:44] marr: has joined #RubyOnRails
[15:19:12] smathy: arup_r, yeah, you're in for a world of hurt.
[15:19:27] arup_r: should I quit? :p
[15:19:32] tubbo: arup_r: http://www.rails-upgrade-checklist.com/
[15:19:55] sevenseacat: arup_r: http://guides.rubyonrails.org/v4.0/3_0_release_notes.html#upgrading-to-rails-3 might be a start
[15:20:03] tubbo: > [ ] run your javascript tests (hahahahaha omg I know right?!?!!!)
[15:20:05] smathy: arup_r, it's probably actually easier to just make a Rails 4 app and manually pull the code across into it.
[15:20:07] arup_r: ok ^ let me see there
[15:20:15] sevenseacat: but the 2 -> 3 upgrade was huge
[15:20:16] renegadeandy: In rspec i use ‘rspec spec’ to run all my tests…at the end it gives me 39 examples, 12 failures, 24 pending - how can i get it to output the total number of examples which actually passed…
[15:20:26] arup_r: smathy: good point!
[15:20:40] tubbo: smathy: i don't believe that's the case if you have tests and stuff
[15:20:57] tubbo: because of all the API changes to e.g. find()
[15:20:58] arup_r: Let me approach to them by saying what you said.. smathy, just copy/paste from 3 to 4 right?
[15:20:59] thomasfedb: has joined #RubyOnRails
[15:20:59] thomasfedb: has joined #RubyOnRails
[15:21:24] smathy: tubbo, umm, there's no magic fix for that, you'll have to change those no matter how you approach it.
[15:21:28] arup_r: problem is never worked on below rails 3. so dunno know how it looked like.. haha
[15:21:32] Anubix: smathy: If i compare it with google original code, there miss a lot of code, async loading, but I am not good in JS
[15:21:39] tubbo: it's pretty similar arup_r
[15:21:49] smathy: tubbo, I'm just saying that upgrading in-place will be a big pain, so much in `config` is different, changed autoloading, etc..
[15:21:58] tubbo: yeah that's true
[15:22:12] smathy: Anubix, that script isn't blocking, it's being run on the page:change event.
[15:22:16] tubbo: i remember reading a guide on how to upgrade minor versions of 2.3.x and then going from that to 3.0, from that to 3.1, etc.
[15:22:43] smathy: Anubix, just try it, you won't have any blocking issues.
[15:22:50] sevenseacat: I consider myself lucky to have never worked on a rails 2 app
[15:23:31] smathy: tubbo, yeah, I've done 1 -> 2, 2 -> 3, and 3 -> 4, but never jumped a version. Even the 2 -> 3 I think I did this way.
[15:23:56] Anubix: smathy: I will rather uninstal turbolinks, I saw it only speed-up loading page but i have only two js codees on website, it doesnt worth, i have problem with facebook sdk turbolinks as well it doesnt work
[15:23:56] sevenseacat: skipping major (or even minor) versions not recommended in any upgrade
[15:23:58] tubbo: sevenseacat: n00b
[15:24:12] smathy: It's not not recommended by me.
[15:24:29] smathy: Anubix, ok, then do that.
[15:24:40] sevenseacat: I could say the sky was blue and you'd disagree.
[15:25:24] renegadeandy: In rspec i use ‘rspec spec’ to run all my tests…at the end it gives me 39 examples, 12 failures, 24 pending - how can i get it to output the total number of examples which actually passed…
[15:25:30] smathy: I didn't disagree, you may be right that it's not recommended (by someone, DHH? Not sure I've ever read anything specifically) - I'm just saying that that's not my view, hence my recommendation to arup_r
[15:25:32] renegadeandy: sevenseacat: the sky is never blue in scotland....
[15:25:41] tubbo: sevenseacat: who me?
[15:25:53] sevenseacat: tubbo: no, smathy.
[15:26:00] smathy: renegadeandy, !dry only warning!
[15:26:00] helpa: renegadeandy: Don't repeat yourself. Asking the same question repeatedly will not give you more answers.
[15:27:16] sunya7a: smathy: confusion on my part...i see what you mean....thank you
[15:28:01] smathy: sunya7a, funny how actually making a gist sometimes reveals the problem :) Happy to help.
[15:28:59] rafaelfranca: has joined #RubyOnRails
[15:29:13] smathy: renegadeandy, do any of the different formatters produce a different summary line?
[15:29:13] zave: has joined #RubyOnRails
[15:29:19] AzaToth: has joined #RubyOnRails
[15:31:34] renegadeandy: smathy: there are only 2 progress and documentation
[15:31:43] renegadeandy: progress is default and documentation doesnt do it
[15:33:54] smathy: renegadeandy, dunno, look for other formatters.
[15:34:33] sevenseacat: out of curiosity, why do you want to know the number of passing specs?
[15:34:35] tubbo: renegadeandy: i'm not sure you *can* edit that with the formatter.
[15:34:58] renegadeandy: sevenseacat: the warm fuzzy feeling it gives me rather than the slightly scary number of failing tests
[15:35:05] smathy: Ruh-roh. I have no rspec-fu
[15:35:12] tubbo: renegadeandy: what, green isn't good enough for you?
[15:35:21] pawnbox: has joined #RubyOnRails
[15:35:26] renegadeandy: sevenseacat: its just a little more positive to show the number of passing tests
[15:35:31] tubbo: renegadeandy: https://github.com/mattsears/nyan-cat-formatter
[15:35:44] tubbo: renegadeandy: theres your number of passed specs :)
[15:36:02] sevenseacat: i guess so. if there are any failing specs, thats not positive at all
[15:36:24] renegadeandy: tubbo: I DID SEE THIS! ahhaha
[15:36:29] renegadeandy: might add it in then
[15:36:39] ayonkhan: has joined #RubyOnRails
[15:36:58] renegadeandy: a little ridiculous that the nyan-cat-formatter is one of the most useful at a glance summaries
[15:37:04] disgrntld: has joined #RubyOnRails
[15:37:13] Sadin: has joined #RubyOnRails
[15:37:23] tubbo: renegadeandy: might tell you something about how "useful" those at-a-glance summaries end up being for most people.
[15:37:31] srinidhi: has joined #RubyOnRails
[15:37:32] smathy: rspec, a little ridiculous? That's unpossible!
[15:37:48] sevenseacat: i personally like the fuubar formatter.
[15:37:51] renegadeandy: tubbo: well its not so much how useful it is and its more about seeing progress
[15:37:52] tubbo: that said, if you strongly feel that having the number of passing examples in your test output is necessary for some reason, the rspec guys are always happy to take in new pull requests.
[15:38:00] renegadeandy: if i see the number failing drop by 1, its nice to see thenumber passing increase by 1
[15:38:03] tubbo: sevenseacat: +1 i was just about to suggest that :)
[15:38:11] renegadeandy: its hardly a big ask tbh and im surprised its just not there,
[15:38:12] weckl: has joined #RubyOnRails
[15:38:16] drbayer: has joined #RubyOnRails
[15:38:27] tubbo: the QA dude on my team introduced me to that and this other gem called 'pronto' that i'm currently modifying to work with atlassian stash
[15:38:35] tubbo: because i want pull request comments on rubocop errors dammit
[15:38:53] cpruitt: has joined #RubyOnRails
[15:39:32] JakFrist: has joined #RubyOnRails
[15:39:38] renegadeandy: i mean…i could stand and say the fuubar formatter is not important, how useful is it to know the progress of your running tests. Not really. they will finish when they finish.
[15:39:56] renegadeandy: its a matter of perspective
[15:40:29] smathy: Agreed re progress indicators ^
[15:40:41] smathy: ...but I'm also on the other side of your wish, who cares about how many passed.
[15:41:16] _tpavel: has joined #RubyOnRails
[15:41:40] sevenseacat: I find the showing of instant failures and the one-line output more useful that the progress indicator
[15:41:49] sevenseacat: so you can start fixing while the rest of your suite runs
[15:42:09] openstruct: has joined #RubyOnRails
[15:42:34] sevenseacat: also, I don't find screens of dots interesting
[15:43:19] smathy: Agreed ^ (see, you didn't even need to say something as uncontroversial as the sky is blue)
[15:44:14] pawnbox: has joined #RubyOnRails
[15:44:43] quazimodo: has joined #RubyOnRails
[15:45:14] baweaver: has joined #RubyOnRails
[15:45:15] shanson: has joined #RubyOnRails
[15:45:28] smathy: My test output: http://imgur.com/Ofanpl0
[15:46:44] smathy: ...and yeah, failures fail immediately and output stack trace with code context.
[15:46:47] ziggles: has joined #RubyOnRails
[15:47:36] nodejunkie: has joined #RubyOnRails
[15:50:43] siaW: has joined #RubyOnRails
[15:52:38] diegoaguilar: has joined #RubyOnRails
[15:54:06] Devalo: has joined #RubyOnRails
[15:55:03] bmf: has joined #RubyOnRails
[15:56:09] mbreedlove: has joined #RubyOnRails
[15:58:03] pawnbox: has joined #RubyOnRails
[16:01:13] Cohedrin: has joined #RubyOnRails
[16:04:45] bradleyprice: has joined #RubyOnRails
[16:05:45] Cohedrin_: has joined #RubyOnRails
[16:06:10] baweaver: has joined #RubyOnRails
[16:07:01] bruno-: has joined #RubyOnRails
[16:07:43] mordof: has joined #RubyOnRails
[16:08:47] mordof: I've got a before_destroy hook on my model. I'm calling a destroy_all on a portion of the table records. Is there a way I can say - if the before_destroy hook fails, only prevent that one record from being deleted, but continue with the rest?
[16:12:30] bradleyprice: has joined #RubyOnRails
[16:12:56] cpruitt: mordof: As I understand it, destroy_all creates an instance of each record & calls `#destroy` on each one. You should get teh effect your’e looking for by doing your own query, and calling #each and then #destroy for each instance.
[16:13:37] bronson: has joined #RubyOnRails
[16:13:38] mordof: cpruitt: right. it just seems like active record should already have that behavior built in.. guess not
[16:14:23] cpruitt: mordof: Not really. If you think about what you’re asking it to do, Destroy ALL of these, then a failure on any one invaidates the thing you’ve instructed it to do.
[16:14:42] mordof: cpruitt: that's how destroy_all currently works. it rolls back everything
[16:14:42] dionysus69: has joined #RubyOnRails
[16:15:00] mordof: cpruitt: nevermind i get your wording
[16:15:03] cpruitt: That’s what I’m saying. That’s correct. You asked it to destroy all. If it can’t destroy ALL it reverts
[16:15:30] mordof: cpruitt: so then i'll go with what a co-worker suggested and make a destroy_each method
[16:15:52] cpruitt: Sure, that’d work.
[16:16:07] cpruitt: Drop it into a module & just mix it in where you want to use it.
[16:16:10] shanson: has joined #RubyOnRails
[16:16:18] mordof: blegh - that's more effort than just iterating over the items :/ lol
[16:16:23] mordof: iteration it is
[16:16:42] mordof: i only actually need it for one spot right now
[16:16:48] flashpoint9: has joined #RubyOnRails
[16:22:26] baweaver: has joined #RubyOnRails
[16:22:43] mbreedlove: has joined #RubyOnRails
[16:23:33] Travis-42: has joined #RubyOnRails
[16:23:49] wldcordeiro: has joined #RubyOnRails
[16:25:11] smathy: mordof, active record intentionally puts the entire destroy_all in a transaction, that's the whole point of having a single call.
[16:25:32] smathy: ...and hence any rollback within any part of that will cause the whole thing to be rolled back.
[16:25:45] bmf: has joined #RubyOnRails
[16:26:22] Mattx: has joined #RubyOnRails
[16:26:25] Mattx: Hey guys!
[16:26:26] shinnya: has joined #RubyOnRails
[16:26:35] Mattx: I have this column in a model: t.text :keywords, null: false, array: true, default: []
[16:26:49] Mattx: so I expect it to be an empty array in case I don't specify otherwise
[16:27:03] Mattx: also, I don't have any validation over that column
[16:27:20] Mattx: but when I try to save an object with .keywords = nil
[16:27:34] mbreedlo_: has joined #RubyOnRails
[16:27:37] Mattx: I get this error: ERROR: null value in column "keywords" violates not-null constraint
[16:27:52] Mattx: Why is that? How do I set a default value if not like this?
[16:28:15] Maletor: has joined #RubyOnRails
[16:28:42] baweaver: has joined #RubyOnRails
[16:28:59] sharkman: has joined #RubyOnRails
[16:29:24] Spami: has joined #RubyOnRails
[16:30:07] mordof: smathy: yeah it makes sense. it just means that i have to iterate my stuff manually
[16:31:06] sharkman: is there a way to do this without the ".values[0].to_f", ActiveRecord::Base.connection.select_one(sql).values[0].to_f
[16:32:33] beingjohnm: Mattx: your column says "null: false" and saving something as "nil" would violate that. If you want to save something as nil you're going to have to change that to "null: true"
[16:32:55] Mattx: beingjohnm, nope, it says null: false, default: []
[16:33:06] Mattx: if I save it with nil, it should assume the default value
[16:33:11] Mattx: that's how it *should* work
[16:33:34] Mattx: I just noticed the problem is that empty arrays in postgres are '{}', that should be the default value I use, not []
[16:33:39] Mattx: I think that will solve the isse
[16:33:54] moeabdol: has joined #RubyOnRails
[16:34:21] renegadeandy: has joined #RubyOnRails
[16:35:13] pawnbox: has joined #RubyOnRails
[16:35:15] Yeomra: has joined #RubyOnRails
[16:37:28] stupidystupid: has joined #RubyOnRails
[16:38:24] JakFrist: has joined #RubyOnRails
[16:38:33] Regulati_: has joined #RubyOnRails
[16:40:31] Sadin: has joined #RubyOnRails
[16:40:48] shanson: has joined #RubyOnRails
[16:40:57] th0m: has joined #RubyOnRails
[16:42:20] crdpink2: has joined #RubyOnRails
[16:43:22] IrishGringo: has joined #RubyOnRails
[16:44:51] workmad3: Mattx: setting `.keywords = nil` will most likely try to set an explicit `NULL` in the database btw
[16:45:15] workmad3: Mattx: because explicitly setting nil is different from not setting a value at all
[16:45:40] workmad3: (namely, not setting a value == default. Explicitly setting nil == setting nil)
[16:45:55] manfrin: has joined #RubyOnRails
[16:47:46] roamingdog: has joined #RubyOnRails
[16:48:31] Oliphaunte: has joined #RubyOnRails
[16:50:04] macsteps: has joined #RubyOnRails
[16:50:12] arpegius: has joined #RubyOnRails
[16:50:54] beilabs: has joined #RubyOnRails
[16:52:24] bruno-: has joined #RubyOnRails
[16:52:37] smathy: mordof, yes it does.
[16:54:52] Cohedrin: has joined #RubyOnRails
[16:56:04] gambl0re: has joined #RubyOnRails
[16:57:36] phaza: has joined #RubyOnRails
[17:00:10] GriffinHeart: has joined #RubyOnRails
[17:01:23] ornerymoose: has joined #RubyOnRails
[17:03:59] aegis3121: has joined #RubyOnRails
[17:04:16] iliketurtles: has joined #RubyOnRails
[17:04:33] sleungcy: has joined #RubyOnRails
[17:04:44] Pumukel: has joined #RubyOnRails
[17:05:25] chouhoul_: has joined #RubyOnRails
[17:05:47] Ergo: has joined #RubyOnRails
[17:07:24] mbreedlove: has joined #RubyOnRails
[17:07:39] mikecmpbll: has joined #RubyOnRails
[17:09:58] mbreedlove: has joined #RubyOnRails
[17:09:59] shanson: has joined #RubyOnRails
[17:10:33] rickmasta: has joined #RubyOnRails
[17:10:48] theblang: has joined #RubyOnRails
[17:11:10] pawnbox: has joined #RubyOnRails
[17:12:31] gambl0re: has joined #RubyOnRails
[17:12:31] gambl0re: has joined #RubyOnRails
[17:15:32] chouhoulis: has joined #RubyOnRails
[17:16:14] qejk: has joined #RubyOnRails
[17:16:16] n008f4g_: has joined #RubyOnRails
[17:17:42] zave: has joined #RubyOnRails
[17:20:11] nodejunkie: has left #RubyOnRails: ("Leaving")
[17:20:18] macsteps: has joined #RubyOnRails
[17:20:31] aegis3121: has joined #RubyOnRails
[17:21:06] cnk: has joined #RubyOnRails
[17:21:52] jhack: has joined #RubyOnRails
[17:22:01] bruno-: has joined #RubyOnRails
[17:22:28] capin: has joined #RubyOnRails
[17:23:00] maxdoubt: has joined #RubyOnRails
[17:23:33] maxdoubt: is there a way to run stable activerecord (4.2.6) against bleeding edge AREL (from git) ?
[17:23:59] jhack_: has joined #RubyOnRails
[17:24:11] maxdoubt: i really need to get some AREL sql case statement love
[17:25:12] VeryBewitching: has joined #RubyOnRails
[17:25:33] k1io: has joined #RubyOnRails
[17:25:37] smathy: I have max doubts maxdoubt
[17:26:16] maxdoubt: smathy: hmm… i’d entering a world of pain ?
[17:26:50] smathy: Well, what you need to look at is what 4.2.6 had as a dependency and what version of arel you want.
[17:27:13] smathy: Like if 4.2 explicitly limited arel to < 5 or something then I'd expect a world of hurt.
[17:27:27] jhack: has joined #RubyOnRails
[17:27:35] maxdoubt: smathy: i need arel from git… code i want isn’t in a release yet, AR 4.2.6 requires AREL 6.0
[17:28:02] smathy: ...right but master is 7.x
[17:28:13] smathy: ...so does 4.2 limit arel to < 7 ?
[17:28:41] workmad3: seems to be ~> 6
[17:29:01] smathy: ...right, so I'd expect hurt with >= 7
[17:29:21] Anubix: Have somebody experiences with Mina deploy and Whenever gem? I can't generate sitemap with schedule.rb :/
[17:29:29] maxdoubt: hmm… do we have ETA on rails 5?
[17:29:46] workmad3: maxdoubt: same as always - when it's ready
[17:29:47] smathy: maxdoubt, I've constructed case strings many times, I'd just do that.
[17:29:54] zpe: has joined #RubyOnRails
[17:30:12] maxdoubt: smathy: ok, will do until case comes down stream
[17:30:15] smathy: maxdoubt, my understanding is that matthewd is entirely responsible for its delay because he's been too busy watching cat videos.
[17:30:58] matthewd: ACTION checks over his shoulder
[17:31:14] workmad3: cat videos > rails 5
[17:33:31] shanson: has joined #RubyOnRails
[17:33:46] workmad3: Criten: this isn't :slack: :P
[17:33:56] pyemkey: has joined #RubyOnRails
[17:34:08] Criten: oh shit, that's actually an emoji in slack
[17:35:42] mustmodify: **and** there are five skin tones for it...
[17:38:39] pyemkey: What is common pattern to store personalized search filters in database? I want to provide feature which let user to used saved one. Is it right to store just url address in text field?
[17:38:54] JakFrist: has joined #RubyOnRails
[17:41:42] rickmasta: has joined #RubyOnRails
[17:42:28] flashpoint9: has joined #RubyOnRails
[17:42:59] brent__: has joined #RubyOnRails
[17:42:59] roamingdog: pyemkey: that could prove brittle - i'd save a list of search terms and regenerate the url when wanted. can save in a pipe-delimited field or a table
[17:43:11] roamingdog: or whatever-delimited
[17:43:52] petor: has joined #RubyOnRails
[17:43:53] sbarg: has joined #RubyOnRails
[17:44:04] sbarg: has left #RubyOnRails: ()
[17:44:05] cnk: depending on how the data + search code evolved that might not be any less brittle than the url solution
[17:44:19] drbayer: has joined #RubyOnRails
[17:45:10] cnk: pyemkey: most anything that lets you generate the query will work in the immediate term - the question is how do you see this code changing in the future? more options? different structure? new search plugin?
[17:45:19] roamingdog: well if you save the url, you're locked in to that format - if you change format you have to update all the old urls. if you change domain name etc etc
[17:45:36] baweaver: has joined #RubyOnRails
[17:45:49] jhack_: has joined #RubyOnRails
[17:45:59] roamingdog: of course you wouldn't want to save the domain in any case
[17:46:34] SteenJobs: has joined #RubyOnRails
[17:46:40] gambl0re: has joined #RubyOnRails
[17:48:59] shanson: has joined #RubyOnRails
[17:50:27] sp1rs: has joined #RubyOnRails
[17:52:07] conta: has joined #RubyOnRails
[17:52:17] njero: has joined #RubyOnRails
[17:52:25] tildes: has joined #RubyOnRails
[17:54:46] netzfisch: has joined #RubyOnRails
[17:55:06] baweaver: has joined #RubyOnRails
[18:00:16] roamingdog: has joined #RubyOnRails
[18:01:35] jhack: has joined #RubyOnRails
[18:03:44] Oliphaun_: has joined #RubyOnRails
[18:06:20] aloneintheworld: has joined #RubyOnRails
[18:07:28] amortimer: has joined #RubyOnRails
[18:09:23] yellow5: has joined #RubyOnRails
[18:10:50] Anubix: Don't you know why is form action="search" methos="get" marked as 404 not found ? I used Search Engine Optimization Toolkit from Miscrosoft and did analys of my website
[18:11:10] Anubix: its quite weird
[18:11:34] zpe: has joined #RubyOnRails
[18:11:37] smathy: Anubix, no big deal here, just an "in case you wanted to know", the way we phrase questions is "Do you know ...." not "don't"
[18:11:38] broman: has joined #RubyOnRails
[18:11:57] pipework: Anubix: Don't you know whether you have a route for it?
[18:11:58] smathy: Anubix, !code if you want help with that issue
[18:11:58] helpa: Anubix: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[18:12:14] smathy: ...except pipework - he's so contrarian.
[18:12:33] broman: can someone please help me? how can I subtract 2 dates to get the number of days? example I have '05/02/2016 - 00:00:00 ' and '07/02/2016 - 00:00:00' and I want the number of days between them.. how can I do that?
[18:12:55] pipework: broman: #days perhaps
[18:13:07] pyemkey: cnk: There will be more filters
[18:13:20] pipework: broman: Look into the date classes methods, yeah?
[18:13:56] Anubix: this code <form class="navbar-form navbar-right" role="search" action="/search" accept-charset="UTF-8" method="get"> is clasified as link, and of course 404 error because /search page without get is not found
[18:14:23] pipework: Anubix: Why don't you know if the web application has that route?
[18:14:28] bradleyprice: has joined #RubyOnRails
[18:14:34] Anubix: smathy: Ok i will remember on it :)
[18:14:56] dlt_: has joined #RubyOnRails
[18:15:01] smathy: Anubix, if that code exists in your HTML then some JS is turning it into a link.
[18:15:05] smathy: Start looking there.
[18:15:19] smathy: Anubix, ...but links are GETs too so I really don't think that's your problem.
[18:15:36] hutchy: In API’s - Is it common to return 204 to a successful Put \ UPDATE request ?
[18:15:57] mikecmpbll: has joined #RubyOnRails
[18:16:00] Anubix: pipework: application has route on search keywords, but single website.com/search is not existing
[18:16:12] pipework: hutchy: 202 perhaps.
[18:16:16] [Butch]: has joined #RubyOnRails
[18:17:11] hutchy: @pipework I had wondered about that, but wikipedia says that 202 mean ssuccess but not “completed”
[18:17:27] smathy: ZOMG !code Anubix
[18:17:49] cnk: pyemkey: I would look into something composible that lets you recreate the searches from pieces. For example, a data model with a search id, user id, filter type, + list of chosen options
[18:18:11] PedramT: has joined #RubyOnRails
[18:18:24] pipework: hutchy: no @ needed. Also, yeah, you're right, I think 200 seems best.
[18:18:32] Anubix: pipework: I can route get 'search' => to some simple page view, but I am really surprised that form action search engine count as link
[18:18:49] pipework: But I generally return things too.
[18:18:53] roamingdog: has joined #RubyOnRails
[18:18:56] shanson: has joined #RubyOnRails
[18:19:27] pipework: Anubix: I don't know why you're asking here about that microsoft noise.
[18:19:33] iliketurtles: has joined #RubyOnRails
[18:19:35] pipework: Anubix: Ask them why they use forms as links, I guess.
[18:19:35] joshkovach: has joined #RubyOnRails
[18:20:06] Anubix: pipework: Well, it's tool from them, maybe Google thinks same and that could be problem.
[18:20:08] Bloomer: has joined #RubyOnRails
[18:20:38] pipework: Anubix: Maybe it's that they look at forms with method=GET?
[18:20:54] pyemkey: cnk: How would you store list of chosen options. Would you store as kind of mapper 1 to 1 or as text field which can be parsed and converted to params
[18:20:54] pipework: Anubix: Either way, make the route and make it work or bother them.
[18:21:25] cpruitt: broman: Not sure if there’s a rails helper method or better way but you can do something like: `((later_date - earlier_date) / 1.days).to_i`
[18:21:29] cnk: I would probably store it as a comma seperated list of values - in a text field. But YMMV
[18:22:23] Anubix: pipework: Ok :)
[18:24:23] arpegius: has joined #RubyOnRails
[18:27:32] bruno-: has joined #RubyOnRails
[18:28:56] arathald: has joined #RubyOnRails
[18:29:58] prgmmr: has joined #RubyOnRails
[18:30:01] macsteps: has joined #RubyOnRails
[18:30:57] baweaver: has joined #RubyOnRails
[18:32:58] iliketurtles: has joined #RubyOnRails
[18:33:52] a1fa: has joined #RubyOnRails
[18:34:09] JakFrist: has joined #RubyOnRails
[18:34:40] a1fa: i'm trying to setup an audit trail for certain ar elements; should i use before_save and changed? to trigger audit log?
[18:36:32] cnk: I would use one of the gems that already does that
[18:37:09] pipework: a1fa: papertrail
[18:37:10] cnk: https://www.ruby-toolbox.com/search?utf8=%E2%9C%93&q=audit
[18:37:19] cnk: has left #RubyOnRails: ()
[18:37:24] a1fa: pipework: i am all gemed out
[18:37:31] cnk: has joined #RubyOnRails
[18:37:39] pipework: a1fa: It's about the value of the gem, not the number.
[18:38:03] a1fa: i'll read the docs, brb
[18:38:16] akshat_: has joined #RubyOnRails
[18:39:40] a1fa: highly featured, i will bookmark it
[18:40:05] sypheren: has joined #RubyOnRails
[18:40:16] dionysus69: has joined #RubyOnRails
[18:42:30] tenderlove: has joined #RubyOnRails
[18:45:12] shanson: has joined #RubyOnRails
[18:49:25] Puffball: has joined #RubyOnRails
[18:49:55] gambl0re: has joined #RubyOnRails
[18:50:45] yfeldblum: has joined #RubyOnRails
[18:50:46] arpegius: has joined #RubyOnRails
[18:51:29] emachnic: has joined #RubyOnRails
[18:53:00] bradleyprice: has joined #RubyOnRails
[18:53:37] mbreedlove: has joined #RubyOnRails
[18:54:04] wldcordeiro: has joined #RubyOnRails
[18:55:50] polyidus: has joined #RubyOnRails
[18:56:25] ferr: has joined #RubyOnRails
[18:56:50] ferr: Hey, how would I track if mail was sent successfully with ActionMailer?
[18:57:10] aegis3121: has joined #RubyOnRails
[18:59:04] cpruitt: ferr: More context? You trying to write a test or ferify production deliver or verify that it was actually recived by recip or what?
[18:59:34] ferr: cpruitt: I don't receive any emails, now I changed the logins to any text, I try to send emails and I receive the same encoded stuff as usual
[19:00:10] cpruitt: I’m sorry, I don’t follow that. May want to paste your code & describe the issue in a gist.
[19:00:27] shanson: has joined #RubyOnRails
[19:00:29] cpruitt: Also don’t know if you’re talking dev, production or what.
[19:00:31] emachnic: has joined #RubyOnRails
[19:00:32] stupidystupid: has joined #RubyOnRails
[19:01:25] bruno-: has joined #RubyOnRails
[19:01:49] cpruitt: ferr: In short you can set your actionmailer config for raise_delivery_errors to true. If you don’t get a deliver error then it was successful.
[19:02:19] cpruitt: Geez I wish IRC allowed editing for typo corrections…
[19:03:55] shanson: has joined #RubyOnRails
[19:06:10] netzfisch: has joined #RubyOnRails
[19:06:45] shanson: has joined #RubyOnRails
[19:07:07] polyidus: has joined #RubyOnRails
[19:07:08] jstransky: has joined #RubyOnRails
[19:08:05] frem_: has joined #RubyOnRails
[19:09:42] meoblast001: has joined #RubyOnRails
[19:11:24] Jasaka: has joined #RubyOnRails
[19:16:23] Synthead: has joined #RubyOnRails
[19:16:42] bradleyprice: has joined #RubyOnRails
[19:18:22] macsteps: has joined #RubyOnRails
[19:20:05] mdw: has joined #RubyOnRails
[19:23:26] arup_r: has joined #RubyOnRails
[19:23:28] arup_r: has left #RubyOnRails: ()
[19:23:32] arup_r: has joined #RubyOnRails
[19:24:06] yardenbar: has joined #RubyOnRails
[19:26:53] baweaver: has joined #RubyOnRails
[19:27:40] hxegon: has joined #RubyOnRails
[19:29:34] akshat: has joined #RubyOnRails
[19:32:06] ZerGabriel: has joined #RubyOnRails
[19:34:31] roamingdog: has joined #RubyOnRails
[19:36:49] King_Rex: has joined #RubyOnRails
[19:38:45] someish: has joined #RubyOnRails
[19:40:30] jhack: has joined #RubyOnRails
[19:41:45] mbreedlove: has joined #RubyOnRails
[19:42:25] arBmind: has joined #RubyOnRails
[19:46:05] shanson: has joined #RubyOnRails
[19:46:15] Dimik: has joined #RubyOnRails
[19:46:46] jeffleeismyhero: has joined #RubyOnRails
[19:48:46] baweaver: has joined #RubyOnRails
[19:49:48] GodFather: has joined #RubyOnRails
[19:51:59] bradleyprice: has joined #RubyOnRails
[19:52:16] ornerymoose: has joined #RubyOnRails
[19:54:26] n008f4g_: has joined #RubyOnRails
[19:55:57] dionysus69: has joined #RubyOnRails
[19:57:51] bruno-: has joined #RubyOnRails
[19:59:09] syndikate: has joined #RubyOnRails
[19:59:45] pawnbox: has joined #RubyOnRails
[19:59:49] polyidus: has joined #RubyOnRails
[20:03:50] maxdoubt: has joined #RubyOnRails
[20:05:03] matthias_: has joined #RubyOnRails
[20:05:19] baweaver: has joined #RubyOnRails
[20:05:36] SteenJobs: has joined #RubyOnRails
[20:06:37] stannard: has joined #RubyOnRails
[20:08:30] jstransky: has joined #RubyOnRails
[20:08:43] moeabdol: has joined #RubyOnRails
[20:09:17] DoubleMalt: has joined #RubyOnRails
[20:10:05] mikecmpbll: has joined #RubyOnRails
[20:15:36] bronson: has joined #RubyOnRails
[20:19:11] ornerymoose: has joined #RubyOnRails
[20:20:07] netzfisch: has joined #RubyOnRails
[20:20:49] jenrzzz: has joined #RubyOnRails
[20:21:12] stannard: has joined #RubyOnRails
[20:22:22] dopie: how put @user.name inside the alertbox ?
[20:22:22] dopie: PrivatePub.publish_to("/credits/#{@user.username}", 'alert("Transaction woot woot!")')
[20:23:07] beilabs: has joined #RubyOnRails
[20:23:12] arup_r: has joined #RubyOnRails
[20:23:18] jhack: has joined #RubyOnRails
[20:23:56] tubbo: dopie: flip the double & single quotes, then you'll be able to interpolate.
[20:24:00] mbreedlove: has joined #RubyOnRails
[20:24:04] smathy: OMG, please let it not be that.
[20:25:19] tubbo: the outer quotes determine whether ruby can interpolate something
[20:25:36] smathy: ACTION was trying to work out what he meant
[20:25:59] smathy: ...like, hmm, some problem with serializing some value into the pubsub thing... hmmm...
[20:26:21] arup_r: has joined #RubyOnRails
[20:26:42] dopie: heeheh :)
[20:26:44] dopie: tubbo: thanks
[20:29:45] sbarg1: has joined #RubyOnRails
[20:30:48] fryguy: dopie: consider %q and %Q for doing a third level of string quoting so you don't have to worry about escaping double or single-quotes when mixing them.
[20:32:12] lemur: has joined #RubyOnRails
[20:36:05] shanson: has joined #RubyOnRails
[20:36:06] tubbo: huge fan of percent-strings
[20:36:39] smathy: ...%q won't help though
[20:36:51] aloneintheworld: has joined #RubyOnRails
[20:39:05] rickmasta: has joined #RubyOnRails
[20:39:32] aegis3121: has joined #RubyOnRails
[20:43:29] Radar: it won't?
[20:44:11] Radar: Oh right, lowercase q.
[20:44:15] Radar: I am totally awake this morning.
[20:47:21] baweaver: qq Radar, qq
[20:47:52] stannard: has joined #RubyOnRails
[20:48:15] SteenJobs: when using strong params, what kind of vulnerabilities would one be risking if they used permit only with no require
[20:48:47] helpa: Why don't you try it and find out for yourself?
[20:49:00] SteenJobs: baweaver: me?
[20:49:01] baweaver: what happens when you use permit, throw a binding.pry on there
[20:49:08] SteenJobs: ya ya i did all o fthat
[20:49:16] SteenJobs: (i hate being helpa’d haha so humiliating!)
[20:49:17] tubbo: it's a poorly named method imho
[20:49:25] SteenJobs: i’m in the middle of binding.prying all over the place
[20:49:28] GriffinHeart: has joined #RubyOnRails
[20:49:32] tubbo: SteenJobs: people literally !code me every time i have a question
[20:49:36] tubbo: so don't feel too bad
[20:49:45] baweaver: tubbo: !code
[20:49:45] helpa: tubbo: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[20:49:51] baweaver: even when you don't :D
[20:49:57] SteenJobs: haha nah, i laugh when i get helpa’d - it’s like “i deserve it, i’ll learn for next time"
[20:50:15] baweaver: jokes aside, what did you see when you did params.permit(:something) ?
[20:50:18] SteenJobs: and let’s be real, there’s no where i ever felt more comfortable when i was first starting out than here
[20:50:21] tubbo: SteenJobs: the way i see it, require just means "dive into this sub-hash of the main params object and permit from there"
[20:50:27] SteenJobs: baweaver: well i know what it does!!!!
[20:50:35] mustmodify: can we have an automatic reply of "damnit" ?
[20:50:47] helpa: goteeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeem
[20:50:51] SteenJobs: right that’s exactly what it does - minus the part that it throws an error if the required hash name isn’t there
[20:50:55] tubbo: mustmodify: !goteem
[20:50:55] helpa: mustmodify: goteeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeem
[20:51:20] SteenJobs: yea we need a good helpa resonse helpa
[20:51:25] baweaver: !dammit_user
[20:51:25] helpa: Dammit user! I'm a programmer not a psychic!
[20:51:38] tubbo: i wish we could do "Dammit %{name}"
[20:51:49] baweaver: same, need to ask radar to make it magic
[20:52:20] SteenJobs: baweaver: my question presupposed that i know what the method does - i need to get rid of my require bit because the form only has one param, and it’s optional, so if it’s not present require throws an error - just wanted to know if i’m opening any risks by using only permit in this case
[20:52:26] mustmodify: no I mean...
[20:52:29] tubbo: baweaver: Radar doesn't care about open source https://github.com/radar/railsbot/pull/51
[20:52:47] Radar: http://ryanbigg.com/2015/11/open-source-work/
[20:52:48] bruno-: has joined #RubyOnRails
[20:52:48] Radar: Confirmed
[20:52:52] mustmodify: if tubbo says \! code to someone else... say ... alevy, then alevy should automatically respond DAMNIT.
[20:52:55] tubbo: come on Radar just merge the pull request
[20:53:11] SteenJobs: finally, thaaaat’s where that repo is!
[20:54:00] baweaver: SteenJobs: Think of it as a whitelist
[20:54:08] SteenJobs: well i mean it isssss a whitelist
[20:54:17] baweaver: it won't crash, but it won't let them through if it's not whitelisted
[20:54:32] baweaver: so I can't see how that'd be a security issue
[20:54:42] SteenJobs: right - that i all get - functionality i’m good on, just wondering if there are unforseen security holes that would open up should i not whitelist it
[20:54:44] baweaver: at least insofar as strong params themselves are concerned
[20:54:47] SteenJobs: yea i didn’t think there was
[20:54:57] bradleyprice: has joined #RubyOnRails
[20:55:02] baweaver: not unless you do something very bad after that
[20:55:07] SteenJobs: just sometimes i’m worried i may inadvertantly leave an opening
[20:55:15] SteenJobs: yea nope - just updating an avatar
[20:55:25] baweaver: http://brakemanscanner.org/
[20:55:26] tubbo: the only potential security holes you'd have to be aware of is if you have this line of code in ApplicationController `before_filter { params.permit! }` :D
[20:55:57] tubbo: we do that in Api::ApplicationController, because API requests can't be openly authenticated to (you need to set up a user to have API access)
[20:55:59] mhoungbo: has joined #RubyOnRails
[20:56:45] crdpink: has joined #RubyOnRails
[20:56:47] SteenJobs: right right, ok great. just wanted to make sure.
[20:57:06] SteenJobs: ugh damn JS bugs - so used to writing ruby that i forgot an explicity return.
[20:57:12] baweaver: tubbo: that looks like.....
[20:57:24] baweaver: tubbo: !code
[20:57:24] helpa: tubbo: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[20:57:27] helpa-bot: has joined #RubyOnRails
[20:57:55] baweaver: hm, helpa-bot, that's new.
[20:57:59] baweaver: Radar: new toy?
[20:58:13] ur5us: has joined #RubyOnRails
[20:58:52] a1fa: where are custom validators set in? config/initializers/?
[20:59:08] a1fa: config/initializers/validates_formatting_of.rb ?
[20:59:12] arup_r: a1fa: app/validators is what I dump them
[20:59:28] arup_r: ok.. didn't get you it seems
[20:59:42] a1fa: i have this problem with url validator.. i have no clue where it is
[20:59:45] arup_r: ok.. no I am right
[20:59:57] a1fa: validates_formatting_of :url
[21:00:07] a1fa: is that a built in validator?
[21:00:23] arup_r: I need to google!
[21:01:18] arup_r: it is OOB a1fa, http://apidock.com/rails/ActiveModel/Validations/HelperMethods/validates_format_of
[21:01:19] a1fa: gem 'validates_formatting_of'
[21:01:42] arup_r: oh.. your is different..
[21:02:06] a1fa: validates_formatting_of (0.8.1)
[21:02:54] sp1rs: has joined #RubyOnRails
[21:03:36] arup_r: a1fa: use the rails provided one? why picked a gem?
[21:04:01] a1fa: working on someone elses code
[21:04:37] shanson: has joined #RubyOnRails
[21:04:42] DoctorMonocular: has joined #RubyOnRails
[21:04:44] a1fa: and there happens to be a bug with the gem
[21:05:46] Technodrome: has joined #RubyOnRails
[21:08:35] aegis3121: has joined #RubyOnRails
[21:08:55] mrgreenfur: has joined #RubyOnRails
[21:09:07] drbayer: has joined #RubyOnRails
[21:11:57] a1fa: nope, not a bug with gem, bug in my head, but yeah, there is a bug in the gem still.
[21:12:14] a1fa: it does not recognize http://localhost as a valid url :)
[21:12:38] a1fa: ACTION pets "uri"
[21:13:19] iamdevnul: anyone here deal with i18n and parsing user input? I've been looking at https://github.com/clemens/delocalize but was wondering if there were other recommendations out there
[21:13:54] Jasaka: has joined #RubyOnRails
[21:14:47] maxdoubt: has joined #RubyOnRails
[21:15:11] eljimmy: has joined #RubyOnRails
[21:15:13] smathy: iamdevnul, I've used that before, it works.
[21:15:54] iamdevnul: i see it works for rails 4, just hoping the author keeps it going for 5
[21:15:58] diegoaguilar: has joined #RubyOnRails
[21:16:26] mrgreenfur: Anyone have any conventions for dealing with statistics related to your rails models? I made some complicated sql to get the right statistics ready, but I’d rather avoid lots of code to process them. Is there any elegant way to tie them to actual models and keep them in the rails way of thinking (ie using the model)?
[21:16:55] smathy: a1fa, URI is terrible at validating URLs.
[21:17:18] iamdevnul: thanks for the response smathy
[21:17:36] smathy: iamdevnul, np.
[21:18:45] w1lson: has joined #RubyOnRails
[21:19:15] universa1_: has joined #RubyOnRails
[21:19:50] smathy: mrgreenfur, https://github.com/ruport/ruport maybe?
[21:20:07] mrgreenfur: smathy: oooh, thanks much never seen this before
[21:20:25] twilling: has joined #RubyOnRails
[21:20:57] smathy: mrgreenfur, also https://github.com/saulabs/reportable - a bit more DSL-y.
[21:20:59] SeanLazer: has joined #RubyOnRails
[21:22:18] yfeldblum: has joined #RubyOnRails
[21:25:11] SeanLazer: has joined #RubyOnRails
[21:25:23] DoubleMalt: has joined #RubyOnRails
[21:26:41] Radar: !botsnack
[21:26:41] helpa: Nom nom. Thanks, Radar!
[21:28:55] mrgreenfur: @smathy thanks!
[21:29:10] smathy: mrgreenfur, np, hope they help.
[21:29:13] tekk: has joined #RubyOnRails
[21:31:21] zave: has joined #RubyOnRails
[21:44:44] Sadin: has joined #RubyOnRails
[21:44:56] Puffball: has joined #RubyOnRails
[21:48:45] wldcordeiro: has joined #RubyOnRails
[21:52:24] shanson: has joined #RubyOnRails
[21:52:56] bruno-: has joined #RubyOnRails
[21:53:05] P4Titan: has joined #RubyOnRails
[21:54:13] P4Titan: Hello all. If I wish to render a specific view from another callback, and that view's callback has some initialization code, is there a better way of doing this:
[21:54:22] P4Titan: http://pastie.org/10804368
[21:54:49] Radar: P4Titan: move the render call from line 17 into link_data_entry method and then you can just call the method.
[21:54:49] tweeeaks: has joined #RubyOnRails
[21:54:51] devn: has joined #RubyOnRails
[21:55:10] P4Titan: I see, but is that all that can be improved?
[21:56:36] smathy: P4Titan, ...is there a reason why, in that invalid case, you wouldn't want to display the fields that the user had already filled in?
[21:57:26] P4Titan: i just wish to include the @app_callout with the rendered view
[21:58:01] DoctorMonocular: has joined #RubyOnRails
[21:58:01] wmoxam: has joined #RubyOnRails
[21:58:08] smathy: P4Titan, the normal approach would be to set @link_entry in your create rather than using a local var, and then THAT's what you end up re-rendering on failure, and it has any of the fields that have been filled in.
[21:58:38] a1fa: smathy: any other ideas on the url validation?
[21:58:42] smathy: P4Titan, take a look at the resource generator that ships with Rails, it'll show you that pattern.
[21:59:04] P4Titan: search up "resource generator"?
[21:59:15] P4Titan: Tanks for the help!
[21:59:39] smathy: a1fa, look at the addressable gem.
[22:00:00] smathy: P4Titan, on your command line, read the output of: rails generate resource
[22:00:47] P4Titan: will that create any new files/litter?
[22:00:49] manfrin: has joined #RubyOnRails
[22:01:17] hoylemd: has joined #RubyOnRails
[22:02:09] smathy: P4Titan, by itself it just shows help/usage, but yes - do it in another dummy project with some args and see what it creates.
[22:02:38] P4Titan: hmm, i see
[22:02:43] P4Titan: I'll look into resource
[22:02:49] Radar: P4Titan: Why are you doing an if with a negative condition, paired with an else?
[22:03:01] Radar: P4Titan: You could reverse them so that the non-valid case is underneath the else.
[22:03:09] Radar: P4Titan: if with negative cond + else is a double negative
[22:03:13] Radar: "if this is not not valid"
[22:04:04] smathy: ACTION prefers `unless !model.invalid?`
[22:04:51] Radar: ACTION twitches
[22:05:07] jstransky: has joined #RubyOnRails
[22:09:01] roamingdog: has joined #RubyOnRails
[22:10:01] Spami: has joined #RubyOnRails
[22:10:48] timdotrb: has joined #RubyOnRails
[22:11:05] Puffball: has joined #RubyOnRails
[22:11:17] P4Titan: tbh, I have never gotten used to the unless flow
[22:14:42] jhack: has joined #RubyOnRails
[22:15:52] Intii: has joined #RubyOnRails
[22:17:01] Intii: Hi everyone, I have a form_for with method: :put but the form keeps POSTing versing using the PUT action.
[22:17:14] Intii: So everytime I submit the form the wrong action in my controller is called
[22:17:43] petor: has joined #RubyOnRails
[22:18:28] Intii: The hidden field _method is showing correctly but I don't think Rails takes that into account
[22:19:53] egray: has joined #RubyOnRails
[22:20:20] DoctorMonocular: has joined #RubyOnRails
[22:20:55] CodaBrink: has joined #RubyOnRails
[22:22:00] timdotrb: has joined #RubyOnRails
[22:22:58] timdotrb: Afternoon, all
[22:23:12] smathy: P4Titan, to be honest, if you use `unless !model.invalid?` then I'll have to find you and kill you.
[22:23:36] smathy: Intii, it does.
[22:23:55] smathy: Intii, PUT isn't universally supported by httpds, so Rails uses a hack to indicate that method.
[22:24:03] smathy: ...and delete too.
[22:24:38] crystal77: has joined #RubyOnRails
[22:24:45] Intii: smathy: I completely understand that, but it's not working properly here. In my log it says STARTED POST "/users/password" and it throws an error because the forms are different
[22:25:00] greengriminal: has joined #RubyOnRails
[22:25:20] Intii: Processing by Devise::PasswordsController#create as HTML
[22:25:22] null__: has joined #RubyOnRails
[22:25:34] Intii: That's what my log returns everytime I press submit on the put method form
[22:25:53] Intii: It should be PasswordsController#update
[22:26:15] smathy: Intii, !gist your routes, log, and the HTML of the form.
[22:26:15] helpa: Intii: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[22:27:18] nickenchuggets: has joined #RubyOnRails
[22:27:19] nickenchuggets: has joined #RubyOnRails
[22:28:22] TheMoonMaster: has joined #RubyOnRails
[22:28:50] Majadon: has joined #RubyOnRails
[22:29:14] Intii: smathy: Here you go buddy https://gist.github.com/dsarhadian/a7950e480bffc2906f77b0e542792f5a
[22:29:19] Oog: has joined #RubyOnRails
[22:29:47] smathy: Intii, no, not the view the HTML itself, from view-source before you submit.
[22:30:29] Intii: smathy: https://gist.github.com/dsarhadian/a7950e480bffc2906f77b0e542792f5a
[22:33:22] Cache_Money: has joined #RubyOnRails
[22:33:41] smathy: Intii, ...and add the output of `rake routes`
[22:33:49] aegis3121: has joined #RubyOnRails
[22:34:49] smathy: Intii, https://gist.github.com/dsarhadian/a7950e480bffc2906f77b0e542792f5a#file-routes-rb-L15
[22:35:02] aegis3121: has joined #RubyOnRails
[22:35:08] maxdoubt: has joined #RubyOnRails
[22:35:26] shanson: has joined #RubyOnRails
[22:35:28] Intii: But that's not what the controller is posting too
[22:35:43] smathy: Intii, is that ^ what you're doing? Ok, so yeah, `rake routes` please.
[22:35:49] Intii: I added the rake routes
[22:35:52] Intii: To the same file
[22:36:17] maxdoubt: has joined #RubyOnRails
[22:36:34] Intii: So in my rake routes output, there is a PUT /users/password
[22:36:38] Intii: That's where the form should be going
[22:36:48] mustmodify: has left #RubyOnRails: ()
[22:37:27] Cache_Money: I have a FantasyGame model which has 2+ User participants. I've created a FantasyGameUser model but I can never remember how to setup my ActiveRecord relationships. In the User profile I'd like to get all of the FantasyGames they've participated in (e.g. User.find(params[:id]).fantasy_games) but not sure how to do that with the models I currently have setup: https://gist.github.com/anonymous/8889193454c4c11181f1c21455dcdef2
[22:38:29] aloneintheworld: has joined #RubyOnRails
[22:39:29] timdotrb: I just got a private chat working with Private Pub, but am having trouble differentiating between which user sent the message. The wrong class is applied to the message for the recipient (it’s using the sender class). Basically the same issue that this person has: http://stackoverflow.com/questions/35989728/differentiate-users-with-private-pub
[22:39:50] roamingdog: has joined #RubyOnRails
[22:39:54] smathy: Intii, yep, looks fine all round.
[22:40:12] smathy: Intii, restart spring and your app.
[22:40:36] timdotrb: Is anyone aware of a solution?
[22:43:22] maxdoubt: has joined #RubyOnRails
[22:43:37] flashpoint9: has joined #RubyOnRails
[22:43:42] Jasaka: has joined #RubyOnRails
[22:49:51] Intii: smathy: I've restated the box 100 times
[22:49:56] Intii: That doesn't seem to solve the problem
[22:51:30] ensyde: has joined #RubyOnRails
[22:53:07] jstransky: has joined #RubyOnRails
[22:53:38] baweaver: has joined #RubyOnRails
[22:54:15] smathy: Intii, sorry, no idea here.
[22:54:37] Intii: smathy: okay
[22:54:38] smathy: I'm not a big devise user.
[22:54:40] Intii: thanks for your help
[22:55:35] DoctorMonocular: has joined #RubyOnRails
[22:56:05] quazimodo: has joined #RubyOnRails
[22:57:24] dopie: has joined #RubyOnRails
[22:58:35] bruno-: has joined #RubyOnRails
[22:59:42] idefine: has joined #RubyOnRails
[23:04:57] Radar: Intii: What is resource on the form page?
[23:05:00] TheShaun: has joined #RubyOnRails
[23:05:14] Radar: Intii: is it a persisted resource; does it have an ID?
[23:06:48] suffice: has joined #RubyOnRails
[23:07:20] Weavel: has left #RubyOnRails: ()
[23:08:13] Weavel: has joined #RubyOnRails
[23:08:54] markelite: has joined #RubyOnRails
[23:09:31] smathy: Radar, he has the url: option and method: :put - the right HTML is being generated.
[23:13:32] Synthead: can I configure the redis host and auth in sidekiq.yml?
[23:14:31] Radar: Synthead: !g configure redis host sidekiq
[23:14:57] Synthead: Radar: that doesn't answer my question :[
[23:15:02] Radar: Synthead: It doesn't?
[23:15:55] Radar: welp I tried.
[23:16:13] Spami: has joined #RubyOnRails
[23:16:19] Synthead: thanks anyway
[23:16:28] Puffball: has joined #RubyOnRails
[23:18:00] timdotrb: ACTION lol
[23:18:49] Synthead: for those that feel like putting in more effort, I'll elaborate... there's this: https://github.com/mperham/sidekiq/wiki/Using-Redis and this https://github.com/mperham/sidekiq/wiki/Advanced-Options. I'd feel kinda silly configuring redis in multiple yml files, especially rolling my own for the former config. it would be really nice to have a centralized configuration in one yml, and sidekiq already uses sidekiq.yml.
[23:19:15] DragonPunch: has joined #RubyOnRails
[23:19:26] PedramT: has joined #RubyOnRails
[23:19:45] Synthead: I want to configure a password for redis' auth, so I was hoping that there was a way (that I didn't find in google searches prior to asking this channel) to stick it in sidekiq.yml
[23:20:42] Spami: has joined #RubyOnRails
[23:21:35] beilabs: has joined #RubyOnRails
[23:21:36] Oliphaunte: has joined #RubyOnRails
[23:22:17] manfrin: has joined #RubyOnRails
[23:22:32] roamingdog: has joined #RubyOnRails
[23:26:23] idefine_: has joined #RubyOnRails
[23:26:51] Synthead: I don't need to configure specific sidekiq options at the moment, so I think I'll just roll my own yml until I find a better solution
[23:27:54] beilabs_: has joined #RubyOnRails
[23:27:56] superlou: has joined #RubyOnRails
[23:28:03] DoctorMonocular: has joined #RubyOnRails
[23:29:15] idefine__: has joined #RubyOnRails
[23:31:36] smathy: Synthead, sidekiq should just ignore extraneous options in sidekiq.yml
[23:32:04] Synthead: smathy: yeah I was kinda considering putting extra stuff in there, but it's starting to push code smell
[23:32:39] Synthead: smathy: if someone were to randomly pick up the project blind, there'd be extra stuff in there and the user couldn't look up upstream documentation for it
[23:32:56] Synthead: putting a comment in there might not be a bad idea, though
[23:33:21] idefine: has joined #RubyOnRails
[23:35:11] idefine_: has joined #RubyOnRails
[23:35:21] Puffball: has joined #RubyOnRails
[23:35:36] lemur: has joined #RubyOnRails
[23:35:49] cabinB: has joined #RubyOnRails
[23:38:47] maxdoubt: has joined #RubyOnRails
[23:40:12] quazimodo: has joined #RubyOnRails
[23:41:40] EasyCo: has joined #RubyOnRails
[23:42:55] epochwolf: has joined #RubyOnRails
[23:43:15] Synthead: I ended up writing this: http://pastie.org/10804424
[23:43:17] Synthead: thanks all :)
[23:43:45] SteenJobs: has joined #RubyOnRails
[23:45:23] wkoszek: has joined #RubyOnRails
[23:46:23] RegulationD: has joined #RubyOnRails
[23:47:32] DarkBushido: has joined #RubyOnRails
[23:47:32] DarkBushido: has joined #RubyOnRails