« Back to channel list

#RubyOnRails - 16 July 2015

« Back 1 day Forward 1 day »
[00:01:10] CodyStringham: has joined #RubyOnRails
[00:01:42] joelataylor: has joined #RubyOnRails
[00:01:49] VeryBewitching: Does anyone have an elegant solution they can point me to for Rails unit tests with models that override to_param (using stringex for acts_as_url); some of my URLs use it, but when I do an update, the 'url' field is not updated.
[00:02:17] chipotles: has joined #RubyOnRails
[00:03:51] rickmasta: has joined #RubyOnRails
[00:03:56] VeryBewitching: https://gist.github.com/bewitchingme/0c9880c1096036e9550f
[00:04:05] lethjakman: has joined #RubyOnRails
[00:05:01] VeryBewitching: Because only caption is updated (and the conversion of caption to the 'url' field using to_url doesn't seem to happen) the redirected_to assertion fails.
[00:07:28] 7GHAAP6P7: has joined #RubyOnRails
[00:07:28] 64MADC7ZF: has joined #RubyOnRails
[00:08:31] ddos[cat]: has joined #RubyOnRails
[00:08:45] Aeyrix: kek thanks heroku
[00:08:47] charliesome: has joined #RubyOnRails
[00:09:03] ddos[cat]: has joined #RubyOnRails
[00:09:58] Radar: VeryBewitching: Should a URL change for an item? ;)
[00:10:47] lindii_: has joined #RubyOnRails
[00:11:56] ddos[cat]: has joined #RubyOnRails
[00:12:06] VeryBewitching: Radar: These are URLs once authenticated, no SEO reuqirements, and it was as requested as well.
[00:12:17] Aeyrix: Radar: What the fuck is up with Heroku and Freenode?
[00:12:41] yashinbasement: has joined #RubyOnRails
[00:13:08] VeryBewitching: Radar: They would not be indexed, in other words. The front-end only uses the gallery name on the URI.
[00:13:24] VeryBewitching: Radar: The items use paperclip and can change.
[00:14:16] Radar: Aeyrix: I don't know? You tell me.
[00:14:22] nickenchuggets: has joined #RubyOnRails
[00:14:32] Aeyrix: I was kind of hoping you'd know given that ddos[cat] was me running the bot on heroku.
[00:14:33] Radar: VeryBewitching: Ok, so I'm guessing stringex only sets the url during creation and not update.
[00:14:36] greengriminal: has joined #RubyOnRails
[00:14:43] Radar: VeryBewitching: It's been a while since I've used that. I prefer friendly_id these days.
[00:14:52] VeryBewitching: Radar: Oh, I see.
[00:15:16] greengriminal: Radar, can you take a look at this https://gist.github.com/anonymous/e00d116087272b13df13 and give me your opinion
[00:15:34] Radar: greengriminal: Can you deposit $200 into radarlistener@gmail.com on PayPal first?
[00:16:05] greengriminal: didn't you know I had done that already
[00:16:44] Radar: http://imgur.com/DMbQ12i
[00:16:49] Radar: Doesn't look like it.
[00:16:57] strcmp1: greengriminal, i will do it for $180
[00:17:04] greengriminal: lol I'm sure I did ;)
[00:17:26] Radar: greengriminal: If you want my serious opinions about your code you will need to treat this matter seriously :)
[00:17:33] Radar: Otherwise: please don't waste my time.
[00:17:36] greengriminal: lol I'll pass.
[00:17:49] Radar: I don't hand out free code reviews.
[00:19:23] dlitz: has joined #RubyOnRails
[00:19:39] zorak8: has joined #RubyOnRails
[00:20:06] Radar: greengriminal: However, I will say this: https://gist.github.com/anonymous/e00d116087272b13df13#file-example-rb-L30-L31
[00:20:12] Radar: greengriminal: You've got a bug on those two lines.
[00:21:58] lindii_: what does NameError in LikesController#create uninitialized constant Like::Likeable means?
[00:21:58] greengriminal: Radar, i went and deleted the gist -.- We're you referring to these two lines: https://gist.github.com/anonymous/7fe41ea651439cfda3a7#file-example-rb-L30-L31
[00:22:04] mloy: greengriminal, did you kill that gist?
[00:22:09] Radar: greengriminal: yes.
[00:23:24] raugh: has joined #RubyOnRails
[00:23:55] sevenseacat: has joined #RubyOnRails
[00:24:11] dlitz: has joined #RubyOnRails
[00:24:34] JeramyRR: has joined #RubyOnRails
[00:26:31] dlitz: has joined #RubyOnRails
[00:26:40] bronson: has joined #RubyOnRails
[00:29:26] eggoez: has joined #RubyOnRails
[00:29:41] joelataylor: has joined #RubyOnRails
[00:33:03] bungoman: has joined #RubyOnRails
[00:34:46] bungoman: has joined #RubyOnRails
[00:35:54] xcesariox: has joined #RubyOnRails
[00:36:46] eggoez: has joined #RubyOnRails
[00:36:58] jkamenik1: has joined #RubyOnRails
[00:37:28] jdayvie: has joined #RubyOnRails
[00:40:49] Aeyrix: Radar: how to get a list of ops?
[00:41:01] p8m: has joined #RubyOnRails
[00:43:48] Scripore: has joined #RubyOnRails
[00:44:31] godzillaenlacasa: has joined #RubyOnRails
[00:48:00] Radar: Aeyrix: /msg chanserv access #rubyonrails list
[00:48:42] Radar: At work: "How do we get back those images that we deleted?" "You can't, they're gone." "But you have a way, right?" "Nope."
[00:49:00] Aeyrix: define:rekt
[00:49:09] lindii_: is validates_uniqueness_of and the uniqueness validation helper the same thing?
[00:49:20] Radar: lindii_: "uniqueness validation helper"?
[00:49:37] lindii_: Radar: http://guides.rubyonrails.org/active_record_validations.html#uniqueness
[00:49:58] Radar: "Why is the CSV using these image URLs still?" "Because it was generated when those images existed." "Can they be changed?" #smdh
[00:50:22] Radar: lindii_: Ah, yes those are the same.
[00:50:36] pwnd_nfsw: has joined #RubyOnRails
[00:51:26] lindii_: Radar: so is the same to do validates :user, presence: true, uniqueness: { :scope => [:likeable_id, :likeable_type] } and validates_uniqueness_of :user, :scope => [:likeable_id, :likeable_type]
[00:51:44] pwnd_nfsw: Anyone ever run into the problem with & being escaped in views? I'm having trouble with it. It's stored in the database as & (since gsub or CGI.unescape don't have an affect), but once it hits the view, it is escaped
[00:51:56] Radar: lindii_: Almost. The first example validates the presence too.
[00:51:59] Radar: pwnd_nfsw: code.
[00:52:07] lindii_: Radar: right
[00:52:10] lindii_: well thanks
[00:52:51] pwnd_nfsw: Radar https://gist.github.com/SirUncleCid/97f69577daffa3273aa2
[00:53:11] Radar: pwnd_nfsw: .html_safe at the end, or wrap it in raw()
[00:53:13] jdayvie: Hello =) Does anyone know of a good guide for S3 (via Amazon I think?). Setup paperclip but now need a way to store the images uploaded but I keep coming across tough to understand guides or some that include setting up paperclip (and confuses me) =P
[00:53:50] pwnd_nfsw: Radar, same results for both
[00:54:43] pwnd_nfsw: jdayvie, does it have to be S3? Cloudinary is a great alternative
[00:55:05] pwnd_nfsw: attachinary is the gem
[00:55:11] Radar: jdayvie: https://gist.github.com/radar/fe91cac72d4a415572b3
[00:55:19] jdayvie: Absolutely not =) I have just been told and read S3 is the best option?
[00:55:25] nfk: has joined #RubyOnRails
[00:55:45] Radar: jdayvie: Does that gist answer your questions?
[00:55:50] pwnd_nfsw: Cloudinary does all transformations on their cloud, and can be manipulated via url. You also don't need a credit card
[00:56:08] jdayvie: Radar: Basically, yes, very much! =) Though now, I am not sure if Cloudinary should be used instead?
[00:56:18] jdayvie: Radar: I meant to say thank you very much** :)
[00:56:27] pwnd_nfsw: YOu don't need to install any other software :)
[00:57:12] viiralvx: has joined #RubyOnRails
[00:57:13] jdayvie: pwnd_nfsw: I am sure there is a limit though and after a certain amount, must be charged =P
[00:57:25] pwnd_nfsw: It's pretty huge
[00:57:31] jdayvie: Going to compare now.
[00:58:16] njero: has joined #RubyOnRails
[00:58:47] Aeyrix: Adding a very important !MODS command
[00:58:48] Aeyrix: to the bot
[00:58:50] bronson: has joined #RubyOnRails
[00:58:50] njero: Hi all, anyone seen the error "RangeError: 4630598657 is out of range for ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Integer with limit 4". I am getting it intermittently inside of a transaction when inserting records
[00:58:51] Aeyrix: should be highly imoprtant
[00:59:10] jdayvie: Wow, Cloudinary seems to be better for the price than S3.
[00:59:13] Radar: pwnd_nfsw: can you show me a screenshot of what you're seeing in the view?
[00:59:15] Aeyrix: wow good spelling Aeyrix
[00:59:30] seank_: has joined #RubyOnRails
[01:00:01] sevenseacat: we typically need the mods less here than in #ruby. I wonder why.
[01:00:09] pwnd_nfsw: Radar http://imgur.com/lx8rkOZ
[01:00:15] pwnd_nfsw: <h4>Total: &amp;#128;12314.5</h4>
[01:00:35] Radar: pwnd_nfsw: What is the #128;?
[01:00:35] pwnd_nfsw: Trying to get euro sign >:|
[01:00:37] htmldrum: has joined #RubyOnRails
[01:00:56] Radar: pwnd_nfsw: Can you show me what @currency.symbol is in the controller?
[01:01:13] pwnd_nfsw: @money_symbol = @currency.symbol
[01:01:17] Contigi: has joined #RubyOnRails
[01:01:21] Radar: @pwnd_nfsw: Yeah, but what is @currency.symbol?
[01:01:28] bungoman_: has joined #RubyOnRails
[01:01:35] pwnd_nfsw: From postgres
[01:01:45] Radar: pwnd_nfsw: Show us the actual value.
[01:01:53] Radar: Put a breakpoint there and show us what @currency.symbol shows you.
[01:01:58] pwnd_nfsw: symbol: "&#128;"
[01:02:04] Radar: And in the controller?
[01:02:06] pwnd_nfsw: From rails c
[01:02:19] jdayvie: Hey Seven =) Hope you and Radar are having great days/evenings =)
[01:02:21] nfk: has joined #RubyOnRails
[01:02:26] sevenseacat: jdayvie: mornin'!
[01:02:38] Radar: <%= "&#128;".html_safe %>
[01:02:43] Radar: pwnd_nfsw: ^ that works on my machine
[01:02:54] Radar: pwnd_nfsw: It could be the gsubbing that you're doing in your controller which is futzing it
[01:03:12] nobitanobi: has joined #RubyOnRails
[01:03:23] Sylario: has joined #RubyOnRails
[01:03:32] eminencehc_: has joined #RubyOnRails
[01:04:52] macriis: has joined #RubyOnRails
[01:05:02] hahuang65: has joined #RubyOnRails
[01:05:40] nettoweb: has joined #RubyOnRails
[01:06:26] pwnd_nfsw: Radar, interesting
[01:06:35] pwnd_nfsw: When you put it in #{.....}
[01:06:38] pwnd_nfsw: it borks, but
[01:06:45] pwnd_nfsw: <%= @money_symbol.html_safe %><%= "#{@bag.total_price}" %
[01:06:49] pwnd_nfsw: thanks for your help
[01:07:05] pwnd_nfsw: That's pretty ridiculous lol
[01:07:13] pwnd_nfsw: wait a minute
[01:07:13] Radar: pwnd_nfsw: ftr: <%= @money_symbol.html_safe %><%= @bag.total_price %> would also work
[01:07:43] pwnd_nfsw: You have to do
[01:07:58] pwnd_nfsw: html_safe outside of the #{}
[01:08:00] pwnd_nfsw: and it works
[01:08:11] Radar: <%= "#{currency_symbol}10.00".html_safe %>
[01:08:14] nettoweb: has joined #RubyOnRails
[01:08:20] pwnd_nfsw: Yes, got it :P
[01:08:24] pwnd_nfsw: Thanks again
[01:08:32] Radar: (and did you realise the letters in the last half of your name are in the wrong order?
[01:09:12] pwnd_nfsw: Not on purpose either
[01:09:16] pwnd_nfsw: But I'm registered now *shrugs*
[01:09:32] sevenseacat: you can add multiple names to the same account
[01:09:35] sevenseacat: I have two on this one.
[01:09:53] sevenseacat: (dont ask me how. I don't remember.)
[01:09:58] Radar: ACTION has 3, including Radar[crippled] which I forgot about
[01:10:03] nettoweb_: has joined #RubyOnRails
[01:10:15] sevenseacat: I have sevenseacat and Karpah, naturally.
[01:10:54] giowong: when i call my model in rails console
[01:11:06] pwnd_nsfw: does it call back?
[01:11:10] giowong: why is it calling the singular version of my table when i have my table as plural?
[01:11:22] Aeyrix: giowong: That's the convention.
[01:11:28] sevenseacat: Aeyrix: no its not
[01:11:40] giowong: :Aeyrix no its suppoosed ot be plural
[01:11:42] Radar: giowong: code
[01:11:42] pwnd_nsfw: Butt model calls Butts table. It should anyways.
[01:11:42] Aeyrix: Whoa misread.
[01:11:48] Aeyrix: pwnd_nsfw: butts
[01:11:57] giowong: Radar: not sure how to show code
[01:11:57] nettoweb_: has joined #RubyOnRails
[01:12:00] pwnd_nsfw: You're right
[01:12:18] giowong: My model name is singular and the schema reflects plural name
[01:12:19] doctorly: has joined #RubyOnRails
[01:12:28] giowong: i dont know where the problem is
[01:12:32] mikeric: @Radar: Here is some example code to reproduce: http://pastie.org/10295610
[01:12:43] bricker: giowong: what probably are you having? Is there an error or something?
[01:12:59] mikeric: @Radar: using actionmailer 3.2.21
[01:13:03] hahuang61: has joined #RubyOnRails
[01:13:04] doctorly: what is the website to upload code again?
[01:13:08] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[01:13:11] doctorly: as in pastebin
[01:13:15] giowong: http://pastebin.com/kVqn0rc5
[01:13:29] giowong: yeah its an error
[01:13:34] lindii_: in a polymorphic association how can i make a query like self.likes.find_by_likeable_id_and_likeable_type(model.id, model.type #whatever goes here)
[01:14:10] sevenseacat: model.class.to_s would usually go there
[01:14:40] sevenseacat: though I'm not sure what that query is supposed to be doing
[01:14:55] sevenseacat: or how it can return anything
[01:15:02] bricker: giowong: can you gist please my ISP blocks pastie
[01:15:06] bricker: pastebin I mean
[01:15:22] lindii_: sevenseacat: true or false if a user already liked
[01:15:39] sevenseacat: called on a user, I see
[01:16:05] doctorly: I am having an issue using select2, it is over-riding the css of my template. When I try to edit the CSS by adding a style tag, I can only get width to change. Here is the tage I'm using https://gist.github.com/brendenyule/ed90607352a8f314a370 . Any help would be aweosme!
[01:16:14] fgo: has joined #RubyOnRails
[01:16:16] giowong: https://gist.github.com/gwong89/6fb8228fc0d747cb0cc6
[01:16:19] htmldrum: has joined #RubyOnRails
[01:16:20] lindii_: sevenseacat: that worked thanks
[01:16:47] Radar: giowong: report_data is the plural.
[01:16:52] Radar: giowong: You've named your model plural.
[01:17:01] Radar: ReportDatum would be the singular version.
[01:17:28] bricker: the ol "wtf english" bug
[01:17:30] Radar: Or something.
[01:17:34] ur5us: has joined #RubyOnRails
[01:17:36] JeramyRR: has joined #RubyOnRails
[01:17:37] giowong: is there a way to fix this
[01:17:38] Radar: ACTION waits
[01:17:45] Radar: giowong: Yes.
[01:17:49] bricker: giowong: Just rename your model to ReportDatum and you're good to go
[01:17:54] Radar: bricker: that's cheating :P
[01:18:01] Radar: (and one extra letter to type)
[01:18:07] bricker: But it's correct
[01:18:10] Radar: giowong: what's the table name that was created?
[01:18:23] tfittsy: has joined #RubyOnRails
[01:18:32] hahuang62: has joined #RubyOnRails
[01:18:36] giowong: my model is singular though??
[01:18:45] sevenseacat: guessing an inflection is going to be made
[01:18:48] sevenseacat: no, Data is plural
[01:18:57] Radar: giowong: No, it's not.
[01:19:16] giowong: in my models report_data.rb is the file
[01:19:34] Aeyrix: Welcome back to "Fuck English", episode "What the fuck language".
[01:19:37] Frem: has joined #RubyOnRails
[01:19:46] Radar: giowong: "Data" is the plural of the word "Datum"
[01:19:51] lethjakman: has joined #RubyOnRails
[01:19:56] Aeyrix: Rename it to DataPoint.
[01:20:01] Radar: irb(main):001:0> "data".pluralize
[01:20:02] Radar: => "data"
[01:20:10] Radar: irb(main):002:0> "datum".pluralize
[01:20:11] Radar: => "data"
[01:20:16] Wingar_: has joined #RubyOnRails
[01:20:42] njero: has joined #RubyOnRails
[01:20:56] jeanjack_: has joined #RubyOnRails
[01:21:09] bricker: Radar: sevenseacat I think we just found a new chapter for your book
[01:21:25] Frem: has joined #RubyOnRails
[01:21:41] Aeyrix: sevenseacat: Does Devise handle TOTP?
[01:21:43] Aeyrix: s/does/can/
[01:21:53] Radar: Anything is possible if you wish for it enough.
[01:21:55] sevenseacat: I don't know what TOTP is
[01:22:08] Aeyrix: Time-based One-Time Passcode.
[01:22:09] Radar: Aeyrix: See also: https://en.wikipedia.org/wiki/The_Secret_(book)
[01:22:10] pkrnj: has joined #RubyOnRails
[01:22:29] Aeyrix: Radar: Merge my pullreq so I can add my VERY IMPORTANT COMMAND
[01:22:56] giowong: fuck me english
[01:23:03] Aeyrix: Radar: thank
[01:23:05] atrius: has joined #RubyOnRails
[01:23:05] giowong: i changed data to datas
[01:23:10] sevenseacat: Aeyrix: I don't think it does
[01:23:14] bricker: you mean two-factor auth?
[01:23:58] Aeyrix: my VIC is next
[01:23:59] Aeyrix: not that one
[01:24:04] Aeyrix: that one actually just fixes that bug :v
[01:24:22] Radar: giowong: I agree with Aeyrix. You should rename it ReportDatapoint
[01:24:22] sp33drac3r: has joined #RubyOnRails
[01:24:36] Aeyrix: <Radar> I agree with Aeyrix
[01:24:45] Aeyrix: This is the best day of my life.
[01:25:26] Radar: Seems like you've had a pretty shit life then.
[01:25:38] beauby: has joined #RubyOnRails
[01:30:41] merryfett: has joined #RubyOnRails
[01:34:09] dieogviola: has joined #RubyOnRails
[01:34:44] Rennex_: has joined #RubyOnRails
[01:35:29] ur5us: has joined #RubyOnRails
[01:36:14] braincra-: has joined #RubyOnRails
[01:36:25] CodyStringham: has joined #RubyOnRails
[01:37:25] dieogviola: has joined #RubyOnRails
[01:37:27] giowong: how do i access the relation in rails console
[01:37:35] giowong: theme.report_datum?
[01:37:40] giowong: if its one to one
[01:37:54] Radar: This is the first I am hearing of a theme
[01:38:37] giowong: lets say its just some model that has a has_one relation with report_datum
[01:38:39] beauby: has joined #RubyOnRails
[01:39:01] Radar: Did you try accessing it the way you suggested?
[01:39:55] one_zero: has joined #RubyOnRails
[01:40:17] giowong: undefined method
[01:40:57] tweeeaks: has joined #RubyOnRails
[01:41:22] nya: has joined #RubyOnRails
[01:42:23] sevenseacat: code, error, etc.
[01:42:52] Miesco: has joined #RubyOnRails
[01:43:02] one_zero_j: has joined #RubyOnRails
[01:43:52] bruno-: has joined #RubyOnRails
[01:44:07] Miesco: The problem is, my production nginx/passenger server is giving me a 404 for the static pages defined with 'get' in routes.config, while it is working on my rails development server. What is the first step to bring an end to this problem?
[01:45:11] htmldrum: has joined #RubyOnRails
[01:48:46] Radar: Miesco: !debug-proxy
[01:48:46] helpa: Miesco: This kind of issue is hard to debug remotely. You should hire someone who can look at your code and figure it out. We are most likely unable to help you in this situation.
[01:48:50] camilasan: has joined #RubyOnRails
[01:49:04] Radar: Miesco: You can also look at your production logs.
[01:49:08] Radar: Miesco: log/production.log
[01:49:17] Radar: Miesco: My guess is that you haven't deployed the code yet for those routes.
[01:49:22] Radar: But *shrug* hard to tell from this far away
[01:50:27] Fire-Dragon-DoL: has joined #RubyOnRails
[01:52:25] macriis: has joined #RubyOnRails
[01:52:35] speaking1ode: has joined #RubyOnRails
[01:53:58] WillAmes: has joined #RubyOnRails
[01:55:34] JoshuaPaling: has joined #RubyOnRails
[01:55:59] macriis: has joined #RubyOnRails
[01:56:14] htmldrum: has joined #RubyOnRails
[01:56:51] duderonomy: has joined #RubyOnRails
[01:58:51] Miesco: Radar: Here is my routes.conf: https://gist.github.com/2b1879d1bc51771f1c03
[01:59:14] ephantmon: has joined #RubyOnRails
[02:00:45] Radar: Miesco: Did you deploy the changes or not?
[02:01:51] Miesco: Radar: Well yea. nginx just points to my public/ directory.
[02:02:06] thatkid: has joined #RubyOnRails
[02:02:11] Radar: You didn't answer my question.
[02:02:20] Radar: Is that config/routes.rb from your local computer or from the server?
[02:02:21] helpa: http://i.imgur.com/m9m3wr9.gif
[02:02:30] Miesco: Radar: both
[02:02:36] Radar: Are you certain?
[02:02:37] sevenseacat: miesco breaks Ruby, episode 6
[02:02:42] sevenseacat: its on its on its onnnnnn
[02:02:45] Radar: Miesco: Show the logs from logs/production.log
[02:02:46] thatkid: I'm getting an error like this "no implicit conversion of Sprockets::Asset into String"
[02:02:52] Radar: thatkid: !code
[02:02:52] helpa: thatkid: 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.
[02:02:55] Radar: What the fuck is with people today not providing code?!
[02:03:16] Miesco: Radar: Well right now, my nginx server is running the development environment (for troublshooting this)
[02:03:24] diego1: has joined #RubyOnRails
[02:03:26] thatkid: I'm getting an error like this "no implicit conversion of Sprockets::Asset into String", what the possible reoson behind it? http://stackoverflow.com/questions/31444000/typeerror-in-spreeadminordersshow-no-implicit-conversion-of-sprocketsass
[02:03:33] towski_: has joined #RubyOnRails
[02:03:35] Radar: Especially today.
[02:03:46] Radar: Miesco: Show the logs from log/development.log
[02:04:00] thatkid: Radar: I missed that, sorry.
[02:04:25] dopie: has joined #RubyOnRails
[02:04:32] Miesco: Radar: https://gist.github.com/b1b94901ecfbdbe53109
[02:06:04] Miesco: wait I found something
[02:06:10] Miesco: I tried: rails s -e production
[02:06:14] Miesco: And I get: ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
[02:06:32] sevenseacat: totally unrelated.
[02:06:56] dopieee: has joined #RubyOnRails
[02:08:07] viiralvx: has joined #RubyOnRails
[02:09:12] beauby: has joined #RubyOnRails
[02:12:26] htmldrum: has joined #RubyOnRails
[02:13:13] Aeyrix: Radar: imo
[02:13:18] Aeyrix: (and i'll add a patch for this)
[02:13:25] Aeyrix: if you call <user>: !code three times, it kicks the user.
[02:13:25] helpa: if you call <user>: 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.
[02:13:47] Aeyrix: prevents Radar getting mad
[02:13:52] Aeyrix: p good solution imo
[02:14:02] mikeric: has joined #RubyOnRails
[02:14:02] sevenseacat: no auto-kicking.
[02:14:34] Aeyrix: I bet you're one of those people that uses excel instead of sequel because you don't trust those new fangled systems
[02:16:04] TheNet: has joined #RubyOnRails
[02:16:42] Miesco: If I am using nginx with passenger in development environment, should I be getting the error console and such like I do on the 'rails server'?
[02:17:00] TheNet: how can I have set a class for text_area_tag without adding a value?
[02:17:01] siemprefresco: has joined #RubyOnRails
[02:17:22] Aeyrix: TheNet: create a wrapping function
[02:17:56] TheNet: Aeyrix: wrapping function?
[02:18:26] Aeyrix: def parameters_are_too_hard
[02:18:35] Aeyrix: return text_area_tag('someclass')
[02:18:38] Aeyrix: obvious pseudocode
[02:19:19] TheNet: there's nothing in rails?
[02:19:28] TheNet: that seems like poor design
[02:19:37] bungoman: has joined #RubyOnRails
[02:19:56] TheNet: I don't see why I can't just do text_field_tag :name, class: 'my-class'
[02:20:09] Aeyrix: I thought that's what you meant you didn't want to do.
[02:20:13] sevenseacat: you said "without adding a value"
[02:20:32] TheNet: in which case it would be text_field_tag :name, '', class: 'my-class'
[02:20:43] sevenseacat: http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-text_field_tag
[02:20:46] TheNet: I mean without the ''
[02:21:02] sevenseacat: no. the second arg is the value of the text field tag.
[02:22:10] Lytol: has joined #RubyOnRails
[02:23:29] Scripore: has joined #RubyOnRails
[02:23:35] TheNet: is nil the convention over '' in that case?
[02:23:56] Aeyrix: irb(main):001:0> ''.class
[02:23:56] Aeyrix: => String
[02:23:57] Aeyrix: irb(main):002:0> nil.class
[02:23:58] Aeyrix: => NilClass
[02:24:47] Aeyrix: That question leads me to believe you're trying to do something nonsensical.
[02:25:00] Aeyrix: What's so difficult about '' that `nil` is so much better than?
[02:25:23] mloy: In the API docs the examples given use nil instead of '', why is '' prefered? Honest question, total Ruby and Rails noob here.
[02:25:29] darrencauthon: has joined #RubyOnRails
[02:25:39] TheNet: the example sevenseacat linked literally both
[02:25:48] mloy: not as in Ruby on Rails noob, I'm a noob at both.
[02:25:56] TheNet: *used both
[02:26:27] TheNet: just asking which one is better ??\_(???)_/??
[02:26:43] sevenseacat: it literally doesn't matter.
[02:26:49] Aeyrix: `nil` will get converted to a string.
[02:26:56] Creeves: has joined #RubyOnRails
[02:27:00] Aeyrix: So if you want to save that miniscule bit of processing power, use ''.
[02:27:02] TheNet: nil looks better imo
[02:27:08] Aeyrix: sevenseacat: Uh
[02:27:09] sevenseacat: see the examples in the docs.
[02:27:23] sevenseacat: nil -> no value set at all.
[02:27:25] Aeyrix: options = options.stringify_keys
[02:27:28] sevenseacat: '' -> empty value set.
[02:27:34] fgo: has joined #RubyOnRails
[02:27:43] sevenseacat: the value isnt an option.
[02:28:10] Aeyrix: > content.to_s.html_safe
[02:28:17] Aeyrix: content == value for text_area
[02:28:32] sevenseacat: text_field_tag 'request', nil, class: 'special_input' # => <input class="special_input" id="request" name="request" type="text" />
[02:28:34] sevenseacat: no value set at all.
[02:28:54] konsolebox: has joined #RubyOnRails
[02:29:01] mloy: Aeyrix, in response to saying that 'nil' will get converted to a string and thus use more processing, thanks. Exactly the answer I was looking for.
[02:29:03] Aeyrix: I think you misunderstood my statement.
[02:29:05] beauby: has joined #RubyOnRails
[02:29:09] r_baron: has joined #RubyOnRails
[02:29:19] r_baron: has joined #RubyOnRails
[02:29:28] Aeyrix: It gets checked later down the line by the `content_tag` function, and removed if empty/nil (lol another check).
[02:29:32] sevenseacat: except its wrong, but sure :P
[02:29:39] Aeyrix: sevenseacat: I'm looking at the source
[02:29:59] Aeyrix: Unless I'm fundamentally unable to comprehend Ruby, I'd venture that within the scope of the text_area_tag function I'm not incorrect.
[02:30:18] Aeyrix: https://github.com/rails/rails/blob/dd7af2c413a06ea44e50abf0df205314ba1bfc98/actionview/lib/action_view/helpers/form_tag_helper.rb#L348
[02:30:25] Aeyrix: `content_tag`, as I mentioned.
[02:30:30] Aeyrix: content.to_s.html_safe, as I mentioned.
[02:30:58] Aeyrix: `content`, for text_area_tag, is value, yes? According to the arguments you pass to it, it is.
[02:31:34] sevenseacat: Aeyrix: you're looking at text_area_tag, not text_field_tag
[02:31:48] Aeyrix: That's because:
[02:31:49] Aeyrix: [12:16:59] <TheNet> how can I have set a class for text_area_tag without adding a value?
[02:32:13] TheNet: I did mean text_field
[02:32:14] sevenseacat: ah we're confused because TheNet used both
[02:32:16] sevenseacat: TheNet: I don't see why I can't just do text_field_tag :name, class: 'my-class'
[02:32:19] TheNet: sorry ;-;
[02:32:42] sevenseacat: the docs I linked were also for text_field_tag
[02:32:55] Aeyrix: > basing my answer off initially given information
[02:33:02] Aeyrix: > you're, idk, an op, so i'm wrong
[02:33:08] moeabdol2: has joined #RubyOnRails
[02:33:32] sevenseacat: yeah so was I, so there was just a miscommunication :P
[02:33:45] sevenseacat: you may indeed be right for text_area_tag. but you're not for text_field_tag.
[02:33:56] sevenseacat: why they're different? who the fuck knows.
[02:34:16] Aeyrix: I'd imagine to process the rows/columns and shit.
[02:34:26] Aeyrix: https://github.com/rails/rails/blob/dd7af2c413a06ea44e50abf0df205314ba1bfc98/actionview/lib/action_view/helpers/tag_helper.rb#L74
[02:34:30] Aeyrix: That's what we use for most other things.
[02:35:47] sevenseacat: but of course, blame the fact that I'm an op, or whatever.
[02:36:50] sevenseacat: I get so tired of bullshit.
[02:37:00] Aeyrix: VeryBewitching: There's too many
[02:37:02] Aeyrix: T Y R A N T S
[02:37:20] Aeyrix: Ah shit I forgot he removed it from his Twitter bio.
[02:37:22] sevenseacat: yeah I can see the tyranny everywhere.
[02:37:25] Aeyrix: No longer an IRC tyrant. ;_;
[02:37:26] VeryBewitching: I've never felt any kind of tyranical presence in this channel.
[02:37:39] sevenseacat: thats why Aeyrix is allowed to constantly troll his head off.
[02:37:42] Aeyrix: VeryBewitching: It's obviously all over the place.
[02:37:50] VeryBewitching: Be polite, asked pointed questions, wait for assistance when it's available
[02:38:01] Aeyrix: VeryBewitching: also post code
[02:38:03] Aeyrix: you forgot that one
[02:38:15] VeryBewitching: The rules are in the subject.
[02:38:23] VeryBewitching: Follow, be merry.
[02:38:30] Aeyrix: Is post code in the rules?
[02:38:37] VeryBewitching: Depends on the question.
[02:38:43] Aeyrix: It's #3 it seems.
[02:39:17] VeryBewitching: "Can I connect to a db2 database with Rails?" would be a question that does not involve me to gist anything.
[02:39:25] Aeyrix: Nah post code.
[02:39:35] Aeyrix: Reproduce problem in a new rails app please.
[02:39:35] sevenseacat: its also something we can just say 'yes' or 'no' to, and move on.
[02:40:15] sevenseacat: if you then ask 'how?' then we can ask what you've tried so far
[02:40:22] sevenseacat: we're not here to spoonfeed people answers
[02:40:24] Creeves: number 9 in the rules is... very confusing... ???
[02:40:28] sevenseacat: and do their jobs for them
[02:40:33] helpa: Do not use excessive punctuation. This includes question marks (?), exclamation marks (!) and ellipsis (...).
[02:40:43] Aeyrix: You ain't seen nothing yet.
[02:40:52] Aeyrix: We've seen people get up to 88 punctuation marks per line.
[02:41:03] Creeves: wow!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[02:41:08] Aeyrix: Overuse of ellipsis cause me to read things really weirdly.
[02:41:15] Creeves: okay that's enough from me
[02:41:33] mloy: What about underuse of punctuation
[02:41:39] Miesco: Is it only 'rails server' that writes to log/ or does the nginx deployed version also write to log/?
[02:42:15] Aeyrix: mloy: So long as it's at least a little readable.
[02:42:33] jesterfraud: has joined #RubyOnRails
[02:42:59] jenrzzz: has joined #RubyOnRails
[02:44:02] Miesco: Aeyrix: Do you know?
[02:44:15] Aeyrix: Search Results
[02:44:21] Creeves: Miesco: what rails server
[02:45:09] beauby: has joined #RubyOnRails
[02:45:48] Miesco: Creeves: rails 4.2.3
[02:46:16] htmldrum: has joined #RubyOnRails
[02:47:58] viiralvx: So I am using Devise and I defined a custom confirmation route for my Confirmation Email, for some reason its appending a period and the resource's ID to the route though. So its users/confirm.1?confirmation_token=foobarbaz, any ideas why it does that?
[02:49:03] Creeves: Miesco: okay, so webbrick/thin?
[02:49:29] doodlehaus: has joined #RubyOnRails
[02:50:36] surrealanalysis: has joined #RubyOnRails
[02:50:59] Miesco: Creeves: ?
[02:51:12] Creeves: nginx is just your reverse proxy right
[02:51:18] njero: has joined #RubyOnRails
[02:51:18] Creeves: you're still shooting the requests to some server
[02:51:31] Miesco: Creeves: No
[02:51:35] Miesco: Creeves: I am using passenger
[02:51:50] Creeves: ah, that's what i was getting at before
[02:52:07] Creeves: Miesco: what rails server
[02:52:36] Miesco: Creeves: I am testing with the rails server, and deploying with nginx/passenger
[02:53:04] Miesco: Creeves: I am just wondering if nginx/passenger writes to log/
[02:53:11] Creeves: i'm pretty sure it'll be up to passngers config
[02:53:20] Creeves: i know if you use unicorn you can set that
[02:53:49] smathy: Miesco, nginx will just use your syslog.
[02:53:49] Creeves: but by default, it should go to log/ yes
[02:53:56] ephantmon: has joined #RubyOnRails
[02:54:28] smathy: Miesco, until it boots, and then it'll log request-level things to wherever it's configured to.
[02:55:06] baweaver: has joined #RubyOnRails
[02:55:35] mloy: Should I be using Unicorn or Passenger over Puma?
[02:56:07] smathy: mloy, you should rotate between those three, changing each week.
[02:56:11] Aeyrix: smathy: lol
[02:56:12] mloy: smathy, d:
[02:56:24] Creeves: use spider-gazelle: https://github.com/cotag/spider-gazelle :D
[02:56:32] mloy: From everything I've been reading Puma is the way to go but I only see the other two mentioned on here. Then again I've only been here as of today.
[02:56:40] Aeyrix: mloy: I use Puma.
[02:56:49] Aeyrix: I also use Unicorn, but I find Puma faster.
[02:56:56] smathy: mloy, use whichever one you're most familiar with.
[02:57:15] eminencehc_: has joined #RubyOnRails
[02:57:20] mloy: smathy, that's great advice. I'm equally unfamiliar with all so I want to be sure to pick one and not regret it ^^
[02:57:21] smathy: mloy, performance is interesting, misconfiguration sinks ships.
[02:57:43] smathy: mloy, they each have strengths and weaknesses, there's no one right answer.
[02:57:56] smathy: mloy, pick whichever one you like the feel of.
[02:57:59] LearningCN: has joined #RubyOnRails
[02:58:34] jdayvie: Good Evening all =) Does anyone happen to have some knowledge on paperclip and how to fix the blurry images uploaded? =P
[02:59:43] Miesco: Okay, going to bed. I'll figure this out another time. Thanks for the help.
[02:59:43] jdayvie: I tried one convert_option that helped very little in development but made no difference in production, hah.
[03:00:29] Aeyrix: sevenseacat: How do they do that
[03:00:31] Aeyrix: so consistently
[03:00:35] Aeyrix: they should be on the core dev team
[03:00:40] Aeyrix: it's like a human fuzzer
[03:00:48] sevenseacat: Aeyrix: magic. welcome to our lives.
[03:01:41] helpa: jdayvie: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[03:01:46] lwu: has joined #RubyOnRails
[03:02:13] Trynemjoel: has joined #RubyOnRails
[03:02:20] jdayvie: Sure thing - Give me one minute to place it all in there.
[03:02:39] bronson: has joined #RubyOnRails
[03:03:04] TheNet: has joined #RubyOnRails
[03:04:01] jdayvie: https://gist.github.com/Jdayvie/9a43f22e7fd3328ca798
[03:04:42] Aeyrix: oh man, paperclip
[03:04:43] VeryBewitching: jdayvie: !gist-usage
[03:04:43] helpa: jdayvie: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[03:04:57] Aeyrix: VeryBewitching: You're a fan of these commands aren't you
[03:05:03] VeryBewitching: What size are the source images jdayvie?
[03:05:15] VeryBewitching: Aeyrix: It's easier to read if it's divided properly :P
[03:05:27] jdayvie: Ill read that page for future gists, thanks =)
[03:06:07] jdayvie: The sample image I am using may be bit big - 293KB? =P Its just been a sample to try for what I am doing.
[03:06:22] beauby: has joined #RubyOnRails
[03:06:51] jdayvie: If you want actual dimensions, it is 900x900, so I know its being scaled down quite a bit which affects it. Though it seems (from research), paperclip has an issue a bit with this?
[03:07:05] viiralvx: Hey y'all, check it: https://gist.github.com/iheanyi/457059b206b031425764 I'm having an error with a custom confirmation URL with Devise, its appending the resource ID to the end of the url, any idea how to fix it?
[03:07:30] rhizome: jdayvie: tell people not to upload blurry images
[03:07:49] sevenseacat: viiralvx: you're passing a param to a route that doesnt expect one
[03:08:02] VeryBewitching: jdayvie: I used this http://www.imagemagick.org/script/command-line-processing.php?ImageMagick=lj6pre8q2iautc3ch6nuph1fc2#geometry to get me by with Paperclip
[03:08:04] sevenseacat: so it treats it as the default optional param - the format param
[03:08:08] jdayvie: Haha Rhizome =P The image I am trying is very clear though.
[03:08:15] viiralvx: Ooooooh. Wait, duh.
[03:08:19] viiralvx: @sevenseacat: Thanks.
[03:08:24] viiralvx: Let me try that
[03:08:25] jdayvie: VeryBewitching: Perfect, thank you very much! =)
[03:08:29] rhizome: jdayvie: well, there is no "the blurry image" problem
[03:08:44] jdayvie: *waves again at Seven...and I think I saw Smathy around too*
[03:08:53] sevenseacat: he's kicking around here somewhere
[03:09:09] braincrash: has joined #RubyOnRails
[03:09:15] viiralvx: Figured it out
[03:09:19] viiralvx: @sevenseacat: Thanks. Derp moment.
[03:10:48] chinmay_dd: has joined #RubyOnRails
[03:12:28] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[03:14:24] lexluthor1: has joined #RubyOnRails
[03:15:26] llakey: has joined #RubyOnRails
[03:17:27] Maletor: has joined #RubyOnRails
[03:19:55] erich: has joined #RubyOnRails
[03:20:43] Creeves: trying ruby-install for this deployment
[03:20:51] Creeves: rather than rbenv/rvm
[03:20:55] Creeves: seems to work nice
[03:21:50] Aeyrix: I scripted it now because I'm deploying it everywhere. :D
[03:21:51] jglover: has joined #RubyOnRails
[03:22:42] Lytol: has joined #RubyOnRails
[03:22:55] jglover: hey guys, we're using faye-rails right now for the real-time portion of our app, and it seems to be sucking a little bit. I'd like to experiment with a couple other things this weekend. Does anybody have any recommendations?
[03:23:24] jglover: its a pretty small application of real-timeyness. About 250 people need to be aware of what the other 249 people are doing throughout the day
[03:23:34] jglover: and if they're busy, etc. It's an internal tool..
[03:23:47] jglover: maybe chat too, later on.
[03:24:59] Creeves: other one i've heard of is Juggernaut
[03:25:04] Creeves: but couldn't say which is better
[03:25:23] Creeves: oh it's dead
[03:26:39] jglover: Creeves: going to try node-faye
[03:26:43] lexluthor1: has joined #RubyOnRails
[03:26:44] rhizome: jglover: a good google technique is seeing what comes up in suggest for "thing vs"
[03:26:52] Creeves: oh so it's isn't faye that you want to avoid
[03:27:17] jglover: rhizome: heh, not a bad idea
[03:30:04] yfeldblum: has joined #RubyOnRails
[03:30:05] VeryBewitching: alternatives to gives reliable results I find as well
[03:30:10] codepete: has joined #RubyOnRails
[03:31:45] fgo: has joined #RubyOnRails
[03:33:03] LearningCN: has joined #RubyOnRails
[03:33:19] eggoez: has joined #RubyOnRails
[03:34:17] jglover: I'm seeing online people say things like "do not use (ruby|rails) for websockets" why is that?
[03:34:50] Aeyrix: Because ActionCable isn't standard yet.
[03:35:20] dan0034001: has joined #RubyOnRails
[03:36:07] ledestin: has joined #RubyOnRails
[03:37:15] llakey: has joined #RubyOnRails
[03:38:43] jglover: "A tip: don't use ruby as websocket server, go for NodeJS - we handle thousands of messages every hour without any issue." this is from a stack overflow post
[03:38:48] jglover: I have no idea why still.
[03:39:02] jglover: I believe it, because it seems the consensus. But it's not clear to me why.
[03:41:17] giowong: has joined #RubyOnRails
[03:43:30] Aeyrix: I can use C as a websocket server and manage even more messages per hour.
[03:43:48] Aeyrix: I don't, because I prefer to write Ruby and it's fast enough for my usage.
[03:44:52] mikeric: has joined #RubyOnRails
[03:46:10] bungoman: has joined #RubyOnRails
[03:46:11] Aeyrix: RIP IRCClod.
[03:46:55] avitzurel: has joined #RubyOnRails
[03:47:43] Radar: lol nodejs
[03:47:48] Radar: real programmers use Elixir
[03:49:42] Anakat: has joined #RubyOnRails
[03:50:43] rhizome: testing heck
[03:50:58] grandy: has joined #RubyOnRails
[03:51:00] mloy: Figuring out how to structure my first Rails app is annoying, so I keep learning complimentary things. Been learning how to use Heroku, Puma, nginx, partial caching, etc.
[03:51:09] mloy: * as a way to procrastinate.
[03:51:45] machty: has joined #RubyOnRails
[03:52:08] ght: Question: I'm altering CSS styles via jQuery in my rails 4.2.x project and the changes aren't displayed until a forced screen redraw, such as if a jQuery alert event is generated
[03:52:26] ght: Is there a known method to force a redraw after CSS styles are dynamically updated via jQuery?
[03:52:32] VeryBewitching: mloy: I fought myself doing it several times, but going through the guides is best; the high-to-mid-level view you'll have by the end is better than being scatter-brained.
[03:52:46] VeryBewitching: ght: Use transit
[03:52:47] rhizome: ght: one would think the js isn't running when you think it should
[03:53:23] sevenseacat: +1 to rhizome
[03:53:53] rhizome: console.log "I AM CHANGING CSS RIGHT NOW I HOPE IT'S THE RIGHT TIME"
[03:53:56] mloy: VeryBewitching, thanks. I worked through a few, need to just buckle down and finish the rest. They're not so bad once I start.
[03:53:59] ght: verybewitching: Thank you for the response. I'm reading the documentation on this gem now; I apologize, it's not clear how this gem would apply.
[03:54:06] sevenseacat: !r4ia plug plug plug
[03:54:06] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[03:54:12] VeryBewitching: ght: http://ricostacruz.com/jquery.transit/
[03:54:19] sevenseacat: plug plug plug plug <_<
[03:54:22] VeryBewitching: If you're using jQuery already, this will save time
[03:54:39] hellschreiber: has joined #RubyOnRails
[03:54:45] dotty: has joined #RubyOnRails
[03:54:54] maZtah: has joined #RubyOnRails
[03:54:59] ght: VeryBewitching: Looking into this now, thank you very much.
[03:55:09] MiracleBlue: has joined #RubyOnRails
[03:55:24] pusewicz: has joined #RubyOnRails
[03:55:32] VeryBewitching: Snack time, bbiab
[03:55:53] baweaver: has joined #RubyOnRails
[03:56:06] Aeyrix: Have you tried using Turbolinks?
[03:56:08] Aeyrix: I heard it's great.
[03:56:17] ebryn: has joined #RubyOnRails
[03:56:28] rakm: has joined #RubyOnRails
[03:56:42] danlucraft: has joined #RubyOnRails
[03:57:06] rhizome: is it dangerous to destroy a parent object from a child model, once the last child is destroyed?
[03:57:32] sevenseacat: dont see why it would be _dangerous_ - causing unintended effects, maybe
[03:57:44] rhizome: that's a form of danger ;)
[03:57:52] zemmihates: has joined #RubyOnRails
[03:57:57] sevenseacat: then yeah I reckon it would be
[03:58:06] Frem: has joined #RubyOnRails
[03:58:12] rhizome: i guess i could guard with a destroy preventer on the parent
[03:59:05] erich: has joined #RubyOnRails
[04:00:23] synfinatic: has joined #RubyOnRails
[04:00:26] rhizome: it just seemed smelly to do something like if self.parent.children.empty? from Child
[04:00:39] shwoodard: has joined #RubyOnRails
[04:01:42] alxndr: has joined #RubyOnRails
[04:02:06] sevenseacat: could you use an after destroy callback on the child to just be like notify_parent or something
[04:02:06] drewdavis: has joined #RubyOnRails
[04:02:30] lxkm__: has joined #RubyOnRails
[04:02:33] sevenseacat: and then the child calls a notifier method on the parent than then does the children checking
[04:02:43] hashrocket: has joined #RubyOnRails
[04:02:44] Juanchito: has joined #RubyOnRails
[04:02:44] iamdevnul: has joined #RubyOnRails
[04:03:19] erich: has joined #RubyOnRails
[04:05:25] chancancode: has joined #RubyOnRails
[04:08:14] feignt: has joined #RubyOnRails
[04:08:38] erich: has joined #RubyOnRails
[04:13:31] htmldrum: has joined #RubyOnRails
[04:14:24] lexluthor1: has joined #RubyOnRails
[04:15:13] mauro1254: has joined #RubyOnRails
[04:16:08] VeryBewitching: rhizome: Why not destroy the children from the parent and let parent decide whether or not to destroy itself if children.count is 0? Like: parent.destroy_child_or_self ?
[04:16:49] jesterfraud: has joined #RubyOnRails
[04:17:03] amitchellbullard: has joined #RubyOnRails
[04:17:48] rhizome: because the count is decremented without invoking the parent model. lineitem = cart.line_items.where(item: some_item); lineitem.decrement!(:qty) # doesn't run Cart
[04:18:50] TheNet: has joined #RubyOnRails
[04:20:28] rhizome: i'm guessing there's a tried-and-true pattern for cart functionality like this, but it escapes me
[04:21:33] ljen: has joined #RubyOnRails
[04:21:36] sevenseacat: i'm not sure what the problem is now that we have some context
[04:21:39] CheckYourSix: has joined #RubyOnRails
[04:21:47] sevenseacat: the line item can destroy itself if the quantity is zero
[04:21:50] VeryBewitching: cart.decrease_quantity(some_item)
[04:22:03] VeryBewitching: cart.decrease_quantity(some_item, qty)
[04:22:03] spastorino: has joined #RubyOnRails
[04:22:08] sevenseacat: but the cart doesnt need to be destroyed does it?
[04:22:32] rhizome: i like that idea, and it makes sense. derp.
[04:22:42] RubyNewbey_: has joined #RubyOnRails
[04:22:47] rhizome: sevenseacat: i have an idea that empty carts should be destroyed, just for housecleaning
[04:22:49] mloy: Plus if you destroy the cart you won't get your quarter back. (sorry)
[04:22:49] VeryBewitching: sevenseacat: Although having some cart record laying around reuqires some cleanup cron
[04:23:36] zrl: has joined #RubyOnRails
[04:23:48] VeryBewitching: rhizome: I tend to like to think of any object that belongs_to another as being best managed by the owner.
[04:23:58] VeryBewitching: rhizome: Makes the code read better imo
[04:24:32] neilfse: has joined #RubyOnRails
[04:24:59] rhizome: unfortunately a case can also be made for operating directly on the line_item. however, it's not like i have a line_item controller that would imply that kind of real ownership
[04:25:19] VeryBewitching: Would line item exist without cart?
[04:25:41] VeryBewitching: It's normalized only because having an unnormalized cart is scary
[04:26:06] VeryBewitching: (pardon my nomenclature, that came out of my head direct to you)
[04:26:51] rhizome: good point. now i have to think about how to reason this out :)
[04:28:08] siemprefresco: has joined #RubyOnRails
[04:28:26] CheckYourSix: has joined #RubyOnRails
[04:28:46] rhizome: have to change the form from line_item based to send item_id and direction
[04:29:21] carlosoliveira: has joined #RubyOnRails
[04:29:34] VeryBewitching: Well you're always performing the same operation, you're sending -1 or 1
[04:29:37] ivanskie: has joined #RubyOnRails
[04:29:43] mostlybadfly: has joined #RubyOnRails
[04:30:03] jlyndon: has joined #RubyOnRails
[04:30:18] jxf: has joined #RubyOnRails
[04:30:21] rhizome: right now it's client-supplied qty, essentially, and handled via Cart#update
[04:30:34] rhizome: nested form on cart
[04:30:53] nya: has joined #RubyOnRails
[04:30:54] Maletor: has joined #RubyOnRails
[04:31:56] alvaro_o: has joined #RubyOnRails
[04:33:36] exadeci: has joined #RubyOnRails
[04:35:19] sp1rs: has joined #RubyOnRails
[04:35:30] simplyianm: has joined #RubyOnRails
[04:35:37] sarink: has joined #RubyOnRails
[04:36:00] corioliss: has joined #RubyOnRails
[04:36:47] VeryBewitching: rhizome: Are you keeping client-supplied quantity in addition to a click to decrement/increment?
[04:37:22] srinidhi: has joined #RubyOnRails
[04:38:08] lala: has joined #RubyOnRails
[04:38:11] rhizome: what do you mean?
[04:38:36] VeryBewitching: rhizome: Like a qty text field, in addition to + or -?
[04:38:55] ght: VeryBewitching: Quick question, I'm here reading the transit documentation, I wget'ed the jquery.transit.min from https://github.com/rstacruz/jquery.transit
[04:39:30] ght: I set it to require jquery.transit.min in application.js
[04:39:34] ght: cycled httpd
[04:39:36] rhizome: it just sends the number from the field in the form. if js is enabled, +/- changes number in form field, ajax sends cart#update to controller
[04:39:42] vigasdeep: has joined #RubyOnRails
[04:39:55] ght: And, per the docs, it appears you simply use the same jquery.css functions, yet nothing has changed.
[04:40:09] VeryBewitching: ght: I know as much about transit as y ou see on that link; but it's saved me having to deal with vendor prefixes and oddities in the way each browser handles the DOM update.
[04:40:10] ght: I'm not seeing any errors in my console.log, do you happen to know if there's another core setup step I might be missing?
[04:40:21] ght: Hmm, ok.
[04:40:33] ght: There was a jquery transit gem but it hasn't been updated since 2013.
[04:40:53] VeryBewitching: ght: Performing a CSS isn't entirely straightforward
[04:41:09] VeryBewitching: With jquery anyway
[04:41:33] ght: Right, well I've got the jquery-based CSS changes working, the problem is that they're not displayed until a page rewrite, via like a jquery alert or some such.
[04:41:52] rhizome: that doesn't really make sense to me
[04:42:41] VeryBewitching: ght: Uh, you'll have to gist some code, cause both parts of that sentence don't balance.
[04:42:59] G: has joined #RubyOnRails
[04:43:23] ght: Well that was my original question.
[04:43:53] corioliss: has joined #RubyOnRails
[04:43:57] ght: My problem is that I have a jQuery button event handler that modifies some CSS, performs a few Ajax calls, then modifies it back.
[04:44:23] rhizome: simple enough. gist.
[04:44:28] ght: If I insert a jquery alert in the code after the CSS is altered, the display updates with the modified CSS (behind the alert)
[04:44:56] VeryBewitching: rhizome: My final suggestion would be Cart#adjust_item_quantity(item, new_quantity) with Cart#adjust_by_one(item, :neg|:pos)
[04:45:07] bruno-: has joined #RubyOnRails
[04:45:08] ght: however, if I don't insert any alerts and simply let the code roll, you don't see any changes, since the CSS in the display doesn't update until the button event handler is complete.
[04:45:19] ght: And by then, of course, it's changed back.
[04:45:23] ght: As instructed.
[04:45:53] ght: So the original question was, how to dynamically modify page CSS without forcing display rewrite via a jquery alert or page reload or some such.
[04:46:10] jesterfraud: has joined #RubyOnRails
[04:46:30] rhizome: your question is basically "how do i do this straightforward thing without thing-that-shouldn't-happen-because-of-my-code?"
[04:46:48] VeryBewitching: ght: http://stackoverflow.com/questions/3485365/how-can-i-force-webkit-to-redraw-repaint-to-propagate-style-changes look at that, I just don't suggest it
[04:47:58] Klumben: has joined #RubyOnRails
[04:48:04] VeryBewitching: ght: How long are you expecting the change to remain? You said it's intended to change back, is it doing it right away?
[04:48:10] cpruitt: has joined #RubyOnRails
[04:48:22] xcesariox: has joined #RubyOnRails
[04:48:51] krz: has joined #RubyOnRails
[04:49:37] mloy: Do you recommend Docker for my development environment if I'm using Heroku for production? Right now I'm using a Debian VM and it's been working fine, but heroku-docker seems like it could be neat. Any positive/negative experiences with it?
[04:49:42] mikepack: has joined #RubyOnRails
[04:49:53] Guest10289: has joined #RubyOnRails
[04:50:00] VeryBewitching: ght: I suggested transit because it makes chaining transitions really easy for CSS or animation and handles the vping for you.
[04:50:55] Lloyd: has joined #RubyOnRails
[04:51:27] njero: has joined #RubyOnRails
[04:51:59] rhizome: if you're using jquery 1.8, promises are the better option
[04:52:24] dideler: has joined #RubyOnRails
[04:53:45] Anakat: has joined #RubyOnRails
[04:53:45] VeryBewitching: ght: Also bear in mind that your question is not rails-related strictly speaking, #javascript or #jquery might be your better bet.
[04:57:05] seank_: has joined #RubyOnRails
[04:57:16] vere: has joined #RubyOnRails
[04:58:39] lala: has joined #RubyOnRails
[05:00:44] uberjar: has joined #RubyOnRails
[05:02:34] uberjar: Hi. I need help creating a route to match a trailing character appended to an "/:id" for example the url /surfboardsZ is that possible ?
[05:03:09] uberjar: where the route matches "surfboards" for the :id param??? and the Z is ignored
[05:04:07] lethjakman: has joined #RubyOnRails
[05:04:11] uberjar: but the url "/surfboards" should not match it without the Z
[05:08:02] rhizome: maybe, but that's a pretty terrible rule
[05:09:17] uberjar: there is precedent for that kind of thing though
[05:09:23] rhizome: what exactly is the criteria?
[05:09:44] rhizome: it should match both an existing id and require some trailing character?
[05:09:55] uberjar: yes precisely
[05:10:17] uberjar: some dynamic id.. then a trailing charcter
[05:10:25] rhizome: what is the precedent?
[05:10:46] rhizome: a single character of any kind?
[05:11:04] uberjar: well I'll give you one example that you've probably seen before.. bit.ly has links that look like this: https://bitly.com/easygym
[05:11:16] uberjar: but to access the link's statistics page you use https://bitly.com/easygym+
[05:11:31] Lytol: has joined #RubyOnRails
[05:11:35] rhizome: so, one *special* character. that's different
[05:11:52] VeryBewitching: It's a nice way to distinguish the two though
[05:11:54] melonstorm: has joined #RubyOnRails
[05:12:18] uberjar: ya one special character.. or perhaps even a special string
[05:12:37] uberjar: but to make it simple lets assume one (just like bitly)
[05:13:19] rhizome: i would guess that they have defined it as a path separator
[05:13:38] uberjar: I can think of how to do it with nginx url rewriting or a rack middleware.. but that feels hacky
[05:13:41] VeryBewitching: uberjar: http://guides.rubyonrails.org/routing.html 3.8
[05:14:38] rhizome: so, bit.ly/foo goes to UrlController#show, and bit.ly/foo/ goes to Stats#index, they just change the last slash to a +
[05:15:38] rhizome: get /:id, to: 'blah#show'; get /:id+, to: 'foo#index'
[05:15:40] uberjar: VeryBewitching: I was looking at those.. but is it possible to even write a regex that only matches the part if it's at the end of the string ? (excuse my regex ignorance)
[05:16:01] uberjar: a segment constrain regex that is
[05:16:07] riotjones: has joined #RubyOnRails
[05:16:47] VeryBewitching: uberjar: I'm not sure, but it looks like this is the best bet.
[05:17:18] TheNet: has joined #RubyOnRails
[05:17:35] VeryBewitching: uberjar: Just start playing with http://rubular.com/, that's how I sort out regex normally
[05:18:22] uberjar: rhizome: I tried what you wrote??? get '/:id+' and that didn't work
[05:18:47] uberjar: ahhh??? \z is end of string.. brilliant
[05:19:01] uberjar: segment constrains should work then. cheers
[05:19:30] VeryBewitching: uberjar: If you know what that last character is going to be all the time, should be easy to match it.
[05:20:30] VeryBewitching: /\A[some-range-or-match-for-id]+Z\z/i
[05:21:11] VeryBewitching: Z being at the end of the string.
[05:22:01] eGGsha: has joined #RubyOnRails
[05:23:24] DoctorMonocular: has joined #RubyOnRails
[05:25:28] xcesariox: has joined #RubyOnRails
[05:26:31] uberjar: that was it! thanks again
[05:37:04] Tinyyy: has joined #RubyOnRails
[05:41:37] rails663: has joined #RubyOnRails
[05:41:40] inoter: has joined #RubyOnRails
[05:41:45] lexluthor1: has joined #RubyOnRails
[05:44:16] tagrudev: has joined #RubyOnRails
[05:49:51] jenrzzz: has joined #RubyOnRails
[05:50:56] simplyianm: has joined #RubyOnRails
[05:51:26] darrencauthon: has joined #RubyOnRails
[05:51:58] Rubie: has joined #RubyOnRails
[05:52:03] chrissonar: has joined #RubyOnRails
[05:52:37] atmosx: has joined #RubyOnRails
[05:54:17] baweaver: has joined #RubyOnRails
[05:57:57] ProLoser: has joined #RubyOnRails
[05:58:58] El3ktra: has joined #RubyOnRails
[05:58:58] El3ktra: has joined #RubyOnRails
[06:00:14] krokuz_: has joined #RubyOnRails
[06:01:18] Scripore: has joined #RubyOnRails
[06:08:00] microdex: has joined #RubyOnRails
[06:08:10] eGGsha: has joined #RubyOnRails
[06:09:08] avitzurel: has joined #RubyOnRails
[06:10:15] x44x45x41x4E: has joined #RubyOnRails
[06:11:51] lwu: has joined #RubyOnRails
[06:16:04] Shoutsid: has joined #RubyOnRails
[06:16:58] riotjones: has joined #RubyOnRails
[06:18:17] seank_: has joined #RubyOnRails
[06:24:04] mikeric: has joined #RubyOnRails
[06:24:53] VeryBewitching: ACTION casts Cure Light Wounds.
[06:25:06] Aeyrix: [Flash Heal]
[06:27:12] lxsameer: has joined #RubyOnRails
[06:27:16] mike___1234: has joined #RubyOnRails
[06:34:14] giowong: has joined #RubyOnRails
[06:35:29] zemmihates: has joined #RubyOnRails
[06:36:25] neilfse: has joined #RubyOnRails
[06:37:42] arBmind: has joined #RubyOnRails
[06:38:20] sp1rs: has joined #RubyOnRails
[06:39:23] mikeric: @Radar: hey, i now it's a super late response. but you asked for an isolated example to get a Mail::Message instance that has the encoding issue (where a multibyte character is cut in half).
[06:39:24] mikeric: http://pastie.org/10295923
[06:39:37] Radar: ermegerd lagggg
[06:40:03] Radar: mikeric: Cool example :)
[06:40:46] Radar: mikeric: and that breakage is causing issues somewhere?
[06:41:06] Radar: From the first = to the next = is exactly 72 characters.
[06:41:17] Radar: My mind says that's significant but I can't remember why.
[06:42:16] mikeric: yes, it's invalid because the end of the first one ends in the middle of a multibyte character and the rest of that multibyte character starts on the next line.
[06:42:33] mikeric: which is invalid, and Mandrill actually cannot parse that, so it never gets sent.
[06:42:58] Radar: That would've been fun to track down.
[06:43:23] giowong: when i do a index and foreign key
[06:43:26] Radar: ACTION tinkers
[06:43:34] giowong: am i supposed to index on the belongs to or the has one
[06:44:57] VeryBewitching: giowong: I'm wondering why you're asking that question more than I'm considering answering it.
[06:45:20] Guest657: has joined #RubyOnRails
[06:45:37] Guest657: is there a method similar to find_in_batches() that returns an ActiveRelation instead of an array? I want to use it to update millions of rows in 1000 batches instead of all at once
[06:45:48] VeryBewitching: giowong: Your indexes should go where you intend for them to go.
[06:46:06] vere: has joined #RubyOnRails
[06:46:30] giowong: because im a newbie
[06:46:37] giowong: i have a report model
[06:46:50] giowong: and it has_one :user and has_one property
[06:47:22] Radar: mikeric: do you see the same issue with what's output from this script? https://gist.github.com/radar/fac523da66c7ef45ded7
[06:47:29] Radar: giowong: It's likely that you're using has_one as if it were a belongs_to.
[06:48:11] giowong: because not every user will have a report
[06:48:25] giowong: only the *top* sales people will have a report
[06:48:34] VeryBewitching: giowong: It's still one, whether or not it's created.
[06:48:34] giowong: thats one i wnet with report has_one user
[06:48:47] VeryBewitching: report belongs to user
[06:49:34] Radar: +1 VeryBewitching
[06:50:12] giowong: so just switch my things around?
[06:50:26] VeryBewitching: Try it and find out
[06:50:38] Radar: mikeric: Do I need to wait 7 hours again before you reply? :)
[06:50:50] Radar: ACTION pictures mikeric out past Pluto somewhere
[06:51:06] VeryBewitching: 150 baud serial modem or something
[06:51:48] VeryBewitching: smoke break, brb
[06:51:49] Radar: mikeric: Anyway, the email that I generate with Mail::Message *looks* correct to me. I would love your confirmation.
[06:52:12] giowong: thank you VeryBewitching
[06:52:16] mikeric: @Radar: nope, very different encoding, i commented on your gist.
[06:52:36] Radar: Same here.
[06:52:38] mikeric: yea, you're right that it looks more correct. though.
[06:53:02] mikeric: hmm, i'd like actionmailer to encode things this way.. do you have any idea what the difference could be?
[06:53:08] Radar: I don't know why AM would do it differently.
[06:53:14] mikeric: i've been examining both of them and can't seem to see the difference
[06:53:21] Rubie: has joined #RubyOnRails
[06:53:21] lethjakman: has joined #RubyOnRails
[06:53:50] mikeric: well the ActionMailer::Base.mail(params) one actually does return a Mail::Message instance.
[06:54:31] mikeric: and it seems to have identical configuration (from what i can tell) to creating the Mail::Message directly.
[06:54:39] krz: has joined #RubyOnRails
[06:55:33] Aeyrix: Radar: If I create a new def of
[06:55:38] Aeyrix: def mods_command
[06:55:48] Radar: Can you try something for me? ActionMailer::Base.deliver(message) where message is not one built with ActionMailer::Base.mail, but instead one that's built with Mail::Message.new?
[06:55:48] Aeyrix: Is that automatically pulled in a la rails ~~magic~~?
[06:55:50] Radar: mikeric: ^
[06:55:57] Aeyrix: For railsbot, to clarify.
[06:56:06] yfeldblum: has joined #RubyOnRails
[06:56:39] Radar: Aeyrix: Metaprogramming, motherfucker.
[06:56:40] Radar: Aeyrix: https://github.com/radar/railsbot/blob/0af0a36dbbd02b9d0d5faef00f37d66d26e134a0/bot.rb#L316-L321
[06:56:45] Aeyrix: I don't speak it.
[06:56:49] Aeyrix: https://github.com/radar/railsbot/compare/master...Aeyrix:mods-command
[06:57:12] mikeric: @Radar: is that correct? getting undefined method `deliver' for ActionMailer::Base:Class
[06:57:17] jenrzzz: has joined #RubyOnRails
[06:57:28] Radar: mikeric: argh. This is what I get for not testing things before I suggest people try them.
[06:57:53] mikeric: also, i'm using 3.2.12, but i don't think the AM interface has changed much since then anyway.
[06:58:35] _3by8: has joined #RubyOnRails
[06:59:06] _3by8: If I include something in my ApplicationController, do all other controllers have access to that include?
[06:59:10] Radar: mikeric: I can't remember the proper incantation to send an email message.
[06:59:18] _3by8: Aeyrix: was that towards me?
[06:59:25] _3by8: Aeyrix: thanks :)
[06:59:33] Radar: omg this is going to be an endless lo... oh
[06:59:59] Radar: mikeric: I don't think I can help you here because it's outside of my knowledge :D
[07:00:13] Lytol: has joined #RubyOnRails
[07:00:45] xkickflip: has joined #RubyOnRails
[07:00:48] aganov: has joined #RubyOnRails
[07:00:50] kazenjizo_: has joined #RubyOnRails
[07:01:35] Jhon: has joined #RubyOnRails
[07:01:36] Hates_: has joined #RubyOnRails
[07:01:48] Hates_: has joined #RubyOnRails
[07:02:08] Rukeal: has joined #RubyOnRails
[07:02:40] jhon_be: has joined #RubyOnRails
[07:03:42] Aeyrix: Radar: If I make it an equivalence to !ops in #ruby is it viable? :D
[07:03:48] Aeyrix: Then again
[07:03:50] Aeyrix: when do we ever use that
[07:03:59] Radar: Aeyrix: triggered spam filter :D
[07:04:11] Aeyrix: I thought you updated that?
[07:04:51] Radar: I did, you broke it.
[07:05:09] Radar: You broke the speed barrier by sending 5 messages in under 10 seconds.
[07:05:27] sevenseacat: *internet police pull Aeyrix over
[07:05:46] Aeyrix: I patched that out. :^)
[07:05:49] Aeyrix: Did you update the bot or?
[07:05:53] sevenseacat: sir did you know you were doing 5000 messages an hour when the speed limit is a lot less than that
[07:06:07] Aeyrix: Yeah but I really had to shitpost.
[07:06:09] Aeyrix: I'm sorry officer.
[07:06:42] sevenseacat: i can just imagine someone saying that to a cop.
[07:06:46] sevenseacat: 'but but but... shitposting!'
[07:06:51] Scriptonaut: has joined #RubyOnRails
[07:07:07] yardenbar: has joined #RubyOnRails
[07:08:22] Aeyrix: sevenseacat: Radar won't approve this: https://github.com/radar/railsbot/compare/master...Aeyrix:mods-command
[07:09:15] sevenseacat: probably not.
[07:09:44] blackmesa: has joined #RubyOnRails
[07:11:30] schaerli: has joined #RubyOnRails
[07:11:41] shawnacscott: has joined #RubyOnRails
[07:11:49] sevenseacat: pragprog 40% off sale. time to go shopping.
[07:12:13] fighella: has joined #RubyOnRails
[07:12:39] pwnz0r: has joined #RubyOnRails
[07:13:41] wethu: has joined #RubyOnRails
[07:14:08] helpa: has joined #RubyOnRails
[07:14:29] Hates_: it is? I cna't see the deal :(
[07:14:41] Radar: Hates_: XMASJULY2015
[07:14:46] sevenseacat: christmas in july - coupon code XMASJULY2015
[07:14:51] Hates_: nice thanks :D
[07:15:03] Hates_: oh nice... XSLT Jumpstarter
[07:16:09] Hates_: been a while since I checked them out. they have some strange titles now Mazes for Programmers
[07:17:29] jesterfraud: has joined #RubyOnRails
[07:18:23] towski_: has joined #RubyOnRails
[07:19:23] blackmesa: has joined #RubyOnRails
[07:19:37] DoubleMalt: has joined #RubyOnRails
[07:19:53] dualbus: has joined #RubyOnRails
[07:20:47] chinmay_dd: has joined #RubyOnRails
[07:21:32] raenk: has joined #RubyOnRails
[07:23:48] comrad: has joined #RubyOnRails
[07:24:57] skyjumper: has joined #RubyOnRails
[07:25:42] Palsson: has joined #RubyOnRails
[07:26:15] eGGsha: has joined #RubyOnRails
[07:26:51] sevenseacat: ACTION looks at $170 of books in cart -_-
[07:27:49] Voxxit: has joined #RubyOnRails
[07:28:00] roolo: has joined #RubyOnRails
[07:28:11] mikeric: has joined #RubyOnRails
[07:28:21] pragmatism: has joined #RubyOnRails
[07:30:07] Hates_: I only racked up $21 :P
[07:30:11] Aeyrix: That was fast sevenseacat
[07:30:35] _3by8: Where do you buy books from?
[07:30:48] sevenseacat: atm we're looking at http://pragprog.com
[07:31:29] annlewis: has joined #RubyOnRails
[07:31:39] Radar: gnight all
[07:31:44] _djbkd: has joined #RubyOnRails
[07:32:42] darutoko: has joined #RubyOnRails
[07:32:55] Aeyrix: Also off, ciao all.
[07:34:07] TheCuriousGuy: has joined #RubyOnRails
[07:34:09] TinkerTyper: has joined #RubyOnRails
[07:35:17] siempref_: has joined #RubyOnRails
[07:35:34] TheCuriousGuy: Does anyone know of any Ruby/Rails projects which need help with documentation?
[07:35:39] _3by8: I keep seeing that website mentioned. Are the books there really that good?
[07:38:03] sevenseacat: some of them are the best of their kind.
[07:38:36] sevenseacat: now that I've just bought another pile, I now own 38 books from pragprog. -_-
[07:38:45] htmldrum: has joined #RubyOnRails
[07:39:12] artto: has joined #RubyOnRails
[07:39:29] TheCuriousGuy: PragProg rocks
[07:41:01] yfeldblum: has joined #RubyOnRails
[07:42:27] sp1rs: has joined #RubyOnRails
[07:42:34] eGGsha: has joined #RubyOnRails
[07:43:42] blackmesa: has joined #RubyOnRails
[07:44:44] sevenseacat: i just have way too many freaking tech books.
[07:44:58] DraconPern: has joined #RubyOnRails
[07:45:03] sevenseacat: TheCuriousGuy: probably all of them.
[07:45:08] Sylario: has joined #RubyOnRails
[07:45:21] TheCuriousGuy: sevenseacat: that is too broad, isn't it?
[07:45:56] mloy: has joined #RubyOnRails
[07:46:03] DraconPern: heya! I am working through a rails tutorial and there's an expression I am puzzled about.
[07:46:08] Creeves: does ruby-install have a builtin way to set default ruby version
[07:46:12] dhjondoh: has joined #RubyOnRails
[07:46:50] DraconPern: in the line render 'xyz/error_message', object: f.object
[07:47:04] DraconPern: why pass f.object, and not just f?
[07:47:06] sevenseacat: Creeves: no. thats what chruby is typically for.
[07:47:22] bruno-: has joined #RubyOnRails
[07:47:24] sevenseacat: DraconPern: because the errors are on the object, not the form.
[07:48:35] DraconPern: sevenseacat: Oh! gotcha
[07:50:18] DraconPern: that makes sense now, thanks
[07:51:16] charliesome: has joined #RubyOnRails
[07:51:40] arBmind: has joined #RubyOnRails
[07:53:22] gremax: has joined #RubyOnRails
[07:54:10] chipotles: has joined #RubyOnRails
[07:54:54] x44x45x41x4E: sevenseacat: Any book recommendations from PragProg?
[07:55:03] sevenseacat: on what topic?
[07:56:08] fighella: has joined #RubyOnRails
[07:58:02] x44x45x41x4E: sevenseacat: Nothing in particular. Like your must-read books from PragProg?
[07:59:26] ur5us: has joined #RubyOnRails
[07:59:36] ndrei: has joined #RubyOnRails
[08:01:36] mikecmpbll: has joined #RubyOnRails
[08:01:55] VeryBewitching: I'm off to sleep, night folks.
[08:05:19] krz: has joined #RubyOnRails
[08:11:56] TheCuriousGuy: sevenseacat: any suggestions?
[08:12:15] TheCuriousGuy: for projects which need documentation
[08:14:26] DoctorMonocular: I need to do something tricky with an array, dig this: https://gist.github.com/PeteMichaud/6edfa2f04c799b74e6d2
[08:14:37] DoctorMonocular: what's the cleanest/most idomatic way to handle that?
[08:14:39] dhjondoh: has joined #RubyOnRails
[08:15:34] _utah_: has joined #RubyOnRails
[08:15:54] Lytol: has joined #RubyOnRails
[08:16:09] tvw: has joined #RubyOnRails
[08:16:34] noodman: has joined #RubyOnRails
[08:16:35] adre: has joined #RubyOnRails
[08:16:35] jsrn_: has joined #RubyOnRails
[08:17:43] eminencehc_: has joined #RubyOnRails
[08:17:52] mikecmpb_: has joined #RubyOnRails
[08:18:51] edwinvdgraaf: has joined #RubyOnRails
[08:19:02] seank_: has joined #RubyOnRails
[08:20:44] mikecmpbll: has joined #RubyOnRails
[08:23:02] kitsuneyo: has joined #RubyOnRails
[08:23:10] Psy-Q: has left #RubyOnRails: ()
[08:24:47] webdestroya: has joined #RubyOnRails
[08:24:50] n008f4g_: has joined #RubyOnRails
[08:24:51] r0bby_: has joined #RubyOnRails
[08:25:33] blackmesa: has joined #RubyOnRails
[08:27:41] matcouto: has joined #RubyOnRails
[08:29:51] x-light: has joined #RubyOnRails
[08:31:08] TheNet: has joined #RubyOnRails
[08:32:18] rhizome: is it always going to split on "A"?
[08:34:44] DoctorMonocular: well, I mean that's the condition I'm using for the example
[08:34:47] DoctorMonocular: here's what I came up with:
[08:34:48] DoctorMonocular: https://gist.github.com/PeteMichaud/6edfa2f04c799b74e6d2
[08:34:53] DoctorMonocular: but god it's fugly
[08:35:43] DoctorMonocular: there: https://gist.github.com/PeteMichaud/6edfa2f04c799b74e6d2
[08:35:55] DoctorMonocular: that's how mine works, you can pass any block to it though
[08:36:14] DoctorMonocular: I don't know how to make it prettier though
[08:36:58] chipotles: has joined #RubyOnRails
[08:38:01] simmerz: has joined #RubyOnRails
[08:38:02] DoctorMonocular: updated the gist with console output
[08:38:24] DoctorMonocular: my actual use case is more complex, but it's handled by the block as well, no problem
[08:39:21] rhizome: your ruby is better than mine, plus melatonin
[08:40:22] DoctorMonocular: I hate using a for loop, but I don't see a way around it
[08:40:48] edwinvdgraaf: has joined #RubyOnRails
[08:40:59] DoctorMonocular: and the nested conditionals inside the loop are giving me hives
[08:41:13] Hates_: you can't just find the indexes of all the elements that satisfy the block and slice on them?
[08:41:55] lethjakman: has joined #RubyOnRails
[08:42:12] mikecmpb_: has joined #RubyOnRails
[08:42:24] DoctorMonocular: Hates_: hmm, ok I'm listening. So let's say I have an array of indices, how do I slice on them? loop through them and just slice from the original array over and over?
[08:43:07] Hates_: I'm just thinking out loud so could be wrong, but I guess you could try slicing from index to index
[08:44:00] DoctorMonocular: so like indices.each_cons |i1, i2] and do new << source[i1, i2]
[08:44:05] DoctorMonocular: something like that
[08:44:59] Hates_: no idea tbh :S I hadn't thought about it :P, just make the first index 0 and the last one -1
[08:45:40] DoctorMonocular: ok, this may work, gimme a few
[08:46:10] edwinvdg_: has joined #RubyOnRails
[08:49:23] srinidhi: has joined #RubyOnRails
[08:49:53] axl_: has joined #RubyOnRails
[08:51:19] htmldrum: has joined #RubyOnRails
[08:52:51] DEA7TH: has joined #RubyOnRails
[08:52:54] vmarcetic: has joined #RubyOnRails
[08:53:40] DoctorMonocular: I think I got it
[08:53:46] DoctorMonocular: way way prettier, lemme run some tests
[08:55:13] mwlang: has joined #RubyOnRails
[08:57:31] mwlang: I have an odd one for y???all: Yesterday, we tried to switch from Windows-based hosting of a Rails app to Linux-based, which meant switching servers. That switch was may simply by changing the NAT tables on the edge firewall so that the external IP address of the FQDN is routed to the new server. For the most part, all that worked???except for one browser in particular: IE
[08:58:24] edwinvdgraaf: has joined #RubyOnRails
[08:59:21] mwlang: Apparently, users that had used IE previously to connect to the website still continued to reach the old server despite the new NAT???d route. FF and Chrome had no problem seamlessly flowing to the new server. How is that even possible?!?
[09:00:38] Lytol: has joined #RubyOnRails
[09:00:57] Hates_: mwlang: so the public IP stayed the same?
[09:01:25] mwlang: the only thing I can think of at this point is ARP has somehow come into play to preserve a route to the old server..
[09:01:27] mwlang: Hates_: yes
[09:01:47] Hates_: mwlang: weird... sadly this is over my head :S
[09:02:17] mwlang: Hates_: any thoughts for googling?
[09:02:31] livathinos: has joined #RubyOnRails
[09:02:38] Ergo: has joined #RubyOnRails
[09:02:38] Hates_: mwlang: sorry I really wouldn't know. maybe there's a networking channel that might be able to help
[09:02:42] Hates_: or sysadmin
[09:02:58] x44x45x41x4E: mwlang: Might wanna head to #reddit-sysadmin
[09:03:23] x44x45x41x4E: mwlang: Are you hosting on your on-premise servers?
[09:03:48] marr: has joined #RubyOnRails
[09:04:22] marr: has joined #RubyOnRails
[09:04:43] mwlang: x44x45x41x4E yes
[09:05:31] ruurd: has joined #RubyOnRails
[09:05:45] inoter: Question on Ruby Grape API: in a POST call, I am expecting a nested class MyClass with type Hash. But from my Android device and Retrofit, I am sending Json instead of Hash. Am i missing something here?
[09:08:16] matcouto: has joined #RubyOnRails
[09:08:27] DraconPern: mwlang: those IE browsers may have a connection still open, you'll need to reboot the router or clear the NAT state table
[09:09:51] mwlang: DraconPern: hmmm???interesting point.
[09:10:13] leex_: has left #RubyOnRails: ()
[09:10:25] marr: has joined #RubyOnRails
[09:12:31] x44x45x41x4E: mwlang: Yeah. You should ask there.
[09:12:35] ndrei: has joined #RubyOnRails
[09:18:02] bruno-: has joined #RubyOnRails
[09:19:02] kitsuneyo: has joined #RubyOnRails
[09:20:39] MaDErroR123: has joined #RubyOnRails
[09:24:44] eGGsha: has joined #RubyOnRails
[09:26:11] htmldrum: has joined #RubyOnRails
[09:27:25] leex: has joined #RubyOnRails
[09:28:04] matcouto: has joined #RubyOnRails
[09:28:10] DoctorMonocular: Hates_: thanks, I made your idea work. Took a little fighting, but it's prettier I think: https://gist.github.com/PeteMichaud/6edfa2f04c799b74e6d2
[09:28:20] DoctorMonocular: array_revised.rb has the new method
[09:29:34] leex: Hi, is there a nice way to do change the type of a column from boolean to text in rails and setting 'string1' if the boolean is true and 'string2' if false, I got it to work like this: execute "alter table offers ALTER COLUMN status TYPE text USING CASE status WHEN true THEN 'active' ELSE 'inactive' END;" Just wanted to know whether there is a rails way to do it.
[09:29:45] DoctorMonocular: rhizome: figured it out, check out my gist above if you're curious
[09:29:56] lxsameer: has joined #RubyOnRails
[09:30:40] DoctorMonocular: leex: that sort of thing is handled by the migration code and there's no really idomatic way to do it since each circumstance is totally different. If want you did works, then it's probably fine
[09:31:33] leex: DoctorMonocular: cool
[09:32:17] leex: DoctorMonocular: just wanted to see whether there is a rails way to do it and if I could learn something :)
[09:32:28] DraconPern: has left #RubyOnRails: ()
[09:32:38] bronson: has joined #RubyOnRails
[09:33:07] Hates_: DoctorMonocular: wow much neater :)
[09:34:01] DoctorMonocular: Hates_: significantly less error prone too
[09:34:52] Pupeno: has joined #RubyOnRails
[09:34:52] Pupeno: has joined #RubyOnRails
[09:35:40] Pathfinder: has joined #RubyOnRails
[09:35:58] Karpah: has joined #RubyOnRails
[09:36:39] srinidhi: has joined #RubyOnRails
[09:37:59] ruurd: has joined #RubyOnRails
[09:39:49] DEA7TH_: has joined #RubyOnRails
[09:39:58] kham: has joined #RubyOnRails
[09:43:44] DEA7TH: has joined #RubyOnRails
[09:46:53] wethu: has joined #RubyOnRails
[09:49:53] seank_: has joined #RubyOnRails
[09:50:14] avitzurel: has joined #RubyOnRails
[09:52:50] microdex: has joined #RubyOnRails
[09:55:19] LearningCN: has joined #RubyOnRails
[09:56:33] blackmesa: has joined #RubyOnRails
[09:58:29] ruurd: has joined #RubyOnRails
[09:58:34] benhuda: has joined #RubyOnRails
[10:00:20] matcouto: has joined #RubyOnRails
[10:02:57] Skelz0r: has joined #RubyOnRails
[10:03:57] ruurd: has joined #RubyOnRails
[10:04:17] DaniG2k: has joined #RubyOnRails
[10:07:49] eGGsha: has joined #RubyOnRails
[10:07:49] blackmesa: has joined #RubyOnRails
[10:13:38] Axy: has joined #RubyOnRails
[10:13:38] mloy_: has joined #RubyOnRails
[10:14:10] seank_: has joined #RubyOnRails
[10:20:05] lwu: has joined #RubyOnRails
[10:20:23] sp1rs: has joined #RubyOnRails
[10:22:11] wethu: has joined #RubyOnRails
[10:23:19] quazimodo: has joined #RubyOnRails
[10:23:22] x44x45x41x4E: has left #RubyOnRails: ("Away, for now.")
[10:23:24] quazimod1: has joined #RubyOnRails
[10:29:22] Rubie: has joined #RubyOnRails
[10:30:57] lethjakman: has joined #RubyOnRails
[10:31:01] SteenJobs: has joined #RubyOnRails
[10:34:07] Detch: has joined #RubyOnRails
[10:34:09] blackmes1: has joined #RubyOnRails
[10:35:40] ruurd: has joined #RubyOnRails
[10:37:48] wethu: has joined #RubyOnRails
[10:40:15] blackhuey: has joined #RubyOnRails
[10:40:52] livathinos: has joined #RubyOnRails
[10:41:46] mostlybadfly: has joined #RubyOnRails
[10:43:40] ruurd: has joined #RubyOnRails
[10:49:13] blackmes1: has joined #RubyOnRails
[10:49:47] sp1rs: has joined #RubyOnRails
[10:50:04] Lytol: has joined #RubyOnRails
[10:50:55] Papierkorb: has joined #RubyOnRails
[10:51:53] vmarcetic: has joined #RubyOnRails
[10:51:58] thelastinuit: has joined #RubyOnRails
[10:52:45] intinig: has joined #RubyOnRails
[10:53:49] microdex: has joined #RubyOnRails
[10:54:25] schaerli: has joined #RubyOnRails
[10:55:34] ProLoser: has joined #RubyOnRails
[10:55:48] siemprefresco: has joined #RubyOnRails
[10:55:59] MaDErroR123: has joined #RubyOnRails
[10:58:10] walker233: has joined #RubyOnRails
[10:58:17] vmarcetic: Hi I have a strange problem. Count on a SQL is taking 9 seconds in app and 200 ms in pgAdmin. (8425.0ms) SELECT COUNT(*) FROM "imdb" WHERE (id <> ALL(array(select (jsonb_array_elements(movies_json)->>'movie_id')::integer AS movie_id FROM lists WHERE id in (1, 2225, 4453)))) and if I run it in pgAdmin Execution time: 228.090 ms. That is normal count, not from any paginate gem.
[10:58:54] intinig: has joined #RubyOnRails
[11:02:57] ruurd: has joined #RubyOnRails
[11:08:52] siempref_: has joined #RubyOnRails
[11:12:02] arup_r: has joined #RubyOnRails
[11:13:53] ndrei: has joined #RubyOnRails
[11:14:00] edwinvdgraaf: has joined #RubyOnRails
[11:17:11] bashusr: has joined #RubyOnRails
[11:17:50] microdex: has joined #RubyOnRails
[11:17:54] mhib: has joined #RubyOnRails
[11:22:45] DEA7TH: has joined #RubyOnRails
[11:23:11] Linkinus: has joined #RubyOnRails
[11:23:53] arup_r: I am trying to include .scss file inside a menifest file.. but in page from browser I am seeing it is not getting loaded.. https://gist.github.com/aruprakshit/cc2a68a700962e5234aa
[11:23:57] arup_r: What is wrong I did ?
[11:25:08] logik-bomb: drop the .scss
[11:26:33] darrencauthon: has joined #RubyOnRails
[11:27:06] stephen_h: has joined #RubyOnRails
[11:28:11] arup_r: logik-bomb: I tried .. didn't work
[11:28:23] quazimodo: has joined #RubyOnRails
[11:28:25] quazimod1: has joined #RubyOnRails
[11:30:04] logik-bomb: connect.css -> connect.scss ?
[11:30:18] logik-bomb: I don't know
[11:31:37] nfk: has joined #RubyOnRails
[11:31:39] schaerli: has joined #RubyOnRails
[11:32:43] JeramyRR: has joined #RubyOnRails
[11:32:45] arup_r: logik-bomb: no the menifest file is connect.css only
[11:32:46] stephen_h: Hi, we had some problems with a rake task not finding its arguments using OptionParser after upgrading rake (think we were on 0.9 before). Based on comments in http://stackoverflow.com/a/19466362 we fixed it by explicitly passing ARGV[2..-1] to the option_parser. I can't find any other mentions of this problem from googling or in the rake change history and was wondering if anyone knows more about what was changed in rake?
[11:34:33] bruno-: has joined #RubyOnRails
[11:34:58] eGGsha: has joined #RubyOnRails
[11:35:35] ur5us: has joined #RubyOnRails
[11:39:25] siemprefresco: has joined #RubyOnRails
[11:42:48] peeja: has joined #RubyOnRails
[11:43:01] ldnunes: has joined #RubyOnRails
[11:45:39] adre: has joined #RubyOnRails
[11:49:06] _solomon: has joined #RubyOnRails
[11:51:11] allcentury: has joined #RubyOnRails
[11:51:59] edwinvdgraaf: has joined #RubyOnRails
[11:52:17] schaerli: has joined #RubyOnRails
[11:53:37] nfk: has joined #RubyOnRails
[11:53:47] lala_: has joined #RubyOnRails
[11:54:29] lethjakman: has joined #RubyOnRails
[11:55:08] yuuvee: has joined #RubyOnRails
[11:57:23] ruurd: has joined #RubyOnRails
[12:01:44] DEA7TH: has joined #RubyOnRails
[12:02:36] Lightsword: has joined #RubyOnRails
[12:03:48] Ropeney: has joined #RubyOnRails
[12:03:51] symbol: has joined #RubyOnRails
[12:04:32] Betray1st: has joined #RubyOnRails
[12:05:57] siempref_: has joined #RubyOnRails
[12:09:09] erich: has joined #RubyOnRails
[12:10:13] arup_r: has joined #RubyOnRails
[12:10:36] surrealanalysis: has joined #RubyOnRails
[12:10:46] blackmes1: has joined #RubyOnRails
[12:10:57] arBmind: has joined #RubyOnRails
[12:11:22] cek: has joined #RubyOnRails
[12:11:50] Moonlight-Angel: has joined #RubyOnRails
[12:15:29] ruurd: has joined #RubyOnRails
[12:17:21] schaerli: has joined #RubyOnRails
[12:18:05] Scripore: has joined #RubyOnRails
[12:18:25] Pathfinder_: has joined #RubyOnRails
[12:18:41] microdex: has joined #RubyOnRails
[12:19:57] nickenchuggets_: has joined #RubyOnRails
[12:20:28] chinmay_dd: has joined #RubyOnRails
[12:20:40] erich: has joined #RubyOnRails
[12:20:59] Lytol: has joined #RubyOnRails
[12:22:56] edwinvdgraaf: has joined #RubyOnRails
[12:23:13] LBo: has joined #RubyOnRails
[12:23:30] garrypolley: has joined #RubyOnRails
[12:24:34] symbol: has joined #RubyOnRails
[12:27:09] schaerli_: has joined #RubyOnRails
[12:31:18] arBmind: has joined #RubyOnRails
[12:31:53] dionysus69: has joined #RubyOnRails
[12:32:07] kb3ien: has joined #RubyOnRails
[12:33:03] matcouto: has joined #RubyOnRails
[12:33:11] adre: has joined #RubyOnRails
[12:33:55] jamiely: has joined #RubyOnRails
[12:35:00] cornerma1: has joined #RubyOnRails
[12:35:12] davidbitton: has joined #RubyOnRails
[12:35:14] matcouto: Hi Y'all. Is there a simpler way to get the same result as myobject.class.name.downcase.to_sym ??
[12:36:06] konsolebox: has joined #RubyOnRails
[12:38:23] rustymyers: has joined #RubyOnRails
[12:39:05] ndrei: has joined #RubyOnRails
[12:39:34] jamiely: has joined #RubyOnRails
[12:40:21] adre: has joined #RubyOnRails
[12:40:24] stantonnet: has joined #RubyOnRails
[12:42:18] Axilla: has joined #RubyOnRails
[12:42:33] Cork: matcouto: what is it you're trying to do?
[12:42:43] Silex: except "to_s" instead of "name" I don't see much you can improve :)
[12:43:16] matcouto: Cork convert the class name to a symbol
[12:43:26] matcouto: Silex Yeah. That's what I thought!
[12:43:27] Cork: ya, i see that much
[12:43:31] Cork: but in what situation
[12:43:55] Cork: cause ya, without knowing more there isn't much to change
[12:45:31] diegorv: has joined #RubyOnRails
[12:49:49] matcouto: I'm looking up classes in a hash by its class name as a symbol
[12:50:02] matcouto: EG = { first: First, second: Second}
[12:50:09] Linkinus: has joined #RubyOnRails
[12:51:18] erich: has joined #RubyOnRails
[12:51:38] Silex: DefV: one down, only 4 more "why" to go :)
[12:51:46] bmurt: has joined #RubyOnRails
[12:53:11] DefV: Often times I see people in here asking very specific but odd questions
[12:53:21] DefV: I always try to get to the bottom of their crazyness
[12:53:32] k4nd4lf: has joined #RubyOnRails
[12:53:50] curses: has joined #RubyOnRails
[12:54:00] bruno-: has joined #RubyOnRails
[12:54:09] diegorv: life is crazy ??\_(???)_/??
[12:55:21] curses: Anyone know how I could import a CSV entry as an array into a postgres db?
[12:55:38] DefV: thanks for proving my point
[12:55:56] earthquake: has joined #RubyOnRails
[12:56:57] ProLoser: has joined #RubyOnRails
[12:57:08] schaerli: has joined #RubyOnRails
[12:57:28] siemprefresco: has joined #RubyOnRails
[12:58:24] erich: has joined #RubyOnRails
[13:00:50] nfk: has joined #RubyOnRails
[13:02:34] sarink: has joined #RubyOnRails
[13:02:40] toomus: has joined #RubyOnRails
[13:03:53] toomus: How to access my Rails app hosted on Yosemite 10.10 from LAN?
[13:03:54] workmad3: has joined #RubyOnRails
[13:04:19] doodlehaus: has joined #RubyOnRails
[13:04:21] nateberkopec: has joined #RubyOnRails
[13:04:23] DefV: toomus: how are you running it?
[13:04:31] DefV: toomus: just "rails server"?
[13:04:34] Oog_: has joined #RubyOnRails
[13:04:36] matcouto: DefV reusing code, and that's the way it's currently implemented =/
[13:04:37] toomus: rails s -b 0.0.0.0
[13:04:43] Dwarf: has joined #RubyOnRails
[13:04:47] eGGsha: has joined #RubyOnRails
[13:04:53] DefV: toomus: someone can surf to your IP on port 3000
[13:05:20] cochise: has joined #RubyOnRails
[13:05:55] pabloh: has joined #RubyOnRails
[13:06:29] kitsuneyo: has joined #RubyOnRails
[13:06:34] toomus: I'm trying to access it from my Android phone
[13:06:56] bungoman: has joined #RubyOnRails
[13:07:23] njero: has joined #RubyOnRails
[13:08:15] DefV: toomus: if it's on the same network: go to your public IP:3000
[13:08:16] toomus: And in app console is see "Cannot render console from 192.168.88.246! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255"
[13:08:29] DefV: that a new thing?
[13:09:09] DefV: toomus: but that's to render the web-console?
[13:10:03] jeanjack: has left #RubyOnRails: ()
[13:10:32] jkamenik: has joined #RubyOnRails
[13:10:36] victortyau: has joined #RubyOnRails
[13:11:22] stantonnet: has joined #RubyOnRails
[13:12:57] nickenchuggets_: has joined #RubyOnRails
[13:13:33] chinmay_dd: has joined #RubyOnRails
[13:14:17] bungoman: has joined #RubyOnRails
[13:14:24] Scripore: has joined #RubyOnRails
[13:15:51] schaerli: has joined #RubyOnRails
[13:16:37] XCMer: has joined #RubyOnRails
[13:17:58] Rubie: has joined #RubyOnRails
[13:18:51] krz: has joined #RubyOnRails
[13:19:01] XCMer: Is it possible to nest a rails engine inside another?
[13:19:24] darrencauthon: has joined #RubyOnRails
[13:19:24] microdex: has joined #RubyOnRails
[13:19:25] XCMer: I mean, I tried that, but migrations are only detected on engines one level deep
[13:20:18] allcentury: has joined #RubyOnRails
[13:22:00] JoshL: has joined #RubyOnRails
[13:23:35] crislarr: has joined #RubyOnRails
[13:31:20] hfp: has joined #RubyOnRails
[13:32:20] hfp__work: has joined #RubyOnRails
[13:32:22] devdazed: has joined #RubyOnRails
[13:33:20] hfp_work-: has joined #RubyOnRails
[13:33:50] hfp-: has joined #RubyOnRails
[13:33:51] balr0g: has joined #RubyOnRails
[13:34:45] [H]unt3r: has joined #RubyOnRails
[13:36:20] ruurd: has joined #RubyOnRails
[13:37:31] ramortegui: has joined #RubyOnRails
[13:38:52] ekain: has joined #RubyOnRails
[13:39:16] _solomon: has joined #RubyOnRails
[13:40:11] Rubie: has joined #RubyOnRails
[13:40:28] lobmys: has joined #RubyOnRails
[13:41:21] hfp: has joined #RubyOnRails
[13:41:51] hfp_work: has joined #RubyOnRails
[13:41:56] axl_: has joined #RubyOnRails
[13:42:59] seank_: has joined #RubyOnRails
[13:43:02] Wingar: has joined #RubyOnRails
[13:43:27] lethjakman: has joined #RubyOnRails
[13:43:40] brazenbraden: has joined #RubyOnRails
[13:43:43] Sylario: has joined #RubyOnRails
[13:43:52] urkle: has joined #RubyOnRails
[13:44:31] brazenbraden: hey guys... I would like to use the render_to_string method (http://apidock.com/rails/ActionController/Rendering/render_to_string) inside a custom module. I have tried to include ActionController::Rendering but that doesnt help. How could I get access to that method from inside my custom module?
[13:44:43] thang: has joined #RubyOnRails
[13:45:56] brazenbraden: has left #RubyOnRails: ()
[13:46:04] brazenbraden: has joined #RubyOnRails
[13:46:35] sevenseacat: has joined #RubyOnRails
[13:47:35] annlewis: has joined #RubyOnRails
[13:47:56] DEA7TH_: has joined #RubyOnRails
[13:48:10] paulcsmith: has joined #RubyOnRails
[13:49:23] Oog_: has joined #RubyOnRails
[13:50:14] thang: has joined #RubyOnRails
[13:51:43] NOPmike: has joined #RubyOnRails
[13:52:58] mikecmpbll: I've just realised, for the first time, that my mysql databases and tables are in all sorts of different collations. I've no fucking idea why as I don't recall ever determining what collation anything should be in.
[13:53:09] mikecmpbll: but it's causing me an issue now: Mysql2::Error: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
[13:53:36] mikecmpbll: I don't know a great deal about collations, but the majority of text columns appear to be using utf8_unicode_ci
[13:53:42] mikecmpbll: BrazenBraden: sh
[13:54:14] mikecmpbll: would it be prudent to just force all of my databases to utf8_unicode_ci, if so, anyone know how or what the implications are?
[13:54:21] mikecmpbll: don't want to scramble data or anything.
[13:54:39] Scripore: has joined #RubyOnRails
[13:54:41] kies: has joined #RubyOnRails
[13:55:28] brazenbraden: so I was thinking of switching from RoR to PHP. What you guys think?
[13:56:04] schaerli: has joined #RubyOnRails
[13:57:22] brazenbraden: https://www.youtube.com/watch?v=32UGD0fV45g
[13:57:27] Creeves: BrazenBraden: and use what, cakephp?
[13:57:42] mikecmpbll: stop trolling guys. help me/comfort me
[13:57:44] zorak8: has joined #RubyOnRails
[13:57:59] jgpawletko: has joined #RubyOnRails
[13:58:38] brazenbraden: mikecmpbll, everything is going to be ok.
[13:58:54] brazenbraden: just do a backup, force the change, see what happens?
[14:01:07] mikecmpbll: answer template: "the reason all your collations are fucked up is <this>. rails/mysql will use <this> as the default collation but the best collation is <this> and you can change to it by doing <this>, but be aware of <this> when changing collations." kthx.
[14:01:25] microdex: has joined #RubyOnRails
[14:01:44] sarink: has joined #RubyOnRails
[14:03:23] sevenseacat: 'fill in the blanks, peon.'
[14:05:52] thang: has joined #RubyOnRails
[14:06:09] mikecmpbll: also why the fuck is latin1_swedish_ci so prevalent
[14:06:15] mikecmpbll: nothing against the swedish but ..
[14:06:33] dopie: has joined #RubyOnRails
[14:06:33] workmad3: has joined #RubyOnRails
[14:07:14] sankaber: has joined #RubyOnRails
[14:07:23] cpruitt: has joined #RubyOnRails
[14:08:21] brazenbraden: mikecmpbll, dunno if this is of any use but http://stackoverflow.com/questions/29067703/how-to-change-column-collation-without-losing-or-changing-data ?
[14:08:43] wasp__: has joined #RubyOnRails
[14:09:07] GhettoCode: has joined #RubyOnRails
[14:09:21] devdazed: has joined #RubyOnRails
[14:09:43] Lytol: has joined #RubyOnRails
[14:10:09] qejk: has joined #RubyOnRails
[14:12:09] edwinvdgraaf: has joined #RubyOnRails
[14:12:09] mikecmpbll: BrazenBraden: interesting. i'm getting the impression it's only likely to affect the data if you change character set, rather than collation.
[14:12:14] DEA7TH: has joined #RubyOnRails
[14:12:26] mikecmpbll: so i think i'm good.. now how to change it for every column on every table on every db..
[14:13:52] godzillaenlacasa: has joined #RubyOnRails
[14:14:43] brazenbraden: mikecmpbll, something like: "ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;" ?
[14:15:03] brazenbraden: doiesnt convert tables
[14:15:06] blackmes1: has joined #RubyOnRails
[14:15:07] mikecmpbll: yeah, that just changes the database default apparently, doesn't update the tables.
[14:15:10] krz: mikecmpbll: just curious. where is your db hosted?
[14:15:22] mikecmpbll: it appears that there's a database default, a table default, a connection defualt and a server default
[14:15:32] brazenbraden: http://stackoverflow.com/a/11873492 ?
[14:16:10] mikecmpbll: krz: on a vps, how come?
[14:16:27] krz: how many records we talking about?
[14:16:38] mikecmpbll: there's over 1000 databases
[14:16:47] umgrosscol: has joined #RubyOnRails
[14:18:23] krz: mikecmpbll: im guessing you werent the one who set this db up
[14:18:27] brazenbraden: wouldnt the #mysql channel be better suited for sorting this sort of thing out?
[14:18:40] mikecmpbll: BrazenBraden: indeed, you're probably right.
[14:18:46] mikecmpbll: krz: also right
[14:19:07] krz: should have hosted on the cloud :P id do a dump. then restore records into a cloud solution like aws
[14:19:29] mikecmpbll: not sure how that has anything to do with the problem? :p
[14:19:37] krz: as per 1k databases. i hope you mean 1k tables
[14:19:45] mikecmpbll: no, 1k databases.
[14:19:58] benhuda: has joined #RubyOnRails
[14:20:19] sevenseacat: talk to your ops team.
[14:20:27] brazenbraden: in other news, I would like to use the render_to_string method (http://apidock.com/rails/ActionController/Rendering/render_to_string) inside a custom module. I have tried to include ActionController::Rendering but that doesnt help. How could I get access to that method from inside my custom module?
[14:20:28] mikecmpbll: mikecmpbll: hi mate
[14:20:30] mikecmpbll: mikecmpbll: halp
[14:20:37] sshuff: has joined #RubyOnRails
[14:20:44] cpruitt: has joined #RubyOnRails
[14:21:04] sevenseacat: either way, its really not related to rails.
[14:21:20] mikecmpbll: this much is true, i'll clear out ;)
[14:21:28] krz: good luck :)
[14:21:31] JoshL: has joined #RubyOnRails
[14:22:23] krz: BrazenBraden: do you get an error or anything?
[14:22:55] thoraxe: has joined #RubyOnRails
[14:23:06] brazenbraden: krz, if I dont include ActionController::Rendering, I get the error method render_to_string not found
[14:23:22] thoraxe: sinatra-activerecord in play, trying to do a "rake db:migrate" but nothing happens. generally that's because the schema version is newer than the db migration file, right?
[14:23:47] krz: thoraxe: that CAN be true
[14:23:57] brazenbraden: krz, if I do include it, I get "super: no superclass method `render_to_string'"
[14:23:59] krz: thoraxe: check schema.rb and the latest migration version
[14:24:08] krz: if it generates a schema.rb that is
[14:24:36] Grundell: has joined #RubyOnRails
[14:24:44] brazenbraden: krz, https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/rendering.rb#L32\
[14:25:19] brazenbraden: krz, (sorry, typo) https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/rendering.rb#L32
[14:25:27] thoraxe: yeah one sec
[14:25:30] thoraxe: that's kinda hard for me
[14:25:42] krz: BrazenBraden: it looks like its calling render_to_string from the parent module?
[14:26:01] krz: i.e. ActionController?
[14:26:10] Lytol: has joined #RubyOnRails
[14:26:40] brazenbraden: yea, but I cant include ActonController (not in a controller context)
[14:27:10] lytol_: has joined #RubyOnRails
[14:28:10] krz: BrazenBraden: well thats probably why then. the it cant find render_to_string from super when the render_to_string method is called
[14:28:36] brazenbraden: krz, indeed. but how to go about injecting ActionController into my custom module?
[14:28:37] krz: BrazenBraden: you might want to think about why you are including that module in the first place. maybe theres another way to achieve what you are trying to get at
[14:28:55] kies^: has joined #RubyOnRails
[14:29:00] brazenbraden: krz, i tried extending ActionController::Base but alas, no cigar there
[14:29:16] krz: what are you trying to achieve with render_to_string ?
[14:29:21] sevenseacat: why are you trying to render from things that arent controllers?
[14:29:32] krz: that too ^
[14:30:01] catcher: has joined #RubyOnRails
[14:30:19] nettoweb: has joined #RubyOnRails
[14:30:34] SteenJobs: has joined #RubyOnRails
[14:30:41] simmerz_: has joined #RubyOnRails
[14:30:44] brazenbraden: sevenseacat, my controller passes my data long to a decorator which sets things up for the view. In there, I am setting up a bunch of vars to generate a button which comes from a button partial and I want to render the partial with the locals (the variables I set up) to get a html string which I can then inject into my view.
[14:30:45] Scripore: has joined #RubyOnRails
[14:30:53] krz: BrazenBraden: this is what super needs from the Render module: http://apidock.com/rails/ActionController/Base/render_to_string
[14:31:21] schaerli: has joined #RubyOnRails
[14:31:30] sar1nk: has joined #RubyOnRails
[14:33:13] krz: BrazenBraden: let your controller render the view. nothing else. if you need the decorator class accessible in the view. declare it as an instance var in the controller. i.e. @foo_decorator = FooDecorator.new(...); in the view, you can access @foo_decorator.do_something
[14:33:14] brazenbraden: krz, thats old (rails 2.3.8). This is the current one: http://apidock.com/rails/ActionController/Rendering/render_to_string
[14:33:43] pico-pete: has joined #RubyOnRails
[14:34:01] sevenseacat: yeah and it calls super first thing
[14:34:05] LJT: has joined #RubyOnRails
[14:34:18] Jhon: has joined #RubyOnRails
[14:34:23] rubyonrailed: has joined #RubyOnRails
[14:34:40] sevenseacat: what you're trying to do is fundamentally wrong.
[14:35:10] sevenseacat: decorators are for decorating models. not for generating buttons and rendering partials.
[14:35:22] rubyonrailed: I'm using .to_json on a set of data. It's extremely slow! Has anyone had performance issues using .to_json and know a way to speed things up?
[14:35:26] brazenbraden: lets call it a ViewModel then
[14:35:39] krz: maybe a presenter is up your alley
[14:36:02] brazenbraden: krz, yea, presenter pattern
[14:36:12] krz: rubyonrailed: you doing this for an api?
[14:36:44] sevenseacat: i dont know what the presenter pattern is, so I guess I'm out
[14:36:45] rubyonrailed: krz: No, it's a json set of data I send to my JS.
[14:36:57] krz: rubyonrailed: yea an api
[14:37:16] krz: rubyonrailed: look into AMS or jbuilder
[14:37:44] krz: rubyonrailed: and if your api starts to expand. consider adopting the json api format
[14:37:50] Anakat: has joined #RubyOnRails
[14:37:51] krz: http://jsonapi.org/
[14:38:08] rubyonrailed: krz: Ok, thanks.
[14:38:19] krz: and if you go down that road. consider using https://github.com/cerebris/jsonapi-resources
[14:38:35] intinig: has joined #RubyOnRails
[14:38:38] sevenseacat: wow, they asked for tips on fixing a performance problem and you told them to rewrite their entire api. nice.
[14:38:39] krz: although replicating the format in jbuilder is equally simple
[14:38:58] Ssweet211: has joined #RubyOnRails
[14:39:02] krz: yea. get it done the right way
[14:39:17] sevenseacat: that level of arrogance is pretty funny.
[14:39:36] krz: rubyonrailed: how big is your json object?
[14:39:58] sevenseacat: i mean for all you know its nothing to do with the json rendering
[14:40:01] krz: perhaps you need to limit the number of results?
[14:40:26] sevenseacat: maybe its a N+1 query or something
[14:40:30] krz: sevenseacat: given what was described. its hard to know anything at that level
[14:40:41] sevenseacat: exactly, but you told them to reqwrite their entire api anyway
[14:41:06] sevenseacat: not even knowing if that will have any effect on the problem
[14:41:20] krz: if you assume that way. then i can assume he has something before the to_json command. like sleep(10.seconds)
[14:41:28] krz: lets not assume :P
[14:41:38] Grundell: has joined #RubyOnRails
[14:41:47] sevenseacat: krz: indeed, you should stop doing so.
[14:41:58] krz: rubyonrailed: give more details!
[14:42:13] _solomon: has joined #RubyOnRails
[14:42:22] krz: rubyonrailed: show some code :)
[14:43:29] thoraxe: someone just built an ews application using the template and the deployer log says "couldn't scale... timed out waiting for the condition"
[14:43:35] thoraxe: is that because the docker pull took too long?
[14:44:17] krz: rubyonrailed, sevenseacat does have a point. im not aware of to_json being slow. perhaps its something before that, thats causing the delay. or perhaps your json object is just too big
[14:45:08] Trefex: has joined #RubyOnRails
[14:45:36] cleopatra: has joined #RubyOnRails
[14:46:00] mary5030: has joined #RubyOnRails
[14:46:07] krz: rubyonrailed: perhaps your building your ruby object and thats whats taking long. not the to_json. hard to know without code
[14:46:22] erichu: has joined #RubyOnRails
[14:47:14] mary5030: has joined #RubyOnRails
[14:47:19] krz: but seriously. after you get this fixed. pick a decent json serializer :D i recommend jbuilder or AMS
[14:49:41] sshuff: has joined #RubyOnRails
[14:50:03] sarink: has joined #RubyOnRails
[14:50:47] bungoman: has joined #RubyOnRails
[14:50:59] rubyonrailed: krz: I'll get back to you, i'm doing some debugging.
[14:51:18] tenderlove: has joined #RubyOnRails
[14:52:09] krz: rubyonrailed: off topic. what js client are you using?
[14:52:39] eGGsha: has joined #RubyOnRails
[14:52:56] rubyonrailed: just using jquery
[14:53:42] schaerli: has joined #RubyOnRails
[14:54:08] sar1nk: has joined #RubyOnRails
[14:54:09] symbol: has joined #RubyOnRails
[14:54:56] relipse: has joined #RubyOnRails
[14:55:24] disgrntld: has joined #RubyOnRails
[14:57:26] sarink: has joined #RubyOnRails
[14:57:49] ndrei: has joined #RubyOnRails
[14:58:10] mikepack: has joined #RubyOnRails
[14:58:37] ProLoser: has joined #RubyOnRails
[14:59:26] werelivinginthef: has joined #RubyOnRails
[14:59:28] konsolebox: has joined #RubyOnRails
[15:00:19] adre: has joined #RubyOnRails
[15:01:29] hfp: has joined #RubyOnRails
[15:01:59] hfp_work: has joined #RubyOnRails
[15:01:59] iamse7en: has joined #RubyOnRails
[15:02:10] darrencauthon: has joined #RubyOnRails
[15:02:35] Grundell: has joined #RubyOnRails
[15:02:35] edwinvdgraaf: has joined #RubyOnRails
[15:03:03] rubyonrailed: krz: https://gist.github.com/JasonMannon/ba741c455818b63a6b5e
[15:03:25] rubyonrailed: I dug into a bit, there's a ton of stuff going on
[15:04:46] krz: rubyonrailed: what does User.grantable_regions return?
[15:05:44] rubyonrailed: krz: https://gist.github.com/JasonMannon/772132dd29207bb893d9
[15:06:55] krz: rubyonrailed: so we are talking about a few region records right?
[15:07:05] krz: can you do a count. just want to make sure
[15:07:14] cpruitt: Long shot question but is anyone using formtastic-bootstrap and if so do you know how to silence formtastic deprecations messages? ???DEPRECATION WARNING: input_class is deprecated and will be removed from Formtastic 4.0??????
[15:07:20] rubyonrailed: krz: Yeah, there are 7 regions
[15:07:37] rubyonrailed: But I need the districts and schools in the json
[15:08:09] krz: yea well thats probably where your bottleneck is
[15:08:13] sar1nk: has joined #RubyOnRails
[15:08:50] krz: you might want to run these queries individually and see which one is slow
[15:09:15] rubyonrailed: I tried to just load the schools needed at once via json and not initially. It was still slow and that was while the user was trying to use the page.
[15:09:39] rubyonrailed: I can tell in my logs, it's the schools.
[15:10:11] nobitanobi: has joined #RubyOnRails
[15:10:23] krz: i dont think its a good idea parsing/looping through 6343 schools/objects
[15:10:47] platzhirsch: has joined #RubyOnRails
[15:10:48] krz: the real question is. do you really need to go through all schools?
[15:10:50] erich__: has joined #RubyOnRails
[15:10:59] platzhirsch: is there an opposite variant of validates_numericality_of?
[15:11:00] yardenbar: has joined #RubyOnRails
[15:11:36] krz: platzhirsch: opposite variant?
[15:11:38] Creeves: like to validate that something is not solely numeric?
[15:11:43] rubyonrailed: krz: Well, only 3 types of users, will actually be loading all of these schools. A majority of users will not have this problem. But for those 3 user types, it's necessary.
[15:11:53] symbol: has joined #RubyOnRails
[15:11:53] kies^: has joined #RubyOnRails
[15:12:09] livathinos: has joined #RubyOnRails
[15:12:12] Creeves: !validates_numericality_of?
[15:12:17] hutch78: has joined #RubyOnRails
[15:12:30] hutch78: asked this in #spree, but no answer (as usual):
[15:12:30] krz: platzhirsch: http://stackoverflow.com/questions/4933403/rails-3-validation-of-a-string
[15:12:34] hutch78: Anyone have any idea why in getting an unpermitted attributes error locally, but not in Production
[15:12:35] Creeves: not that that would work
[15:13:05] krz: rubyonrailed: for what? i cant immagine a page loading 6k results at once
[15:13:09] hutch78: as usual was an unfair way to put it, i should say as usual over the last two weeks
[15:13:35] dEPy: has joined #RubyOnRails
[15:13:48] krz: rubyonrailed: consider paginating? run it in the background?
[15:14:27] Creeves: platzhirsch: could you do a custom validatoin that says !(attr.is_a? Numeric)
[15:14:33] Creeves: validation
[15:14:38] rubyonrailed: krz: They are all put into selects and populated depending on selection. Like I said, I tried to only get the schools via ajax when they were needed, but it was still freezing the page. One district can still have hundreds of schools that need to be rendered.
[15:14:42] platzhirsch: Creeves: sure :) just wondered if there's already something built in
[15:14:56] rubyonrailed: But that was freezing the page while users were using it.
[15:16:41] krz: rubyonrailed: sounds like you need to rething your implementation
[15:16:45] krz: rethink*
[15:17:18] krz: user selects a district. you expect maximum of 6k records to return
[15:17:32] krz: doesnt sound sane
[15:18:56] charliesome: has joined #RubyOnRails
[15:19:17] rubyonrailed: krz: Well what's another option? This is again only happens for a very small amount of users > 5% of users will have this problem.
[15:19:34] milesmatthias: has joined #RubyOnRails
[15:20:25] jhack: has joined #RubyOnRails
[15:21:50] l0oky: has joined #RubyOnRails
[15:21:54] adre: has joined #RubyOnRails
[15:21:59] gambl0re: has joined #RubyOnRails
[15:22:00] mingsheng: has joined #RubyOnRails
[15:25:01] Sheperson: has joined #RubyOnRails
[15:26:39] Sheperson: Hello everyone
[15:26:58] l0oky: sheperson: Hello :)
[15:26:59] adre: has joined #RubyOnRails
[15:27:39] l0oky: Any ideas why do I get `NoMethodError`?? I clearly defined a method in my model.. https://gist.github.com/l0oky/a0308d9510867f517e29
[15:27:52] platzhirsch: has left #RubyOnRails: ()
[15:28:38] Sheperson: try `def self.create_new`
[15:29:39] l0oky: sheperson: It worked. Why?
[15:29:47] grizzlybair: has joined #RubyOnRails
[15:29:48] greengriminal: has joined #RubyOnRails
[15:30:11] l0oky: Thanks! :D
[15:30:33] AzaToth: has joined #RubyOnRails
[15:30:42] Sheperson: This might help you:
[15:30:44] Sheperson: http://www.railstips.org/blog/archives/2009/05/11/class-and-instance-methods-in-ruby/
[15:31:04] bruno-: has joined #RubyOnRails
[15:31:14] l0oky: sheperson: `Error: Content Missing` Thanks btw..
[15:31:24] leonardoajim: has joined #RubyOnRails
[15:31:51] Sheperson: It???s too quiet in here, I am getting scared :(
[15:32:15] lethjakman: has joined #RubyOnRails
[15:33:56] MaDErroR123: has joined #RubyOnRails
[15:35:06] GQiu: has joined #RubyOnRails
[15:35:09] benhuda: has joined #RubyOnRails
[15:35:21] riotjones: has joined #RubyOnRails
[15:35:24] mingsheng_: has joined #RubyOnRails
[15:35:49] bungoman: has joined #RubyOnRails
[15:35:56] grizzlybair: has joined #RubyOnRails
[15:36:03] wasp__: has joined #RubyOnRails
[15:37:17] jobewan: has joined #RubyOnRails
[15:37:22] edwinvdgraaf: has joined #RubyOnRails
[15:38:13] edwinvdg_: has joined #RubyOnRails
[15:38:40] drale2k: has joined #RubyOnRails
[15:40:26] relipse2: has joined #RubyOnRails
[15:40:34] drale2k: has joined #RubyOnRails
[15:41:27] blackmes1: has joined #RubyOnRails
[15:41:58] drale2k: has joined #RubyOnRails
[15:42:36] guest19913: has joined #RubyOnRails
[15:42:51] arBmind: has left #RubyOnRails: ()
[15:42:57] iamse7en: Suppose I had a Users model, a Games model and Predictions model. Users can predict on many games, but only one prediction per user. Do I need a 'through' at all? or is this fine as is? https://gist.github.com/anonymous/44f14b2b481c8df7f776
[15:43:05] arBmind: has joined #RubyOnRails
[15:43:34] iamse7en: one prediction per game per user i mean
[15:43:35] drale2k: has joined #RubyOnRails
[15:44:05] bronson: has joined #RubyOnRails
[15:44:36] iamse7en: typo, that last one is Class Prediction obviously
[15:44:44] moeabdol2: has joined #RubyOnRails
[15:45:15] devdazed: has joined #RubyOnRails
[15:45:23] edwinvdgraaf: has joined #RubyOnRails
[15:45:48] disgrntld: has joined #RubyOnRails
[15:46:01] lindii_: has joined #RubyOnRails
[15:48:25] towski_: has joined #RubyOnRails
[15:48:58] elia: has joined #RubyOnRails
[15:49:34] Lightsword: has joined #RubyOnRails
[15:49:51] greengriminal: validate :some_method, on: [:create, :update] syntanically this doesn't' seem right.
[15:50:01] greengriminal: i mean i could declare the validation twice. one with "validate :some_method, on: :create and validate :some_method, on: :update"
[15:50:10] r_baron: has joined #RubyOnRails
[15:50:21] relipse3: has joined #RubyOnRails
[15:51:08] Ssweet211: has left #RubyOnRails: ()
[15:54:01] jhack: has joined #RubyOnRails
[15:54:11] seank_: has joined #RubyOnRails
[15:54:30] GeorgesLeYeti: has joined #RubyOnRails
[15:54:41] willywos: has joined #RubyOnRails
[15:54:53] microdex: has left #RubyOnRails: ("Leaving...")
[15:55:24] griffindy: has joined #RubyOnRails
[15:55:26] relipse2: has joined #RubyOnRails
[15:55:26] LoBoGoL: has joined #RubyOnRails
[15:55:34] GeorgesLeYeti: Is it possible to make a when case with value lower than / between to and up to ?
[15:55:38] Pathfinder: has joined #RubyOnRails
[15:56:10] GeorgesLeYeti: Or should i make if a < 0 ... elseif ......
[15:57:54] grizzlybair: has joined #RubyOnRails
[15:58:38] mhb: has joined #RubyOnRails
[15:59:35] ndrei: has joined #RubyOnRails
[16:01:23] momomomomo: has joined #RubyOnRails
[16:03:06] momomomomo: has joined #RubyOnRails
[16:04:46] paulcsmith: has joined #RubyOnRails
[16:04:46] elmhouse: has joined #RubyOnRails
[16:05:05] podman: has joined #RubyOnRails
[16:05:59] charliesome: has joined #RubyOnRails
[16:06:42] Anakat: has joined #RubyOnRails
[16:06:58] momomomomo: has joined #RubyOnRails
[16:08:44] jwaldrip: has joined #RubyOnRails
[16:12:00] eminencehc_: has joined #RubyOnRails
[16:14:17] SteenJobs: has joined #RubyOnRails
[16:16:18] moeabdol2: has joined #RubyOnRails
[16:17:16] smathy: has joined #RubyOnRails
[16:17:42] ProLoser: has joined #RubyOnRails
[16:18:16] jamiely: has joined #RubyOnRails
[16:18:22] pixelhandler: has joined #RubyOnRails
[16:19:26] bricker: has joined #RubyOnRails
[16:22:13] vlad_starkov: has joined #RubyOnRails
[16:22:34] tubbo: GeorgesLeYeti: anything is possible in a turing-complete language. the question is do you want to do it or not.
[16:22:35] vlad_starkov: Question: Hi! Does anyone know can I use strong_parameters gem outside Rails?
[16:22:37] nobitano_: has joined #RubyOnRails
[16:23:08] tubbo: vlad_starkov: well, it's an extension to ActionController. are you using ActionController?
[16:23:25] relipse3: has joined #RubyOnRails
[16:23:30] tubbo: vlad_starkov: then i don't think it applies to you. what exactly are you trying to do?
[16:23:38] vlad_starkov: tubbo: I need something like strong parameters to validate hashes inside my microservice
[16:23:57] vlad_starkov: tubbo: this isn't rails rather pure ruby
[16:24:07] krz: rubyonrailed: sorry was out for a bit. paginated view
[16:24:07] jwaldrip: has joined #RubyOnRails
[16:24:11] tubbo: vlad_starkov: you could throw the whole thing into an object and use that to figure out what you need.
[16:24:47] vlad_starkov: tubbo: but still I use ActiveModel and I need its mass-assignment feature
[16:24:49] benlieb: has joined #RubyOnRails
[16:25:05] tubbo: vlad_starkov: this is really the meat and potatoes of strong_parameters, the ActionController::Parameters object -> https://github.com/rails/strong_parameters/blob/master/lib/action_controller/parameters.rb
[16:25:12] krz: rubyonrailed: another way is to run build the ruby object in the background. cache it into redis. and then render to json when needed. wont be up to date. but like you said. its only for internal staff/members
[16:25:31] vlad_starkov: tubbo: meat and potatoes sounds good))
[16:25:31] tubbo: vlad_starkov: not sure if you can just copy out a lot of that code, but unfortunately strong_parameters is way too coupled to rails for it to be any use outside of rails. you'll have to just take its concepts and implement them yourself.
[16:26:08] GeorgesLeYeti: tubbo, I'm not sure yet. It s just that i'm trying to anticipate futur cases. EG if I have diffrent color for every 10 steps.
[16:26:41] vlad_starkov: tubbo: I see. Also do you think there're any gems like strong parameters but loosely coupled to anything?
[16:26:51] tubbo: vlad_starkov: check out ruby-toolbox.com and see
[16:27:00] vlad_starkov: tubbo: on my way
[16:27:04] vlad_starkov: tubbo: thanks!
[16:27:25] blackmes1: has joined #RubyOnRails
[16:27:34] MaDErroR123: has joined #RubyOnRails
[16:28:13] NOPmike: has joined #RubyOnRails
[16:28:14] doodlehaus: has joined #RubyOnRails
[16:30:03] siemprefresco: has joined #RubyOnRails
[16:34:27] baweaver: has joined #RubyOnRails
[16:35:13] jwaldrip_: has joined #RubyOnRails
[16:35:44] lord4163: has joined #RubyOnRails
[16:37:16] Casty: has joined #RubyOnRails
[16:37:21] shinnya: has joined #RubyOnRails
[16:39:02] darrencauthon: has joined #RubyOnRails
[16:40:07] gerep: has joined #RubyOnRails
[16:40:55] jarr0dsz: has joined #RubyOnRails
[16:41:42] diegoviola: has joined #RubyOnRails
[16:41:47] lindii_: i have this polymorphic association involving hearts and posts but im struggling with my destroy action. I dont know how should i route in this case http://pastie.org/10297028
[16:42:57] drale2k: has joined #RubyOnRails
[16:43:40] diegorv: has joined #RubyOnRails
[16:43:48] tubbo: GeorgesLeYeti: i typically find when i'm doing an elsif that it might as well just be a case statement. but if it's just one elsif, no big deal. it's mostly about how easy it will be to add to later on.
[16:44:20] swebby: has joined #RubyOnRails
[16:45:52] TvL2386: has joined #RubyOnRails
[16:46:39] Spami: has joined #RubyOnRails
[16:47:11] nahtnam: has joined #RubyOnRails
[16:47:20] [Butch]: has joined #RubyOnRails
[16:50:07] zorak8: has joined #RubyOnRails
[16:50:09] tvw: has joined #RubyOnRails
[16:50:24] cochise: has joined #RubyOnRails
[16:55:29] blackmes1: has joined #RubyOnRails
[16:56:18] fgo: has joined #RubyOnRails
[16:57:18] kitsuneyo: has joined #RubyOnRails
[16:57:56] cpruitt: has left #RubyOnRails: ()
[16:59:35] momomomomo: has joined #RubyOnRails
[17:00:18] lala: has joined #RubyOnRails
[17:00:37] dimickh: has joined #RubyOnRails
[17:01:47] edwinvdgraaf: has joined #RubyOnRails
[17:02:27] eggoez: has joined #RubyOnRails
[17:03:53] benlieb: has joined #RubyOnRails
[17:03:53] jwaldrip_: has joined #RubyOnRails
[17:06:15] jimmiejohnson: has joined #RubyOnRails
[17:06:39] eminencehc_: has joined #RubyOnRails
[17:07:26] jimmiejohnson: has joined #RubyOnRails
[17:07:26] jimmiejohnson: has left #RubyOnRails: ()
[17:07:38] logik-bomb: my root_path takes me to my controller#index. What's the best way to change this so that when I user has only a record, root_path behaves like controler#show ?
[17:07:43] Sutffness: has joined #RubyOnRails
[17:07:58] rickmasta: has joined #RubyOnRails
[17:09:32] momomomomo: has joined #RubyOnRails
[17:09:51] elmhouse: has joined #RubyOnRails
[17:10:45] towski_: has joined #RubyOnRails
[17:12:04] rrawlins: has joined #RubyOnRails
[17:13:23] rrawlins: Anyone in the room use the rocket_pants gem for API work? Having issues getting Cache into place, looking for a little advice.
[17:13:30] charliesome: has joined #RubyOnRails
[17:14:07] djbkd: has joined #RubyOnRails
[17:15:02] ndrei: has joined #RubyOnRails
[17:15:04] pixelhandler: has joined #RubyOnRails
[17:15:18] skyjumper: super vague question... how does one know if they have Impostor Syndrome?
[17:19:54] kb3ien: Clearly this is WRONG, what's the correct syntax for this inside a controller ? content << render :partial => 'history_stash', :locals => { localized_params: @localized_params } ;
[17:20:10] devdazed: has joined #RubyOnRails
[17:20:14] darrencauthon: has joined #RubyOnRails
[17:20:28] bronson: has joined #RubyOnRails
[17:20:44] noah256_: has joined #RubyOnRails
[17:20:53] elmhouse: has joined #RubyOnRails
[17:20:53] lethjakman: has joined #RubyOnRails
[17:20:56] Hamled: has joined #RubyOnRails
[17:21:08] drewdavis: has joined #RubyOnRails
[17:21:43] Rubie: has joined #RubyOnRails
[17:21:52] michael_imac: has joined #RubyOnRails
[17:22:46] bricker: kb3ien: you're looking for render_to_string probably
[17:23:02] bricker: skyjumper: by seeing a therapist
[17:23:15] bahar: hello guys :)
[17:23:26] eggoez: has joined #RubyOnRails
[17:23:32] skyjumper: where do therapists know of such things... silicon valley?
[17:23:51] MaDErroR123: has joined #RubyOnRails
[17:24:46] gambl0re: has joined #RubyOnRails
[17:26:07] bahar: rails n00b here... im trying to figure out how to create something like this in rails: http://i.stack.imgur.com/V4Xds.png best i can figure is, i need at least 3 DB fields for each day of the week (day_of_week, start_at, end_at) but if i want to add more time slots for one day i'm not sure how to go about doing that. would i need to set a limit of 3 time slots perhaps, and have 3 x 3 (9) fields for each day...? or is there a better way to do it?
[17:26:49] noodman: has joined #RubyOnRails
[17:28:21] benlieb: has joined #RubyOnRails
[17:29:12] kb3ien: I'm just trying to pass the localized_params into the partial to do js stuff with it.
[17:29:27] allcentury: has joined #RubyOnRails
[17:29:40] sarink: has joined #RubyOnRails
[17:30:32] darrencauthon: has joined #RubyOnRails
[17:32:06] Techguy305: has joined #RubyOnRails
[17:32:35] jarr0dsz: has joined #RubyOnRails
[17:33:30] godzillaenlacasa: has joined #RubyOnRails
[17:35:20] benlieb: has joined #RubyOnRails
[17:36:31] tubbo: skyjumper: psychology is like any other medical profession, there are a lot of therapists that know about the most common causes of mental distress, but they will refer you to a specialist if you reach the limit of their abilities.
[17:36:33] blackmes1: has joined #RubyOnRails
[17:37:01] smathy: kb3ien, !code - and explain what you're trying to do here.
[17:37:01] helpa: kb3ien: 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.
[17:37:19] diegorv: tubbo true
[17:37:24] dimickh: has joined #RubyOnRails
[17:37:26] Anakat: has joined #RubyOnRails
[17:38:37] smathy: bahar, you'd just have a Schedule that has_many :time_slots
[17:38:41] bungoman: has joined #RubyOnRails
[17:39:14] WhereIsMySpoon_: has left #RubyOnRails: ()
[17:39:41] smathy: bahar, !gettingstarted - because based on your question I suspect you know very little about Rails (this is a fairly simple problem)
[17:39:41] helpa: bahar: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy and Ryan Bigg
[17:40:02] michaellippold: has joined #RubyOnRails
[17:40:19] bahar: smathy: thanks, i'll look into that..
[17:40:25] smathy: bahar, you're welcome.
[17:42:15] teadur: !gettingstarted
[17:42:33] cryptocronus: has joined #RubyOnRails
[17:42:37] elmhouse: has joined #RubyOnRails
[17:43:11] oflannabhra: has joined #RubyOnRails
[17:43:54] sloggerkhan: has joined #RubyOnRails
[17:44:24] oflannabhra: has joined #RubyOnRails
[17:44:35] romdi: has joined #RubyOnRails
[17:44:48] cryptocronus: trying to figure out best architecture for managing a large stream of data from clients. was thinking of just saving to amazon redshift directly from rails controller as we receive the data. is that okay? will it be too slow? other options seem to be save to regular sql database and then copy out later asynchronously? or perhaps push directly to a kinesis stream and then into redshift? thoughts?
[17:45:27] mikecmpbll: has joined #RubyOnRails
[17:46:00] mike___1234: has joined #RubyOnRails
[17:46:32] bungoman: has joined #RubyOnRails
[17:47:51] Obfuscate: has joined #RubyOnRails
[17:50:28] siddart_: has joined #RubyOnRails
[17:50:35] jottr_: has joined #RubyOnRails
[17:51:46] LoBoGoL: has joined #RubyOnRails
[17:53:23] sloggerkhan: if it pretty much better to use capybara-webkit rather than selenium?
[17:54:13] s2013: has joined #RubyOnRails
[17:54:58] seank_: has joined #RubyOnRails
[17:55:07] bricker: cryptocronus: definitely don't go direct to redshift, you lose recovery options. I would queue into something quick and atomic (eg redis) and then asynchronously pop data off the queue and push to redshift
[17:55:07] ndrei: has joined #RubyOnRails
[17:55:13] ndrei_: has joined #RubyOnRails
[17:55:33] smathy: teadur, there's a whitelist for bot commands.
[17:55:37] kies^: has joined #RubyOnRails
[17:55:50] cryptocronus: bricker: thanks, i???m not even sure we really need RedShift.. might just go with RDS
[17:56:01] smathy: SloggerKhan, I use poltergeist, they all have strengths and weaknesses.
[17:56:01] teadur: smathy: k no worries ,i was blind enough didnot notice the link at first
[17:56:09] bricker: cryptocronus: oh, you said redshift like 12 times I assumed you were already using it
[17:56:18] cryptocronus: we???re trying to figure out what to use
[17:56:22] smathy: teadur, np :) Just explaining.
[17:56:27] teadur: smathy: ty :)
[17:56:40] cryptocronus: thought redshift might be a good fit
[17:56:53] codepete: has joined #RubyOnRails
[17:57:11] bricker: cryptocronus: well you never explained what you're doing with the data
[17:58:15] GQiu: has joined #RubyOnRails
[18:00:19] iamse7en: has joined #RubyOnRails
[18:00:29] TheNet: has joined #RubyOnRails
[18:01:17] tubbo: SloggerKhan: biggest win for poltergeist is you don't have to wait a million years for Qt to build :)
[18:01:26] bungoman_: has joined #RubyOnRails
[18:01:28] bruno-: has joined #RubyOnRails
[18:01:30] HardFu: has joined #RubyOnRails
[18:01:53] sloggerkhan: tubbo: Thanks. It just finished building, though it only took a couple minutes maybe. lol
[18:02:28] oflannabhra: has joined #RubyOnRails
[18:03:01] rhizome: cryptocronus: how many Gig/sec?
[18:04:58] dimickh: has joined #RubyOnRails
[18:06:13] workmad3: has joined #RubyOnRails
[18:06:56] qejk: has joined #RubyOnRails
[18:10:43] mustmodify: has joined #RubyOnRails
[18:11:07] schaerli: has joined #RubyOnRails
[18:11:22] jhack: has joined #RubyOnRails
[18:11:29] yardenbar: has joined #RubyOnRails
[18:12:24] noodman: has joined #RubyOnRails
[18:14:06] Anakat: has joined #RubyOnRails
[18:14:42] blackmesa: has joined #RubyOnRails
[18:15:22] Anakat_: has joined #RubyOnRails
[18:15:23] kidoz: has joined #RubyOnRails
[18:16:28] Anakat__: has joined #RubyOnRails
[18:17:20] arup_r: has joined #RubyOnRails
[18:17:50] TheNet: has joined #RubyOnRails
[18:19:20] codezomb: has joined #RubyOnRails
[18:20:43] gambl0re: has joined #RubyOnRails
[18:20:54] strcmp1: has joined #RubyOnRails
[18:22:35] dimickh: has joined #RubyOnRails
[18:22:41] cajone: has joined #RubyOnRails
[18:22:51] cajone: has left #RubyOnRails: ()
[18:23:57] cnk: has joined #RubyOnRails
[18:24:36] greengriminal: has joined #RubyOnRails
[18:25:26] mustmodify: I suspect subscriptions are the single most frustrating thing I've had to handle. Does anyone have a solid way to handle these? It always feels... not right,
[18:26:08] LoBoGoL: has joined #RubyOnRails
[18:26:33] tubbo: mustmodify: subscriptions?
[18:26:51] mustmodify: yeah, pay me and I'll give you access to features.
[18:26:54] tubbo: like...recurring billing or publish/subscribe notifications
[18:27:22] tubbo: mustmodify: who's your payment provider? i've used Stripe for that and it was awesome compared to Authorize.net
[18:27:35] tubbo: like zero boilerplate, i just send them a params hash and they give me back an identifier to work with
[18:27:37] rhizome: "way to handle these"
[18:27:43] blackmes1: has joined #RubyOnRails
[18:31:25] workmad3: has joined #RubyOnRails
[18:32:30] schaerli: has joined #RubyOnRails
[18:32:54] oflannab_: has joined #RubyOnRails
[18:36:01] Macaveli: has joined #RubyOnRails
[18:38:11] doodlehaus: has joined #RubyOnRails
[18:39:42] Pupeno: has joined #RubyOnRails
[18:41:30] arup_r: form_for doing `PATCH` request instead of `POST` https://gist.github.com/aruprakshit/8e5a900df2ac089904b3
[18:42:05] Pupeno_: has joined #RubyOnRails
[18:42:08] dimickh: has joined #RubyOnRails
[18:43:18] arup_r: what wrong I did ?
[18:44:29] kitsuneyo: has joined #RubyOnRails
[18:44:58] sankaber: has joined #RubyOnRails
[18:45:31] rhizome: one thing you did wrong was to get a routing error but not include routes in your gist
[18:45:45] tubbo: ^ #iceburn
[18:45:49] tubbo: #thuglife
[18:46:30] smathy: arup_r, @booking is an existing record, so `form_for` generates a route to the update action because you're editing. Hence the PATCH
[18:46:55] tubbo: arup_r: before figuring out the url for your form's action="", it will first do @booking.new_record? (or whatever object you pass into there), and that's what makes the determination as to what URL to spit out
[18:46:56] smathy: arup_r, POST is for the `create` action, which is only for new records.
[18:47:19] bungoman: has joined #RubyOnRails
[18:47:31] smathy: tubbo, see the URL in the exception, "(No route matches [PATCH] "/bookings/19/payments")" - it's obviously not a new record.
[18:47:41] vmarcetic: has joined #RubyOnRails
[18:49:36] arup_r: ok...........
[18:50:29] arup_r: that's a good explanation.... indeed
[18:50:32] DEA7TH: has joined #RubyOnRails
[18:51:34] sloggerkhan: So I've got Capybara.javascript_driver = :webkit and Capybara.default_driver = :rack_test in my test_helper, but my tests seem to be using webkit anyway.
[18:51:40] arup_r: thank you guys..
[18:51:45] kitsuneyo: has joined #RubyOnRails
[18:51:57] nikhgupta: has joined #RubyOnRails
[18:52:44] schaerli: has joined #RubyOnRails
[18:53:25] lindii_: i have this polymorphic association involving hearts and posts but im struggling with my destroy action. I dont know how should i route in this case http://pastie.org/10297028
[18:53:44] Scriptonaut: does anyone know if actionmailer gets rid of extra newlines by default? The mails that are being sent out aren't preserving newlines. ALl newlines are squashed down to one no matter how many there are
[18:53:44] sloggerkhan: Yeah, it seems I have to manually set my tests to default driver. Oh well.
[18:54:53] edwinvdg_: has joined #RubyOnRails
[18:55:01] jottr_: has joined #RubyOnRails
[18:55:14] [Butch]: has joined #RubyOnRails
[18:57:12] kitsuneyo: what's the best way to do a gender column in rails? enum?
[18:57:41] vmarcetic: Does anyone know how to fix/speed up count in rails? I have a query that takes 6 seconds (6381.1ms) SELECT COUNT(*) FROM "imdb" WHERE (id <> ALL(array(select (jsonb_array_elements(movies_json)->>'movie_id')::integer AS movie_id FROM lists WHERE id in (1, 2225, 4453)))), and when I try it in pgAdmin I get 200ms
[18:57:42] Macaveli_: has joined #RubyOnRails
[18:57:42] rhizome: lindii_: you can do something like @heart.becomes(@heart.heartable_type) if your poly is set up right
[18:58:26] momomomomo: has joined #RubyOnRails
[18:58:30] rhizome: vmarcetic: i'm gonna guess it's the <>
[18:58:47] baweaver: has joined #RubyOnRails
[18:59:13] vmarcetic: rhizome: so <> is affecting rails count ? but not from shell or pgAdmin
[18:59:14] MaDErroR123: has joined #RubyOnRails
[18:59:46] lindii_: rhizome: where?
[18:59:50] lindii_: in the view
[19:00:25] rhizome: lindii_: well, you didn't actually say what error, or even an actual problem, so i was guessing
[19:00:54] rhizome: vmarcetic: i'm no pg genius, but that looks like a big ol' joiny subselect
[19:00:57] lindii_: rhizome: no error.. just wondering how i would route
[19:01:01] lindii_: n this case
[19:01:11] bungoman: has joined #RubyOnRails
[19:01:12] Anakat: has joined #RubyOnRails
[19:01:21] rhizome: you left off the last half of that sentence
[19:01:58] rhizome: like where you want to route to, or any goal.
[19:02:07] arup_r: after payment saving why getting `@payment` as `nil` ? https://gist.github.com/aruprakshit/3bda189896dd945158a9#file-paymentscontroller-rb-L15
[19:02:36] Pathfinder_: has joined #RubyOnRails
[19:02:50] hfp_work: has joined #RubyOnRails
[19:03:20] hfp: has joined #RubyOnRails
[19:03:59] hardtail: good day everybody, hope you are all having a good week
[19:05:44] vmarcetic: rhizome: I will check it out, but I believe that it is somehow an rails issue, since it is fast if I run it from psql console
[19:07:30] giowong: has joined #RubyOnRails
[19:07:47] vmarcetic: rhizome: tnx :)
[19:08:51] hfp: has joined #RubyOnRails
[19:09:21] hfp_work: has joined #RubyOnRails
[19:09:29] momomomomo_: has joined #RubyOnRails
[19:09:43] lethjakman: has joined #RubyOnRails
[19:09:54] bwlang: has joined #RubyOnRails
[19:11:45] bwlang: Hi??? i???m thinking about adding strip_attributes to all of my models. Is there a clean way to do this without having to add a line to each model? Is this a bad idea?
[19:12:43] darrencauthon: has joined #RubyOnRails
[19:13:20] bwlang: put more generally??? what???s the best way to add some callback logic to all models
[19:13:40] MaDErroR123: has joined #RubyOnRails
[19:13:58] rhizome: i understand what some of those words mean
[19:14:09] tubbo: bwlang: what's strip_attributes?
[19:14:53] tubbo: bwlang: also, how many models do you have to add this to?
[19:15:02] LoBoGoL: has joined #RubyOnRails
[19:15:17] tubbo: it's bad practice to do things like in config/initializers that will affect a large portion of your codebase, because people will inevitably not want that in the future and have to deconstruct your whole scheme here
[19:15:23] krz: has joined #RubyOnRails
[19:16:56] baweaver: has joined #RubyOnRails
[19:17:25] bwlang: tubbo: strip_attributes is a gem that converts user inputs like ?????? to nil. (Maybe there is a better way ????)
[19:17:34] bwlang: about 50 models
[19:17:41] Pupeno: has joined #RubyOnRails
[19:17:59] rhizome: what's wrong with ''
[19:18:13] mustmodify: has left #RubyOnRails: ()
[19:18:50] bwlang: rhizome: by ?????? i mean an empty string.
[19:19:00] bwlang: i dont??? want empty strings??? i want nil.
[19:20:01] tubbo: bwlang: yeah we know, the question is why do you want nil?
[19:20:28] bwlang: empty string break convenient construct like model.short_name || model.name
[19:21:09] bwlang: instead i have to day model.short_name.blank? ? model.short_name : model.name
[19:21:32] rhizome: model.display_name
[19:21:45] ruurd: has joined #RubyOnRails
[19:21:47] navo: has joined #RubyOnRails
[19:22:41] Scripore: has joined #RubyOnRails
[19:22:51] tubbo: bwlang: so to answer your question...yes, it is a bad idea. i would decline your pull request if you submitted that to my project, because having a bit of code in your initializers that affects every single file in app/models can and will cause confusion down the road. seen it happen way too many times.
[19:23:03] bwlang: rhizome: yes??? could do this, but the bottom line is that I don???t like the mix of nil and ?????? in my database??? makes other queries more complicated too.
[19:23:15] rhizome: you prefer the mix of gems and callbacks
[19:23:19] tubbo: bwlang: that said, you can do this by having a config.to_prepare { ActiveRecord::Base.class_eval { strip_attributes } }
[19:23:26] bwlang: tubbo: understood??? maybe that???s not awesome.
[19:23:51] tubbo: you'll notice a lot of gems doing this, but obviously in the documentation it will tell you "hey, we're obviously extending ActionController (or something) here..."
[19:24:13] vickleton: has joined #RubyOnRails
[19:24:17] bwlang: rhizome: really - i would prefer that rails handle this for me, i can???t think of any reason to store a blank string from user input.
[19:24:55] bwlang: however - it seems that others don???t care about this (though that could change??? we have foreign key s now ;)
[19:25:32] lindii_: rhizome: how would i do in the button here? http://pastie.org/10297251
[19:27:35] bwlang: tubbo: so maybe to be unsurprising i should put this logic into the gem (maybe a fork of https://github.com/rmm5t/strip_attributes)
[19:28:23] tubbo: bwlang: that's not really what i was going for. if you're going to do this at all, you might as well do it config/initializers...you want LESS indirection, not more!
[19:28:24] xkickflip: has joined #RubyOnRails
[19:29:53] bwlang: tubbo: I value the principle of least surprise??? not sure which is less surprising config/initializers or a gem that says what it does on the tin??? i just dont want to add the same code to a ton of models.
[19:30:38] tubbo: bwlang: you didn't make strip_attributes. if i take on this project and for some reason want to upgrade strip_attributes, i can't now because you are in control of the fork.
[19:30:44] tubbo: bwlang: if you fork it, that is
[19:31:06] tubbo: at least with the file in config/initializers i have all the tools at my disposal to debug whatever i want.
[19:31:19] abuzze: has joined #RubyOnRails
[19:32:21] ruurd: has joined #RubyOnRails
[19:32:26] bwlang: tubbo: yeah - or maybe i could add some config option to the gem that injects its logic to all models. But it sounds like you guys would be less surprised by just living with the mixed nil and ?????? situation in thedb.
[19:32:44] bwlang: (and hope for a pull request to be accepted)
[19:33:58] Vols: has joined #RubyOnRails
[19:34:44] Frem: has joined #RubyOnRails
[19:36:00] Casty: has joined #RubyOnRails
[19:36:20] arup_r: any idea why getting error ? https://gist.github.com/aruprakshit/3bda189896dd945158a9#file-paymentscontroller-rb-L7
[19:36:21] catcher: you're almost better off overriding blank & ||
[19:36:51] tvw: has joined #RubyOnRails
[19:37:29] jenrzzz: has joined #RubyOnRails
[19:38:16] mikepack: has joined #RubyOnRails
[19:38:29] rubyonrailed: I currently have a class method that takes params as an attribute. Should I break those params up and accept them as sepererate arguments, or is there an easy way to test this method without writing a hash for each needed result.
[19:38:34] arup_r: it seems I need to do @payment.reload.id
[19:38:53] dimickh: has joined #RubyOnRails
[19:39:58] kitsuneyo: has joined #RubyOnRails
[19:41:06] kadoppe: has joined #RubyOnRails
[19:41:36] bwlang: catcher: overriding || give me the heebie jeebies , so should injecting strip_attributes i guess??? i???ll just get comfortable with nill and ?????? living together, cats and dogs lying down together, human sacrifice and mass hysteria generally ;)
[19:43:06] catcher: bwlang, yeah, I'd skip it, or override. The override could check a responds_to for something specific to your models to be a little less gross.
[19:43:19] garrypolley: has joined #RubyOnRails
[19:44:16] SteenJobs: has joined #RubyOnRails
[19:44:17] schaerli: has joined #RubyOnRails
[19:46:05] ruurd: has joined #RubyOnRails
[19:46:17] speaking1ode: has joined #RubyOnRails
[19:46:24] gambl0re: has joined #RubyOnRails
[19:47:07] bricker: You can't override ||
[19:47:07] edwinvdgraaf: has joined #RubyOnRails
[19:47:13] bricker: is everybody on crazy pills
[19:47:56] toretore: has joined #RubyOnRails
[19:49:41] bungoman: has joined #RubyOnRails
[19:51:01] Rubie: has joined #RubyOnRails
[19:51:17] VeryBewitching: has joined #RubyOnRails
[19:52:05] SteenJobs: my favorite kind of pills
[19:53:22] smathy: Scriptonaut, you maybe using HTML output?
[19:53:31] SteenJobs: if i???m implementing the stripe API for an angular frontend with a rails backend, do i implement it for rails or do i add it totally for angular because it uses the stripe servers anyway?
[19:54:01] s2013: has joined #RubyOnRails
[19:55:21] hfp: has joined #RubyOnRails
[19:55:26] smathy: arup_r, also, you showed us line 7 of PaymentsController, but the error was: app/controllers/bookings_controller.rb:7
[19:55:43] speaking2ode: has joined #RubyOnRails
[19:55:51] seank_: has joined #RubyOnRails
[19:55:51] hfp_work: has joined #RubyOnRails
[19:56:34] edwinvdgraaf: has joined #RubyOnRails
[19:57:00] SteenJobs: :(. i???ll be back, don???t worry. with my question in hand.
[19:57:18] smathy: rubyonrailed, just use `merge` in each of your tests to override a base hash that you define at the top of your tests.
[19:57:56] ciree: has joined #RubyOnRails
[19:59:42] roolo: has joined #RubyOnRails
[20:00:18] l0oky: will .empty? check for nil?
[20:00:39] jottr_: has joined #RubyOnRails
[20:01:06] Pupeno: has joined #RubyOnRails
[20:02:03] artto: has joined #RubyOnRails
[20:02:43] artto_: has joined #RubyOnRails
[20:03:15] tubbo: l0oky: blank? will though
[20:03:34] hfp: Hey all, I am updating my CV, website etc and I'm wondering... Should I label myself as a web developer? I was always under the impression that a web developer is associated with slicing PSD designs and doing front end stuff but not web apps. Has this changed or should I stick to software developer even though I only really do web apps?
[20:03:48] l0oky: >> nil.blank?
[20:04:14] bricker: hfp: web designer = PSD slicing, basic HTML and CSS mockups
[20:04:22] bricker: hfp: web developer = implementation
[20:04:24] nikhgupt: has joined #RubyOnRails
[20:04:34] tubbo: l0oky: https://gist.github.com/tubbo/b51229ea29b5c57aea73
[20:04:51] hfp: bricker: noted, thanks
[20:05:15] bricker: hfp: I always go with "software developer" though
[20:06:29] ciree: putting software engineer is an easy 5k extra in salary
[20:07:13] isjaylee: has joined #RubyOnRails
[20:07:24] eminencehc_: has joined #RubyOnRails
[20:07:42] siempref_: has joined #RubyOnRails
[20:08:50] l0oky: tubbo: Thanks :)
[20:09:30] Scriptonaut: smathy, it was because I wasn't whitelisting <p> tags
[20:09:36] Scriptonaut: apparently tinymce uses <p> instead of <br />
[20:11:02] sypheren: has joined #RubyOnRails
[20:12:17] arup_r: smathy, you said it is doing PATCH request...... because record exist.. but for new record also it is doing PATCH request
[20:13:00] nettoweb: has joined #RubyOnRails
[20:13:17] fighella: has joined #RubyOnRails
[20:15:22] xicreative: has joined #RubyOnRails
[20:15:33] edwinvdgraaf: has joined #RubyOnRails
[20:15:35] artto: has joined #RubyOnRails
[20:16:02] gambl0re: has joined #RubyOnRails
[20:17:08] xicreative: Hey, quick question: did the behavior of `content_for` change between Rails 4.0 and Rails 4.2? I'm got some content_for blocks that are no longer being yielded into :head.
[20:17:42] bin_005: has joined #RubyOnRails
[20:18:14] lxsameer: has joined #RubyOnRails
[20:21:04] yfeldblum: has joined #RubyOnRails
[20:22:22] dionysus69: has joined #RubyOnRails
[20:23:04] professor_soap: has joined #RubyOnRails
[20:23:06] jenrzzz: has joined #RubyOnRails
[20:23:43] tubbo: xicreative: not that i know of, but you might want to browse the changelogs for 4.1 and 4.2 to make sure i'm not just talking out of my ass.
[20:24:00] tubbo: more accurately... *I* have not noticed much of a difference in how `content_for` operates between rails 4.0 and 4.2
[20:24:08] bashusr: has joined #RubyOnRails
[20:29:22] bronson: has joined #RubyOnRails
[20:29:44] ubermonkey: has joined #RubyOnRails
[20:30:09] ubermonkey: has joined #RubyOnRails
[20:32:24] MaDErroR123: has joined #RubyOnRails
[20:33:12] Pupeno: has joined #RubyOnRails
[20:34:19] ubermonkey: has joined #RubyOnRails
[20:34:40] nettoweb_: has joined #RubyOnRails
[20:36:07] Maletor: has joined #RubyOnRails
[20:36:21] isjaylee: has left #RubyOnRails: ()
[20:37:29] momomomomo: has joined #RubyOnRails
[20:40:37] elmhouse: has joined #RubyOnRails
[20:40:46] x-light: has joined #RubyOnRails
[20:44:26] cac: has joined #RubyOnRails
[20:44:29] vmarcetic: has joined #RubyOnRails
[20:44:47] smathy: arup_r, !gist your code please, view and controller.
[20:44:47] helpa: arup_r: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[20:45:05] momomomomo: has joined #RubyOnRails
[20:45:25] arup_r: smathy, I figured it out.. you guys were true
[20:45:40] smathy: arup_r, good to hear.
[20:45:49] jottr_: has joined #RubyOnRails
[20:47:06] baweaver: has joined #RubyOnRails
[20:49:24] sah_usmc: has joined #RubyOnRails
[20:51:10] aldodelgado: has joined #RubyOnRails
[20:51:10] gnagno: has joined #RubyOnRails
[20:51:28] sah_usmc: has joined #RubyOnRails
[20:51:30] l0oky: I have a method inside my model all It does is a simple query to the database and returns activerecord. How can I make this method efficent and tell it not to query every single time?
[20:53:06] arup_r: Geeting an error while trying to save the payment as "A field with precision 3, scale 0 must round to an absolute value less than 10^3."
[20:53:14] arup_r: https://gist.github.com/aruprakshit/3bda189896dd945158a9#file-log-L10
[20:53:52] aldodelgado: has joined #RubyOnRails
[20:54:15] nettoweb: has joined #RubyOnRails
[20:56:18] lindii_: any suggestions about how to build a route in order to unheart a model with this poly association? http://pastie.org/10297375
[20:56:36] ruurd: has joined #RubyOnRails
[20:56:53] jenrzzz: has joined #RubyOnRails
[20:56:54] sarink: has joined #RubyOnRails
[20:58:25] lethjakman: has joined #RubyOnRails
[20:59:58] cpruitt: has joined #RubyOnRails
[21:01:36] Radar: GOOD MORNING
[21:01:52] Radar: "unheart" YOU MONSTER
[21:02:17] arup_r: well got the error.. wanted to know. just can I declare decimal number uisng only scale but not precision ?
[21:02:46] arup_r: like t.decimal precision: 3
[21:02:57] Radar: lindii_: I don't understand the question.
[21:03:09] Radar: arup_r: "using scale but not precision", then your example uses precision.
[21:03:28] arup_r: or like t.decimal scale: 3
[21:03:35] l0oky: has joined #RubyOnRails
[21:04:01] x-light: happy friday radar
[21:04:05] arup_r: Radar, didn't get you
[21:04:08] lindii_: Radar: im wondering how would be the route to use in the destroy action for this situation
[21:04:36] Anakat: has joined #RubyOnRails
[21:04:57] swebby: has joined #RubyOnRails
[21:06:23] swebby: Greetings.
[21:07:29] swebby: Anyone home?
[21:07:46] siemprefresco: has joined #RubyOnRails
[21:08:18] p8m: has joined #RubyOnRails
[21:09:04] xicreative: tubbo: thanks, I'll take a look
[21:09:21] baweaver: has joined #RubyOnRails
[21:10:29] momomomomo: has joined #RubyOnRails
[21:11:17] JeramyRR: has joined #RubyOnRails
[21:12:31] giowong: in image_tag do i have to specify the /images part?
[21:12:33] futilegames: has joined #RubyOnRails
[21:12:48] elmhouse: has joined #RubyOnRails
[21:13:03] Radar: lindii_: What you've got there... does it not work?
[21:13:05] giowong: im lookin at the output of my sendgridn email template and the path is showing /assets/folder/img
[21:13:23] giowong: when the images are in /assets/images/folder/img
[21:13:24] Coldblackice: has joined #RubyOnRails
[21:13:43] smathy: giowong, !try
[21:13:43] helpa: giowong: Why don't you try it and find out for yourself?
[21:13:43] arup_r: if they are inside images directly then only name of the file inside the image_tag will work
[21:14:11] kb3ien: has joined #RubyOnRails
[21:14:18] giowong: well i did
[21:14:23] giowong: and the output was /images/images
[21:14:32] smathy: giowong, right, so doesn't that answer your question?
[21:14:54] TheNet: has joined #RubyOnRails
[21:14:58] arup_r: Can I create a column like t.decimal scale: 3 # without putting precision
[21:15:00] edwinvdgraaf: has joined #RubyOnRails
[21:15:40] lindii_: Radar: well the only think that came to my mind was to route to lets say hearts/7 where 7 is the post id but the find_likeable expects something like posts/7/likes but i cant use that to delete
[21:15:51] giowong: no cause im dumb
[21:16:40] Radar: lindii_: why not?
[21:16:50] Radar: lindii_: GET /posts/7/likes/1 is different to DELETE /posts/7/likes/1
[21:17:20] tubbo: yo fuck poltergeist
[21:17:23] lindii_: Radar: i dont need the like id
[21:17:26] tubbo: "oh yeah we totally support phantomjs 2.0"
[21:17:29] tubbo: (six weeks later)
[21:17:37] tubbo: "what? no! don't use phantomjs 2.0 with poltergeist! you crazy!"
[21:18:08] LoBoGoL: has joined #RubyOnRails
[21:18:33] Radar: lindii_: so DELETE /posts/7/likes?
[21:18:51] lindii_: Radar: yes but thats not possible
[21:19:01] hfp: has joined #RubyOnRails
[21:19:27] hfp_work: has joined #RubyOnRails
[21:19:33] eggoez: has joined #RubyOnRails
[21:19:44] crdpink2: has joined #RubyOnRails
[21:22:00] l0oky: `Market.pluck(:zipcode)` vs `Market.all.map(&:zipcode)`. Which is faster? :D
[21:22:08] skyjumper: anyone know why rspec/capybara wouldn't show where in the spec that an error occurred - only where in the app itself? https://gist.github.com/anonymous/5b500695a9fca6075ef1
[21:23:07] ur5us: has joined #RubyOnRails
[21:24:16] sloggerkhan: How do I wait until a part of a page isn't visible with capybara? I can't find an async opposite of visible? in the obvious documentation.
[21:25:09] kitsuneyo: has joined #RubyOnRails
[21:25:43] rhizome: skyjumper: the error is in your code, not the return of a test
[21:25:49] duderonomy: has joined #RubyOnRails
[21:26:29] skyjumper: rhizome: right, but i'm not sure what which point in the test that code is being triggered
[21:26:39] erich__: has joined #RubyOnRails
[21:27:17] rhizome: you could be doing too much in that test, then
[21:27:31] skyjumper: i didn't write the code... just trying to debug it
[21:27:33] rhizome: hard to say, but it happens sometimes
[21:27:44] rhizome: you can see what test it is though, right?
[21:28:01] charliesome: has joined #RubyOnRails
[21:28:13] rhizome: comment from the first assertion down, then uncomment until it doesn't pass
[21:28:50] Pupeno: has joined #RubyOnRails
[21:28:52] bricker: skyjumper: the backtrace is truncated, use -b to see the full thing
[21:29:06] rhizome: must be an rspec thing
[21:29:14] skyjumper: -b didn't do it either
[21:29:44] bricker: rspec -b should enable full backtrace
[21:29:52] FernandoBasso: has joined #RubyOnRails
[21:29:58] skyjumper: of the spec itself?
[21:30:14] bricker: for failures
[21:31:27] zorak8: has joined #RubyOnRails
[21:31:32] kitsuneyo: has joined #RubyOnRails
[21:31:38] vmarcetic: has joined #RubyOnRails
[21:31:59] bricker: skyjumper: I see the message at the top now, gist the full file, usually that's caused by a typo somewhere
[21:32:14] l0oky: Is there a more efficient way to do this? https://gist.github.com/l0oky/3d44199eecd1f653082f
[21:33:01] cac: has joined #RubyOnRails
[21:33:59] bronson: has joined #RubyOnRails
[21:34:12] bricker: l0oky: Group.where(group_id: GroupUser.select("distinct group_id").pluck(:group_id))
[21:34:40] jottr: has joined #RubyOnRails
[21:35:20] l0oky: bricker: thanks!
[21:35:35] l0oky: looks much simpler
[21:35:42] rhizome: Group.joins(:group_users).all # no?
[21:35:46] l0oky: What does it return?
[21:36:24] l0oky: i mean what type
[21:36:39] l0oky: an array of these Groups?
[21:36:41] rhizome: the class on which the query is being run. Group.
[21:37:28] ruurd: has joined #RubyOnRails
[21:39:04] edwinvdgraaf: has joined #RubyOnRails
[21:39:11] Anakat: has joined #RubyOnRails
[21:39:59] l0oky: bricker: Is this valid? Group.where(group_id: GroupUser.select("distinct group_id").where(:user_id => self.id).pluck(:group_id))
[21:41:17] bricker: l0oky: looks okay, only one way to find out
[21:42:48] l0oky: bricker: works! thank you very much :D Its like a from 0 to hero in very short time thanks to you guys :D
[21:42:51] FernandoBasso: What is the rails thing where you build a separate module to integrate into an existing app that can also be used in other apps?
[21:42:54] l0oky: IRC is so effective :)
[21:43:13] bricker: FernandoBasso: engine
[21:43:19] ruurd: has joined #RubyOnRails
[21:43:32] paulcsmith: has joined #RubyOnRails
[21:43:50] rhizome: NB: GroupUser.pluck(:group_id).uniq
[21:44:04] FernandoBasso: For instance, if I have an app that is an admin area, and it provides a CRUD. And then, I want to build a site, e-commerce, etc that is ONLY public (basic with the R (retrieve)) and some forms for user interaction.
[21:44:08] FernandoBasso: bricker, I think so.
[21:44:27] FernandoBasso: bricker, Also, do you have another suggestion for what I have just described?
[21:45:06] FernandoBasso: For instance, in PHP, I design a database, create the restrict area, and then the public area almost pure select statements.
[21:45:16] FernandoBasso: How would I achieve something similar in rails?
[21:45:17] blackmes1: has joined #RubyOnRails
[21:45:35] FernandoBasso: I don't want/need (or I can't, I'm not sure) to redefine models, for instance.
[21:45:51] bricker: FernandoBasso: um
[21:46:00] bricker: You can use engines, I don't like that way though
[21:46:05] FernandoBasso: If the restrict area has a CRUD for users, how to write a separate area that is the public area.
[21:46:12] SteenJobs: has joined #RubyOnRails
[21:46:17] eGGsha: has joined #RubyOnRails
[21:46:31] bricker: FernandoBasso: You can have two separate apps that share the same database, the models end up being very different in that scenario
[21:46:37] FernandoBasso: bricker, The last time I read about engines, they didn't sound right for this task.
[21:46:42] bricker: FernandoBasso: best solution is to have an API that both apps will use
[21:47:02] FernandoBasso: Could be, I think.
[21:47:20] FernandoBasso: But won't this add an overhead if it is a high used website?
[21:47:58] FernandoBasso: Sorry if I am being to picky. I just want to understand the choices I have.
[21:47:59] sloggerkhan: Is there a way to NOT have to manually truncate the tables in my test DB when an async capybara test fails?
[21:48:20] glenn: has joined #RubyOnRails
[21:48:34] bricker: FernandoBasso: it will add overhead if your API sucks
[21:49:16] TheNet: has joined #RubyOnRails
[21:52:01] mwlang: Is it possible to search and replace escape sequences as regular expression match (from rails log file) in Text Mate 2?
[21:52:43] ruurd: has joined #RubyOnRails
[21:53:08] SteenJobs: hey guys, if i have an app with an angular frontend and rails backend, and i want to integrate the Stripe API, do i use the API for rails or for angular? or both?
[21:53:55] djbkd: has joined #RubyOnRails
[21:56:05] jaequery: has joined #RubyOnRails
[21:56:36] seank_: has joined #RubyOnRails
[21:57:11] skyjumper: SteenJobs: isn't it kind of up to you about how you want it to work?
[21:57:39] SteenJobs: i guess? i???m wondering what would be the advantages of using one rather than the other.
[21:57:39] cpruitt: has joined #RubyOnRails
[21:58:02] SteenJobs: skyjumper: like is it irrelevant or are their pros and cons for each method?
[21:58:42] _solomon: has joined #RubyOnRails
[21:58:47] CanTonic: has joined #RubyOnRails
[21:59:27] ruurd: are there any secrets involved in using that API?
[21:59:28] CheckYourSix: has joined #RubyOnRails
[21:59:30] skyjumper: ACTION doesn't know
[21:59:38] TheNet: Why does rails write names in forms like name="post[cities]" ?
[21:59:58] skyjumper: TheNet: because that's the "cities" field of the "post" model
[22:00:23] SteenJobs: ruurd: what do you mean?
[22:00:28] bricker: to Protect the Magic(tm)
[22:00:46] TheNet: skyjumper: isn't having the
[22:01:00] TheNet: 'post' a little redundant?
[22:01:16] skyjumper: is your model named Post?
[22:01:21] viiralvx: has joined #RubyOnRails
[22:01:38] TheNet: skyjumper: my model isn't anything, it's just a form
[22:01:42] TheNet: not a form_for resource
[22:01:51] ruurd: SteenJobs hashes, keys, usernames, that kind of stuff.
[22:02:31] rhizome: well it's a form_something
[22:02:48] rhizome: form_tag :post
[22:03:01] TheNet: there's no post involved, that was just an example
[22:03:07] SteenJobs: ruurd: ah yea, i mean you need an API key. but nvrm, just realized that you need the API for the backend as well anyway.
[22:03:10] SteenJobs: ruurd: i???m pretty sure.
[22:03:12] rhizome: then i don't know what you're talking about
[22:03:32] baweaver: has joined #RubyOnRails
[22:03:56] smathy: TheNet, not redundant when you have fields from multiple models in the same form.
[22:04:42] baweaver_: has joined #RubyOnRails
[22:04:48] TheNet: smathy: if I don't though, which field should I use to name the field?
[22:04:55] TheNet: which *option
[22:05:04] TheNet: parameter
[22:05:06] smathy: TheNet, well if you're not using the conventions of resources then use whatever you want.
[22:06:37] TheNet: smathy: I'm not using resources
[22:06:56] smathy: TheNet, ...then use whatever you want.
[22:08:05] l0oky: has joined #RubyOnRails
[22:09:13] CheckYourSix: has joined #RubyOnRails
[22:09:24] wethu: has joined #RubyOnRails
[22:09:48] kitsuneyo: has joined #RubyOnRails
[22:09:52] sah_usmc: has joined #RubyOnRails
[22:10:19] LoBoGoL: has joined #RubyOnRails
[22:11:35] centrx: has joined #RubyOnRails
[22:11:53] xkickflip: has joined #RubyOnRails
[22:12:43] djbkd: has joined #RubyOnRails
[22:12:58] bonhoeffer: has joined #RubyOnRails
[22:13:14] SteenJobs: has joined #RubyOnRails
[22:15:51] sah_usmc: has joined #RubyOnRails
[22:16:10] riotjones: has joined #RubyOnRails
[22:16:37] glenn: has joined #RubyOnRails
[22:16:46] sah_usmc: has joined #RubyOnRails
[22:19:49] bungoman: has joined #RubyOnRails
[22:22:01] FernandoBasso: has joined #RubyOnRails
[22:23:03] bmurt: has joined #RubyOnRails
[22:23:47] garrypolley: has joined #RubyOnRails
[22:24:16] noodman: has joined #RubyOnRails
[22:24:42] DEA7TH: has joined #RubyOnRails
[22:24:55] baweaver: has joined #RubyOnRails
[22:25:00] fighella: has joined #RubyOnRails
[22:26:14] lemonada: has joined #RubyOnRails
[22:26:40] lemonada: Can someone tell me why am I getting Missing template error?
[22:27:42] vmarcetic: has joined #RubyOnRails
[22:31:05] DoctorMonocular: has joined #RubyOnRails
[22:32:46] grizzlybair: has joined #RubyOnRails
[22:32:54] ellisTAA: has joined #RubyOnRails
[22:32:55] bruno-: has joined #RubyOnRails
[22:33:10] smathy: Damnit, I knew that one too!
[22:33:24] jgpawletko: has joined #RubyOnRails
[22:33:41] cek: has joined #RubyOnRails
[22:34:07] cek: has left #RubyOnRails: ()
[22:34:08] viiralvx: has joined #RubyOnRails
[22:34:36] ellisTAA: does anyone know of a gem that i can use for displaying analytics
[22:34:38] Grundell: has joined #RubyOnRails
[22:34:38] jhack: has joined #RubyOnRails
[22:39:41] crunk_bear: has joined #RubyOnRails
[22:40:48] ruurd: has joined #RubyOnRails
[22:40:56] Papierkorb: has joined #RubyOnRails
[22:42:35] mwlang: has anyone ever seen users with IE browser consistently get different session IDs with each page request?
[22:43:10] mwlang: with Firefox and Chrome, the session Id???s remain consistent, but certain IE users, the session Id is new with every page visit.
[22:43:48] l0oky: has joined #RubyOnRails
[22:44:07] lethjakman: has joined #RubyOnRails
[22:44:09] mwlang: I think it???s actually in the Apache bowels and not the Rails app because when I run the app on port 3000 and hit it directly with the troublesome IE browser, it works perfectly.
[22:45:26] seank_: has joined #RubyOnRails
[22:46:00] ellisTAA: has joined #RubyOnRails
[22:46:15] scottmatheina: has joined #RubyOnRails
[22:46:40] kitsuneyo: has joined #RubyOnRails
[22:47:53] Scripore: has joined #RubyOnRails
[22:48:18] xkickflip: has joined #RubyOnRails
[22:49:23] Rubie: has joined #RubyOnRails
[22:50:04] sah_usmc: has joined #RubyOnRails
[22:50:40] kitsuneyo: has joined #RubyOnRails
[22:52:17] centrx: mwlang, I've seen users with IE browser do all sorts of impossible things
[22:54:09] allcentury: has joined #RubyOnRails
[22:56:47] x-light: has joined #RubyOnRails
[22:57:17] ellisTAA: has joined #RubyOnRails
[22:58:45] eggoez: has joined #RubyOnRails
[23:00:34] mwlang: centrx: finally figured it out???.cookies were blocked for the domain. Sheez???talk about 16 hours lost.
[23:01:06] mwlang: of course???it took me 15.5 hours just to narrow down our issue to session ids changing every request.
[23:01:43] roolo: has joined #RubyOnRails
[23:01:57] mwlang: then half an hour of googling ie and session ids changing before the stark obvious presented itself.
[23:02:24] mwlang: Is it at all possible for server side to detect cookies are blocked?
[23:02:46] thejoecarroll: has joined #RubyOnRails
[23:02:52] fgo: has joined #RubyOnRails
[23:02:52] mwlang: if so, at the very least I can send back a flash notice: ???This site will not work w/o cookies enabled"
[23:03:09] ndrei: has joined #RubyOnRails
[23:03:59] ndrei_: has joined #RubyOnRails
[23:04:56] greengriminal: has joined #RubyOnRails
[23:04:58] jhack: has joined #RubyOnRails
[23:07:04] centrx: mwlang, Yeah I was going to suggest that 16 hours ago, but I was stuffing my face with cookies
[23:07:34] mwlang: centrx: lordy. I???m gonna go stuff my belly with beer
[23:07:44] aamax: has joined #RubyOnRails
[23:08:40] aamax: I'm having trouble sending mail using ActionMailer in a rails api. the mail preview works but when I try to send it using curl it can't find the template. I've put the mail template in a number of places but still can't find it.
[23:08:56] benlieb: has joined #RubyOnRails
[23:08:57] aamax: could it be that the request is coming in as json and that is messing it up?
[23:09:40] mwlang: aamax: the development.log should tell you exactly which template file it???s attempting to open.
[23:11:03] Mia: has joined #RubyOnRails
[23:11:03] Mia: has joined #RubyOnRails
[23:11:46] rickmasta: has joined #RubyOnRails
[23:12:05] aamax: mwlang, the file referenced is there... although it's html.erb.... the formats value in the error is: {:json}... I'm a bit baffled
[23:12:26] Guest23796: has joined #RubyOnRails
[23:12:45] aamax: mwlang, I've tried moving it out of my api and into the general app but that gets the same error....
[23:13:31] eggoez: has joined #RubyOnRails
[23:13:46] r_baron: has joined #RubyOnRails
[23:13:59] r_baron: has joined #RubyOnRails
[23:14:08] aamax: mwlang, the email I'm trying to send gets output to the console and dev log as well... so at some level it's finding the template... ???
[23:15:09] mwlang: aamax: gist your errors and code.
[23:15:27] mwlang: can???t really answer without details.
[23:16:11] ellisTAA: has joined #RubyOnRails
[23:20:39] MarqueI: has joined #RubyOnRails
[23:21:26] flori: has joined #RubyOnRails
[23:21:42] Killerkeksdose_: has joined #RubyOnRails
[23:21:55] Marquel: has joined #RubyOnRails
[23:24:10] aamax: mwlang, the gist is at: https://gist.github.com/aamax/c7c4a3098a4009e7c357 I've sanitized it a little but that's the gist :)
[23:24:36] aamax: mwlang, let me know if I left anything out....
[23:25:44] Radar: GOOD MORNING
[23:25:54] aamax: morning Radar
[23:26:04] aamax: been a long time.
[23:26:13] Radar: I am chirpy++ this morning. BRING IT.
[23:26:19] speaking1ode: has joined #RubyOnRails
[23:26:40] Radar: aamax: Confirm that your issue is because it's using json as the request format.
[23:26:54] mwlang: Radar: ???VEEEEEITNAMMMM!
[23:27:19] aamax: Radar, I don't know. I've never tried to do this from an api before.
[23:27:31] jesterfraud: has joined #RubyOnRails
[23:27:53] aamax: Radar, I was thinking that that might be the issue - but I'm not sure. nor do I know how to tell at this point
[23:28:13] Radar: How are you triggering the request in the first place?
[23:28:31] aamax: I've tried a number of curls. I'll add that to the gist. just a sec
[23:30:56] ellisTAA: has joined #RubyOnRails
[23:31:43] aamax: Radar, I've updated the gist with the curls
[23:33:18] Radar: aamax: Do you have an Api::V1::ApplicationController?
[23:33:38] aamax: Radar, no.
[23:33:46] Radar: hm, I am not sure then. Sorry!
[23:34:39] aamax: Radar, thanks for looking. It's one of those things where I think I'm on the edge of having it work. the test preview works fine and the console is getting the html just fine.
[23:36:47] ruurd: has joined #RubyOnRails
[23:36:58] s2013: has joined #RubyOnRails
[23:37:02] mwlang: aamax: I???m not sure, but this filter may be your real culprit: before_filter :allow_only_html_requests
[23:37:43] mwlang: file-errors Line #161 seems to indicate mime type restriction error.
[23:38:08] baweaver: has joined #RubyOnRails
[23:38:38] baweaver: has joined #RubyOnRails
[23:38:40] mwlang: and two valid places for the template to reside is api/v1/vendors/send_vendor_list, application/send_vendor_list
[23:39:26] vmarcetic: has joined #RubyOnRails
[23:39:28] Radar: mwlang: The template does reside there, just not in a format that matches the request.
[23:39:35] aamax: mwlang, Radar I messed up. That is from the regular vendors controller (not the api one). I updated it to have the api code...
[23:39:41] mwlang: aamax: I think what you have happening is the mail template is actually processing just fine, but the render is what???s failing.
[23:40:30] aamax: mwlang, both of those locations you posted should be under the views dir right?
[23:41:05] mwlang: aamax: yeah, that???s the wrong tree for the barkin???
[23:41:07] aamax: api/v1/vendors/send_vendor_list.html.erb is the path that I have in play (I also have copies in some other spots to try and track this down
[23:41:19] mwlang: It???s like 21 of vendor_controller that is suspect. ???{result: "success"}"
[23:41:53] siempref_: has joined #RubyOnRails
[23:42:13] aamax: mwlang, yeah, that was a dumb line.
[23:42:33] Aeyrix: yaaaaaaaas
[23:42:35] aamax: mwlang, still getting the same error though
[23:42:53] mwlang: I think you need an explicit: render json: ???.
[23:43:21] eggoez: has joined #RubyOnRails
[23:43:24] mwlang: Aeyrix: is that like googling yourself? :-o
[23:43:35] Aeyrix: mwlang: I was fixing a bug in that function yesterday.
[23:43:39] Aeyrix: It's been deployed. :>
[23:43:55] mwlang: Aeyrix: ah.
[23:45:09] aamax: mwlang, I think that may have gotten it! THANKS!
[23:45:20] mwlang: aamax: good.
[23:45:35] Ropeney: has joined #RubyOnRails
[23:45:45] aamax: haven't gotten the mail yet but it's passed that point. I knew it was something simple and stupid
[23:46:06] mwlang: aamax: if you???re in development mode, you might not get the email.
[23:46:31] mwlang: the default environments don???t actually send the email for development and test, but does for production
[23:46:57] Vols: has joined #RubyOnRails
[23:48:12] aamax: I added a config to the dev config. we'll see. thanks for the extra eyes.
[23:52:04] bungoman_: has joined #RubyOnRails