« Back to channel list

#RubyOnRails - 20 August 2015

« Back 1 day Forward 1 day »
[00:00:00] hfifty: has joined #RubyOnRails
[00:00:25] dideler34: has joined #RubyOnRails
[00:01:28] a1fa: Radar: i basically did <%= cars.car_score.name if ! car.car_score_id.nil? %>
[00:01:31] a1fa: that worked
[00:01:46] Radar: a1fa: <%= car.car_score.try(:name) %> is a shorter way of writing that code.
[00:01:51] Radar: skyjumper: Maybe on a Raspberry Pi...
[00:01:53] moei: has joined #RubyOnRails
[00:01:56] a1fa: wow ;) cool
[00:02:24] drale2k: has joined #RubyOnRails
[00:02:52] a1fa: Thanks Radar
[00:03:48] blackmesa: has joined #RubyOnRails
[00:07:01] mary5030: has joined #RubyOnRails
[00:07:14] gilest: has joined #RubyOnRails
[00:07:16] bePolite: has joined #RubyOnRails
[00:09:04] RubyRonin: has left #RubyOnRails: ()
[00:09:34] JFlash: has joined #RubyOnRails
[00:09:58] rakm: has joined #RubyOnRails
[00:10:06] barhum2013: has joined #RubyOnRails
[00:14:01] nya: has joined #RubyOnRails
[00:14:26] IceyEC: has joined #RubyOnRails
[00:15:16] jtthedev: has joined #RubyOnRails
[00:17:12] jtthedev: can someone help me out with namespaces issues. I have a namespace in routes.rb, within that namespace i specify 1 resouce... the controller that this resources has 2 methods.. however, when i do a rake routes.. i see a route for "show" which I have not specified anywhere... Why is this happening? does me specifying a resource automaticcaly create that route for me ?
[00:17:20] bmurt: has joined #RubyOnRails
[00:17:32] iloverubynoob: has joined #RubyOnRails
[00:17:52] bePolite: has joined #RubyOnRails
[00:19:32] bePolite: has joined #RubyOnRails
[00:24:37] bronson: has joined #RubyOnRails
[00:24:46] superlou: has joined #RubyOnRails
[00:26:29] givanse_: has joined #RubyOnRails
[00:26:32] bongespob: has joined #RubyOnRails
[00:27:49] roolo: has joined #RubyOnRails
[00:27:55] Ropeney: has joined #RubyOnRails
[00:28:26] quazimodo: has joined #RubyOnRails
[00:31:10] hotpancakes: has joined #RubyOnRails
[00:37:24] bongespob: has left #RubyOnRails: ()
[00:38:19] sevenseacat: has joined #RubyOnRails
[00:38:32] northfurr: has joined #RubyOnRails
[00:38:59] Lightsword: has joined #RubyOnRails
[00:42:10] Radar: jtthedev: !rule14
[00:42:10] helpa: jtthedev: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[00:42:14] Radar: Rule 14 SO HARD.
[00:42:45] JFlash: try rule 15
[00:43:16] helpa: Don't piss off Radar.
[00:43:58] sevenseacat: also quite hard.
[00:44:54] user121212: has joined #RubyOnRails
[00:46:52] craigphares: has joined #RubyOnRails
[00:47:01] user121212: I have a column name countries, Can I delete the all data in it by using destroy_all method from rails console?
[00:47:10] Radar: user121212: !try
[00:47:10] helpa: user121212: Why don't you try it and find out for yourself?
[00:47:10] elv: has joined #RubyOnRails
[00:47:31] user121212: *named 'countries'
[00:47:42] paulcsmith: has joined #RubyOnRails
[00:48:00] Radar: wouldn't it be a TABLE named countries?
[00:48:23] lethan: has joined #RubyOnRails
[00:48:32] user121212: Radar: I tried, But it shows something like this. "NameError: undefined local variable or method `countries' for main:Object"
[00:48:47] chouhoul_: has joined #RubyOnRails
[00:48:55] Radar: user121212: code plz
[00:48:59] Radar: user121212: Show us exactly what you tryped
[00:49:18] user121212: countries.destroy_all
[00:49:28] sevenseacat: or a model named Country? >_>
[00:49:33] charliesome: has joined #RubyOnRails
[00:49:41] Radar: user121212: Show us the model please.
[00:51:03] hmsimha_: has joined #RubyOnRails
[00:52:59] Radar: user121212: *taps keyboard* is this thing still on?
[00:53:00] Radar: user121212: !gist
[00:53:00] helpa: user121212: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[00:53:25] jenrzzz: has joined #RubyOnRails
[00:54:14] techsethi: has joined #RubyOnRails
[00:54:17] user121212: Radar: wait a sec, this is a spreecommerce project.
[00:54:30] Radar: user121212: So it's probably a model called Spree::Country.
[00:54:37] Radar: Spree::Country.delete_all
[00:55:18] user121212: Radar: I forgot about that spree namespace, thank you :)
[00:57:13] barhum2013: Anyway to mock the timestamp for mysql within an rspec test?
[00:57:18] jeadr: has joined #RubyOnRails
[00:57:40] Radar: barhum2013: Why?
[00:58:01] Radar: ACTION really enjoys the "I have a solution to my question already, please tell me how I can smush it into my app"
[00:58:16] sevenseacat: I sense the sarcasm coming off you in waves.
[00:58:17] Radar: Means that I get to teach someone something :D
[00:58:48] Radar: barhum2013: You _probably_ want to use a gem like Timecop, but it'd be nice to see what you're trying to do before, again suggesting another solution which might not fit the problem.
[00:58:51] barhum2013: Radar: A senior dev wrote a raw sql query using now() within the query
[00:59:06] Radar: barhum2013: Gist the query?
[00:59:29] barhum2013: where cus.insert_date_utc > date_format(now(), '%Y-%m-01 04:00')
[00:59:49] barhum2013: I am using time-warp but it does not work for queries
[01:00:37] sevenseacat: 'stuff this month in utc +4' ?
[01:01:33] Radar: barhum2013: Full context of this query please. I need to know if it's done using AR or if it's a find_by_sql jobbo
[01:01:52] Radar: sevenseacat: I think it's just UTC
[01:02:05] barhum2013: https://gist.github.com/anonymous/0c8cdee9dc9000361a6f
[01:02:07] Limix: has joined #RubyOnRails
[01:02:14] northfurr: has joined #RubyOnRails
[01:02:16] Radar: ok, connection.execute is fine
[01:02:17] sevenseacat: ACTION not touching that
[01:02:18] barhum2013: ActiveRecord::Base.connection.execute
[01:03:04] Radar: barhum2013: Please try this: https://gist.github.com/radar/ab9ed642620d0b418748
[01:03:57] barhum2013: Radar: Should I use interpolation in a query like this?
[01:04:07] Radar: barhum2013: You're not interpolating user input, so it's fine.
[01:05:20] barhum2013: Radar: I think it might work. Thanks a lot!
[01:05:42] wethu: has joined #RubyOnRails
[01:05:55] quazimodo: has joined #RubyOnRails
[01:06:06] charliesome: has joined #RubyOnRails
[01:11:13] atomical: has joined #RubyOnRails
[01:12:30] havenwood: has joined #RubyOnRails
[01:13:27] Creeves: has joined #RubyOnRails
[01:14:01] NBarnes: has joined #RubyOnRails
[01:15:04] p1k: has joined #RubyOnRails
[01:16:55] Rubie: has joined #RubyOnRails
[01:16:59] twilling: has joined #RubyOnRails
[01:17:38] mary5030: has joined #RubyOnRails
[01:18:18] iloverubynoob: has joined #RubyOnRails
[01:20:11] hotpancakes: has joined #RubyOnRails
[01:20:22] greengriminal: has joined #RubyOnRails
[01:20:52] blackmesa: has joined #RubyOnRails
[01:21:14] workmad3: has joined #RubyOnRails
[01:25:32] bronson: has joined #RubyOnRails
[01:25:52] EminenceHC: has joined #RubyOnRails
[01:28:28] annlewis: has joined #RubyOnRails
[01:33:53] ledestin: has joined #RubyOnRails
[01:35:40] bmurt: has joined #RubyOnRails
[01:37:13] jacaballero: Hey guys, I'm building an Rails App with Koudoku gem, I'm receiving this error "Blocked a frame with origin "https://js.stripe.com" from accessing a frame with origin "https://cloud.stroom.us". Protocols, domains, and ports must match." I already added this in the header: "response.headers['Access-Control-Allow-Origin'] = '*'"
[01:37:16] jtthedev: If I have a route that comes up as "roadnet_order_orders_update_multiple" when i do rake routes.... would the correct way of calling that route on a form_tag be "roadnet_order_orders_update_multiple_path" ??? i am trying this, but I am being given an error "No route matches {:action=>"filtered_index", :controller=>"roadnet/orders"} missing required keys: [:order_id]"... my filtered_index method isn't joining a table, don't understand why it's looki
[01:37:27] Radar: jtthedev: !rule14
[01:37:27] helpa: jtthedev: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[01:37:39] northfurr: has joined #RubyOnRails
[01:38:40] jtthedev: Radar: i will create a pastie... 1 minute please..
[01:40:25] hahuang61: has joined #RubyOnRails
[01:40:50] ivanskie: has joined #RubyOnRails
[01:40:58] greengriminal: has joined #RubyOnRails
[01:41:06] bruno-: has joined #RubyOnRails
[01:41:59] one_zero: has joined #RubyOnRails
[01:42:19] northfurr: has joined #RubyOnRails
[01:43:58] jtthedev: Radar: http://pastie.org/10362946
[01:43:59] techsethi: has joined #RubyOnRails
[01:44:00] rhizome: jacaballero: there are a variety of hacks and workarounds for cross-domain iframe issues, but generally what you are seeing is by design.
[01:44:18] jtthedev: has all the relevant information for my issues, including routes, views, models, controllers
[01:44:27] jtthedev: and stack trace output
[01:44:45] Radar: Wow a neatly formatted pastie. Coloured me surprised.
[01:45:12] Radar: jtthedev: Your routes nested inside orders should be defined as either collection or member routes.
[01:45:15] Radar: jtthedev: !routing
[01:45:15] helpa: jtthedev: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[01:45:42] rhizome: "miltiple"
[01:47:13] hightower4: has joined #RubyOnRails
[01:49:40] Duckily: has joined #RubyOnRails
[01:49:54] drale2k: has joined #RubyOnRails
[01:50:31] jtthedev: Radar: i tried as a collection and a member, and in each instance, it's asking me to provide an order_id for the method... this method does not require one for what I am trying to achieve
[01:50:51] jtthedev: can i define the routes outside of a namespace ?
[01:50:51] rhizome: collection do
[01:51:33] Radar: jtthedev: Show me how you tried with the collection routes.
[01:51:45] hahuang61: has joined #RubyOnRails
[01:52:05] Radar: All of those routes in routes.rb should be inside a collection block which is inside the orders resources block which is inside the roadnet namespace block which is inside the Rails.application.routes.draw do block
[01:52:14] Radar: See how explaining code with words is really damn hard?
[01:52:21] jtthedev: http://pastie.org/10362957
[01:52:44] Radar: jtthedev: Please look at the docs again for collection. You should be defining the routes as post :edit_multiple'
[01:52:47] Radar: without the '
[01:54:34] jtthedev: I have this code working independantly on a seprate project where I didn't have to use a namespace.. after working on moving it to this app and using namespaces to keep things organized, it's getting more difficult to maintain simply because this is a new territory for me
[01:54:52] Radar: Please try what I suggested :)
[01:55:05] Radar: The "post :edit_multiple" way is the right way to do it.
[01:55:16] Radar: ACTION wrote the routing documentation for api.rubyonrails.org.
[01:55:31] Radar: Mike Gunderloy wrote the routing guide and it is _almost_ perfect
[01:55:39] bricker: has joined #RubyOnRails
[01:55:46] jtthedev: I get that, but edit_multiples isn't even relevant for this problem right now. my view is not calling that method at all
[01:55:49] Radar: That's the kind of guide that I would love to have for, say, elasticsearch
[01:55:59] Radar: jtthedev: But is it calling one of the other routes?
[01:56:08] Radar: ActionController::UrlGenerationError - No route matches {:action=>"filtered_index", :controller=>"roadnet/orders"} missing required keys: [:order_id]:
[01:56:11] Radar: Oh look, yes it is!
[01:56:22] Radar: Soooo maybe put them ALL inside a collection block and use the syntax as I suggested?
[01:56:24] daniellutz: has joined #RubyOnRails
[01:56:27] Radar: Did you try it yet?
[01:56:31] jtthedev: working on it
[01:58:38] MAQ: has joined #RubyOnRails
[02:01:21] RegulationD: has joined #RubyOnRails
[02:03:31] BongoShaftsbury: has joined #RubyOnRails
[02:04:36] IceyEC: has joined #RubyOnRails
[02:09:09] Altonymous: has joined #RubyOnRails
[02:09:40] darwingr: has joined #RubyOnRails
[02:10:23] jtthedev: Radar: would this be the correct way ? http://pastie.org/10362973 my apologies in advanced for not being anywhere fluent as you. I know such a low level route question may aggravate you
[02:12:55] StartupHub: has joined #RubyOnRails
[02:12:57] teegee543: has joined #RubyOnRails
[02:15:59] roolo: has joined #RubyOnRails
[02:19:03] iloverubynoob: has joined #RubyOnRails
[02:21:31] milesforrest: has joined #RubyOnRails
[02:23:07] blackmesa: has joined #RubyOnRails
[02:24:38] barhum2013: has joined #RubyOnRails
[02:27:43] nya: has joined #RubyOnRails
[02:29:15] annlewis: has joined #RubyOnRails
[02:29:57] fighella: has joined #RubyOnRails
[02:31:14] bap1313: has joined #RubyOnRails
[02:31:29] Creeves: has joined #RubyOnRails
[02:33:11] pulgalipe: has joined #RubyOnRails
[02:34:57] jenrzzz: has joined #RubyOnRails
[02:37:55] charliesome: has joined #RubyOnRails
[02:39:05] annlewis: has joined #RubyOnRails
[02:39:19] smathy: has joined #RubyOnRails
[02:39:24] chouhoulis: has joined #RubyOnRails
[02:40:17] chouhoulis: has joined #RubyOnRails
[02:41:25] bronson: has joined #RubyOnRails
[02:41:26] VeryBewitching: jtthedev: get :filted_index I'm assuming should be get :filtered_index ?
[02:41:46] x-light: has joined #RubyOnRails
[02:42:24] nahtnam: has joined #RubyOnRails
[02:43:10] nahtnam: Is there a "email changed" method for devise I can use that lets me know if the users email changed? For some reason devise isnt sending out confirmation emails so it looks like I have to implement something for it
[02:43:28] choke: has joined #RubyOnRails
[02:44:02] VeryBewitching: nahtnam: You have to configure Devise to do that.
[02:44:28] baweaver: has joined #RubyOnRails
[02:46:27] nahtnam: VeryBewitching: Configure devise to do what?
[02:46:29] VeryBewitching: nahtnam: https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users
[02:46:30] nahtnam: Have a mehtod
[02:46:49] VeryBewitching: You need to add :reconfirmable I think
[02:48:11] nahtnam: VeryBewitching: Oh ok, so I have def confirmation_required? false end set because I want to allow people to access the site without confirming their email
[02:48:29] nahtnam: but it looks like I should be settings config.allow_unconfirmed_access_for = 2.days instead
[02:48:47] nahtnam: lol can I do infinity.days? :P
[02:49:03] VeryBewitching: nahtnam: I played with Devise on my first three projects and have kind of abandoned it for the time being. I know it can be configured though
[02:49:14] sevenseacat: in future, try to avoid blaming devise when you've done exactly zero research into the problem
[02:50:21] VeryBewitching: nahtnam: Look at the migration devise generates, one of the fields is used to confirm a password change; your table must have that field, so if you've commented it out you'll have to create another migration for it.
[02:50:39] rogue_koder: has joined #RubyOnRails
[02:51:03] drale2k: has joined #RubyOnRails
[02:51:17] choke: has joined #RubyOnRails
[02:51:38] darrencauthon: has joined #RubyOnRails
[02:52:27] nahtnam: VeryBewitching: Yep, just missed the config setting
[02:54:47] zeitue: has joined #RubyOnRails
[02:57:11] michael_mbp: has joined #RubyOnRails
[02:59:33] paulcsmith: has joined #RubyOnRails
[03:01:19] greengriminal: has joined #RubyOnRails
[03:06:09] nahtnam: Eh, devise still isnt sending out confirmation email when I call `current_user.update_without_password(:email => params[:user][:email])` Here is my model if anyone wants to take a look at it. https://gist.github.com/nahtnam/9e8cb30ec92ee961c7b6
[03:07:41] nahtnam: And yes, i confirmed my smtp settings are correct
[03:08:05] sevenseacat: and what do your logs say?
[03:08:11] nahtnam: Updated gist with devies initializer
[03:08:36] nahtnam: Updated the gist
[03:08:42] eduerondu: has joined #RubyOnRails
[03:09:37] sevenseacat: restarted your server/spring/etc. after changing your config?
[03:10:00] workmad3: has joined #RubyOnRails
[03:11:05] EminenceHC: has joined #RubyOnRails
[03:11:24] braincrash: has joined #RubyOnRails
[03:12:56] sevenseacat: can we see the controller?
[03:14:53] bricker: nahtnam: have you ever successfully sent an e-mail using those SMTP settings?
[03:14:54] nahtnam: Updated the gist
[03:14:59] nahtnam: bricker: Yes
[03:15:05] nahtnam: plenty of times (manutally)
[03:15:42] Limix: has joined #RubyOnRails
[03:16:42] mecchio: has joined #RubyOnRails
[03:16:48] Limix: has joined #RubyOnRails
[03:16:50] sevenseacat: do you have mail deliveries enabled for development?
[03:17:31] pontiki: maybe the question is: have you done any deliveries with those settings from your app?
[03:19:36] nahtnam: I just ran `current_user.send_confirmation_instructions`
[03:19:39] nahtnam: and it worked
[03:19:50] iloverubynoob: has joined #RubyOnRails
[03:21:16] bronson: has joined #RubyOnRails
[03:26:44] erich: has joined #RubyOnRails
[03:30:02] riskish: has joined #RubyOnRails
[03:30:31] nahtnam: My current solution is to just check if the params email is equal to email or unconfirmed_email, and if it isnt, then send confirmation email
[03:30:35] nahtnam: but thats pretty janky
[03:31:11] MAQ: has joined #RubyOnRails
[03:31:54] earthquake: has joined #RubyOnRails
[03:34:37] jacaballero: has joined #RubyOnRails
[03:36:16] framling: has joined #RubyOnRails
[03:37:11] No1Phan: has joined #RubyOnRails
[03:37:12] nahtnam: Is there a email_changed? call back or something?
[03:38:07] No1Phan: has joined #RubyOnRails
[03:38:49] havenwood: has joined #RubyOnRails
[03:39:50] fighella: has joined #RubyOnRails
[03:40:32] pontiki: you could certainly write one triggering on before_save
[03:40:47] pontiki: it's your model, after all
[03:41:22] j_mcnally: has joined #RubyOnRails
[03:47:03] charliesome: has joined #RubyOnRails
[03:47:21] elv: has joined #RubyOnRails
[03:48:19] jzig: has joined #RubyOnRails
[03:48:50] sarink: has joined #RubyOnRails
[03:51:29] VeryBewitching: nahtnam: You should be asking for the parameter :unconfirmed_email in the form if they want to change it, then after save do a mailer if that field was updated.
[03:51:50] VeryBewitching: Since it's the column it's going into anyway.
[03:51:55] nahtnam: VeryBewitching: Its supposed to be email (i think)
[03:52:00] nahtnam: devise does the unconfirmed part
[03:52:05] nahtnam: if email is already set
[03:52:06] drale2k: has joined #RubyOnRails
[03:52:10] nahtnam: it puts it in the unconfirmed_email
[03:52:13] Limix: has joined #RubyOnRails
[03:53:39] VeryBewitching: Doesn't Devise all you to configure a mail to be sent when that happens anyway?
[03:54:01] JamesDH: has joined #RubyOnRails
[03:54:32] hmsimha_: has joined #RubyOnRails
[03:55:57] sarink: has joined #RubyOnRails
[03:59:26] gokulnath: has joined #RubyOnRails
[04:00:54] nahtnam: VeryBewitching: The view?
[04:01:18] greengriminal: has joined #RubyOnRails
[04:01:21] nahtnam: I dont think there is an option
[04:01:31] nahtnam: it usually automatically does on save/update
[04:02:00] nahtnam: VeryBewitching: Isnt that set in the initailizer, not model?
[04:02:16] nahtnam: `const_get': uninitialized constant Devise::Models::Reconfirmable (NameError)
[04:02:34] arooni-mobile: has joined #RubyOnRails
[04:02:55] VeryBewitching: config.reconfirmable, it's the key ;)
[04:03:51] VeryBewitching: So you try to change a password and Devise does nothing?
[04:04:05] roolo: has joined #RubyOnRails
[04:04:25] nahtnam: Not change password
[04:04:28] nahtnam: Change email
[04:04:35] nahtnam: Im gonna downgrade one version
[04:04:43] nahtnam: and see what happens
[04:05:05] VeryBewitching: nahtnam: err.., ya, I meant email
[04:05:12] nahtnam: Yes, no email
[04:05:20] Obfuscate: I'm attempting to make a simple user registration form which takes an email_address and password, creates/saves an Email, and then (if successful) creates the User with the email_id and password.
[04:05:49] nahtnam: Downgrading didnt help
[04:05:49] Obfuscate: What's a sane way to implement that sort of workflow using activerecord/formbuilder?
[04:06:00] nahtnam: Obfuscate: Devise?
[04:06:34] Obfuscate: Even if I used Devise for this, I'd really like to know how to accomplish something this basic with rails.
[04:07:06] VeryBewitching: nahtnam: Look at this: http://itquestionz.com/questions/2673742/how-to-send-two-different-emails-for-devise-confirmable-and-devise-reconfirmable
[04:07:07] nahtnam: http://railscasts.com/episodes/250-authentication-from-scratch
[04:08:08] VeryBewitching: Obfuscate: You can do it fast, reasonably, but probably not air-tight.
[04:08:12] jeanlinux: has joined #RubyOnRails
[04:08:52] corioliss: has joined #RubyOnRails
[04:09:00] Obfuscate: nahtnam: My confusion isn't with the authentication itself. I'm wondering how to have a form which accepts parameters for both Email and User objects (and perhaps others), and then creates the Email object that will be owned by the User before creating that User (or at least rolling back safely on failure).
[04:09:19] VeryBewitching: Obfuscate: Oh, have you read through the guides yet?
[04:09:29] helpa: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[04:09:55] Obfuscate: I've been reading through them, but can't figure out how to do this particular task.
[04:10:29] sevenseacat: I still think it's spring/server related.
[04:10:41] VeryBewitching: Obfuscate: If you go through all of them and not have at least half of the answer about how that would work, you should go over them again.
[04:10:59] sevenseacat: VeryBewitching: thats not helpful.
[04:11:08] sevenseacat: Obfuscate: you probably want to look up nested model forms.
[04:11:19] sevenseacat: so you can have a form_for a user, then the user has_many emails or something.
[04:11:57] Obfuscate: sevenseacat: Thank you, I'll look over those again.
[04:12:18] nahtnam: I cant decode what this line means: https://github.com/lynndylanhurley/devise_token_auth/blob/master/app/controllers/devise_token_auth/registrations_controller.rb#L97 What is resource?
[04:12:37] sevenseacat: nahtnam: the user (or other model that is hooked up to devise).
[04:13:46] hmsimha_: has joined #RubyOnRails
[04:16:30] Maletor: has joined #RubyOnRails
[04:17:02] choke: has joined #RubyOnRails
[04:18:01] snockerton: has joined #RubyOnRails
[04:20:34] iloverubynoob: has joined #RubyOnRails
[04:20:49] charliesome: has joined #RubyOnRails
[04:22:07] bronson: has joined #RubyOnRails
[04:23:04] jeanlinux: has joined #RubyOnRails
[04:29:04] nahtnam: I cant do an after save hook either
[04:29:11] nahtnam: because I constatnly update things like the token
[04:30:20] snockerton: has left #RubyOnRails: ()
[04:32:18] srinidhi: has joined #RubyOnRails
[04:32:41] p1k: has joined #RubyOnRails
[04:32:52] sarink: has joined #RubyOnRails
[04:33:51] nahtnam: I think im just gonna implement it in the controller
[04:34:13] happydad: has joined #RubyOnRails
[04:35:27] Obfuscate: sevenseacat: The nested forms mention led me to a good solution. Thanks again.
[04:40:32] sarink: has joined #RubyOnRails
[04:43:15] Lightsword: has joined #RubyOnRails
[04:43:39] badmadrad: has joined #RubyOnRails
[04:43:40] kies: has joined #RubyOnRails
[04:45:41] michael_mbp: has joined #RubyOnRails
[04:45:47] errakeshpd: has joined #RubyOnRails
[04:48:00] lxsameer: has joined #RubyOnRails
[04:48:20] VeryBewitching: sevenseacat: Can I msg you?
[04:49:35] moneylotion: has joined #RubyOnRails
[04:53:39] drale2k: has joined #RubyOnRails
[04:58:45] workmad3: has joined #RubyOnRails
[04:59:55] j_mcnally: has joined #RubyOnRails
[05:04:07] badmadrad1: has joined #RubyOnRails
[05:06:13] urkle: has joined #RubyOnRails
[05:06:20] CheckYourSix: has joined #RubyOnRails
[05:08:13] Lightsword: has joined #RubyOnRails
[05:09:20] jeanlinux: has joined #RubyOnRails
[05:13:58] pgatt: has joined #RubyOnRails
[05:14:15] charliesome: has joined #RubyOnRails
[05:14:57] bePolite: has joined #RubyOnRails
[05:15:02] User458764: has joined #RubyOnRails
[05:16:01] techsethi: has joined #RubyOnRails
[05:16:05] riotjones: has joined #RubyOnRails
[05:19:17] annlewis: has joined #RubyOnRails
[05:21:20] iloverubynoob: has joined #RubyOnRails
[05:22:07] baash05: has joined #RubyOnRails
[05:22:14] urkle: has joined #RubyOnRails
[05:22:20] nya: has joined #RubyOnRails
[05:22:22] Radar: hi baash05
[05:22:28] baash05: I've got an interesting error..
[05:22:30] baash05: ActionController::ParameterMissing
[05:22:52] baash05: This is not what I was expecting..
[05:23:05] sevenseacat: whats so interesting about it?
[05:23:14] baash05: Well I was expecting a 422 error.
[05:23:33] baash05: but this throws an exception in my app if the user of the api forgets a param
[05:23:40] sevenseacat: i wouldnt - its a bad request
[05:23:43] baash05: which does him no good.
[05:23:51] baash05: so he gets no error.
[05:24:08] EminenceHC: has joined #RubyOnRails
[05:24:15] baash05: Am I wrong in that?
[05:24:22] sevenseacat: i dont think its a 500
[05:24:24] baash05: It is an exception right
[05:24:52] baash05: and that means my app would post a bugsnag and bail
[05:25:11] baash05: it 'should 422 if retailer_id missing' do
[05:25:12] baash05: get :index
[05:25:12] baash05: expect(response.status).to eq 422
[05:25:12] baash05: binding.pry
[05:25:16] baash05: Sorry for the paste.
[05:25:33] rakm: has joined #RubyOnRails
[05:25:40] baash05: I never get to the expect.. the test bails before the expect is reached.
[05:25:59] sevenseacat: correct, because you're raising an exception and not catching it
[05:26:15] nyaa: has joined #RubyOnRails
[05:26:21] darrencauthon: has joined #RubyOnRails
[05:26:43] baash05: So all params.require(:retailer_id) have to be exception handled?
[05:26:57] nyaa: has joined #RubyOnRails
[05:27:19] baash05: so that we can send something back to the user?
[05:27:25] j_mcnally: has joined #RubyOnRails
[05:27:26] sevenseacat: it would make sense to have a global exception handler for that error, I think
[05:27:43] baash05: Ha ha haaa.. that is so funny
[05:27:44] Duckily: has joined #RubyOnRails
[05:28:47] baash05: well global exception handlers to me are a dreadful design flaw.
[05:29:14] baash05: I'll do it. but wow that's a bad decision... that we all have to do it.
[05:29:16] sevenseacat: we might mean different things here.
[05:29:47] sevenseacat: well we all might decide to handle the error different ways
[05:29:59] sevenseacat: if you're doing any kind of authorization checking, you're already doing it
[05:34:13] baash05: How would you accomplish this in a before_action?
[05:34:25] baash05: would you put the exception handling in the method?
[05:35:55] sudonym4: has joined #RubyOnRails
[05:35:59] sevenseacat: something just like this https://github.com/rubysherpas/r4ia_examples/blob/master/ticketee/app/controllers/application_controller.rb#L13-L19
[05:36:33] sudonym4: has left #RubyOnRails: ()
[05:36:44] sevenseacat: I don't think a before_action is the place for requiring/permitting params so I wouldnt be calling it from there
[05:38:56] tagrudev: has joined #RubyOnRails
[05:39:40] chrissonar: has joined #RubyOnRails
[05:41:14] nya: has joined #RubyOnRails
[05:41:51] nya: has joined #RubyOnRails
[05:42:58] nyaa: has joined #RubyOnRails
[05:45:00] rvanlieshout: has joined #RubyOnRails
[05:45:41] riotjones: has joined #RubyOnRails
[05:46:41] aganov: has joined #RubyOnRails
[05:46:55] baash05: Why not in the before_action? I authenticate that a user can do an action.. In this case based on if they belong to a retailer
[05:51:06] BongoShaftsbury: has joined #RubyOnRails
[05:51:09] Rubie: has joined #RubyOnRails
[05:52:13] roolo: has joined #RubyOnRails
[05:52:37] jeadre: has joined #RubyOnRails
[05:55:04] cgfbotr: has joined #RubyOnRails
[05:55:57] baash05: Oh.. sevenseacat: thanks for that link, I found a bit in our code (different controller) that did the same thing.. Best to copy from others :)
[05:59:04] dhjondoh: has joined #RubyOnRails
[06:00:40] bePolite: has joined #RubyOnRails
[06:04:15] towski_: has joined #RubyOnRails
[06:04:17] rails663: has joined #RubyOnRails
[06:06:54] cornerma1: has joined #RubyOnRails
[06:09:21] JoshGlzBrk: has joined #RubyOnRails
[06:10:39] swept: has joined #RubyOnRails
[06:13:25] Sylario: has joined #RubyOnRails
[06:14:22] elv: has joined #RubyOnRails
[06:14:49] nya: has joined #RubyOnRails
[06:17:50] cgfbee: has joined #RubyOnRails
[06:17:55] jgt1: has joined #RubyOnRails
[06:20:02] yardenbar: has joined #RubyOnRails
[06:20:05] annlewis: has joined #RubyOnRails
[06:22:14] eGGsha: has joined #RubyOnRails
[06:23:05] bronson: has joined #RubyOnRails
[06:23:15] rails663: has joined #RubyOnRails
[06:27:02] aderium: has joined #RubyOnRails
[06:27:28] darrencauthon: has joined #RubyOnRails
[06:27:52] roolo: has joined #RubyOnRails
[06:30:42] nahtnam: 5 minute build times
[06:30:56] nahtnam: I figured out what was slowing my builds by 10 minutes
[06:31:42] nahtnam: Ember-cli was uglifying the JS, and then adding it to the asset pipeline. Rails would then try to uglify the already uglified js and it would get stuck there for a good 10 minutes
[06:31:56] darrik: has joined #RubyOnRails
[06:33:56] arup_r: has joined #RubyOnRails
[06:35:00] Radar: lol rails
[06:35:06] Radar: actually, lol sprockets
[06:35:54] Yarafan: has joined #RubyOnRails
[06:36:10] cgfbee: has joined #RubyOnRails
[06:36:41] michael_mbp: has joined #RubyOnRails
[06:36:42] comrad: has joined #RubyOnRails
[06:38:15] rails663: has joined #RubyOnRails
[06:38:16] MartinElvar: has joined #RubyOnRails
[06:38:27] Yarafan: has left #RubyOnRails: ()
[06:39:16] Macaveli: has joined #RubyOnRails
[06:39:20] nahtnam: Quote from the emberjs slack:
[06:39:22] nahtnam: "always blame sprockets - old saying"
[06:39:34] sevenseacat: its true most of the time.
[06:41:46] Radar: We moved to Webpack for our JS stuff and it is almost but not quite a billion times better than Sprockets.
[06:41:50] choke: has joined #RubyOnRails
[06:42:04] Yarafan: has joined #RubyOnRails
[06:42:24] nahtnam: I want to run an if statement before I run a certain command. If true, I want to run another command after the command, if false, just ignore. Is there a good way to do this or should I just create a variable and store true/false?
[06:42:33] nahtnam: If ^ doesnt make sense, Ill provide some code example
[06:42:48] Radar: nahtnam: !rule14
[06:42:48] helpa: nahtnam: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[06:43:33] errakeshpd: The fb sharer some times show the information from cache, what is the way to resolve it ?
[06:44:09] rails663: has joined #RubyOnRails
[06:44:32] nahtnam: https://gist.github.com/nahtnam/18adab6b2e08fa56bd71
[06:44:47] nahtnam: Is there a better way I can write this without using the variable new?
[06:46:06] puppeh: has joined #RubyOnRails
[06:46:08] rhizome: i added a comment
[06:46:13] nahtnam: rhizome: But that isnt the same. I am updating the email field
[06:46:33] nahtnam: and so it would return false even though the user is new
[06:46:35] puppeh: can somebody explain to me how the asset helpers find the digested assets in my public/assets/ folder and when?
[06:46:37] nahtnam: if that makes sense
[06:46:42] rhizome: it doesn't
[06:46:50] Radar: puppeh: when they've been precompiled
[06:47:29] puppeh: Radar: ok that I know, but where do the views know where to find the assets?
[06:47:33] workmad3: has joined #RubyOnRails
[06:47:41] puppeh: do they use the manifest-md5hash.json file?
[06:47:48] nahtnam: rhizome: ? the update_without_password updates the database, and so when you call current_user.email.present? it will return true instead of flase
[06:47:56] choke: has joined #RubyOnRails
[06:48:02] jensljungblad: has joined #RubyOnRails
[06:48:14] Radar: puppeh: Yes, sprockets-rails overrides the default image_tag and friends helpers to use Sprockets witchcraft to find those assets.
[06:48:34] rhizome: nahtnam: oh. current_user.reload.email.present?
[06:48:53] jensljungblad: has joined #RubyOnRails
[06:49:00] nahtnam: rhizome: Is there some docs on what reload does?
[06:49:23] rhizome: oh, nope, nevermind.
[06:49:37] Macaveli: has joined #RubyOnRails
[06:50:05] rhizome: use a callback. after_update :send_confirmation, if: :email_changed?
[06:50:18] Yarafan: has left #RubyOnRails: ()
[06:50:44] nahtnam: rhizome: Can i do if email_changed? or unconfirmed_emai_changed?
[06:50:57] nahtnam: IE can I add `||` in that?
[06:51:30] rhizome: if: :blah_blah?; def blah_blah?; foo || bar
[06:51:53] rhizome: compressed for convenience. don't write it like that.
[06:52:28] Yarafan: has joined #RubyOnRails
[06:53:02] Yarafan: has left #RubyOnRails: ()
[06:54:24] JoshGlzBrk: has joined #RubyOnRails
[07:00:22] yaw: has joined #RubyOnRails
[07:00:31] juanpaucar: has joined #RubyOnRails
[07:01:04] greenride: has joined #RubyOnRails
[07:02:39] juanpaucar: has joined #RubyOnRails
[07:04:01] AxonetBE: has joined #RubyOnRails
[07:04:03] artto: has joined #RubyOnRails
[07:04:39] renanoronfle: has joined #RubyOnRails
[07:04:46] sinkensabe: has joined #RubyOnRails
[07:04:55] juanpauc_: has joined #RubyOnRails
[07:05:00] sinkensabe: has joined #RubyOnRails
[07:06:00] nahtnam: rhizome: Almost works. Only problem is that a confirmation email is being sent when the email address is copied from the unconfirmed_email to the email address field
[07:06:04] nahtnam: Soooo close
[07:06:21] nahtnam: I guess i can just make an if statement
[07:06:28] bePolite: has joined #RubyOnRails
[07:06:31] rhizome: well, there's a lot i don't know about your code
[07:06:32] iloverubynoob: has joined #RubyOnRails
[07:07:14] juanpaucar: has joined #RubyOnRails
[07:09:05] blackmesa: has joined #RubyOnRails
[07:09:19] nahtnam: Was thinking out loud
[07:09:30] juanpaucar: has joined #RubyOnRails
[07:09:35] nahtnam: Thanks for your help rhizome I think I can figure it out from here
[07:10:24] zpe: has joined #RubyOnRails
[07:10:41] Meow-J: has joined #RubyOnRails
[07:10:55] linus1: has joined #RubyOnRails
[07:11:00] VeryBewitching: Can anyone suggest a way to prevent a host application from overriding the scopes defined for warden in an engine the host application has mounted?
[07:11:36] juanpaucar: has joined #RubyOnRails
[07:12:40] Radar: mount the engine using different scopes.
[07:13:25] VeryBewitching: Radar: I'm not sure I understand what you mean by that.
[07:13:32] Radar: VeryBewitching: application has scope user
[07:13:35] Radar: VeryBewitching: engine has scope user
[07:13:37] Radar: someone has to budge
[07:13:42] Radar: It should be the engine.
[07:13:48] juanpauc_: has joined #RubyOnRails
[07:15:05] jeadre: has joined #RubyOnRails
[07:15:43] duncannz: has joined #RubyOnRails
[07:16:05] juanpauc_: has joined #RubyOnRails
[07:16:14] linus1: has left #RubyOnRails: ()
[07:16:19] czerasz: has joined #RubyOnRails
[07:16:37] VeryBewitching: I guess I could configure scope_defaults with :namespace__scope as a pattern to name the scopes. Thanks Radar.
[07:17:18] xhosae: has joined #RubyOnRails
[07:17:58] Creeves: has joined #RubyOnRails
[07:18:19] krz: has joined #RubyOnRails
[07:18:22] juanpaucar: has joined #RubyOnRails
[07:18:30] lxsameer: folks I'm looking for a solution to extends the routes of "resources" dsl in an scope without changing routes.rb, what's you idea?
[07:18:44] atzorvas: has joined #RubyOnRails
[07:18:46] atzorvas: has joined #RubyOnRails
[07:18:48] Linuus: has joined #RubyOnRails
[07:18:50] Radar: lxsameer: !rule14
[07:18:50] helpa: lxsameer: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[07:18:53] iloverubynoob: has joined #RubyOnRails
[07:18:56] Linuus: has left #RubyOnRails: ()
[07:20:00] sevenseacat: that one's getting quite a workout lately.
[07:20:07] Radar: I'm considering making it Rule #0.
[07:20:14] helpa: Radar is the GodKing of #rubyonrails. Obey him and all shall go well.
[07:20:20] sevenseacat: ACTION raises eyebrow
[07:20:22] Radar: Move that one to !rule14 instead.
[07:20:31] helpa: Don't piss off Radar.
[07:20:38] Radar: It'd be neatly grouped there.
[07:20:38] juanpauc_: has joined #RubyOnRails
[07:20:42] sevenseacat: a very valid rule.
[07:21:02] Linuus: has joined #RubyOnRails
[07:21:06] Linuus: has left #RubyOnRails: ()
[07:21:08] annlewis: has joined #RubyOnRails
[07:22:00] Linuus: has joined #RubyOnRails
[07:22:34] blackmesa: has joined #RubyOnRails
[07:22:53] juanpaucar: has joined #RubyOnRails
[07:22:57] lxsameer: Radar: i don't have any code yet, I just wanted to know different ideas before getting to work
[07:23:18] Radar: lxsameer: We can't help you write the code unless we have an idea of what code needs to be written. Even a fake example might help in this instance.
[07:23:52] jgt1: has joined #RubyOnRails
[07:24:36] jensljungblad: has joined #RubyOnRails
[07:25:04] linus1: has joined #RubyOnRails
[07:25:12] juanpauc_: has joined #RubyOnRails
[07:27:28] juanpauc_: has joined #RubyOnRails
[07:27:34] mutuma: has joined #RubyOnRails
[07:27:37] sandstrom: has joined #RubyOnRails
[07:28:10] darrencauthon: has joined #RubyOnRails
[07:29:45] alexhartley: has joined #RubyOnRails
[07:31:16] atzorvas: has joined #RubyOnRails
[07:31:42] jensljungblad: has joined #RubyOnRails
[07:32:07] marr: has joined #RubyOnRails
[07:33:02] darutoko: has joined #RubyOnRails
[07:34:37] eyck: has joined #RubyOnRails
[07:34:47] yaw: has joined #RubyOnRails
[07:34:53] eyck: has joined #RubyOnRails
[07:35:13] Motoservo: has joined #RubyOnRails
[07:39:56] juanpaucar: has joined #RubyOnRails
[07:40:08] livathinos: has joined #RubyOnRails
[07:41:20] jgt1: has joined #RubyOnRails
[07:42:16] juanpaucar: has joined #RubyOnRails
[07:42:45] Glyphik: has joined #RubyOnRails
[07:43:15] jensljungblad: has joined #RubyOnRails
[07:43:27] iloverubynoob: has joined #RubyOnRails
[07:44:36] juanpauc_: has joined #RubyOnRails
[07:46:45] jeanlinux: has joined #RubyOnRails
[07:46:51] juanpaucar: has joined #RubyOnRails
[07:47:16] eGGsha: has joined #RubyOnRails
[07:47:56] jondot: has joined #RubyOnRails
[07:48:46] Motoservo: has joined #RubyOnRails
[07:49:05] juanpauc_: has joined #RubyOnRails
[07:51:21] juanpaucar: has joined #RubyOnRails
[07:53:25] DoctorMonocular: has joined #RubyOnRails
[07:53:43] juanpauc_: has joined #RubyOnRails
[07:53:50] JimmyNeutron: has joined #RubyOnRails
[07:55:18] demonlove: has joined #RubyOnRails
[07:56:02] juanpauc_: has joined #RubyOnRails
[07:58:10] juanpaucar: has joined #RubyOnRails
[07:58:57] mikecmpbll: has joined #RubyOnRails
[07:59:40] malkav: has joined #RubyOnRails
[08:00:05] malkav: Hey guys.
[08:00:07] krisquigley: has joined #RubyOnRails
[08:00:15] malkav: can anyone help me simplify this method? https://gist.github.com/Almaron/c31f26fb7deefd0d23a5
[08:00:26] juanpauc_: has joined #RubyOnRails
[08:02:37] juanpaucar: has joined #RubyOnRails
[08:03:17] curses: has joined #RubyOnRails
[08:03:19] jenrzzz: has joined #RubyOnRails
[08:03:46] Geffy: has joined #RubyOnRails
[08:04:16] arup_r: has joined #RubyOnRails
[08:04:50] juanpaucar: has joined #RubyOnRails
[08:07:12] juanpauc_: has joined #RubyOnRails
[08:08:12] chouhoulis: has joined #RubyOnRails
[08:09:21] juanpauc_: has joined #RubyOnRails
[08:11:44] juanpaucar: has joined #RubyOnRails
[08:13:50] juanpaucar: has joined #RubyOnRails
[08:15:00] jsrn_: has joined #RubyOnRails
[08:15:14] jensljungblad: has joined #RubyOnRails
[08:16:01] juanpauc_: has joined #RubyOnRails
[08:16:35] quazimodo: has joined #RubyOnRails
[08:16:40] kwd: has joined #RubyOnRails
[08:16:59] jensljungblad: has joined #RubyOnRails
[08:18:28] juanpaucar: has joined #RubyOnRails
[08:19:33] NBarnes: has joined #RubyOnRails
[08:20:06] jeanlinux: has joined #RubyOnRails
[08:20:13] user121212: has joined #RubyOnRails
[08:20:40] juanpaucar: has joined #RubyOnRails
[08:22:02] roolo: has joined #RubyOnRails
[08:22:10] DEA7TH_: has joined #RubyOnRails
[08:22:21] annlewis: has joined #RubyOnRails
[08:22:26] happydad: has joined #RubyOnRails
[08:22:26] ishahnaz: has joined #RubyOnRails
[08:22:48] juanpauc_: has joined #RubyOnRails
[08:23:19] mutuma: has left #RubyOnRails: ()
[08:23:34] Pathfinder: has joined #RubyOnRails
[08:23:52] jeanlinux: has joined #RubyOnRails
[08:23:54] dionysus69: has joined #RubyOnRails
[08:23:56] sarink: has joined #RubyOnRails
[08:24:01] bronson: has joined #RubyOnRails
[08:25:01] juanpauc_: has joined #RubyOnRails
[08:25:41] michael_mbp: has joined #RubyOnRails
[08:27:27] juanpaucar: has joined #RubyOnRails
[08:28:16] gerardc: has joined #RubyOnRails
[08:28:52] darrencauthon: has joined #RubyOnRails
[08:29:34] juanpauc_: has joined #RubyOnRails
[08:31:55] juanpauc_: has joined #RubyOnRails
[08:34:12] juanpaucar: has joined #RubyOnRails
[08:36:17] workmad3: has joined #RubyOnRails
[08:36:25] juanpauc_: has joined #RubyOnRails
[08:37:10] blackmesa: has joined #RubyOnRails
[08:38:26] d2dchat: has joined #RubyOnRails
[08:38:38] juanpaucar: has joined #RubyOnRails
[08:40:55] juanpauc_: has joined #RubyOnRails
[08:41:23] elv: has joined #RubyOnRails
[08:42:11] alex88: has joined #RubyOnRails
[08:43:11] arup_r: has joined #RubyOnRails
[08:43:14] juanpauc_: has joined #RubyOnRails
[08:43:38] jeadre: has joined #RubyOnRails
[08:44:20] atmosx: Malkav: I don't think you need to 'simplify' anything on that methods. It's self-explainatory and clean as it is IMHO.
[08:44:37] mutuma: has joined #RubyOnRails
[08:44:48] atmosx: wow truth to be told, I ddin't scroll enough to the left lol
[08:45:39] juanpaucar: has joined #RubyOnRails
[08:45:45] Queops: has joined #RubyOnRails
[08:46:23] malkav: atmosx: yea, now you can see the problem)
[08:46:30] jensljungblad: has joined #RubyOnRails
[08:46:56] Linuus: Is it possible to have multiple dummy apps when running tests? I have a gem that I want to two different scenarios (inside and engine and in a regular app)
[08:47:42] juanpauc_: has joined #RubyOnRails
[08:47:45] Diabolik: can anyone recommend an easy way of creating an alias for the operators
[08:47:49] Linuus: I want to run some integration tests in one dummy app and some integration tests in another app.
[08:47:50] Diabolik: assert_equal 5, MathExpression.calculate("2 PLUS 3")
[08:49:39] artto: has joined #RubyOnRails
[08:49:58] juanpaucar: has joined #RubyOnRails
[08:52:10] juanpauc_: has joined #RubyOnRails
[08:54:30] juanpaucar: has joined #RubyOnRails
[08:56:03] mikecmpbll: has joined #RubyOnRails
[08:56:49] juanpauc_: has joined #RubyOnRails
[08:57:19] bright_day: has joined #RubyOnRails
[08:57:52] x-light: has joined #RubyOnRails
[08:58:58] juanpaucar: has joined #RubyOnRails
[09:01:12] juanpaucar: has joined #RubyOnRails
[09:01:16] jeanlinux: has joined #RubyOnRails
[09:02:21] jeanlinux: has joined #RubyOnRails
[09:03:05] Duckily: has joined #RubyOnRails
[09:03:26] juanpauc_: has joined #RubyOnRails
[09:03:27] KnownSyntax: has joined #RubyOnRails
[09:03:46] KnownSyntax: has joined #RubyOnRails
[09:05:18] srinidhi: has joined #RubyOnRails
[09:05:41] michael_mbp: has joined #RubyOnRails
[09:05:45] juanpauc_: has joined #RubyOnRails
[09:07:33] blackmesa: has joined #RubyOnRails
[09:07:50] yardenbar: Hi all, I'm new to rails, trying to add config element to be accessible from Rails.configuration.my_new_config
[09:08:01] juanpaucar: has joined #RubyOnRails
[09:08:06] yardenbar: Googling it got me so confused....
[09:08:45] chouhoulis: has joined #RubyOnRails
[09:08:55] kitsuneyo: has joined #RubyOnRails
[09:10:18] juanpauc_: has joined #RubyOnRails
[09:10:43] swept: has joined #RubyOnRails
[09:12:31] juanpaucar: has joined #RubyOnRails
[09:13:04] jensljungblad: has joined #RubyOnRails
[09:13:28] kitsuneyo: has joined #RubyOnRails
[09:14:41] juanpaucar: has joined #RubyOnRails
[09:17:02] juanpauc_: has joined #RubyOnRails
[09:17:25] alex88: has joined #RubyOnRails
[09:19:23] juanpauc_: has joined #RubyOnRails
[09:20:17] Dbugger: has joined #RubyOnRails
[09:20:57] Dbugger: Could please anyone take a look at my question about Dictionaries on StackOverflow? Its been up one day without any answer... http://stackoverflow.com/questions/32103181/rails-4-i18n-reference-another-dictionary-entries-from-within
[09:21:13] Dbugger: Basically about how to reference another dictionary entry, directly from a dictionary entry
[09:21:35] juanpaucar: has joined #RubyOnRails
[09:21:41] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[09:22:17] Tinyyy: has joined #RubyOnRails
[09:23:03] TheCuriousGuy: has joined #RubyOnRails
[09:23:10] annlewis: has joined #RubyOnRails
[09:23:13] happydad: has joined #RubyOnRails
[09:23:22] sandstrom: I'm not a native speaker, but isn't 'guys' genderless. Similar to how 'human' is genderless (even though it ends in -man).
[09:23:49] juanpauc_: has joined #RubyOnRails
[09:23:57] TheCuriousGuy: I have a question and I hope the more experienced guys could help me
[09:23:57] rvanlieshout: sandstrom: no it's not :)
[09:24:33] TheCuriousGuy: I have been doing RoR for a couple of years now, and when I am doing a project for myself, I am very productive and know where everything should be
[09:24:35] sandstrom: This is what my dictionary has to say about it: " (guys) people of either sex: you guys want some coffee? "
[09:24:40] Dbugger: sevenseacat, sorry, not my intention ;)
[09:24:51] sevenseacat: sandstrom: you can argue, or accept that not everyone agrees with you.
[09:25:10] TheCuriousGuy: but when I work for someone else, I become very unproductive and can't do anything
[09:25:10] sameerynho: has joined #RubyOnRails
[09:25:23] TheCuriousGuy: I don't know how to deal with this situation
[09:26:04] charliesome: has joined #RubyOnRails
[09:26:06] juanpauc_: has joined #RubyOnRails
[09:26:26] mathie: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[09:26:28] TheCuriousGuy: I have problem with where to place which code, like choosing which controller for some logic
[09:26:29] sandstrom: sevenseacat I think sometimes bigger issues are missed, while people argue the semantics and etymology of various words.
[09:26:57] sevenseacat: ok, you want to argue then
[09:28:11] Ropeney: TheCuriousGuy: Specifics help you get helped :)
[09:28:17] juanpaucar: has joined #RubyOnRails
[09:28:46] TheCuriousGuy: Maybe someone has the same experience, either themselves or with a team mate :-(
[09:29:01] Dbugger: Thanks to whoever marked the duplicate
[09:29:41] darrencauthon: has joined #RubyOnRails
[09:30:17] sevenseacat: you probably shouldnt have asked a duplicate question then :P
[09:30:37] juanpauc_: has joined #RubyOnRails
[09:32:49] blnkammo_: has joined #RubyOnRails
[09:34:24] mutuma: has joined #RubyOnRails
[09:35:45] Karpah: has joined #RubyOnRails
[09:36:10] Grundell: has joined #RubyOnRails
[09:36:57] blackmesa: has joined #RubyOnRails
[09:40:07] jbrinkmusic: has joined #RubyOnRails
[09:40:45] sevenseacat: has joined #RubyOnRails
[09:40:46] julienk: has joined #RubyOnRails
[09:40:51] DLSteve: has joined #RubyOnRails
[09:42:50] hoodow: has joined #RubyOnRails
[09:43:05] jbrinkmusic: hello, I'm relatively new with rails and I need help with fixing my database schema... I managed to screw something up while trying to add devise to an existing user model and steps I've taken so far are deleting all migrations, deleting the user model and running rake db:drop:all and rake db:create:all
[09:43:27] happydad: has joined #RubyOnRails
[09:43:56] jbrinkmusic: when trying to run db:schema:dump, I get a NameError complaining about "uninitialized constant User"
[09:44:21] elv: has joined #RubyOnRails
[09:44:43] MartinElvar: has joined #RubyOnRails
[09:44:53] jensljungblad: has joined #RubyOnRails
[09:45:07] jbrinkmusic: the database I'm using is sqlite3
[09:45:33] workmad3: has joined #RubyOnRails
[09:45:43] sevenseacat: well i think the steps are what screwed it up
[09:46:24] sevenseacat: somewhere in your code you now reference a User model that doesnt exist, so put back the one you haf
[09:47:02] Linuus: has joined #RubyOnRails
[09:47:06] jbrinkmusic: okay, so in theory, if I remove all references to User in my code, the schema dump should work and I can start fresh?
[09:47:17] sevenseacat: probably not.
[09:47:35] sevenseacat: put back the User model you had.
[09:47:48] sevenseacat: and put back the migrations
[09:48:02] sevenseacat: then we can look at fixing the actual problem
[09:49:18] thsig: has joined #RubyOnRails
[09:51:31] jbrinkmusic: okay, how do I put them back? I don't have them handy anywhere since I completely deleted them, in hopes that I could start from scratch
[09:52:20] StartupHub: has joined #RubyOnRails
[09:52:45] Janno: Can't you just run rake db:drop && rake db:create && rake db:migrate if you don't care about the data in database?
[09:53:13] jbrinkmusic: janno: I've tried just that but rake db:migrate also gives me the NameError
[09:53:13] sevenseacat: jbrinkmusic: is your app under version control, so you can just fetch them out of the history?
[09:53:30] drale2k: has joined #RubyOnRails
[09:53:34] MartinEl_: has joined #RubyOnRails
[09:53:56] sevenseacat: yes, you'll need to either fetch your old User model or make a new one.
[09:54:34] jbrinkmusic: sevenseacat: I have git... I believe my last commit was just after installing devise
[09:54:56] sevenseacat: awesome, so you can undo all of the deletions you've done.
[09:55:46] jbrinkmusic: is it: git reset --hard origin/master ?
[09:56:03] mhib: has joined #RubyOnRails
[09:56:44] nya: has joined #RubyOnRails
[09:56:48] sevenseacat: no. just `git checkout .` will undo everything you've done since your last commit.
[09:57:52] jbrinkmusic: okay, thanks, I'll try that one
[10:03:02] jbrinkmusic: apparently my commit was just before installing devise as I get "uninitialized constant Devise (NameError)" when trying "User.first" in the console... can I safely reinstall devise now or is there a safe way to completely remove the current user model and start again?
[10:03:31] sevenseacat: reinstall devise.
[10:03:53] jbrinkmusic: "users" is the only table in my database, I'd be happy to start afresh
[10:07:11] Janno: did you reload console after 'git checkout .' ?
[10:07:51] jbrinkmusic: it wasn't running before so technically yes
[10:08:43] CheckYourSix: has joined #RubyOnRails
[10:08:52] Detch: has joined #RubyOnRails
[10:08:55] artto: has joined #RubyOnRails
[10:09:28] chouhoulis: has joined #RubyOnRails
[10:10:14] roolo: has joined #RubyOnRails
[10:10:33] Janno: Anyway, if you know commit where everything was working. You should be able to just checkout that and start from scratch
[10:10:41] jbrinkmusic: okay, now this part is where I started having problems last time... I now have a working user model that is built from scratch using bcrypt for safe passwords but I need to replace it with devise...
[10:11:48] jbrinkmusic: I am following a tutorial where someone is doing this from scratch so the migration looks different for me...
[10:12:38] EminenceHC: has joined #RubyOnRails
[10:13:10] nfk: has joined #RubyOnRails
[10:13:43] jbrinkmusic: do I just go with the defaults and let it change whatever columns it needs to?
[10:16:46] Janno: you mean devise default migration?
[10:19:06] Janno: does you app run on production? Because if not, I would just create migration to drop that user table and use devise to generate new one for you.
[10:20:36] jbrinkmusic: my current user model has the following columns: "t.string: username, t.string: email, t.timestamps, t.string: password_digest, t.boolean: admin, t.string: company"... the app is not in production yet so I could definitely do that if I can get it to work somehow
[10:20:40] charliesome: has joined #RubyOnRails
[10:20:59] jbrinkmusic: and yes, I meant the default migration
[10:22:17] jbrinkmusic: the last time I dropped the user table, devise still wanted to run it as a change instead of a create, for some weird reason
[10:23:52] annlewis: has joined #RubyOnRails
[10:24:32] jenrzzz: has joined #RubyOnRails
[10:24:55] bronson: has joined #RubyOnRails
[10:25:14] Janno: could that be, because you still had user model? Even tho you no longer had actual table
[10:25:37] j_mcnally: has joined #RubyOnRails
[10:26:15] Janno: Also did you verify that schema no longer had users table on it?
[10:26:17] jbrinkmusic: janno: do I have to run any other commands between "rails g migration DropUsers" + "rake db:migrate" and "rails g devise User" ?
[10:26:28] ledestin: has joined #RubyOnRails
[10:27:37] nya: has joined #RubyOnRails
[10:27:46] Janno: That sounds fine. You could try removing user model also before generating one with devise
[10:27:51] Janno: "rails destroy model user"
[10:28:09] jbrinkmusic: okay, thanks... I'll try this
[10:29:35] Linuus: has joined #RubyOnRails
[10:30:27] darrencauthon: has joined #RubyOnRails
[10:30:29] Janno: hmm, Note that destroy will remove migrations related to that model.
[10:30:30] jbrinkmusic: janno: I deleted the user model but a couple of migrations adding columns to the user table remained... is this a problem?
[10:30:36] yardenbar: has left #RubyOnRails: ("Leaving")
[10:31:47] jbrinkmusic: deleting the model only deleted the "create_users" migration
[10:31:48] maz-dev: has joined #RubyOnRails
[10:32:08] nya: has joined #RubyOnRails
[10:32:22] Janno: ye thats problem, I think you should checkout that migration back
[10:32:36] Janno: git checkout path/to/migration/file
[10:32:56] Janno: you don't really never want to remove old migrations
[10:33:03] Janno: because it could break other migrations
[10:34:08] jbrinkmusic: okay, so "git checkout db/migrate" in my case?
[10:34:20] jbrinkmusic: or do I need the full name of the file too?
[10:34:26] Janno: yes full name of the file
[10:34:44] Janno: after that you should be able to run "rails g devise User"
[10:35:46] jbrinkmusic: okay, I'll try that now... I got the migration file back
[10:36:38] Janno: just make sure that you no longer have app/models/user.rb and also db/schema.rb does not have anything related to users table
[10:38:34] jbrinkmusic: janno: they do exist now but the content was created by devise so I think this was what we call a great success :D
[10:38:48] jbrinkmusic: thank you for the help :)
[10:40:00] IceyEC: has joined #RubyOnRails
[10:40:13] stamina: has joined #RubyOnRails
[10:48:54] charliesome: has joined #RubyOnRails
[10:48:56] quazimodo: I feel so official
[10:49:00] quazimodo: Making skype calls
[10:49:04] quazimodo: reigning in the India team
[10:49:23] quazimodo: https://www.youtube.com/watch?v=IDfl-a-sbVM
[10:50:22] darrencauthon: has joined #RubyOnRails
[10:51:11] kristofferR: has joined #RubyOnRails
[10:51:34] atomical: has joined #RubyOnRails
[10:52:48] srinidhi: has joined #RubyOnRails
[10:54:02] broman: has joined #RubyOnRails
[10:55:14] broman: can someone help me? im migrating the server... now i have a centos with whm and cpanel, rails 3.2 and passenger installed... but when i try to access the ip address of the server, it shows me the directory listing.. .what should i do?
[10:56:51] rodfersou: has joined #RubyOnRails
[10:56:52] jeanlinux: has joined #RubyOnRails
[10:58:23] kitsuneyo: has joined #RubyOnRails
[10:59:46] rvanlieshout: broman: configure a default website somewhere
[11:00:04] drale2k: has joined #RubyOnRails
[11:00:25] kitsuneyo: has joined #RubyOnRails
[11:02:45] kitsuneyo: has joined #RubyOnRails
[11:02:56] curses: does anyone know of any good guides (beside the official one) on Rails engines?
[11:03:52] broman: rvanlieshout, ? what do you mean?
[11:04:19] rvanlieshout: i don't know much about cpanel, but it most likely created a virtualhost entry for your website
[11:05:01] kitsuneyo: has joined #RubyOnRails
[11:05:12] Linuus: has joined #RubyOnRails
[11:06:01] rvanlieshout: thus the documenroot for your default website is wrong
[11:07:25] broman: im testing the server with ip address.. do you think it could be the problem?
[11:08:02] arup_r: has joined #RubyOnRails
[11:08:40] Linuus: Is it possible to have multiple dummy apps in your tests? I want to run some integration tests against one dummy app and some against another.
[11:08:56] renegadeandy: has joined #RubyOnRails
[11:09:03] jensljungblad: has joined #RubyOnRails
[11:09:46] renegadeandy: hi everyone! At the moment I am using the seeds file to create standard data that all my environments need for my applicaiton, things like categories for search etc. Where should this kind of data be created? Should it be handled in a seperate rake task? Is there something else I should be using?
[11:10:05] renegadeandy: Obviously in production i don't want ot be running this seeds to create that standard setup
[11:10:15] rvanlieshout: you don't have to run seeds in production
[11:10:54] rvanlieshout: or run it multiple times
[11:11:05] chouhoulis: has joined #RubyOnRails
[11:11:25] charliesome: has joined #RubyOnRails
[11:16:07] renegadeandy: rvanlieshout: so what is going to populate my categories table in production
[11:16:17] renegadeandy: at the moment that is handled by seeds in dev
[11:16:35] renegadeandy: What will handle populating my AgeRange model
[11:16:39] gniquil: has joined #RubyOnRails
[11:16:39] renegadeandy: where should this be done
[11:17:09] jgt1: has joined #RubyOnRails
[11:17:57] User458764: has joined #RubyOnRails
[11:19:54] errakeshpd: has joined #RubyOnRails
[11:20:48] errakeshpd: How to clear fb api share catch Programmatically ? , it some times load from the catch.
[11:22:40] renegadeandy: rvanlieshout: ?
[11:22:50] drunkwife: has joined #RubyOnRails
[11:23:08] renegadeandy: is it something for a rake task?
[11:23:12] renegadeandy: like a setup rake task
[11:24:52] annlewis: has joined #RubyOnRails
[11:25:43] phpjunkie: has joined #RubyOnRails
[11:25:53] bronson: has joined #RubyOnRails
[11:25:58] frzn: has joined #RubyOnRails
[11:27:25] IceyEC: has joined #RubyOnRails
[11:28:27] jenrzzz: has joined #RubyOnRails
[11:28:28] nya: has joined #RubyOnRails
[11:30:31] nettoweb: has joined #RubyOnRails
[11:30:53] phpjunkie: pngout worker: `pngout` not found; please provide proper binary or disable this worker (--no-pngout argument or `:pngout => false` through options)
[11:31:02] phpjunkie: Please can anyone help me with this?
[11:31:10] phpjunkie: I'm new to ruby on rails
[11:32:50] phpjunkie: keeps doing that when I ran bundle exec rake db:seed. Using the railstutorial.org book.
[11:33:53] jensljungblad: has joined #RubyOnRails
[11:35:23] drale2k: has joined #RubyOnRails
[11:41:48] elepedus: has joined #RubyOnRails
[11:42:22] Synthead: has joined #RubyOnRails
[11:42:39] ldnunes: has joined #RubyOnRails
[11:46:37] lxsameer_: has joined #RubyOnRails
[11:49:00] enitiz: has joined #RubyOnRails
[11:49:15] enitiz_: has joined #RubyOnRails
[11:49:57] IceyEC: has joined #RubyOnRails
[11:49:58] rustymyers: has joined #RubyOnRails
[11:50:00] quazimodo: elastic beanstalk isn't running rake db:migrate :/
[11:51:02] jensljungblad: has joined #RubyOnRails
[11:54:57] ishahnaz: has joined #RubyOnRails
[11:58:19] roolo: has joined #RubyOnRails
[11:58:25] noodman: has joined #RubyOnRails
[11:58:30] erich: has joined #RubyOnRails
[11:58:50] Anubix: has joined #RubyOnRails
[11:58:51] jbrinkmusic: random question that isn't really directly related to rails per se, but would help make coding faster if I had an answer: is it possible / how to do the shortcut Cmd + / on a keyboard with a Finnish layout? :D
[11:59:34] rvanlieshout: jbrinkmusic: you don't have a / ?
[11:59:50] jbrinkmusic: I'm using Cloud9 as my IDE and Cmd + / is the shortcut to toggle comments... on a Finnish keyboard the "/" symbol is created by pressing Shift + 7
[11:59:51] bruno-: has joined #RubyOnRails
[12:00:07] rvanlieshout: change the shortcut?
[12:00:36] Anubix: guys i need help, i am trying to render template top_cookies from CookiesController and it stile write "missing partial", but i am not using partial, but view from action top_cookies.html.erb
[12:01:01] rvanlieshout: Anubix: what's the full error?
[12:01:01] Motoservo: has joined #RubyOnRails
[12:01:14] rvanlieshout: and code that tries to render that
[12:02:06] doodlehaus: has joined #RubyOnRails
[12:03:45] elv: has joined #RubyOnRails
[12:04:13] jenrzzz: has joined #RubyOnRails
[12:05:04] RegulationD: has joined #RubyOnRails
[12:05:37] Anubix: rvanlieshour: Here is it_: http://pastie.org/10363767
[12:07:18] artto: has joined #RubyOnRails
[12:07:20] Anubix: rvanlieshour: Well maybe it will work if i change it on partial _top_cookies.html.erb but i want to find why it doesnt work
[12:07:48] rvanlieshout: Anubix: is the file called _top_cookies.html.erb or top_cookies.html.erb?
[12:07:57] rvanlieshout: and render 'foo' != render partial: 'foo'
[12:08:15] Anubix: rvanlieshout: its top_cookies.html.erb its not partial
[12:08:35] rvanlieshout: and the full missing partial error?
[12:09:30] Anubix: Missing partial cookies/_top_cookies with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
[12:09:30] Anubix: * "/xxx/xxxx/workspace/my_cookies/app/views"
[12:09:53] rvanlieshout: so he expects a partial
[12:10:07] rvanlieshout: render action: 'cookies/top_cookies ?
[12:10:10] Anubix: well by why, top_cookies is def function in CookiesController
[12:10:11] rvanlieshout: and why not create a partial for this
[12:10:32] rvanlieshout: then have a top_cookies.html.erb that also users this partial
[12:10:34] mostlybadfly: has joined #RubyOnRails
[12:10:36] jensljungblad: has joined #RubyOnRails
[12:11:25] Anubix: it is function that is not routed, but it shouldn't be the error
[12:11:50] chouhoulis: has joined #RubyOnRails
[12:12:15] fschuindt: has joined #RubyOnRails
[12:12:17] zpe: has joined #RubyOnRails
[12:12:46] Anubix: rvanlienshout: show and index views you don't render as partial as well, its the same
[12:13:05] rvanlieshout: i've lost you there
[12:13:13] rvanlieshout: but you normally don't render other action files
[12:13:39] Synthead: has joined #RubyOnRails
[12:13:44] fschuindt: Guy, how can I do such thing like this: company.users.products.sum(:value) ?
[12:14:11] kitsuneyo: has joined #RubyOnRails
[12:14:26] Anubix: rvanlienshout: well if you have PagesController for semi-static and semi-dynamic pages where you render more models, it's normal best-practise i think
[12:14:31] iloveitaly: has joined #RubyOnRails
[12:14:38] rvanlieshout: fschuindt: Product.joins(users: :company).where(companies: { id: company.id }).sum(:value)
[12:14:52] rvanlieshout: Anubix: then specify what to render
[12:14:57] rvanlieshout: using render file: or action:
[12:15:03] artto: has joined #RubyOnRails
[12:15:24] gnguyen: has joined #RubyOnRails
[12:15:41] Ergo: has joined #RubyOnRails
[12:15:53] gnguyen: is it possible to test performance of a Rails method using cucumber?
[12:16:00] fschuindt: rvanlieshout: thank you
[12:16:11] Anubix: rvanlieshout: In ruby official guide is this writter 2.2.3 Rendering an Action's Template from Another Controller - http://guides.rubyonrails.org/layouts_and_rendering.html
[12:17:06] Anubix: rvanlieshout: Its the same what i am doing, render action template from another controller, just use render and it doesnt work, so it looks like bug
[12:17:27] blackmesa: has joined #RubyOnRails
[12:18:09] Anubix: rvanlieshout: I was trying to use render template: , then it doesnt write error, but it doesnt render anything
[12:18:31] rvanlieshout: <%= render template: ''' %> gives you nothing?
[12:18:38] jeanlinux: has joined #RubyOnRails
[12:18:53] kitsuneyo: has joined #RubyOnRails
[12:21:15] jayne: has joined #RubyOnRails
[12:21:55] andywww: has joined #RubyOnRails
[12:21:56] Anubix: rvanlienshout: Well now it write: undefined method `each' for nil:NilClass
[12:22:18] esnqq2l: has joined #RubyOnRails
[12:22:30] jensljungblad: has joined #RubyOnRails
[12:22:40] rvanlieshout: so there is something wrong in that view file
[12:23:09] Anubix: rvanlienshout: Yea but it's interensting it doesnt write no error when i tryid it last time
[12:24:25] Polysics: has joined #RubyOnRails
[12:24:49] Polysics: somehow FactoryGirl is not saving objects, I think
[12:25:06] Polysics: I have an Agreement that has_one Checklist
[12:25:06] jensljungblad: has joined #RubyOnRails
[12:25:33] annlewis: has joined #RubyOnRails
[12:26:07] Polysics: spec is here: https://gist.github.com/polysics/0afa3b31526be63dcacehttps://gist.github.com/polysics/0afa3b31526be63dcace
[12:26:14] Polysics: https://gist.github.com/polysics/0afa3b31526be63dcace
[12:26:54] pontiki: and the result?
[12:27:07] pontiki: it'd be great to see the code under test as well
[12:27:13] Polysics: if I echo out the checklist inside the controller, it's not persisted
[12:27:17] northfurr: has joined #RubyOnRails
[12:27:46] gingray: has joined #RubyOnRails
[12:27:49] Polysics: pontiki: https://gist.github.com/polysics/1455d4689510a94e09ec
[12:28:08] Polysics: I am thinking that somehow inherited_resources resets the record?
[12:28:13] unver: has joined #RubyOnRails
[12:28:13] pontiki: next time, add to the existing gist, don't create new one
[12:28:27] pontiki: i don't know inherited_resource
[12:29:34] JoshL: has joined #RubyOnRails
[12:32:06] jayne: has left #RubyOnRails: ()
[12:32:45] jay_p: has joined #RubyOnRails
[12:34:25] jay_p: has joined #RubyOnRails
[12:35:43] kimegede: has joined #RubyOnRails
[12:35:51] sevenseacat: has joined #RubyOnRails
[12:36:51] blackmesa: has joined #RubyOnRails
[12:37:13] jay_b: has joined #RubyOnRails
[12:37:49] jensljungblad: has joined #RubyOnRails
[12:38:03] dstarh: has joined #RubyOnRails
[12:38:11] kitsuneyo: After struggling with the Wicked gem for a while, I really think it sucks
[12:39:21] kitsuneyo: so complicated, really bad documentation
[12:39:43] sevenseacat: i love the wicked gem
[12:39:54] sevenseacat: wizards are a pain in the ass
[12:40:25] kitsuneyo: sevenseacat, i guess you use it for user forms though? it seems totally geared to that
[12:40:43] sevenseacat: i... use it for wizards
[12:41:22] k13nox: has joined #RubyOnRails
[12:41:22] Polysics: ok, so, inherited_resources is indeed overwriting the existing resource with a .new one
[12:41:33] rvanlieshout: sevenseacat: how shocking
[12:41:51] Polysics: so I guess what I need to figure out is how to prevent that
[12:41:52] kitsuneyo: you're an advanced developer compared to me though, i'm just finding it hard to set up
[12:42:17] jay_b: i wanted to build application where user can post status , like , comment, mention other user in status and take challenge. any suggestion for good gem?
[12:42:37] Polysics: jay_b: there is not going to be a gem for a whole app :)
[12:42:44] rvanlieshout: jay_b: using application != building app
[12:42:48] rvanlieshout: s/application/gem/
[12:42:50] jensljungblad: has joined #RubyOnRails
[12:43:02] sevenseacat: kitsuneyo: that doesnt mean it sucks though, but it does mean theres room for improvement
[12:43:19] Anubix: has joined #RubyOnRails
[12:43:41] jay_b: so any small small gem that can be useful
[12:43:52] Polysics: Rails is good, I hear
[12:43:54] kitsuneyo: sevenseacat, yeah, i know it doesn't actually suck since plenty of people are using it
[12:44:00] rvanlieshout: it's a good start at least
[12:44:02] Polysics: I'd start with Rails
[12:44:13] Polysics: then I think Devise
[12:44:21] Polysics: or any user authentication
[12:44:28] Polysics: the rest should be plain coding :)
[12:45:02] Polysics: jay_b: take a look here: https://www.ruby-toolbox.com/categories/social_networking
[12:45:13] centrx: has joined #RubyOnRails
[12:45:23] Polysics: I never had any good experience with "full system" gems, but maybe it works for you
[12:45:32] Anubix: rvanlieshout: Man i found solution, problem was that in home action on PagesController i have to load @top_cookies because it doesnt supply CookiesController
[12:45:57] annlewis: has joined #RubyOnRails
[12:46:44] rvanlieshout: Anubix: rendering some random file doesn't invoke an action no
[12:47:04] jay_b: polusics: i was thinking of diaspora or social_stream but i don't want their full system , and then i have to override whole view
[12:47:20] Anubix: rvanlieshout: y i didnt know that
[12:47:49] jensljungblad: has joined #RubyOnRails
[12:48:26] Polysics: as I said, there are two ways: use an existing one, or build your own
[12:48:41] Polysics: that really applies to a lot of things in life :D
[12:49:13] arup_r: has joined #RubyOnRails
[12:49:16] jay_b: polysics: i am newbie on ruby on rails , so what you suggest?
[12:49:32] kitsuneyo: sevenseacat, what do you think of Wicked compared to this jQuery thing: http://www.jankoatwarpspeed.com/turn-any-webform-into-a-powerful-wizard-with-jquery-formtowizard-plugin/
[12:49:40] rvanlieshout: jay_b: learn rails first
[12:49:47] rvanlieshout: and about what gems actually do
[12:49:53] kitsuneyo: i'm really not sure of the advantage of Wicked over this anymore
[12:49:56] sevenseacat: kitsuneyo: theyre different things.
[12:49:57] rvanlieshout: this is not something like just combine the top 10 gems and tadaaa
[12:49:57] Polysics: I would use one of hte esisting ones. They look large and well documented and you should be able to override stuff
[12:50:04] Polysics: also uh, the above :)
[12:50:04] paulcsmith: has joined #RubyOnRails
[12:50:12] kitsuneyo: i know, but they have similarities
[12:50:24] Polysics: by the way, Rails is not cool any more. The best programmers use Node.js
[12:50:25] Anubix: Guys when i am using each function to obtain each row of instance, is there a way in third row add another style to my row?
[12:50:36] Polysics: I would check out Node.js first
[12:50:49] TPBallbag: has joined #RubyOnRails
[12:51:02] rvanlieshout: Anubix: !guys
[12:51:02] helpa: Anubix: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[12:51:10] sevenseacat: if you want to do it in js, do it in js. i wouldnt do in js what makes more sense to do on the server side
[12:51:12] Polysics: it works on multiple cores and is Javascript so you already know the language
[12:51:35] Polysics: as an adopted southerner, I heartily second the usage of "y'all"
[12:51:43] Anubix: rvanlieshout: sorry i didnt mean it badly
[12:51:55] kitsuneyo: what can you do in Wicked on the server side? save between steps?
[12:52:07] victortyau: has joined #RubyOnRails
[12:52:07] jamiely: has joined #RubyOnRails
[12:52:19] sevenseacat: save between steps, change flow depending on entered data, run validations, actually have more than one fieldset on a step
[12:52:23] Polysics: also, I am mostly just trying to send noobs towards Node so we can keep working, it is not related to Wicked :D
[12:52:42] jenrzzz: has joined #RubyOnRails
[12:52:47] kitsuneyo: ahh, i didn't know it was one fieldset per step
[12:52:48] rvanlieshout: Anubix: and each row of what? and what exactly do you want?
[12:52:57] m1lt0n: has joined #RubyOnRails
[12:52:59] Polysics: the standard response to "how do I shot social network" should be "Node.js is much cooler, go check that out" :D
[12:53:21] sevenseacat: I mean who wouldn't love to fill out an entire wizard and then be sent back to the first page due to validation errors
[12:53:28] kitsuneyo: i guess i need to persevere with wicked, i'll get there eventually
[12:53:30] craigphares: has joined #RubyOnRails
[12:53:46] kitsuneyo: ha, ok i take your point on that
[12:53:52] sevenseacat: you can also save the state of a form and resume it later.
[12:54:04] sevenseacat: at the same point you left off at
[12:54:14] kitsuneyo: yes, i would love to have that feature but i cannot get my head around using sessions in wicked
[12:54:16] victortyau: has joined #RubyOnRails
[12:54:39] kitsuneyo: is this where you save the session to the db?
[12:54:47] sevenseacat: its got nothing to do with sessions
[12:54:59] a1fa: :popcorn
[12:55:20] sevenseacat: most wizard steps correlate to states in a state machine
[12:55:23] nertzy: has joined #RubyOnRails
[12:55:35] Anubix: rvanlieshout: I use @cookies.each do |cookie| and in every 3 row of this result i want to add HTML tag, is there a way to retrieve every third row?
[12:55:37] sevenseacat: so after each state, you save the data in whatever model you're working on
[12:56:29] rvanlieshout: Anubix: @cookies.in_groups_of(3).each... http://api.rubyonrails.org/classes/Array.html#method-i-in_groups_of
[12:56:38] Polysics: I have a brain lockup. What gives you the action name inside a before_filter?
[12:56:51] sevenseacat: params[:action] ?
[12:57:09] sevenseacat: action_name will also work i think
[12:57:18] Polysics: haha thanks
[12:57:37] Anubix: rvanlieshout: And when i want to add tag every three and four row?
[12:58:07] rvanlieshout: Anubix: why would you want that?
[12:58:11] kitsuneyo: i'm kind of fixated on defining a session to carry the params data across each step of my wicked form, do i not really need to do that? this is what i'm confused about.
[12:58:23] rvanlieshout: you don't want to use sessions
[12:58:31] sevenseacat: i dont know why you would, given your form is presumably for model data
[12:58:35] sevenseacat: just save that model data to the db
[12:59:06] kitsuneyo: then i just need to define the routes so the record id is passed to each step?
[12:59:11] NBarnes: has joined #RubyOnRails
[12:59:31] sevenseacat: follow the setup instructions for wizard. they will show you how to do that.
[12:59:48] kitsuneyo: ehh ok, i'll try it again
[12:59:53] banister: has joined #RubyOnRails
[12:59:58] kitsuneyo: thanks for the help, i really appreciate it
[13:00:11] jgt1: has joined #RubyOnRails
[13:00:13] Anubix: rvanlienshout: I am using responsive bootstrap template and every result = 1 column but i need to add <div class="clearfix visible-x-block"></div> for every device, so sm block is added after each 2 results and md block is added after each 3 results
[13:01:49] jenrzzz: has joined #RubyOnRails
[13:01:49] Anubix: rvanlienshout: So when i retrieve somehow result number, i can use simple If row = 2 then... but i dont know how to get result number
[13:01:49] Lightsword: has joined #RubyOnRails
[13:01:55] atomical: has joined #RubyOnRails
[13:03:47] ramortegui: has joined #RubyOnRails
[13:03:58] Anubix: rvanlienshout: Well i found each_with_index function which should help me
[13:05:29] havenwood: has joined #RubyOnRails
[13:05:32] AxonetBE: has joined #RubyOnRails
[13:06:48] kitsuneyo: "class Products::BuildController < ApplicationController" - what's a build controller? never came across this before
[13:07:02] RTG`: has joined #RubyOnRails
[13:08:13] sevenseacat: the wizard he's building in that example is for building products, so hes called it BuildController
[13:08:39] sevenseacat: the names of controllers do not have special meanings - they get named after what they are for
[13:09:57] pcpanic: Ladies and Gents, I am baffled for the past 2 days on how to CREATE via json a nested object. I have a one to many wher :user has_many :phones, :phones has :user_id and :tel attributes. How does the create action look like in the users
[13:10:05] pcpanic: _controller
[13:10:40] livathinos: has joined #RubyOnRails
[13:10:48] sevenseacat: User.create(user_params) ?
[13:11:23] cajone: has joined #RubyOnRails
[13:11:49] pcpanic: sevenseacat: i want to create a record under Phone - my users permit looks like this (:name, :password, phones_attributes: [:user_id,:tel])
[13:12:10] sevenseacat: looks okay, what problem are you having?
[13:12:38] pcpanic: no record under Phone is being created.
[13:12:46] sevenseacat: so what data are you submitting?
[13:13:01] sevenseacat: and what does your code look like?
[13:13:28] pcpanic: {"user": {"contact_phone":"12127773457","name":"NewUser","password_digest":"12345"},"phones_attributes": [{"tel":"234"}]}
[13:13:35] kitsuneyo: has joined #RubyOnRails
[13:13:47] sevenseacat: ok, thats not correct - phones_attributes should be a hash of data
[13:14:08] sevenseacat: {"0" => {"tel":"234"}} for example
[13:14:39] pcpanic: sevenseacat: "0" instead of phones_attributes ?
[13:14:51] sevenseacat: phones_attributes: {0: {tel: 123}}
[13:15:31] chouhoulis: has joined #RubyOnRails
[13:15:47] pcpanic: sevenseacat: checking
[13:16:12] maz-dev: has joined #RubyOnRails
[13:18:15] kitsuneyo: has joined #RubyOnRails
[13:18:55] hardtail: good morning, how is everyone today?
[13:19:00] hahuang61: has joined #RubyOnRails
[13:19:46] aganov: has joined #RubyOnRails
[13:20:17] jensljungblad: has joined #RubyOnRails
[13:20:55] Linuus: has joined #RubyOnRails
[13:21:01] dopamean_: has joined #RubyOnRails
[13:21:23] pcpanic: sevenseacat: updated json: {"user": {"contact_phone":"12127773457","name":"NewUser","password_digest":"12345"},"phones_attributes": {"0":{"tel":"234"}}}
[13:21:35] dskrypnyk: has joined #RubyOnRails
[13:21:36] umgrosscol: has joined #RubyOnRails
[13:23:00] sevenseacat: you've now moved the phones_attributes hash outside the user hash
[13:23:15] sevenseacat: oh it was already outside before - thats not going to help anyone
[13:26:47] bronson: has joined #RubyOnRails
[13:27:17] pcpanic: sevenseacat: YOU ARE AWESOMEEEE - So many thanks!
[13:27:26] sevenseacat: :D glad I could help
[13:28:30] Dbugger: has joined #RubyOnRails
[13:28:33] Dbugger: Hi fellas.
[13:28:52] sevenseacat: dbugger: !guys, again
[13:28:58] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[13:29:07] Dbugger: sevenseacat, fellas is gender-specific??
[13:29:15] Dbugger: since when?
[13:29:25] Dbugger: I always took it as gender ambiguous
[13:29:29] nettoweb: has joined #RubyOnRails
[13:29:32] Dbugger: But hey.. English is not my language
[13:29:36] sevenseacat: you seem to do a lot of that.
[13:29:36] Dbugger: So... sorry :P
[13:29:44] Dbugger: I tried this time :
[13:30:01] sevenseacat: I know, which is why I' m not getting grumpy :P
[13:30:09] Dbugger: So.... hey people
[13:30:17] sevenseacat: anyway, how are you dbugger ?
[13:30:28] doodlehaus: has joined #RubyOnRails
[13:30:33] Dbugger: tired. i18n is hard :P
[13:30:37] greengriminal: has joined #RubyOnRails
[13:30:48] Dbugger: I wanted to ask something:
[13:31:49] Dbugger: I just made a Language menu, and it works great for most of the part, but when I change the language after having done a POST request, obviously, it fails. Is there a clever way to do it, so that it would return to the same page, even after clicking the link?
[13:32:21] sevenseacat: normally when you issue a POST request you do a redirect straight after it
[13:32:46] sevenseacat: so then from the page you redirect to, you could easily change the language and refresh the page
[13:32:50] Dbugger: Really? Because "rails g scaffold" does not do that, I think
[13:33:04] Dbugger: Mmmmm... let me recheck
[13:33:32] sevenseacat: eg. after you create a Something, it'll redirect you to either the index for Somethings or the show page of that Something you just created
[13:33:37] sevenseacat: probably the show page
[13:34:10] blackmesa: has joined #RubyOnRails
[13:34:24] chouhoulis: has joined #RubyOnRails
[13:35:35] sevenseacat: https://en.wikipedia.org/wiki/Post/Redirect/Get
[13:35:42] sevenseacat: theres even a wiki page for the pattern
[13:35:50] jensljungblad: has joined #RubyOnRails
[13:35:58] Dbugger: Ill be dammed, you are right
[13:36:14] Dbugger: So if I make a new action, not CRUD, I need 3 actions: "form", "process" and "result"
[13:36:43] sevenseacat: depends on what the action is for
[13:36:56] rvanlieshout: and you can still have multiple routes to a single action
[13:36:59] sevenseacat: and the interface you're building for it
[13:37:15] Dbugger: http://bookcaneer.com/en/position
[13:37:21] Dbugger: Thats the action
[13:37:24] sevenseacat: i would argue that if you actually need all three, it probably should be its own crud controller
[13:37:35] kitsuneyo: would you say guys is gender specific? i think of it as neutral
[13:37:44] Dbugger: I want to index books, but just the ones on certain proximity
[13:37:49] sevenseacat: kitsuneyo: a lot of men (and some women) do.
[13:38:10] kitsuneyo: yeah i guess better safe than sorry on these things
[13:38:44] jensljungblad: has joined #RubyOnRails
[13:39:05] sevenseacat: its not that, its just realizing that not everyone might think the same as you.
[13:39:22] Dbugger: sevenseacat, do you think the case I showed you needs its own controller?
[13:39:40] sevenseacat: I didn't click on it, so dont know what it is.
[13:40:06] michael_mbp: remind me please, how does the Rails router determine the app's host?
[13:40:51] thsig: has joined #RubyOnRails
[13:40:51] michael_mbp: engine.foo_url ?
[13:41:00] kitsuneyo: i'd say that's effectively the same as what i said
[13:41:11] TheCuriousGuy: has joined #RubyOnRails
[13:41:15] sevenseacat: I'm not surprised.
[13:41:16] michael_mbp: that does give a url with protocol/host inthere.
[13:41:22] michael_mbp: rvanlieshout: ?
[13:41:37] sevenseacat: michael_mbp: it just uses the current one.
[13:41:42] kitsuneyo: but i realise you might not think the same ;)
[13:41:46] sevenseacat: it doesnt 'determine' anything.
[13:41:58] michael_mbp: sevenseacat: right so where does it get the 'current' one from?
[13:42:01] rvanlieshout: michael_mbp: docs: Specifies the host the link should be targeted at. If :only_path is false, this option must be provided either explicitly, or via default_url_options.
[13:42:03] sevenseacat: from the current URL.
[13:42:23] michael_mbp: rvanlieshout: fantastic, thought so.
[13:42:25] TheCuriousGuy: I have a Department model and an Employee model, and each department has many employees
[13:42:34] sevenseacat: if you're accessing your app at foo.com, it will make all absolute urls using foo.com
[13:42:41] michael_mbp: sevenseacat: there isn't always a URL :)
[13:42:43] sevenseacat: unless specified otherwise
[13:42:48] michael_mbp: which is what rvanlieshout was on about
[13:42:59] michael_mbp: for example, I can trigger mail to be sent from a model, via the console.
[13:43:02] Schalla: has joined #RubyOnRails
[13:43:06] rvanlieshout: then you have to set the host
[13:43:10] sevenseacat: right, there are mail specific settings for that.
[13:43:10] michael_mbp: without ever hitting a controller.
[13:43:18] sevenseacat: you never specified mail.
[13:43:26] juanpaucar: has joined #RubyOnRails
[13:43:33] TheCuriousGuy: I want to create a factory (FactoryGirl) named `department_with_employees`, but I want to be able to specify employee names in my spec
[13:43:44] michael_mbp: rvanlieshout: that's the curious thing. I'm seeing a host being sent out that's NOT the host specified in the env default_url_options
[13:43:54] sevenseacat: TheCuriousGuy: use a with_employees trait instead of a specially named factory.
[13:43:58] rvanlieshout: why would it be using 'env'?
[13:44:10] devdazed: has joined #RubyOnRails
[13:44:37] sevenseacat: TheCuriousGuy: eg. create(:department, :with_employees, names: [Bob, Joe])
[13:44:46] michael_mbp: rvanlieshout: default_url_options is sent in each env decl. as in config/environments btw.
[13:44:55] TheCuriousGuy: sevenseacat: let me try
[13:45:09] michael_mbp: config.action_mailer.default_url_options = { :host => ... }
[13:45:22] northfurr: has joined #RubyOnRails
[13:45:28] rvanlieshout: so what host is it using?
[13:45:51] michael_mbp: one from a differnt app (you could think of it as a fork...)
[13:45:53] sevenseacat: TheCuriousGuy: then you can do something like this https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#transient-attributes making the names transient then building the employees in a callback
[13:46:15] tercenya: has joined #RubyOnRails
[13:46:23] michael_mbp: I just silversearched through the main code-base, and 2-dependencies, Chef databags. scratching my head on this one.
[13:46:30] roolo: has joined #RubyOnRails
[13:46:43] rvanlieshout: it gets that host from somewhere
[13:47:04] sevenseacat: did you check the actual email template?
[13:48:53] ivanskie: has joined #RubyOnRails
[13:49:12] michael_mbp: You can login here <%= spree.agent_login_url %>
[13:49:27] krisquigley: has joined #RubyOnRails
[13:49:31] sevenseacat: so where is agent_login_url defined?
[13:49:52] kitsuneyo: is the well-grounded rubyist a good book?
[13:50:20] sevenseacat: for ruby (no rails), yes.
[13:50:26] michael_mbp: within a dependency, under the spree engine.
[13:50:38] sevenseacat: michael_mbp: thats not a helpful answer
[13:50:49] kitsuneyo: what about rails? i looked agile development for rails (or something like that)
[13:50:55] michael_mbp: I've also search both for any potential :host decl. not much luck there.
[13:51:00] michael_mbp: sevenseacat: I know the feeling sadly.
[13:51:17] sevenseacat: kitsuneyo: I recommend Rails 4 in Action (disclaimer: I co-wrote it)
[13:51:19] 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
[13:51:23] michael_mbp: it's basically a route generated within Spree::Core::Engine.routes.draw { }
[13:51:36] ckinniburgh: has joined #RubyOnRails
[13:52:44] kitsuneyo: sevenseacat, wow, i see it here on amazon uk
[13:53:09] kitsuneyo: what was the thinking behind the cover illustration?
[13:53:23] jas02: has joined #RubyOnRails
[13:53:49] sevenseacat: no idea. I knew once. I don't know.
[13:53:53] northfurr: has joined #RubyOnRails
[13:54:03] sevenseacat: the only problem with buying it from somewhere like amazon is that it hasnt been printed yet, so you'll have to wait
[13:54:32] sevenseacat: if you buy direct from manning, you'll get the 100% complete ebook (missing a few little things like an introduction) right now
[13:55:22] kitsuneyo: ah ok. if it's a tutorial like Michaels Hartl then i wouldn't mind the e-book
[13:55:29] sevenseacat: it is a tutorial
[13:55:40] sevenseacat: from scratch to building a ticket-tracking application
[13:55:48] kitsuneyo: is it more advanced than hartl?
[13:55:57] sevenseacat: it covers much more.
[13:56:03] sevenseacat: its a 600 page book.
[13:56:25] kitsuneyo: hartl is more pages ;) but i can see from the description it covers more
[13:56:55] sevenseacat: lets see, it covers - projects, tickets, authentication, authorization, file uploading, state tracking, sending emails, building an api, testing middleware, and I'm sure I missed a bunch of chapters
[13:57:05] sevenseacat: seriously, his is more pages?
[13:57:11] michael_mbp: thanks sevenseacat rvanlieshout for the insight thus far at least.
[13:57:11] maz-dev: has joined #RubyOnRails
[13:57:43] kitsuneyo: ok. i've bookmarked it, i think i better read well-grounded first
[13:58:44] kitsuneyo: i read chris pine learn to program, that was good
[13:59:04] sevenseacat: I've heard good things about that one.
[14:00:00] darrencauthon: has joined #RubyOnRails
[14:00:13] kitsuneyo: the hartl e-book i have is 793 pages. however it has complete listings for every file in the project, most are included more than once
[14:00:37] kitsuneyo: and the type is quite big
[14:00:50] rvanlieshout: are we just comparing page count now?
[14:01:13] sevenseacat: rvanlieshout: yeah, I kinda started it, when kitsuneyo asked if r4ia covered more than hartl, and i said well we're 600 pages of awesome
[14:01:31] pcpanic: if I would like to create a child record :user_courses through an existing parent :user - Is it a POST or a PUT ? Or should I not even create :user_courses through :user and simply POST to :user_courses directly ?
[14:01:45] Grundell: has joined #RubyOnRails
[14:01:58] kitsuneyo: rvanlieshout, did you work on this r4ia book too?
[14:02:05] artto: has joined #RubyOnRails
[14:02:19] matthewburton: has joined #RubyOnRails
[14:02:36] sevenseacat: I did, Radar did, and steveklabnik did (who doesnt visit us on irc)
[14:02:38] matthewburton: http://pastie.org/private/wpd5lhle5fv6cii8hu8lag
[14:02:43] matthewburton: is that saying rails needs to be updated to be compatible with the gem, or vice versa?
[14:03:48] kitsuneyo: the problem with hartl is, it's very easy to go through it mindlessly without learning everything because the tasks it sets are all really easy and not actually required to make the project work
[14:03:49] sevenseacat: matthewburton: other way around
[14:04:17] sevenseacat: kitsuneyo: one thing we dont offer is any exercises for the readers to do on their own time
[14:04:37] sevenseacat: so you could really do the same thing, just copy and paste all the code and voila
[14:04:38] n1lo: has joined #RubyOnRails
[14:05:02] matthewburton: sevenseacat: thanks. Why isn???t it being updated with ???bundle update???? Isn???t that its purpose?
[14:05:14] sevenseacat: matthewburton: I didn't know you ran bundle update
[14:05:24] sevenseacat: bundle update and bundle install are two different things
[14:05:49] sevenseacat: I have no idea how redmine works, I wouldn't touch it with a ten-foot pole.
[14:05:58] sonofdirt: has joined #RubyOnRails
[14:06:00] kitsuneyo: sevenseacat, so long as you explain the concepts well, it's ok
[14:06:09] sevenseacat: kitsuneyo: we tried very hard to do that.
[14:07:16] matthewburton: sevenseatcat, same error :-( http://pastie.org/private/hxpo8l0empalzpku18cvtq
[14:07:46] sevenseacat: then redmine has a problem
[14:08:20] bruno-: has joined #RubyOnRails
[14:08:41] kitsuneyo: i'll be interested to try the book, you folks have helped me out a fair bit already
[14:09:58] sevenseacat: matthewburton: what version of redmine are you using?
[14:10:18] jas02: has joined #RubyOnRails
[14:10:35] jhack: has joined #RubyOnRails
[14:11:47] kitsuneyo: when is rails 5 coming and is it going to be really different?
[14:11:50] artto: has joined #RubyOnRails
[14:11:55] momomomomo: has joined #RubyOnRails
[14:12:01] hardtail: sevenseacat: I am getting an UrlGenerationError..I need to make a Gist :D Error, routes, should I include full controllers as well?
[14:12:16] sevenseacat: kitsuneyo: before the end of the year most probably, and not crazily different, no.
[14:12:32] sevenseacat: Hardtail: let's start with the full error+backtrace
[14:12:37] matthewburton: sevenseacat: 2.6.1
[14:13:31] atomical: I'm getting an error when I set the primary key as another column, but continue to use the id column. Is that not supported in ActiveRecord?
[14:13:33] sevenseacat: matthewburton: thats quite an old version
[14:14:08] artto: has joined #RubyOnRails
[14:14:09] momomomomo: atomical: it may be supported, but it definitely is working against the grain
[14:14:19] momomomomo: atomical: what is stopping you from not doing that silly thing, and using the convention?
[14:14:47] sevenseacat: atomical: it's supported just fine. if you're having a specific problem, please gist it
[14:15:11] momomomomo: sevenseacat: it's still against convention, and not a wise choice unless there's a really good reason for it
[14:15:33] sevenseacat: momomomomo: so you'll just call them silly without even seeing if they have a reason?
[14:15:45] momomomomo: sevenseacat: "momomomomo: atomical: what is stopping you from not doing that silly thing, and using the convention?"
[14:15:55] hardtail: sevenseacat: https://gist.github.com/jonathanmusso/381be919739cf6fb1f5a
[14:16:00] momomomomo: it is silly, unless there's a good reason
[14:16:09] momomomomo: and usually, it's due to a silly constraint
[14:16:16] atomical: it's in our data warehouse. i can't have the db team change it right now.
[14:16:22] Travis-42: has joined #RubyOnRails
[14:16:23] momomomomo: see what I mean
[14:17:03] sevenseacat: Hardtail: is that meant to be build_chapters_path(build) ?
[14:17:23] atomical: https://gist.github.com/atomical/27a5d94623f70aa5ed99
[14:17:24] sevenseacat: build_chapter_path would make a URL like /builds/2/chapters/3
[14:17:26] skroon: has joined #RubyOnRails
[14:17:40] sevenseacat: two params, and you only provided once, hence the error
[14:18:27] sevenseacat: atomical: ok, and what does your optin data model look like?
[14:18:30] Travis-42: I???m trying to optimize some mostly static pages that I???ve cached using action_pack ActionCaching, but I???m finding that the middleware surrounding the request is taking lots of time (mostly rack:deflater and rack:etag). Is it normal for these to take 20-30ms? Is there any way to improve their performance?
[14:18:38] hardtail: sevenseacat: arg, you are right - build_chapters_path(@build) works! Thank you so much
[14:18:44] sevenseacat: Hardtail: np :)
[14:19:15] momomomomo: atomical: have you set 'primary_key' on the model? http://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html
[14:19:39] kitsuneyo: anyone else listen to the 5-by-5 rails podcast? i kind of like it, though they hardly talk about rails
[14:19:42] krz: has joined #RubyOnRails
[14:19:52] momomomomo: atomical: and you restarted the app since then?
[14:20:09] momomomomo: atomical: gist up your model
[14:20:20] atomical: refresh the gist
[14:20:21] dopie: has joined #RubyOnRails
[14:20:26] atomical: https://gist.github.com/atomical/27a5d94623f70aa5ed99
[14:20:29] skroon: i've got nginx infront of my rails puma server, however, how do I tell nginx to not proxy_pass everything to puma, but server it's local assets directly it self?
[14:20:48] atomical: i'm trying to test the model with rspec
[14:21:02] momomomomo: atomical: It's likely to do with the attr_accesible
[14:21:13] sevenseacat: momomomomo: wat
[14:21:13] hardtail: sevenseacat: is it bad practice in Rails to have your model named oen thing and then the controller another? example. 1 model in this project is called ???build_project.rb??? and then the controller is called ???builds_controller.rb??? and the instance variables are all @build. My mentor told me this is good for me to learn how to handle different names but I find it more confusing lol
[14:21:21] sevenseacat: momomomomo: are you just making things up
[14:21:26] momomomomo: try it atomical
[14:21:40] momomomomo: remove the attr_accessible for id
[14:22:32] atomical: i tried that before, and i just tried it again
[14:22:34] momomomomo: you restarted the app / console?
[14:22:37] Dbugger: sevenseacat, mind an IM?
[14:22:44] momomomomo: atomical: and the error is still on the 'id' column?
[14:22:46] tubbo: kitsuneyo: what do they talk about?
[14:22:47] sevenseacat: Hardtail: I would typically keep the same, unless it was going to make the names too long and duplicatey
[14:22:55] sevenseacat: dbugger: go for it
[14:23:13] jhass: skroon: use a named location that proxies and try_files
[14:23:25] jhass: and set root accordingly of course
[14:23:28] atomical: it isn't being included in the sql statement
[14:23:32] maz-dev: has joined #RubyOnRails
[14:23:43] atomical: AR must be removing it
[14:24:12] momomomomo: well atomical that's what I was testing by removing attr_accessible
[14:24:13] The_Phoenix: has joined #RubyOnRails
[14:24:14] kitsuneyo: tubbo, the format changed recently and it's now presented by kyle daigl of github and shaun devine. they kind of talk more generally about life as a developer
[14:24:20] momomomomo: atomical: you're actually restarting the app / console before trying again?
[14:24:22] hardtail: sevenseacat: ok thanks very much
[14:24:55] tubbo: "Kyle and Sean discuss the unavoidable existence and importance of your personal brand as a programmer." ugh
[14:24:58] tubbo: i hate that word
[14:25:29] rhino-sic: has left #RubyOnRails: ("WeeChat 1.1.1")
[14:25:30] tubbo: but they're probably right
[14:25:31] kitsuneyo: yeah well they aren't too wanky about it,
[14:25:37] dopamean_: has joined #RubyOnRails
[14:25:38] Papierkorb: tubbo??? ??? It's a br??nd
[14:26:15] tubbo: Papierkorb: now with 20% less fat
[14:26:37] kitsuneyo: i think one of them kind of says the same, they don't like the term etc but it's still important etc
[14:27:04] skroon: jhass: right, so try_files, tries to see if the file is on local filesystem and if not it would go for the proxy_pass instead?
[14:27:14] tubbo: it's just a euphemism, but sometimes i think the word "aesthetic" is a better way to describe it. a brand, to me, implies that you're trying to sell me something.
[14:27:16] jhass: skroon: yes
[14:27:19] Dbugger: sevenseacat, I wanted to ask you about that thing about creating a special Controller for certain actions. Let me explain you a little better the case: I have Books with a GPS location, to know where are they located. I also have a Book controller, with the typical CRUD actions. Now I wanted to add a way for people to look for books 10km close to their position, so first we have a screen that you input a position in a map, and then
[14:27:19] Dbugger: you have a screen that resembles Book.index, but not identical, where the books nearby are listed. How would you think I should do it? Do I really new controller for that? After all, I do not need any new Model for this operation... What do you think?
[14:27:36] tubbo: but an "aesthetic" is just how an artist wants his piece to be portrayed
[14:27:38] momomomomo: atomical: not sure, it seems like the self.primary_key isn't taking
[14:27:38] The_Phoenix: has joined #RubyOnRails
[14:27:40] skroon: jhass: great, thanks
[14:28:01] tubbo: i don't want to work with people who are trying to sell me on the idea that they're a great programmer. i want to work with people conscious of how they're percieved by others, that's it. :P
[14:28:09] sevenseacat: dbugger: sounds like maybe a 'search' action and then the index action, to me
[14:28:10] momomomomo: atomical: o.primary_key returns "unique_id", correct?
[14:28:42] atomical: OptinData.primary_key does, yes
[14:28:48] kitsuneyo: tubbo, by personal brand they mean how you present yourself and your skills to the world. that incorporates your style as a programmer, but it's about how you communicate that across social media and all that. that's how i interpreted it anyway. your personal brand doesn't *have* to be a hard sell
[14:28:48] Dbugger: sevenseacat, in that case, you do not think that I need a new controller? What you are saying is what Im doing right now, but I was wondering if I was maybe doing it wrong, because of what you commented.
[14:28:54] badmadrad: has joined #RubyOnRails
[14:29:25] tubbo: kitsuneyo: i know, i know :) i'm saying this is what the word means to me. and certainly "brand" is easier both to say and spell.
[14:29:35] sevenseacat: i said if you really needed three separate controller actions, for the form, a post, and a redirect, then you probably would
[14:29:40] momomomomo: atomical: do NOT NULL columns in mysql need a default value?
[14:29:47] sevenseacat: in that case i wouldnt even use a post at all
[14:29:48] Dbugger: sevenseacat, It comes from what we spoke about POST-Redirect-Get. In that case, I need 3 actions: "search-new", "search-process", and "search-show". Does that sound correct?
[14:29:48] kitsuneyo: it's not a term i find pleasant either
[14:30:03] sevenseacat: searching is a repeatable action
[14:30:32] momomomomo: hmm, no it should work: For data entry into a NOT NULL column that has no explicit DEFAULT clause, if an INSERT or REPLACE statement includes no value for the column, or an UPDATE statement sets the column to NULL, MySQL handles the column according to the SQL mode in effect at the time:
[14:30:36] sevenseacat: dbugger: I would have one search action that shows the form, and then that form submits a get request to the index action which does the filtering
[14:30:36] tuelz: has joined #RubyOnRails
[14:30:42] momomomomo: fromhttps://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html
[14:30:59] sevenseacat: momomomomo: did you read the part where they wrote o.id = 10 ?
[14:31:08] tuelz: is there a way to use a select filter that will return an AR relation instead of an array?
[14:31:12] momomomomo: sevenseacat: which is why I'm saying it should work
[14:31:24] Dbugger: sevenseacat, I see.... Instead of a POST-form, a GET-form.... Makes sense. I didnt think of that. Thanks!
[14:31:31] momomomomo: mysql has some weird edge cases and surprises, which is why I checked the documentation
[14:31:33] sevenseacat: momomomomo: i dont think you know what you're saying
[14:31:34] momomomomo: thanks for your sarcasm, though
[14:31:39] momomomomo: are you shitting me?
[14:31:46] sevenseacat: dbugger: no probs :)
[14:32:06] sevenseacat: momomomomo: yes, given the problem is happening before it even gets to the database
[14:32:07] momomomomo: the insert clause included a value for 'id', which is NOT NULL; thus, mysql spec says it should work
[14:32:11] sevenseacat: look at the values that AR is submitting
[14:32:18] momomomomo: sevenseacat: someone might have added that logic to AR
[14:32:30] sevenseacat: therefore, the db isnt involved
[14:32:48] momomomomo: there are rules in AR related to db behavior
[14:33:01] sevenseacat: thats too vague a statement.
[14:34:03] oflannabhra: has joined #RubyOnRails
[14:34:29] hardtail: is it possible to somehow take my schema and have it presented in a spreadsheet type format?
[14:34:51] kies: has joined #RubyOnRails
[14:35:13] jhass: atomical: before we dive into ARs source, can you try updating to 4.2.3 or even 4.2.4.rc1 and verify the bug persists there?
[14:35:19] Dbugger: sevenseacat, One detail. Using forms with GET methods create some truly terrible URLs. This is what I got "?utf8=???&book_latitude=51.078375799999996&book_longitude=13.707561799999999&commit=Search+books+nearby". Is there any way to leave the "Submit button" text and the UTF8 out of the URL?
[14:35:36] sevenseacat: dbugger: nope.
[14:35:58] atomical: jhass: i'll try that, i'm looking through AR source now.
[14:37:36] sevenseacat: atomical: try adding this to your model: https://gist.github.com/sevenseacat/0ad00fb69649f08a8e52
[14:37:50] kitsuneyo: something that podcast does keep talking about is how more developers are using rails to make an api and then building separate javascript client apps, instead of using rails for the whole app. it sounds sensible although the details are a mystery to me.
[14:38:05] dici: has joined #RubyOnRails
[14:38:27] kitsuneyo: i don't even really understand what an api is :)
[14:38:46] sevenseacat: kitsuneyo: think of a service you interact with to extract data
[14:39:13] sevenseacat: or share data, even
[14:39:21] Travis-42: has joined #RubyOnRails
[14:39:23] jenrzzz: has joined #RubyOnRails
[14:39:30] kitsuneyo: i think i get it at that level, the api serves data and the client just grabs the data from the api?
[14:39:32] sevenseacat: strictly speaking, any web app is an api - the consumer of it is the browser
[14:40:02] sevenseacat: think of a really dynamic web app - familiar with something like pivotal tracker, or trello?
[14:40:23] kitsuneyo: sevenseacat, i don't know them
[14:40:35] jhack: has joined #RubyOnRails
[14:41:06] kitsuneyo: yeah i know that one :)
[14:42:00] sevenseacat: so their api is private, but it still is one - every time you click to open a message, it pings the api to get the contents of that message, for example
[14:42:16] kitsuneyo: what does a rails app that is just an api look like though? i guess it would have no views, just active model and controller stuff?
[14:42:27] sevenseacat: it would typically serve json data, instead of HTML
[14:42:42] sevenseacat: and then the client would take the json and turn it into whatever it wants
[14:43:07] kitsuneyo: json is somewhere on my list of stuff to learn about
[14:43:08] sevenseacat: lots of sites have public apis, like github - in theory you could create your own github wrapper app just around their api
[14:43:25] sevenseacat: make your own interface to github and perform all the same tasks, from your own app
[14:43:27] atomical: sevenseacat: tried that. same result.
[14:44:04] kitsuneyo: yeah, my understanding is that having a separate api is good if you have different clients on the web, mobile etc
[14:44:33] sevenseacat: yep yep, thats the other aspect of it
[14:44:35] kitsuneyo: then all the clients are on the same level, it makes sense
[14:44:47] umgrosscol: has joined #RubyOnRails
[14:45:00] sevenseacat: github's mobile apps for example use the same api that is publicly accessible to anyone else
[14:45:02] RegulationD: has joined #RubyOnRails
[14:46:48] kitsuneyo: better stick to the beginner stuff for now
[14:51:22] mary5030: has joined #RubyOnRails
[14:51:28] sevenseacat: atomical: I think I've got it. Rails provides alias methods for ID that point to your primary key, so you will need to set the id manually (not using id = )
[14:51:36] rogue_koder: has joined #RubyOnRails
[14:51:52] sevenseacat: something like o[id] = 10 or o.attributes[id] = 10
[14:51:58] jensljungblad: has joined #RubyOnRails
[14:51:59] sevenseacat: :id of course, not id
[14:52:00] mary5030: has joined #RubyOnRails
[14:52:44] DCio: has joined #RubyOnRails
[14:53:08] atomical: i tried overwriting the id= method
[14:53:09] sevenseacat: if you inspected o after doing o.id = 10, I think you'd find the primary key was set to 10, not the id field
[14:53:14] DCio: is there any reason that a rails app would run faster on my computer than it does on heroku
[14:53:24] tonios57: has joined #RubyOnRails
[14:53:35] atomical: they are both set to 10
[14:53:40] sevenseacat: atomical: so theres more code that you havent shown?
[14:54:02] atomical: no, this is code i have added since talking to you
[14:54:27] sevenseacat: so... can you share it?
[14:54:31] Linuus: has joined #RubyOnRails
[14:55:17] atomical: https://gist.github.com/atomical/27a5d94623f70aa5ed99#file-optin_data-rb
[14:55:47] DCio: Hey guys, is there any reason an app would run way slower on heroku than it would on my local computer
[14:56:08] sevenseacat: because keroku provide slow boxes for free?
[14:56:36] DCio: so then i upgraded to their 2x dynos and it still ran significantly slower
[14:56:44] DCio: like wtf
[14:56:52] sevenseacat: doesnt that just mean you get two of their slow boxes?
[14:57:15] sevenseacat: ie. twice the capacity, not twice the speed
[14:57:20] bePolite: has joined #RubyOnRails
[14:57:53] DCio: well i wasnt using the free ones anymore
[14:58:00] corioliss: has joined #RubyOnRails
[14:58:04] kitsuneyo: DCio, if you have a fast computer then it's probably always going to be faster locally
[14:58:07] allcentury: has joined #RubyOnRails
[14:58:16] DCio: kitsuneyo: im on a macbook pro :/
[14:58:22] DCio: hardly fast
[14:58:23] kitsuneyo: i mean, the data has no distance to travel
[14:58:37] DCio: im not talking about latency, talking about processing power
[14:58:40] sevenseacat: DCio: its still probably going to be an order of magnitude better than what heroku gives you
[14:59:02] DCio: im handling large amounts of data that i need to process and do things with, was heroku just a terrible choice for this?
[14:59:16] sevenseacat: heroku is pretty much a terrible choice for anything.
[14:59:22] sevenseacat: except toy apps.
[14:59:31] kitsuneyo: i heard that heroku was good for deploying apps but i don't know how much you have to pay for good performance
[14:59:37] DCio: yeah im getting that sense now
[15:00:35] jensljungblad: has joined #RubyOnRails
[15:00:49] DCio: maybe i should scrap the project and not do this in rails. perhaps XAMPP is a better choice
[15:01:43] sevenseacat: heroku being slow has nothing to do with choice of language
[15:01:46] jensljungblad: has joined #RubyOnRails
[15:02:25] AxonetBE: has left #RubyOnRails: ()
[15:02:30] DCio: you don't think there is a performance overhead that comes with ruby?
[15:02:55] sevenseacat: there is, but is it worth rewriting an entire project? surely performance was thought about before ruby was selected?
[15:03:01] jgt1: has joined #RubyOnRails
[15:03:53] elv: has joined #RubyOnRails
[15:05:30] kitsuneyo: what's the project DCio? how much data are you talking about?
[15:06:13] DCio: My guess would be its just heroku being shitty, but at this point i'm not sure what my options are. I'm a totally new developer and im trying to get this app up and running for my client before i leave for the summer (in about 5 days). At the moment its total crap on heroku, shit times out and it takes far too long processing data to be useful.
[15:06:41] momomomomo: has joined #RubyOnRails
[15:08:05] kitsuneyo: totally new developer as in, you only just started coding?
[15:08:45] renegadeandy: I have an ENV variable set called RAILS_ENV in production. It is set in .bashrc, when i try rails console ENV['RAILS_ENV'] it correctly shows production. Yet when I am in a model and do puts "env var is:"+ENV['RAILS_ENV'] it is nil. Why would that be?
[15:09:09] DCio: nah ive been coding for like 4 years but this was my first job actually working for someone else.
[15:09:22] DCio: summer internship type of deal
[15:10:11] DCio: i only used heroku because it seemed easy and i have no idea what other options are out there. we don't have our own metal though so its going to have to be a cloud based solution.
[15:10:27] recurrence: has joined #RubyOnRails
[15:11:34] DCio: basically a big part of my bonus is if i can finish this project, so maybe if one of you can help me i can arrange some form of compensation ;)
[15:11:54] kitsuneyo: there are quite a few cloud options i think, but it sounds like you need a clearer picture of your app's requirements before you pick your plan
[15:12:16] User4587_: has joined #RubyOnRails
[15:13:16] renegadeandy: help pretty please!
[15:14:29] Papierkorb: renegadeandy: Use Rails.env instead
[15:14:47] DCio: hmm well I can tell you what the requirements are in terms of the goals for the project.
[15:14:54] Rubie: has joined #RubyOnRails
[15:14:59] alex88: has joined #RubyOnRails
[15:15:01] Papierkorb: renegadeandy: to check for a specific one, e.g. use Rails.env.production?
[15:15:38] doodlehaus: has joined #RubyOnRails
[15:15:44] jacaballero: has joined #RubyOnRails
[15:15:59] kitsuneyo: DCio, i was meaning the power requirements. but i'm really not the person to help you, more of a beginner than you are :)
[15:16:15] Papierkorb: renegadeandy: Oh, and if you really need to disable/enable specific things for development, check for Rails.env.development? to have production behaviour in the test env.
[15:17:12] DCio: I see. I feel like I'll be able to do more when I go back to school and have access to my computer science professors haha.
[15:17:50] renegadeandy: Papierkorb: JUST FOUND OUT URGH! I had to stop and start unicorn instead of simply restarting it in order for it to pickup the new env vars....strange!
[15:18:12] Papierkorb: not strange, sounds like expected behaviour
[15:18:25] renegadeandy: Papierkorb: I would have expected restart to do a stop, then a start
[15:18:46] Papierkorb: the environment is specific to every process. a new process inherits it from the parent process (by default at least)
[15:19:19] renegadeandy: Papierkorb: so a restart inherits from the parent...rather than getting a new one
[15:19:41] Papierkorb: renegadeandy: probably, no idea about how unicorn does things, but seems plausible for this case
[15:19:48] renegadeandy: hahaha ahhhhh thanks!
[15:19:55] AzaToth: has joined #RubyOnRails
[15:19:56] riotjones: has joined #RubyOnRails
[15:20:12] syzygy_: has joined #RubyOnRails
[15:20:56] centrx: has joined #RubyOnRails
[15:21:56] [Butch]: has joined #RubyOnRails
[15:22:12] DCio: Im a fucking dingus
[15:22:20] DCio: I know why its so slow
[15:22:38] DCio: I stored all the question results as a hash in my database and i have to extract that hash and iterate through it each time i want to do this shit
[15:23:24] tubbo: DCio: shoulda used HSTORE ;)
[15:24:45] maz-dev: has joined #RubyOnRails
[15:26:02] DCio: nah the reason its slow is because im using hashes at all and iterating over them in ruby
[15:26:24] DCio: databases are made to be queried, not have their data extracted and then each row compared to something
[15:26:28] DCio: im a dingus
[15:27:44] bronson: has joined #RubyOnRails
[15:28:47] tubbo: sevenseacat: <3 heroku for internal rails apps that i don't feel like talking to ops about fwiw
[15:28:51] tubbo: but nothing that actually matters
[15:29:04] rodfersou: has joined #RubyOnRails
[15:29:08] sevenseacat: I think ops would have my head if i tried that
[15:29:18] kiimi: has joined #RubyOnRails
[15:29:46] tubbo: well like, i've been thinking about building some kind of app that rebuilds documentation on demand.
[15:29:59] tubbo: if that goes down, big deal
[15:30:06] tubbo: or if it's slow
[15:30:14] j_mcnally: has joined #RubyOnRails
[15:31:09] m1lt0n: has joined #RubyOnRails
[15:31:35] aderium: has joined #RubyOnRails
[15:33:11] momomomomo: has joined #RubyOnRails
[15:34:24] hobodave: has joined #RubyOnRails
[15:34:40] roolo: has joined #RubyOnRails
[15:35:17] disgrntld: has joined #RubyOnRails
[15:40:13] oflannabhra: has joined #RubyOnRails
[15:40:20] Maletor: has joined #RubyOnRails
[15:41:06] quazimodo: has joined #RubyOnRails
[15:42:23] michael_mbp: can I use dirty to check which columns were updated after_save>
[15:45:45] northfurr: has joined #RubyOnRails
[15:46:26] alexhartley: has joined #RubyOnRails
[15:47:03] EminenceHC: has joined #RubyOnRails
[15:47:41] bruno-: has joined #RubyOnRails
[15:48:36] artto: has joined #RubyOnRails
[15:50:00] kitsuneyo: i deploy my app to heroku, just a good and free way to check how it works in the wild
[15:50:05] Papierkorb: Aaand I broke Opal again
[15:50:41] kitsuneyo: one of the practices i picked up from the hartl rails tutorial
[15:52:54] artto: has joined #RubyOnRails
[15:53:31] ratmav: has joined #RubyOnRails
[15:54:26] sonofdirt: has joined #RubyOnRails
[15:54:44] artto: has joined #RubyOnRails
[15:56:44] towski_: has joined #RubyOnRails
[15:57:30] errakeshpd: After omni contact fetch, our application redirecting to a get path and displaying the contacts in model popup, if the contacts included many contacts then it shows error Invalid request: HTTP element QUERY_STRING is longer than the (1024 * 10) allowed length
[15:57:31] gavit: I'm contemplating of making several api's. wuld it be better to make 1 rails app with different api's or different apps for different apis?
[15:58:31] jenrzzz: has joined #RubyOnRails
[15:58:44] banister: has joined #RubyOnRails
[15:59:13] podman: has joined #RubyOnRails
[16:00:31] errakeshpd: https://gist.github.com/anonymous/6a23cd0446b787c3a735
[16:02:19] Silox|: has joined #RubyOnRails
[16:04:29] hobodave: has joined #RubyOnRails
[16:07:38] zoidfarb: has joined #RubyOnRails
[16:08:54] zoidfarb: Hey, what tutorials/guides would you suggest for somebody wanting to learn Ruby on Rails from a background of college scientific programming (so not a total programming novice, but no web development experience)
[16:09:06] universa1: errakeshpd: without having looked at anything: don't push the accounts around in the querystring?
[16:09:12] baweaver: has joined #RubyOnRails
[16:09:39] richipargo: has joined #RubyOnRails
[16:10:53] mikebonar: has joined #RubyOnRails
[16:11:17] errakeshpd: Ok @universal, Then how can i pass to that informations to another controller with out passing contacts through url ?
[16:11:47] universa1: store them somewhere?
[16:13:03] errakeshpd: The gmailcontacts_path included a model popup to select the contacts that only will be saved in the db for mail sending.
[16:13:18] NBarnes: has joined #RubyOnRails
[16:13:37] errakeshpd: The selected contact only will be saved. and invitation email will send
[16:13:54] universa1: why are you even redirecting in your local app?
[16:13:59] momomomomo_: has joined #RubyOnRails
[16:14:30] julienk: has joined #RubyOnRails
[16:14:31] pda: has joined #RubyOnRails
[16:15:38] pda: has joined #RubyOnRails
[16:17:06] errakeshpd: has joined #RubyOnRails
[16:17:58] errakeshpd: sorry i was disconnected suddenly
[16:18:25] errakeshpd: @universal Did you shared any informations ?
[16:18:52] dopie: Hey guys I have a question concerning what should I do, currently I'm in the Account Controller edit action, inside the edit action I have to check if a account_profile is present which I do... Now if the profile is present I have to call some methods on it. Would I do this using a helper?
[16:19:21] dopie: or create a module?
[16:19:37] universa1: dopie: no. helpers in the rails context are helping your views.
[16:19:59] universa1: dopie: probably some service kind of object... depending on what you're doing.
[16:20:21] universa1: anyways. tme to go home.
[16:20:55] errakeshpd: Ok sorry i was not seen your last message.
[16:21:12] zoidfarb: Can anyone see this chat?
[16:21:38] jgt1: has joined #RubyOnRails
[16:22:01] errakeshpd: I mentioned (last message) - related to contact fetch.
[16:22:53] Maletor: has joined #RubyOnRails
[16:23:50] errakeshpd: @dopie you can use like this "redirect_to your_controller_action_url and return"
[16:26:09] maz-dev: has joined #RubyOnRails
[16:26:11] ustrajunior: has joined #RubyOnRails
[16:26:29] l1meon: has joined #RubyOnRails
[16:28:36] bronson: has joined #RubyOnRails
[16:29:24] soahccc^: has left #RubyOnRails: ()
[16:29:58] soahccc: has joined #RubyOnRails
[16:31:01] strcmp1: has joined #RubyOnRails
[16:32:13] n008f4g_: has joined #RubyOnRails
[16:32:46] tubbo: anybody else ever see bundler pull down yanked gems on a bundle update?
[16:32:53] tubbo: this just happened *twice* to me, it's really irritating
[16:32:55] lele: has joined #RubyOnRails
[16:33:42] Papierkorb: tubbo: did you do a bundle clean beforehand?
[16:33:54] tubbo: Papierkorb: ^
[16:34:13] Papierkorb: Get rid of da cruft. But I think it happened to me too recently while toying with gems
[16:34:23] tubbo: but that shouldn't matter, `bundle clean` just deletes gems that have been installed to vendor/bundle but aren't being used
[16:34:48] tubbo: the problem here is that Bundler edited Gemfile.lock and threw in the wrong gem version, so when i went to `bundle install` it totally blows up.
[16:35:03] Papierkorb: they're probably still referenced in the Gemfile.lock, and thus bundler could think they're still in use. no idea, never looked into bundlers internals
[16:36:06] benlieb: has joined #RubyOnRails
[16:36:56] nettoweb: has joined #RubyOnRails
[16:37:12] bricker: has joined #RubyOnRails
[16:37:29] tubbo: Papierkorb: if that actually was true, then `bundle update` is definitely NOT doing its job :) running `bundle update` edits the Gemfile.lock if there are changes.
[16:37:36] tubbo: that's its job.
[16:38:30] Papierkorb: yay I found a confirmed nasty compiler bug with Opal.
[16:38:54] hobodave_: has joined #RubyOnRails
[16:39:47] recurrence: has joined #RubyOnRails
[16:39:51] jenrzzz: has joined #RubyOnRails
[16:40:06] rogue_koder_: has joined #RubyOnRails
[16:40:15] blackmesa: has joined #RubyOnRails
[16:42:05] kies: has joined #RubyOnRails
[16:42:17] bulldawgden: has joined #RubyOnRails
[16:42:36] GreatDanton: has joined #RubyOnRails
[16:42:46] DCio: Will anything bad happen if i want like 300 columns in activerecord
[16:43:18] centrx: DCio, It's bad table design but it should technically work
[16:43:36] DCio: best way to store 100's of answers to responses then?
[16:43:50] DCio: right now i have all the answers in a serialized hash which i then store
[16:44:00] Papierkorb: DCio: what's an "answer"?
[16:44:15] DCio: answer is an integer
[16:44:21] Papierkorb: DCio: in general though, have a Answer model and then your Thing has_many :answers and the Answer belongs_to :thing
[16:44:45] Papierkorb: DCio: what does the integer do?
[16:44:47] DCio: right, i tried that and thats terribly inefficient
[16:45:16] centrx: It shouldn't be
[16:45:34] centrx: You can also store it as a serialized hash or json
[16:45:39] Papierkorb: DCio: PostgreSQL lets you use arrays and/or JSON formatted columns. If you know that you'll only need to store tons of integers, a t.integer :answer, array: true # column could work
[16:46:02] DCio: centrx: the reason its inefficient is because when i want to create 1 response i then have to also create 300 answer objects. creating the activerecord objects actually eats a lot of time.
[16:46:15] Papierkorb: DCio: if you're not so sure, I'd use a JSON(B) column. Then, AR will do serialization for you
[16:46:23] centrx: DCio, Why would you have to create 300 answer objects for one answer?
[16:46:32] craigphares: has joined #RubyOnRails
[16:46:37] DCio: centrx 300 answer objects for one response.
[16:46:46] DCio: response has_many: :answers
[16:46:51] Papierkorb: That 300 sounds like an arbitary number. What's up with it?
[16:46:56] j_mcnally: has joined #RubyOnRails
[16:47:13] DCio: im working with a company that survey's people. They ask about 300 questions
[16:47:21] DCio: i have to store the answer to each of those questions
[16:47:21] Papierkorb: So it's an arbitary number
[16:47:31] EminenceHC: has joined #RubyOnRails
[16:47:37] RegulationD: has joined #RubyOnRails
[16:47:47] DCio: kind of, but its unlikely to fluctuate that much because in general people aren't going to be sitting and answering more than that many questions at a time
[16:47:55] Papierkorb: DCio: Consider using an array to store those. if you need a map, you could use a HSTORE, but I'd just use a JSONB column
[16:48:10] Papierkorb: DCio: never understimate the user
[16:49:20] Papierkorb: But I have the feeling that a usual array won't suffice. How would you know which index in the array is the answer to which question?
[16:49:31] d2dchat: has joined #RubyOnRails
[16:49:36] Papierkorb: If you add or remove questions later on, how do you handle 'holes'?
[16:49:52] DCio: the real problem is, i want to do all of my filtering of peoples answers all in the database. Ruby seems to be too slow for this stuff as with only 2 surveys (1500 respondents with 300 answers each) it takes over 7 minutes to filter
[16:50:07] Papierkorb: Define "filter"
[16:50:45] suchness: has joined #RubyOnRails
[16:51:01] DCio: Papierkorb: from all the results stored in the database, we may want to analyze what % of users that answers question W with answer X also answered question Y with answer Z
[16:51:02] Papierkorb: what you can offload to the DB you offload to the DB. That's what's there for afterall. Make use of a smarter WHERE clause. Doing client side filtering is "ugh" in any language
[16:51:03] tubbo: DCio: this doesn't require unstructured data *at all*
[16:51:08] tubbo: DCio: you can do this entirely with relations
[16:51:27] tubbo: Answer should have a value, that value is basically anything. Answer belongs_to Question. Question has_many Answers.
[16:51:33] Papierkorb: DCio: so you need something like a map.
[16:51:39] tubbo: you don't need a column for every answer :)
[16:51:58] DCio: so basically use relations then make sure i do all the filtering database side
[16:52:05] Papierkorb: And why do you need to store 300 for each? Are you preallocating them or what?
[16:52:15] DCio: its not 300 its arbitrary haha
[16:52:28] DCio: at the moment its just a hash with about 300 keys stored as serialized text
[16:52:53] j_mcnally: has joined #RubyOnRails
[16:53:03] DCio: i need to speed this shit up by about a factor of like 100 to make it useful, but i have a feeling i definitely can.
[16:53:05] tubbo: DCio: what's wrong with creating a table for that instead of using the big ass hash?
[16:53:07] Papierkorb: if you use PostgreSQL, use a HSTORE or a JSONB column to store the map. Then you could even offload those more complex queries to the DB and let it do its job
[16:53:27] Papierkorb: Or yeah, use relations
[16:53:34] workmad3: Papierkorb: or he just has a questions table and an answers table like tubbo is suggesting
[16:53:37] tubbo: the idea here being the keys are *always* the same
[16:53:45] tubbo: if they aren't, then that's different
[16:53:49] DCio: do you think relations or HSTORE /JSONB would be faster
[16:53:54] oflannabhra: has joined #RubyOnRails
[16:53:56] DCio: the keys are always going to be the same.
[16:53:57] workmad3: answer belongs_to question and answer belongs_to respondant
[16:54:02] DCio: for every single response
[16:54:04] tubbo: basically if you can draw a pattern between data, and relate to them, that's always your best bet in a relational DB
[16:54:12] tubbo: DCio: hell no. it will be way slower.
[16:54:20] Papierkorb: DCio: Both. You can't say one or the other, it depends on every else variable in your system
[16:54:38] tubbo: DCio: by using relations you can take advantage of indexing, caching, et. al. it's what postgres was DESIGNED to do.
[16:54:39] Junaos: has joined #RubyOnRails
[16:54:57] tubbo: all that other business is just fine, but certainly no replacement for normalizing your data.
[16:55:00] mikebonar: has left #RubyOnRails: ("Part & Quit baby!")
[16:55:07] workmad3: tubbo: hstore and json columns are also indexable and cacheable, and directly queryable inside pg
[16:55:16] nihilatus: has joined #RubyOnRails
[16:55:20] Papierkorb: (Cough you can index JSON data too) but your issue sounds so much relational, that you want a answers table
[16:55:36] DCio: now is there some way to take advantage of the fact that my questions will almost always be the same?
[16:56:24] DCio: still, roughly about 300 questions so im not sure if one big table with all the questions in them is the best solution as someone said 300 columns is inefficient?
[16:56:37] r0uder: has joined #RubyOnRails
[16:56:44] manfrin: has joined #RubyOnRails
[16:57:07] Papierkorb: DCio: Ok. So, how good to you sounds to have 300 columns?
[16:57:25] rakm: has joined #RubyOnRails
[16:57:32] Papierkorb: DCio: Not even speaking about how much of a violation of the normalizing rules that is (or w/e they're called in english)
[16:58:00] DoctorMonocular: has joined #RubyOnRails
[16:58:35] Papierkorb: DCio: If you ever have more, and you will have more, then you're fucked. No need to put it into nice words, it's the way it is
[16:58:37] tuelz: has joined #RubyOnRails
[16:58:46] DCio: very true
[16:58:55] DCio: right. So relations is the way to go then
[16:58:58] Papierkorb: Also never assume that your solution is just temporary. Temporary solutions are for eternity.
[16:59:46] elv: has joined #RubyOnRails
[17:00:11] DCio: so at the moment my data structure looks something like this: survey -> responses -> answers. Each arrow represents a "has_many" relationship
[17:00:41] doublemalt_: has joined #RubyOnRails
[17:00:49] Papierkorb: what does 'responses' do?
[17:01:02] Papierkorb: Is it a response of a person?
[17:01:21] DCio: yes. It includes demographic information about the person as well as their answers (has_many: :answers)
[17:01:24] alex88: has joined #RubyOnRails
[17:01:49] djbkd: has joined #RubyOnRails
[17:02:48] rhizome: where are the questions in there?
[17:03:53] StartupHub: has joined #RubyOnRails
[17:03:55] DCio: well i guess its a bit misleading, but 1 "answer" would actually be a pair of question and answer
[17:04:18] DCio: so answer has question:string answer:integer
[17:04:35] DCio: or perhaps i should make it a different word to avoid confusion
[17:04:52] DCio: so like response has_many :qa_pair
[17:06:18] polpak: has joined #RubyOnRails
[17:06:42] tubbo: workmad3: is JSON? i thought that was the major diff between HSTORE and JSON?
[17:06:56] tubbo: workmad3: a followup question: what about JSONB?
[17:07:00] livathinos: has joined #RubyOnRails
[17:07:06] arooni-mobile: has joined #RubyOnRails
[17:07:55] Rubie: has joined #RubyOnRails
[17:07:56] rhizome: DCio: "qa_pair" tells me you should be using a through model
[17:08:13] DCio: a through model? :o
[17:08:26] towski_: has joined #RubyOnRails
[17:08:31] Rubie: has joined #RubyOnRails
[17:08:53] rhizome: maybe consider this: user has_many questions, through answers
[17:11:32] Glyphik: anybody have experience integrating chart.js with rails?
[17:12:13] DCio: rhizome: not familiar with the through directive. I'll have to check it out
[17:12:33] rhizome: read up on associations
[17:12:44] krisquigley: has joined #RubyOnRails
[17:12:50] DCio: word. hopefully this can significantly speed up the process.
[17:12:56] TomyLobo: has joined #RubyOnRails
[17:13:13] bap1313: has joined #RubyOnRails
[17:13:18] rhizome: besides, i'm guessing the user already has the demographics associated with them
[17:13:22] alexhartley: has joined #RubyOnRails
[17:13:31] kitsuneyo: has joined #RubyOnRails
[17:14:46] unver: has joined #RubyOnRails
[17:15:07] elepedus: has joined #RubyOnRails
[17:15:28] alexhart_: has joined #RubyOnRails
[17:17:12] kitsuneyo: has joined #RubyOnRails
[17:17:18] prestorium: has joined #RubyOnRails
[17:17:48] alexhart_: has joined #RubyOnRails
[17:20:12] chichouw: has joined #RubyOnRails
[17:21:43] jacaballero: has joined #RubyOnRails
[17:22:45] roolo: has joined #RubyOnRails
[17:23:51] a1fa: is it possible to call a method from one controller to another?
[17:24:58] rhizome: you don't want to do that
[17:25:02] cnk: has joined #RubyOnRails
[17:26:10] a1fa: rhizome: well, now i am having people edit "cars" in one page, only to have to go click "calculate" button on another page
[17:26:14] Papierkorb: Read that as: No. a1fa, if you want to share code between controllers, put the code into lib/ or mkdir app/lib and put it there. Depending on what you're doing, you can come up with a better name
[17:26:39] jenrzzz: has joined #RubyOnRails
[17:26:54] Papierkorb: a1fa: Why would you then need to call another controllers method?
[17:26:58] a1fa: so on one page i have people diting individual cars, on another page, its a group edit, where it pulls all cars from that inventory to score them
[17:27:19] a1fa: Papierkorb: its a whole another table too
[17:28:36] a1fa: it takes bunch of the cars of same class (ie: type Sedan), and rates how well the inventory looks
[17:28:46] a1fa: silly accounting
[17:29:03] qejk: has joined #RubyOnRails
[17:29:03] barhum2013: has joined #RubyOnRails
[17:29:09] a1fa: its some propriatery method they are using to "rate" if they need to order more cars
[17:29:22] hobodave: has joined #RubyOnRails
[17:29:27] jwarzech: has joined #RubyOnRails
[17:30:32] a1fa: but anyhow /ratings/ controller does this complex thing with find_by_sql
[17:30:44] rhizome: kind of idiosyncratic terminology, but there's no reason why inventory numbers have to involve a separate controller action is there? are these calculations stored at all?
[17:30:46] a1fa: and then (many selects, and joins)
[17:30:55] a1fa: *getting to it rhizome
[17:31:01] chouhoulis: has joined #RubyOnRails
[17:31:28] alexhartley: has joined #RubyOnRails
[17:31:45] a1fa: it combines many differnet inventory tables and option tables, with the ratings table
[17:32:25] a1fa: and if no record is found, it creates it, if record is found it updates it based on the things it pulled from SQL + the prorietery formula they use
[17:32:49] a1fa: (if no record is found in the ratings table)
[17:32:53] cschneid_: has joined #RubyOnRails
[17:33:18] rubyonrailed: has joined #RubyOnRails
[17:33:24] a1fa: but the rating is not final, until they hit submit on the ratings page
[17:33:38] a1fa: or "recalc" button, which refreshes based on the sql query
[17:34:02] a1fa: so i was thinking that this should happen, if they go back and make a change to the car, it should trigger auto update for the rating
[17:34:09] j_mcnally: has joined #RubyOnRails
[17:34:12] a1fa: instead of forcing them to go click refresh, or recalc :)
[17:34:28] rhizome: it sounds like maybe you're not actually trying to call a controller action from another controller, but just submitting a form to a different action than the edit_cars one.
[17:34:57] a1fa: all of the calculation is done in the rating controller
[17:35:17] rhizome: you can certainly have a #calculate method in your Rating model
[17:35:36] rhizome: move that calc to the model, in other words
[17:36:47] benlieb: has joined #RubyOnRails
[17:36:55] a1fa: that never occured to me as an option, with the RoR tutorials i went through, they speak about business logic being inside controller only
[17:37:01] a1fa: and validations inside the model
[17:37:20] jsrn_: has joined #RubyOnRails
[17:37:33] DelDotB: has joined #RubyOnRails
[17:37:44] pcpanic: Yoyo, I have some content in hebrew in my Course model, I am sending a GET to http://localhost/courses.json and json is all gibberish -- "name":"????????????????????????????????????? ??????????????????????????" ---- what needs done ?
[17:37:50] rhizome: no, business logic goes in the model. what tutorials?
[17:37:52] mikecmpbll: has joined #RubyOnRails
[17:38:05] a1fa: rhizome: its been a couple of months back
[17:38:17] rhizome: well they're wrong, or you misinterpreted
[17:38:25] a1fa: probably the latter
[17:38:36] a1fa: i'll try to dig up the tutorial
[17:38:39] rhizome: http://stackoverflow.com/questions/4558800/where-does-business-logic-goes-in-rails
[17:39:36] benlieb: has joined #RubyOnRails
[17:39:49] arooni-mobile: has left #RubyOnRails: ("Leaving")
[17:39:53] maz-dev: has joined #RubyOnRails
[17:39:58] chouhoulis: has joined #RubyOnRails
[17:40:03] djbkd_: has joined #RubyOnRails
[17:40:05] No1Phan: has joined #RubyOnRails
[17:41:22] dopie: has joined #RubyOnRails
[17:41:31] a1fa: rhizome: i will work on converting the logic into the model
[17:41:51] a1fa: rhizome: it does not appear to be any more involved
[17:42:06] rhizome: yeah, it's usually straightforward
[17:43:44] tubbo: ./app/business/serious
[17:43:53] tubbo: that's where i put all my business logic
[17:44:09] kies: has joined #RubyOnRails
[17:44:40] DoctorMonocular: has joined #RubyOnRails
[17:45:36] benlieb: has joined #RubyOnRails
[17:47:08] baweaver: has joined #RubyOnRails
[17:47:59] paulcsmith: has joined #RubyOnRails
[17:49:32] IrishLoop: has joined #RubyOnRails
[17:50:34] Cervajz: has joined #RubyOnRails
[17:54:11] Papierkorb: wuah why is the FF debugger such a piece of sh..iny window.
[17:54:26] ishahnaz: has joined #RubyOnRails
[17:54:45] rhizome: because it's not firebug :P
[17:54:56] zpe: has joined #RubyOnRails
[17:55:08] Papierkorb: is it actually better? on the plugin page it looks the same like the built in tool
[17:55:19] rhizome: i think the UI is better
[17:55:36] rhizome: maybe i'm just used to it, but there are things in FF tools i can never find
[17:57:02] Papierkorb: rhizome: thanks, it is indeed better. I mean, the debugger .. actually debugs!
[17:57:24] choke: has joined #RubyOnRails
[17:57:38] Papierkorb: with the builtin tool it stopped at a debugger; directive in the code, but didn't bother to open the source nor put the console into the functions context, as in, completely useless
[17:58:51] kitsuneyo: ehh, may be a dumb question but what is business logic??
[17:59:03] tubbo: because it's not chrome dev tools ;)
[17:59:07] tvw: has joined #RubyOnRails
[17:59:18] zoidfarb: Just use Firebug instead
[17:59:21] rhizome: chrome dev tools lies between FF and FB, close to FB
[17:59:21] Papierkorb: tubbo: debugging FF specific stuff, Chromiums tools don't really help here D:
[17:59:52] krisquigley: has joined #RubyOnRails
[18:02:48] diegoviola: has joined #RubyOnRails
[18:05:02] tubbo: haha true!
[18:05:30] tubbo: firebug rules fwiw
[18:08:45] qejk: has joined #RubyOnRails
[18:10:29] doodlehaus: has joined #RubyOnRails
[18:11:22] Glyphik: I'm trying to use chart.js in my rails app and this is the coffeescript I wrote to select the canvas element with an id of "categorypie" in my html: https://gist.github.com/psyglyphik/0733915a9d4e255bd715 When I try to load the page, nothing is displayed and my dev tools debugger gives me this error: Uncaught TypeError: Cannot read property 'getContext' of undefined
[18:11:43] naftilos76: has joined #RubyOnRails
[18:11:55] Glyphik: I'm not sure whether this is happening specifically because of a mistake in the way i wrote the coffeescript code or because of a mistake i made somewhere else in my rails app code. Can anybody give me any suggestions as to why this might be happening?
[18:13:09] barhum2013: has joined #RubyOnRails
[18:13:30] jenrzzz: has joined #RubyOnRails
[18:13:39] rhizome: Glyphik: what are all of those @foo things?
[18:15:04] Cache_Money: has joined #RubyOnRails
[18:15:09] Glyphik: instance variables i'm using as data for the chart i'm trying to create with chart.js
[18:15:29] yfeldblum: has joined #RubyOnRails
[18:15:30] rhizome: that's not the way coffeescript works
[18:15:42] rhizome: unless you're processing it through ERB
[18:15:57] rhizome: which you probably aren't, and shouldn't be doing.
[18:17:08] Mago_joao: has joined #RubyOnRails
[18:18:17] baweaver: has joined #RubyOnRails
[18:18:18] Mago_joao: I need help with WashOut GEM http://stackoverflow.com/questions/32125510/ruby-on-rails-washout-gem-soap-defining-events this topic
[18:18:45] Glyphik: so instance variables from the matching controller file cannot be used in the javascript/coffeescript code?
[18:22:59] Mago_joao: has joined #RubyOnRails
[18:23:03] alphaatom: has joined #RubyOnRails
[18:23:40] kidoz: has joined #RubyOnRails
[18:23:53] rhizome: Glyphik: there is no "matching controller" correlation going on
[18:24:05] northfurr: has joined #RubyOnRails
[18:24:08] dstarh: has joined #RubyOnRails
[18:24:41] rhizome: and CS files aren't processed through rails in a way that would give them access to instance variables
[18:25:16] Lightsword: has joined #RubyOnRails
[18:26:03] zoidfarb: has left #RubyOnRails: ()
[18:26:07] jenrzzz: has joined #RubyOnRails
[18:26:29] crystal77: has joined #RubyOnRails
[18:27:31] bricker: Glyphik: best way to get data from server to script is to define javascript variables and pass in the data there... <script>window.YOUR_CONFIG = "<%= @some_config %>";</script>
[18:28:03] rhizome: or pull from the script itself
[18:28:29] nzst: has joined #RubyOnRails
[18:29:15] nzst: Hi, I'm deploying an application to a vagrant box, I've done this a lot of times, but now I just get a white screen when trying to navigate to the site, with no indication in the logs. How do I begin to troubleshoot this?
[18:29:30] greengriminal: has joined #RubyOnRails
[18:29:37] bronson: has joined #RubyOnRails
[18:29:45] greengriminal: is there a way to dynamically call the rails dirty persistence method _changed?
[18:30:04] greengriminal: i.e i can't do Table.send(:attr_changed?)
[18:30:10] andybernard: has joined #RubyOnRails
[18:31:38] rhizome: i think there's an instance method changed? that will list the dirty attrs
[18:31:49] tubbo: Mago_joao: i don't know what `render :soap => ...` is, but typically responses are given in XML. you should probably be able to switch out `render soap: ...` for `render xml: ...` and have it work
[18:32:11] tubbo: Mago_joao: i didn't see anywhere in that gem where they're adding a :soap template handler to ActionView.
[18:32:15] cornerma1: has joined #RubyOnRails
[18:32:31] polpak: people are still using soap?
[18:32:43] dede: has joined #RubyOnRails
[18:32:55] greengriminal: rhizome, that is right #changed? is on the entire object.
[18:32:56] tubbo: polpak: unfortunately, yes
[18:33:02] rhizome: i saw it in a job ad recently
[18:33:10] greengriminal: and that would work but isn't what i'm after
[18:33:17] rhizome: greengriminal: well yes, dirty attrs are only going to be on an instance
[18:33:19] polpak: xml makes programmers cry
[18:33:24] tubbo: i like how that gem includes a link to http://stopsoap.com/ haha
[18:33:52] drale2k: has joined #RubyOnRails
[18:34:40] rhizome: it should also do logger.info "#"*80+"\n\tOH GOD NOT AGAIN\n"+"#"*80
[18:35:23] craigphares: has joined #RubyOnRails
[18:35:42] rhizome: it puts the soap on its skin or it gets the hose again
[18:36:34] enitiz: has joined #RubyOnRails
[18:37:43] jgpawletko: has joined #RubyOnRails
[18:38:57] nzst: What does it mean when my application shows nothing but a whitescreen when navigating through a browser?
[18:39:55] MAQ: has joined #RubyOnRails
[18:40:13] toretore: has joined #RubyOnRails
[18:40:22] Mago_joao: tubbo: tried with render xml, it gave me the same error when using soap: that is "Unexpected => " , so i guess render xml can work, but after that is what is wrong
[18:40:25] sfr^: has joined #RubyOnRails
[18:40:44] tubbo: oh i see your issue
[18:41:11] tubbo: Mago_joao: you forgot brackets. you need render :soap => { :relato => ... }
[18:41:12] maz-dev: has joined #RubyOnRails
[18:41:19] tubbo: Mago_joao: because otherwise ruby doesn't know you're nesting hashes
[18:41:23] universa1: has joined #RubyOnRails
[18:41:30] manfrin: has joined #RubyOnRails
[18:42:49] Mago_joao: it gives me unexpected } refering to : render xml => {:relato => {@relato}... this last } is the error
[18:43:25] tubbo: Mago_joao: well this code you gave me? render :soap => :relato => {@relato}, :reltask => {@reltask} that's not valid ruby
[18:43:46] tubbo: Mago_joao: this is... render :soap => { :relato => @relato, :reltask => @reltask }
[18:43:47] Mago_joao: it is not, is just to show what i want to make
[18:44:04] naftilos76: has joined #RubyOnRails
[18:45:50] Rubie: has joined #RubyOnRails
[18:45:56] jenrzzz: has joined #RubyOnRails
[18:45:58] StartupHub: has joined #RubyOnRails
[18:46:12] sankage: has joined #RubyOnRails
[18:46:28] Mago_joao: tubbo: call returned nothing, no errors, but no data, neither <relato> wait a sec ill get the response thru SOAPUI
[18:47:29] mcr-credil: has joined #RubyOnRails
[18:49:32] Obfuscate: nzst: Make sure you have config.log_level = :debug. If you still don't see anything, try to verify the request is actually making it to your rails app: look at your apache/nginx logs.
[18:49:37] hardtail: has joined #RubyOnRails
[18:49:40] Mago_joao: tubbo: <tns:Relatorios> <value xsi:type="xsd:string"/> </tns:Relatorios> this was the response
[18:50:18] blackmesa: has joined #RubyOnRails
[18:52:13] chichou: has joined #RubyOnRails
[18:52:26] sfr^: has joined #RubyOnRails
[18:52:46] rromanchuk: has joined #RubyOnRails
[18:53:48] juanpaucar: has joined #RubyOnRails
[18:54:13] juanpaucar: has joined #RubyOnRails
[18:55:21] Silox|: has joined #RubyOnRails
[18:56:32] nzst: Obfuscate: this is all i'm seeing in my nginx log http://hastebin.com/ogorecemis.md
[18:57:03] qejk: has joined #RubyOnRails
[18:57:33] broman: has joined #RubyOnRails
[18:58:30] iliketurtles: has joined #RubyOnRails
[18:59:56] universa1: has joined #RubyOnRails
[19:00:27] sfr^: has joined #RubyOnRails
[19:01:26] shinnya: has joined #RubyOnRails
[19:01:32] momomomomo: has joined #RubyOnRails
[19:01:37] quazimodo: has joined #RubyOnRails
[19:02:08] jenrzzz: has joined #RubyOnRails
[19:02:24] mloy: has joined #RubyOnRails
[19:03:11] Lightsword: has joined #RubyOnRails
[19:03:42] nightsh: has joined #RubyOnRails
[19:06:51] StartupHub: has joined #RubyOnRails
[19:07:31] greenride: has joined #RubyOnRails
[19:07:36] sandstrom: has joined #RubyOnRails
[19:07:49] gingray_: has joined #RubyOnRails
[19:08:04] sfr^: has joined #RubyOnRails
[19:08:42] yardenbar: has joined #RubyOnRails
[19:09:17] jenrzzz: has joined #RubyOnRails
[19:09:21] Lightsword_: has joined #RubyOnRails
[19:09:39] nzst: Obfuscate: it's weird, I can access all of my data from the rails console, so I know the database is hooked up alright. Can't get past this white screen
[19:10:13] dudo: has joined #RubyOnRails
[19:10:16] ivanskie: has joined #RubyOnRails
[19:10:32] lindii_: has joined #RubyOnRails
[19:10:55] roolo: has joined #RubyOnRails
[19:11:02] tuelz: has joined #RubyOnRails
[19:11:51] x-light: has joined #RubyOnRails
[19:11:53] Obfuscate: nzst: Okay, so you have a 500 error. What about in error_log? Is nginx serving a blank error page for 500?
[19:12:06] rromanchuk: has joined #RubyOnRails
[19:13:48] nzst: Obfuscate: nothing in the error log
[19:15:33] blackmesa: has joined #RubyOnRails
[19:15:53] Obfuscate: nzst: You should be able to figure out what's serving that page via curl -v
[19:16:52] jgt: has joined #RubyOnRails
[19:17:19] nzst: Obfuscate: http://hastebin.com/afayibodod.vbs
[19:19:25] nahtnam: has joined #RubyOnRails
[19:19:55] nahtnam: Hey! Is there a callback similar to "unconfirmed_email_changed?" but only when its being inserted for the first time? So something like `unconfirmed_email_created?`
[19:20:11] kadoppe: has joined #RubyOnRails
[19:20:33] nahtnam: Basically a callback that only executes when a field has been inserted but no changed or removed
[19:21:08] Obfuscate: nzst: That looks like the request is at least being proxied, due to the set Transfer-Encoding. The question then is what rails is serving for a 500 page, or if it's not even managing to serve something, why?
[19:22:55] Sigma00: nahtnam: you'd have to check in your callback what `unconfirmed_email_was` value is, and if it's empty you'd know its being 'inserted'
[19:23:25] User4587_: has joined #RubyOnRails
[19:23:55] nzst: Obfuscate: this is the dom http://hastebin.com/lonesamoca.xml
[19:25:27] northfurr: has joined #RubyOnRails
[19:25:59] baweaver: has joined #RubyOnRails
[19:26:09] elepedus: has joined #RubyOnRails
[19:26:29] Sylario_: has joined #RubyOnRails
[19:26:42] elv: has joined #RubyOnRails
[19:27:16] joaomdmoura_: has joined #RubyOnRails
[19:27:16] alxndr_: has joined #RubyOnRails
[19:27:17] jenrzzz: has joined #RubyOnRails
[19:27:44] hahuang61: has joined #RubyOnRails
[19:27:59] Zarthus_: has joined #RubyOnRails
[19:28:00] nertzy: has joined #RubyOnRails
[19:28:23] nahtnam: Sigma00: Thats perfect. Thanks. Im surprised you were able to decode what I was trying to say :D
[19:29:03] Stuffness: has joined #RubyOnRails
[19:29:07] nkr-: has joined #RubyOnRails
[19:29:24] Sigma00: I worked in IT for quite a bit, decoding questions is second nature now
[19:29:35] crdpink2: has joined #RubyOnRails
[19:30:08] yfeldblum: has joined #RubyOnRails
[19:30:37] robotbrain: has joined #RubyOnRails
[19:30:38] Obfuscate: nzst: Is that in public/500.html? Find out where it's being served from at least. If you have tracing enabled for your server, you should be able to find out quite a bit more. Have you checked this behavior in development?
[19:31:13] mjc_: has joined #RubyOnRails
[19:31:28] bryancp: has joined #RubyOnRails
[19:31:36] corioliss: has joined #RubyOnRails
[19:31:51] blackmesa: has joined #RubyOnRails
[19:31:52] yaymukund: has joined #RubyOnRails
[19:32:12] Silox|: has joined #RubyOnRails
[19:32:22] ewilliam: has joined #RubyOnRails
[19:32:32] nzst: Obfuscate: it isn't in the public/500.html. The app works fine in development. Thanks for the help
[19:32:48] nzst: i notice there isn't a script/rails i'm used to seeing that
[19:33:43] melter: has joined #RubyOnRails
[19:33:51] chancancode: has joined #RubyOnRails
[19:33:53] leslie: has joined #RubyOnRails
[19:33:53] leslie: has joined #RubyOnRails
[19:34:04] netzfisch: has joined #RubyOnRails
[19:34:26] Iacobus: has joined #RubyOnRails
[19:34:40] Seich: has joined #RubyOnRails
[19:34:45] greengriminal: has joined #RubyOnRails
[19:35:13] Zarthus_: has joined #RubyOnRails
[19:36:03] sfr^: has joined #RubyOnRails
[19:36:26] feignt: has joined #RubyOnRails
[19:36:37] nkr-: has left #RubyOnRails: ()
[19:36:46] baweaver: has joined #RubyOnRails
[19:36:48] nkr: has joined #RubyOnRails
[19:37:08] alxndr: has joined #RubyOnRails
[19:37:14] Silox|: has joined #RubyOnRails
[19:37:40] MartinElvar: has joined #RubyOnRails
[19:39:12] Obfuscate: nzst: I'm a rails novice, so I can't help you much with troubleshooting that specific issue, but there's a limited number of places that page can come from, and I know that e.g. thin prints out copious amounts of information with tracing enabled.
[19:40:01] sfr^: has joined #RubyOnRails
[19:40:19] robotbrain: has joined #RubyOnRails
[19:40:35] tubbo: nzst: in rails 3+, script/rails is no longer necessary
[19:41:03] choke: has joined #RubyOnRails
[19:41:10] tubbo: nzst: !gist your site config for nginx. i think your rails app is fine it's just not connected to nginx
[19:41:10] helpa: nzst: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:41:24] tubbo: nzst: it's pretty easy to screw this up, i've taken to just copying around old configs i know that work across my projects :P
[19:41:42] jenrzzz: has joined #RubyOnRails
[19:41:42] Mago_joao: tubbo: got it from this sample https://github.com/shaofenchen/sample-washout-app
[19:42:00] markelite: has joined #RubyOnRails
[19:42:17] nzst: tubbo: http://hastebin.com/umoxutubim.nginx
[19:42:25] momomomomo: has joined #RubyOnRails
[19:42:27] george2: has joined #RubyOnRails
[19:42:43] nzst: tubbo: it's a standard conf that has worked in the past
[19:42:59] tubbo: nzst: yeah doesn't look wrong to me. plus nginx usually throws a different error when that happens
[19:43:09] roolo: has joined #RubyOnRails
[19:43:40] nzst: it does seem like rails isn't talking to the servers
[19:43:57] Pumukel: has joined #RubyOnRails
[19:44:01] tubbo: nzst: yeah that's what i think is going on
[19:44:06] tubbo: nzst: you don't get any logs in rails?
[19:44:10] tubbo: err, your rails log?
[19:44:18] nzst: no, just the migrations from the initial deploy
[19:44:43] tubbo: nzst: try running rails server and configure nginx to use localhost:3000 instead of a unix socket, just to determine that something *can* be connected...
[19:44:49] ivanskie: has joined #RubyOnRails
[19:45:00] tubbo: nzst: if that works, try to figure out what it is about that unix:/tmp/unicorn.sock path that's screwing you up
[19:45:10] teufelChiCoder: has joined #RubyOnRails
[19:45:24] cball: has joined #RubyOnRails
[19:46:35] wldcordeiro: has joined #RubyOnRails
[19:47:03] mcr-credil: has joined #RubyOnRails
[19:47:18] alex88: has joined #RubyOnRails
[19:49:39] Gm4n: has joined #RubyOnRails
[19:50:34] Mia: has joined #RubyOnRails
[19:50:34] Mia: has joined #RubyOnRails
[19:51:41] Dwarf: has joined #RubyOnRails
[19:51:50] nzst: tubbo: the localhost setup didn't work
[19:52:01] nzst: tubbo: same nothing
[19:52:49] Mia: has joined #RubyOnRails
[19:52:49] Mia: has joined #RubyOnRails
[19:52:59] Motoservo: has joined #RubyOnRails
[19:53:53] nzst: that was a good idea though
[19:54:28] theonorth: has joined #RubyOnRails
[19:55:38] Obfuscate: nzst: You're not getting "nothing" though. You're getting a response page, which tells you something. Now try connecting to localhost:3000 directly with your browser. Is that the same response page?
[19:55:53] urkle: has joined #RubyOnRails
[19:56:04] prestorium: has joined #RubyOnRails
[19:56:14] Mia: has joined #RubyOnRails
[19:56:14] Mia: has joined #RubyOnRails
[19:56:30] nzst: Obfuscate: yes
[19:57:33] Obfuscate: Okay. Now you at least know that the problem is on rails end. Next: how to enable verbose tracing with unicorn?
[19:57:33] nzst: Obfuscate: wait, no, localhost:3000 works, when it's a local server. I'm deploying to a virtual machine
[19:58:04] nzst: Obfuscate: i just tried to run a localhost:3000 on that vagrant machine, point nginx at it, and I got the same white screen behavior
[19:58:31] nzst: Obfuscate: that suggestion bypassed unicorn
[19:58:55] Obfuscate: The point to this exercise is to determine whether nginx is serving the 500 page, or if rails/unicorn is.
[19:58:59] netzfisch: has joined #RubyOnRails
[19:59:54] Obfuscate: Access localhost:3000 directly through the browser, not involving nginx. What happens?
[20:00:10] nzst: my app works fine when run locally
[20:00:15] nzst: as expected
[20:00:46] krisquigley: has joined #RubyOnRails
[20:01:03] Mia: has joined #RubyOnRails
[20:01:09] jtthedev: has joined #RubyOnRails
[20:01:40] Obfuscate: You can use text-mode browsers like elinks (or curl) to test this on the production server.
[20:02:25] nzst: oh, good idea
[20:02:33] alphaatom: has joined #RubyOnRails
[20:03:25] jtthedev: Can someone help me, I am trying to pass the results of a method to a query .where, I am unsure how to go about this, it's pretty much telling the where statement of the sql query to pass the following todays date as a param... this is what I ahave come up with so far
[20:03:38] jtthedev: any help or pointing in the right direction is greatly appreciated
[20:04:34] pramsky: has joined #RubyOnRails
[20:05:23] tannerj: has joined #RubyOnRails
[20:05:31] Mia: has joined #RubyOnRails
[20:05:31] Mia: has joined #RubyOnRails
[20:06:25] nzst: Obfuscate: i think that narrowed the issue down, trying a few things now
[20:06:56] TheNet: has joined #RubyOnRails
[20:07:15] TheNet: is there a good gem for an email interface?
[20:07:30] melter: has joined #RubyOnRails
[20:07:50] nzst: tubbo: Obfuscate: ok, so it was something simple, but it was super difficult to trouble shoot, i'm almost embarassed to say that I didn't add a secret key for my vagrant environment
[20:08:03] sankage: jtthedev: !gist what you're working on and I will help
[20:08:18] bruno-: has joined #RubyOnRails
[20:08:31] tubbo: nzst: interesting. so it was a permissions issue :)
[20:08:57] weaksauce: TheNet different from actionmailer?
[20:09:07] nzst: tubbo: yes, see whitescreen of death, assume permissions issue
[20:09:37] leeky: has joined #RubyOnRails
[20:09:49] Mia: has joined #RubyOnRails
[20:09:49] Mia: has joined #RubyOnRails
[20:10:00] TheNet: weaksauce: actionmailer doesn't provide an interface for viewing/composing, does it?
[20:10:25] tubbo: nzst: yeah...it's kind-of annoying, but it means nginx is seceding control of that socket to whatever protocol you defined, so there's no way to recover from an error
[20:10:33] tubbo: when you proxy pass, nginx just hands the connection off and hopefully it worked.
[20:10:34] weaksauce: TheNet ah, no it doesn't. I am not aware of anything like that.
[20:10:40] tubbo: unless it can't hit the file or something
[20:12:51] blackmesa: has joined #RubyOnRails
[20:12:57] nzst: Obfuscate: tubbo: Thank you, both.
[20:14:06] Obfuscate: nzst: Ah, so the problem wasn't related to either then? Well, at least it's solved. :)
[20:14:49] nzst: Obfuscate: I needed that troubleshooting technique to figure it out, clever bit of thinking
[20:15:33] Obfuscate: Well, figuring out what's producing the error is usually a good first step.
[20:15:46] sonofdirt: has joined #RubyOnRails
[20:16:12] northfurr: has joined #RubyOnRails
[20:16:29] ModusPwnens: has joined #RubyOnRails
[20:17:04] alphaatom: has joined #RubyOnRails
[20:17:27] yfeldblum: has joined #RubyOnRails
[20:18:30] allcentu1: has joined #RubyOnRails
[20:19:23] Mia: has joined #RubyOnRails
[20:19:23] Mia: has joined #RubyOnRails
[20:19:39] tannerj: Good Day! I'm trying to test that a message is passed to an instance variable from a controller with rspec using expect(assigns(instance_variable)).to receive(:message) and it keeps failing. I've got a gist of what I'm trying to do here: https://gist.github.com/tannerj/a69eda028c39c6df5122 . Can anyone tell me what I'm doing wrong? Thanks.
[20:20:55] weaksauce: TheNet you can check out http://awesome-ruby.com/ and look at the email section you will probably have to roll your own as there is no "gmail" gem but perhaps using a few of them together would help
[20:21:18] chichou: has joined #RubyOnRails
[20:21:52] TheNet: weaksauce: great resource, thanks!
[20:21:56] momomomomo: has joined #RubyOnRails
[20:21:57] sdwrage: has joined #RubyOnRails
[20:22:09] weaksauce: TheNet you're welcome
[20:22:17] arup_r: has joined #RubyOnRails
[20:22:59] arup_r: Hi.. How would I write `null` using the capture in a helper ?
[20:23:05] arup_r: https://gist.github.com/aruprakshit/54f74d1f16e968671c61
[20:23:23] arup_r: I am getting error ndefined local variable or method `null' for #<#<Class:0xb46a58d8>:0xb46a5388>
[20:23:42] Papierkorb: arup_r: *nil
[20:23:59] arup_r: nil will be translated to JS null
[20:24:02] benlieb: has joined #RubyOnRails
[20:24:04] arup_r: automatically ?
[20:24:11] naftilos76_: has joined #RubyOnRails
[20:24:14] Papierkorb: that's the case for JSON, so I'd guess, yes.
[20:24:46] arup_r: ok.. lt me try
[20:25:43] paulcsmith: has joined #RubyOnRails
[20:28:09] qejk: has joined #RubyOnRails
[20:28:17] alphaatom: has joined #RubyOnRails
[20:28:52] x-light: has joined #RubyOnRails
[20:29:44] maz-dev: has joined #RubyOnRails
[20:30:13] jenrzzz: has joined #RubyOnRails
[20:30:32] bronson: has joined #RubyOnRails
[20:30:33] Coldblackice: has joined #RubyOnRails
[20:30:33] Mia: has joined #RubyOnRails
[20:30:33] Mia: has joined #RubyOnRails
[20:32:39] arup_r: no it is not converting
[20:32:50] arup_r: Papierkorb,
[20:33:15] Papierkorb: what is that thing even supposed to do
[20:34:16] mwlang: has joined #RubyOnRails
[20:34:37] mwlang: Does anyone know if IE 11 still evalutes <!--[if IE]> to true in HTML?
[20:35:14] Radar: arup_r: Show us what you've tried.
[20:35:21] mwlang: It *seems* as though the ie specific CSS is no longer loading, but I can???t actually replicate the issue my client is seeing even on browserstack.com
[20:35:26] Radar: my guess is that you put 'nil' and not nil
[20:35:27] arup_r: Papierkorb, I am trying to create <sceipt> tag using the helper
[20:35:39] slash_nick: mwlang: Sorry I don't... I left my IE browsers back in 2007 :P
[20:35:51] Papierkorb: arup_r: what does the output look like?
[20:35:56] mwlang: slash_nick: lucky you!
[20:36:02] Papierkorb: Radar: he posted a gist above
[20:36:06] Papierkorb: Radar: [22:23] <arup_r> https://gist.github.com/aruprakshit/54f74d1f16e968671c61
[20:36:35] Papierkorb: Radar: OHAYO!, Good Sir ;)
[20:36:36] arup_r: Papierkorb, https://gist.github.com/aruprakshit/54f74d1f16e968671c61
[20:36:44] slash_nick: mwlang: just kidding! I usually target lte IE9 with those conditionals, not sure how IE11 plays with them
[20:37:05] arup_r: But the script tag doesn't looks like what I want it to be
[20:37:22] Papierkorb: arup_r: well that's broken anyway, and it's not even a good idea to use application/javascript as type.
[20:37:32] jenrzzz: has joined #RubyOnRails
[20:38:06] tannerj: has left #RubyOnRails: ()
[20:38:11] mwlang: stack overflow: ???Ten. Million. Questions. Let's celebrate all we've done together. ???
[20:38:33] Radar: arup_r: so it's not rendering properly there. Call .html_safe on the end.
[20:38:45] Papierkorb: arup_r: That's what I have in one of my helpers: "<script id=\"client_configuration\" type=\"application/json\">#{config.to_json.gsub '</', '<\/'}</script>" # Not too pretty, and could use a %{} I guess, but functional.
[20:39:15] arup_r: Radar, you mean to the output of the content_tag to call html_safe
[20:39:24] annlewis: has joined #RubyOnRails
[20:40:01] mwlang: oh, lovely???. From IE10 on, conditional comments are no longer supported: msdn.microsoft.com/en-us/library/ie/hh801214(v=vs.85).aspx
[20:40:35] arup_r: Radar, I called .html safe but nothing improved
[20:41:33] Papierkorb: mwlang: If they continue pushing a new version of their "browser" only every five years or so all webdevs of the world should sue MS for causing life shortening heart attacks
[20:42:03] slash_quit: Papierkorb: no kidding
[20:42:11] tubbo: isn't IE "evergreen" these days?
[20:42:20] Papierkorb: more like everblue
[20:42:39] Papierkorb: both in terms of their icon and in terms of the color of your face after trying to get shit to work with it
[20:42:50] slash_quit: Papierkorb: so, our policy is to support "Latest IE and 2 back"..... Since windows is moving to "Edge", does that mean I'll always be stuck supporting IE11/10/9?
[20:43:06] paulcsmith: has joined #RubyOnRails
[20:43:06] tubbo: or you change your policy
[20:43:15] slash_quit: Gone is that feeling of "eventually I won't have to support IE9"
[20:43:15] Norrin: has left #RubyOnRails: ("Dueces")
[20:43:18] tubbo: especially in a few years from now..
[20:43:33] slash_quit: I'm sure we'll update it... god I hope Edge is different
[20:43:45] Papierkorb: It is! You can draw on it!
[20:43:49] Papierkorb: And then .. share it!
[20:43:50] tubbo: IE9 is still ok. as long as you don't have to support IE7 and IE8, because *most* of the newer JS frameworks aren't even bothering to support that far back
[20:43:54] Papierkorb: The feature you ever needed
[20:44:12] slash_quit: ever so needed
[20:44:49] delanno: has joined #RubyOnRails
[20:45:39] Papierkorb: I mean come on, can't be that far back when you were a toddler and .. hopefully didn't have to put up with that shit and instead used crayons to draw on your walls.
[20:46:02] broman: has joined #RubyOnRails
[20:47:10] mwlang: Papierkorb: all I can really say is, ???DOWN WITH IE6??? Everything after that has been a distinct improvement as far as IE goes.
[20:47:25] mwlang: ???.of course the bar was quite low....
[20:48:08] Papierkorb: IE 11 was okay-ish according to caniuse.com. IE10 was .. somehwat useful except for some neat things
[20:48:20] mwlang: since adopting Bootstrap Twitter???s responsive framework and jQuery in all projects, I really haven???t even had to crack open IE to check if it works.
[20:48:27] Papierkorb: And IE9 is so far back that I guess my stuff wouldn't even render there
[20:49:19] mwlang: and I add modernzr to get things more or less onto an even footing across the board.
[20:49:20] Papierkorb: though modern.ie/ is quite nice if you really need to test your stuff on a IE
[20:49:53] krisquigley: has joined #RubyOnRails
[20:49:55] jenrzzz: has joined #RubyOnRails
[20:50:41] mwlang: I think Microsoft at least acknowledges that they are no longer setting the course in the browser wars and have adapted their internal ways towards delivering open/standards compliant browsers going forward.
[20:50:51] jamgood96: has joined #RubyOnRails
[20:51:38] mwlang: this particular project I???m dealing with predates all the responsive frameworks, so I???m only marginally surprised to be dealing with an IE issue
[20:51:54] bePolite: has joined #RubyOnRails
[20:52:05] nettoweb: has joined #RubyOnRails
[20:52:19] djbkd: has joined #RubyOnRails
[20:53:47] user1138: has joined #RubyOnRails
[20:55:22] tubbo: mwlang: haha i'd be surprised if you *didn't* deal with IE issues on that godforsaken project
[20:55:40] tubbo: mwlang: i really, really hope that you aren't just working in rails 1.x all day, and you got some other projects to do that are more modern :)
[20:57:10] mwlang: tubbo: heh???this is a totally different project. ;-) It???s Rails 4.x, but I was actually able to migrate this one from Rails 2.3 to Rails 4.x in one giant leap.
[20:57:18] mwlang: since it was sanely written.
[20:57:34] mwlang: but I didn???t touch the stylesheet stuff at all.
[20:58:25] tubbo: mwlang: oh that's nice :)
[20:58:56] tubbo: IE 6 has been irrelevant for a long time now, i'm surprised people are still developing for it
[20:59:09] tubbo: i can't think of anyone i'd care to develop for who would require their site to work with IE 6
[21:01:20] mwlang: hmmm???I???m not targeting IE6 ??? that???s just a snarky retort to Papierkorb???s comment about IE
[21:01:57] mwlang: IE6 is dead as far as I know???seems like last stats I saw, it had a browser share of something like 0.005% of total traffic.
[21:01:58] ngscheurich: has joined #RubyOnRails
[21:03:11] darrenca_: has joined #RubyOnRails
[21:03:40] mwlang: actually, first time I???m actually looking for IE6 stats in years???it???s now no longer being reported in 2015 year??? http://www.w3schools.com/browsers/browsers_explorer.asp
[21:03:53] mwlang: IE6 is dead. long live IE6!
[21:04:04] darrenca_: has joined #RubyOnRails
[21:04:51] rakm_: has joined #RubyOnRails
[21:09:24] tubbo: lol w3schools
[21:10:27] Cervajz: has joined #RubyOnRails
[21:12:55] darwingr: has left #RubyOnRails: ()
[21:13:31] Cache_Money: I have a Rails app (Ubuntu, NGINX, Passenger) running on an EC2 instance. This app lives on "reports.example.com". I want to build another Rails app (API only) and have it live at "api.reports.example.com". Is that just something I configure within NGINX?
[21:14:39] elv: has joined #RubyOnRails
[21:16:14] DelDotB: has joined #RubyOnRails
[21:17:57] rhizome: Cache_Money: generally, and DNS
[21:19:16] Cache_Money: rhizome: I use DNS to route requests to "reports.example.com/..." to my EC2 instance. And then use NGINX to route "api.reports.example.com/..." to the Rails API-specific app, right?
[21:19:27] elektronaut: has joined #RubyOnRails
[21:19:51] rhizome: no, DNS needs both, either as A or CNAME records
[21:20:22] StartupHub: has joined #RubyOnRails
[21:21:24] Limix: has joined #RubyOnRails
[21:23:07] volk_: has joined #RubyOnRails
[21:23:11] Rubie: has joined #RubyOnRails
[21:23:31] mwlang: Cache_Money: ???api.reports.example.com??? or any other named URI must be resolved by a DNS server to an IP address, so you always need a DNS entry for name resolution.
[21:23:32] FernandoBasso: has joined #RubyOnRails
[21:24:02] beauby: has joined #RubyOnRails
[21:24:25] bricker: relevant: https://howdns.works/
[21:24:33] mwlang: nginx, apache or whatever webserver can then handle specific URI requests based on how you configure your virtual server sections.
[21:24:41] Cache_Money: okay. So, after I update our DNS can I use this tutorial configure NGINX https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts?
[21:25:10] Cache_Money: instead of example.com I'll use reports.example.com and instead of test.com I'll use api.reports.example.com
[21:25:31] mwlang: Cache_Money: yes
[21:25:46] Cache_Money: cool, thanks!
[21:25:51] volk_: hey guys, just trying to conceptualize something.. what kind of pattern would you use if you have a model with children that use 80% of its attributes.. with a few of their own as well as the children being like other children. so Child1 < Parent , and Child2 < Parent, but child1 && child2 can also be mixed sometimes ..
[21:26:21] sonofdirt: has joined #RubyOnRails
[21:27:13] enitiz: has joined #RubyOnRails
[21:27:17] enitiz_: has joined #RubyOnRails
[21:27:18] volk_: i thoguht about STI
[21:27:20] rhizome: i think you need to use more words to describe it, but on the face i would say that Parent is an insufficient abstraction there
[21:27:29] bricker: volk_: that's a tough question to answer, it requires deep understanding of the business needs and specifics about the models to even start
[21:27:38] tubbo: STI is really a bad idea unless you absolutely know you're going to need it
[21:27:40] DoubleMalt: has joined #RubyOnRails
[21:27:55] tubbo: and you know it's never going to cause problems
[21:28:05] tubbo: otherwise it unnecessarily limits your architecture
[21:28:13] dopie: has joined #RubyOnRails
[21:28:22] tubbo: volk_: my rule of thumb is i don't make different models until i need to make different tables and store bits of data elsewhere in different tables
[21:28:35] tubbo: until you need differing data, why not just use support class POROs?
[21:28:43] ivanskie: has joined #RubyOnRails
[21:28:48] rhizome: rails g model Stuff
[21:29:15] doodlehaus: has joined #RubyOnRails
[21:29:51] johntrails: has joined #RubyOnRails
[21:30:11] beauby: Any way to add a class method (not an instance method) at runtime?
[21:30:25] EminenceHC: has joined #RubyOnRails
[21:31:20] MartinElvar: has joined #RubyOnRails
[21:31:21] volk_: okay so lets say i have an event. there are 2 different types of events. one event is a ???VIP??? event??? and the other is a ???Regular??? event. VIP events have their own special lists, but some VIP events can also have separate lists for regular people as well. VIP events also have other special attributes that define them
[21:31:30] baweaver_: has joined #RubyOnRails
[21:31:41] volk_: at the same time i want to keep the logic open to other types of events so its easy to just add them in
[21:31:45] volk_: withour refactoring everything
[21:32:31] volk_: i wonder if thats a terrible example
[21:32:50] rhizome: i wouldn't call a list an attribute
[21:32:57] x-light: has joined #RubyOnRails
[21:33:05] bmurt: has joined #RubyOnRails
[21:33:11] enitiz: has joined #RubyOnRails
[21:33:29] johntrails: can someone please help me out with passing the results of a method to a .where clause.. i have a method that returns todays date, I want to pass that day as a param... in this pastie you will see my relevant methods and what I have tried so far
[21:33:33] johntrails: http://pastie.org/10365008
[21:34:11] johntrails: since I am running this today.. the SQL equivalent of what I am trying to achieve would be "select * from dailysnapshots where ship_date = '20-AUG-15'"
[21:34:25] rhizome: johntrails: class methods that return relations are essentially the same as scopes. however, scopes can also take arguments
[21:34:33] graft: has joined #RubyOnRails
[21:34:37] hahuang65: has joined #RubyOnRails
[21:34:46] graft: hey all, how the heck do you debug coffeescript in your rails apps?
[21:35:04] johntrails: rhizome: what's the best approach to finding a solution to my problem ?
[21:35:07] volk_: step 1: dont use coffeescript ;p
[21:35:26] rhizome: johntrails: def by_date(date); Foo.by_date(Date.today)
[21:35:47] volk_: jk but source maps help
[21:36:12] StartupHub: has joined #RubyOnRails
[21:36:35] graft: source maps? and why not use coffeescript?
[21:37:02] j_mcnally: has joined #RubyOnRails
[21:37:29] rhizome: johntrails: google class methods scopes
[21:38:10] Sigma00: a local rails shop is starting a rails discussion event once a week... sounds fun.
[21:38:25] Sigma00: and it's pretty smart of them, could help them find some good talent
[21:38:34] volk_: graft: coffeescript, personallty i dont like having another level of indirection between me and my code, and i want full control of my Javscript
[21:38:58] volk_: as for source maps
[21:39:03] volk_: are you asking what they are?
[21:39:16] Radar: rhizome: !rule13
[21:39:16] helpa: rhizome: If you're going to tell someone to "Just google it" or "RTFM", tell them what terms to use on Google exactly, or link them to the place in the documentation.
[21:39:31] Radar: Might be more helpful here to link to the documentation specifcally
[21:39:34] graft: i understand what they are, but not how i can make them available
[21:39:36] rhizome: johntrails: google "class methods scopes"
[21:39:38] Radar: Google might not return results that johntrails can interpret.
[21:40:31] Radar: johntrails: Do you want to return all records in DailySnapshot for today only?
[21:40:50] rhizome: i know what i'm typing
[21:41:09] Radar: rhizome: Do you know that you're probably being unhelpful too?
[21:41:28] graft: Radar: why don't you just provide the documentation instead of sniping rhizome
[21:41:42] Sigma00: johntrails: always include error messages with what you've tried. What was returned and what you expected
[21:41:44] sprite--: has joined #RubyOnRails
[21:41:45] Radar: graft: I'm trying to understand the question better before I go espousing the answer.
[21:41:50] volk_: graft: im assumign your initial question is that its tough to parse the compiled javascript from the coffeescript in your browser?
[21:42:03] sprite--: has left #RubyOnRails: ()
[21:42:08] sprite--: has joined #RubyOnRails
[21:42:10] craigphares: has joined #RubyOnRails
[21:42:27] graft: volk_: essentially, yes. or, rather, i'm not sure how to make rails and/or my browser give me useful error messages
[21:42:44] graft: volk_: that point me to the correct place in my coffeescript code
[21:42:58] johntrails: Radar: correct, I only want dailysnapshots to always turn only todays records
[21:43:17] johntrails: Sigma00: will do.
[21:43:18] Radar: johntrails: https://github.com/radar/by_star <- install that gem and then you can do DailySnapshot.today
[21:43:23] Radar: That will only return records from today.
[21:43:30] Radar: You don't need that class method at all then.
[21:44:01] Radar: i.e. https://gist.github.com/radar/d959422af030af07c244
[21:44:05] Radar: Thanks Sigma00 :)
[21:44:09] sprite--: Is there a way to modify the request body in a before_action? Basically I have a x-www-form-urlencoded request with a param 'signed_body' in the format 'signature.jsonbody'... I want to set the raw post body to the contents of jsonbody in a before filter.
[21:44:48] volk_: graft: im not a pro with source maps but at my last gig we used coffeescript and one of our front end devs introduced source maps which helped debugging a lot. i would start by looking into this article http://ryanflorence.com/2012/coffeescript-source-maps/ ??? the otehr thing was that i thinkkkk there might be a chrome browser plugin to help your console deal with coffeescript
[21:44:56] tuelz: has joined #RubyOnRails
[21:45:43] rasengan: has left #RubyOnRails: ()
[21:45:49] StartupHub: has joined #RubyOnRails
[21:45:54] Scriptonaut_: has joined #RubyOnRails
[21:47:29] bmurt: has joined #RubyOnRails
[21:49:24] broman: has joined #RubyOnRails
[21:49:50] blackmesa: has joined #RubyOnRails
[21:50:38] johntrails: has joined #RubyOnRails
[21:51:25] wethu: has joined #RubyOnRails
[21:51:26] johntrails: glad to have left nyc after living there my entire life... but i damn miss the stability of my internet access... in jersey internet goes out 3 - 4 times a day
[21:51:32] johntrails: radar, i got https://github.com/radar/by_star
[21:51:38] frzn: has joined #RubyOnRails
[21:51:39] johntrails: that's the last thing i saw, not sure if you said anything else after that
[21:51:42] johntrails: I am checking it now
[21:51:51] Radar: johntrails: https://gist.github.com/radar/d959422af030af07c244
[21:53:02] johntrails: Radar: will this work on specific date fields outside of the rails norm of created_at / updated_at? this specific data is being pull from a table sitting on oracle that does not have those fields
[21:53:11] johntrails: k.. thanks for links.. checking now
[21:53:20] crdpink: has joined #RubyOnRails
[21:53:37] allcentu1: has joined #RubyOnRails
[21:54:08] johntrails: awesome, checking now.. thanks
[21:54:15] rakm: has joined #RubyOnRails
[21:54:42] Radar: I can't remember what your field was called and my internet' getting slow because I'm getting close to the city
[21:55:08] Radar: I think the syntax is DailySnapshot.by_day(field: :ship_date)
[21:55:40] doodlehaus: has joined #RubyOnRails
[21:58:21] StartupHub: has joined #RubyOnRails
[21:58:37] sprite--: https://gist.github.com/sprite2005/306fd399623d5fe578e9 is there a way to accomplish something like what I'm trying to do here in a before filter? Obviously I can't set raw post cause there is no raw_post=
[21:58:48] crdpink: has joined #RubyOnRails
[21:59:08] diegoviola: has joined #RubyOnRails
[21:59:28] bruno-: has joined #RubyOnRails
[22:00:02] sprite--: Maybe I should just parse the body and manually set the params?
[22:00:11] johntrails: got it... field is ship_date
[22:00:36] johntrails: so the correct would be Dailysnapshot.today(field: :ship_date) ?
[22:02:50] lsone: has joined #RubyOnRails
[22:03:03] johntrails: oh dude... this is perfect
[22:03:10] johntrails: thank you so much... awesome gem
[22:03:39] jobewan: has joined #RubyOnRails
[22:03:41] lsone: has joined #RubyOnRails
[22:04:07] leeky: has joined #RubyOnRails
[22:04:09] johntrails: instantly going to use this on another app that we have in production..
[22:04:11] fragamus: has joined #RubyOnRails
[22:06:46] prestorium: has joined #RubyOnRails
[22:07:42] Lightsword: has joined #RubyOnRails
[22:08:05] darwingr: has joined #RubyOnRails
[22:09:26] ddv: has joined #RubyOnRails
[22:09:32] nobitanobi: has joined #RubyOnRails
[22:09:53] emptyflask: has joined #RubyOnRails
[22:10:34] noodman: has joined #RubyOnRails
[22:12:12] jenrzzz: has joined #RubyOnRails
[22:15:49] rromanch_: has joined #RubyOnRails
[22:16:28] baweaver: has joined #RubyOnRails
[22:17:04] riotjones: has joined #RubyOnRails
[22:19:09] Cache_Money: How would I write this in a more idiomatic way? https://gist.github.com/anonymous/e1364f0b800b586c9f3a
[22:23:16] andybernard: Cache_Money: I threw something quickly together. didn't test it but its as a comment
[22:23:46] Radar: johntrails: happy to have helped :)
[22:23:51] Cache_Money: andybernard: thanks, that looks like something I've seen before. And much cleaner than mine! I'll test it now
[22:23:53] darwingr: has joined #RubyOnRails
[22:24:08] baweaver: has joined #RubyOnRails
[22:24:08] inoter: has joined #RubyOnRails
[22:24:10] barhum2013: has joined #RubyOnRails
[22:24:30] andybernard: Cache_Money: its never really a good idea to have any type of infinite loop, but thats my 2 cents :)
[22:25:08] Cache_Money: andybernard: how would you go about creating a unique ID for each object before it's saved?
[22:25:22] andybernard: trying to think through that right now haha
[22:25:35] doublemalt_: has joined #RubyOnRails
[22:25:52] andybernard: the chances of a SecureRandom choosing the same number isn't very high
[22:26:35] andybernard: you SHOULD be fine just doing a self.uid = SecureRandom.hex(3)
[22:26:47] Cache_Money: even SecureRandom.hex(3)? It's only 6 chars
[22:26:59] andybernard: 6 hex characters
[22:27:02] Cache_Money: that's why I figure I should check it
[22:27:54] Radar: SecureRandom.uuid
[22:28:06] Victor52: has joined #RubyOnRails
[22:28:17] elepedus: has joined #RubyOnRails
[22:28:22] andybernard: 6 hex characters has some massive amount of possibilities, but I agree with Radar
[22:28:32] Radar: does it really?
[22:28:39] polpak: 16^6 possibilities
[22:28:41] Radar: Only 16 million combinations
[22:28:49] andybernard: ok security wise, no not massive
[22:28:59] andybernard: but chances that SecureRandom is going to generate the same combination?
[22:29:09] andybernard: unless you are dealing with massive data, i wouldn't worry
[22:29:19] Deck`: has joined #RubyOnRails
[22:29:20] polpak: 1 in 16million
[22:29:45] barhum2013: Hello everyone, I am thinking of training some low income people in Guatemala with rails. Jobs here don???t pay very well and not to many rails jobs to go around. Do you think there is good demand for entry junior rails developers for remote work?
[22:29:45] Radar: Better off to use something that is less likely to cause a collision and is a universally accepted standard.
[22:29:46] polpak: but that's just for one attempt
[22:30:24] andybernard: Radar: I am completely with you. I was merely working under the assumption that Cache_Money wanted a 6 digit uid. Of course the longer the better.
[22:30:54] blackmesa: has joined #RubyOnRails
[22:30:57] Deck`: Is there a way to exlude scope from quiery? I mean if a have scope :red. -> { where(color: :red) } how to get everything except red?
[22:31:13] Cache_Money: andybernard: you're right, I didn't want to use SecureRandom.uuid because I'm looking for a smaller string
[22:31:26] bronson: has joined #RubyOnRails
[22:31:43] Radar: Deck`: where("color != 'red'")
[22:31:53] Radar: Deck`: I don't think there's a way to negate the scope that
[22:31:54] andybernard: Deck`: scope :red, -> not.where(color: :red) or where.not(color: :red), i can never remember
[22:32:10] Radar: andybernard: ooh I always forget about that syntax
[22:32:27] Radar: it's where.not
[22:32:29] andybernard: and its a bit different if you are using mongoid
[22:32:43] andybernard: ah thank you Radar, no matter how many times I use that I never remember
[22:32:46] helpa: Don't you mean lolgoid?
[22:32:54] andybernard: I love mongoid!
[22:32:55] blackmesa: has joined #RubyOnRails
[22:33:09] Deck`: Ye, using where I know, thanks. I thought there was a way to exclude particular scope.
[22:33:14] havenwood: has joined #RubyOnRails
[22:33:20] Radar: andybernard: I bet you like recovering your data too.
[22:33:40] Radar: Now that PostgreSQL has json fields there is no reason, imo, to use Mongo at all.
[22:33:41] andybernard: I have honestly never had a problem losing data. and even if I did its blazing fast to backup/restore
[22:34:05] Radar: https://aphyr.com/posts/284-call-me-maybe-mongodb
[22:34:28] andybernard: wait PostgreSQL has json fields?
[22:34:33] andybernard: I honestly never knew that
[22:34:38] maz-dev: has joined #RubyOnRails
[22:34:48] Radar: http://www.postgresql.org/docs/9.4/static/datatype-json.html
[22:34:51] andybernard: now that is enticing
[22:35:04] Radar: I use it to great success in two Rails apps that we have at Marketplacer.
[22:35:29] Radar: One stores the JSON'ified + manipulated version of an XML feed so that I can search on fields from that, and the other I'm just using as a simple key-value store.
[22:35:53] Radar: the kv store is just option values for product variants, so something like [{ type: "Colour", value: "Black"}].to_json
[22:35:58] Radar: It works so well
[22:36:13] andybernard: interesting...
[22:36:33] andybernard: unfortunately where I work we are quite invested in mongoid now.
[22:36:47] andybernard: its speed is quite beneficial for our large volumes of data
[22:37:14] andybernard: and swapping to postgres would be a nightmare
[22:37:34] Radar: Yeah it's not exactly like you can change mongoid.yml to database.yml and blammo
[22:37:54] andybernard: wouldn't that be nice? haha
[22:38:49] baweaver: Radar: new gem idea
[22:38:56] Radar: baweaver: you can write it
[22:38:59] noodman: has joined #RubyOnRails
[22:39:08] Radar: I don't think it would be easy to automatically convert
[22:39:09] baweaver: man that was fast on the reply
[22:39:24] baweaver: Could call it rapture
[22:39:31] RandyT_: has joined #RubyOnRails
[22:39:36] Radar: 8 seconds is pretty good
[22:39:41] Radar: not my fastest
[22:39:53] Radar: I replied to nahtnam BEFORE he asked his question two days ago
[22:40:11] Limix: has joined #RubyOnRails
[22:40:11] nahtnam: I can confirm that
[22:40:59] andybernard: hey newport beach! im not far from there
[22:41:04] andybernard: took a look at marketplacer
[22:41:20] Radar: I'm based in the Melbourne, AU office.
[22:41:28] andybernard: of course haha
[22:41:39] Radar: Melbourne was voted most liveable city in the world again for the 5th year in a row.
[22:41:44] Radar: My home town, Adelaide, is 5th
[22:41:54] quazimodo: has joined #RubyOnRails
[22:42:00] andybernard: well, southern california is not the most liveable place, prices are absolutely crazy
[22:42:15] jgt: has joined #RubyOnRails
[22:42:18] Radar: so if I can't convince you to move to PostgreSQL right now, how about you move to Melbourne? :P
[22:42:24] andybernard: I could buy a house in any other state (mostly) for the price of my rent
[22:42:30] andybernard: haha I'd be enticed to do so.
[22:42:32] Radar: andybernard: How much is your rent?
[22:42:36] baweaver: Rapture wasn't taken as a name yet :D
[22:42:53] yfeldblum: has joined #RubyOnRails
[22:43:00] andybernard: I found fairly cheap, 1.5ish
[22:43:00] baweaver: Radar: Know of any good sample mongo dbs?
[22:43:12] Radar: andybernard: size?
[22:43:17] troyready: has joined #RubyOnRails
[22:43:48] Radar: I pay ~$1,900USD for a 4 bedroom apartment.
[22:44:02] julienk: has joined #RubyOnRails
[22:44:03] Radar: Not sure.
[22:44:17] Radar: AU properties are generally measured in rooms + bathrooms
[22:44:21] Radar: 4 bedrooms, 2 bathrooms
[22:44:25] andybernard: I was on the east coast recently, and like mansion type houses were going for 300k
[22:44:59] Radar: I saw 5bedrooms in Las Vegas going for $180k
[22:45:07] andybernard: yeah what part of Vegas haha
[22:45:13] andybernard: outskirts goes for crazy cheap
[22:45:14] Radar: Caveat: they were near Switch's data center, which is near to the desert.
[22:45:49] diego2: has joined #RubyOnRails
[22:46:27] baweaver: ACTION does not want to look at house prices
[22:46:46] andybernard: sorry, i mean you have to plug in the gem to the service object
[22:47:07] andybernard: #mongomasterrace
[22:47:13] diego2: has joined #RubyOnRails
[22:47:50] baweaver: Oh I don't mind, just more of stating that housing around here is a nightmare.
[22:48:16] baweaver: SF Bay Area
[22:48:25] andybernard: oooooh yeah i feel for you
[22:49:05] kitsuneyo: has joined #RubyOnRails
[22:49:35] jocuman: has joined #RubyOnRails
[22:50:07] rhizome: all you have to do is move to SF 20 years ago :P
[22:54:17] mices: has joined #RubyOnRails
[22:54:39] kitsuneyo: has joined #RubyOnRails
[22:55:01] mices: if there's an "Orders" table then there's an Order object, right?
[22:55:12] choke: has joined #RubyOnRails
[22:55:14] jenrzzz: has joined #RubyOnRails
[22:55:26] mices: if the tables name is Orders the objects name is Order
[22:55:44] andybernard: no, needs to have a class if I recall correctly
[22:55:58] mices: s/object/class/
[22:56:03] mices: that's what i meant
[22:56:19] mices: so then the class's name would be Order for the table Orders
[22:56:50] northfurr: has joined #RubyOnRails
[22:56:59] mices: @orders=Order would place the class with every row into the @orders variable?
[22:57:08] kitsuneyo: how would i generate a controller with class Products::BuildController < ApplicationController? i'm using Wicked to make a multi-step form and trying to follow this guide.
[22:57:19] kitsuneyo: this guide being https://github.com/schneems/wicked/wiki/Building-Partial-Objects-Step-by-Step
[22:57:25] andybernard: @orders = Order.all
[22:57:34] doodlehaus: has joined #RubyOnRails
[22:58:18] mices: @orders = Order.order('created_at desc').page(params[:page])
[22:58:43] mices: in this example the .all seems to be implied
[22:59:06] mices: so was my first syntax right
[22:59:13] mices: @orders=Order
[22:59:17] andybernard: if the .order('created_at desc') wasnt there it'd need to be Order.all.page(params[:page])
[22:59:24] mices: same as @orders=Order.all
[22:59:30] andybernard: no unfortunately
[22:59:35] andybernard: Order would return the class
[22:59:42] andybernard: not all the entries
[22:59:50] devdazed: has joined #RubyOnRails
[23:00:59] mices: so the use of the order clause with no where statement causes a default to all rows in the table
[23:02:23] jobewan: has joined #RubyOnRails
[23:05:36] Cache_Money: from the command line I usually do `rails g model Event description job:references`, however, this time instead of referencing the Job.id field I'd like it to reference the Job.uid field (custom field). Can I do this from the command line or do I need to make changes in the migration file?
[23:05:37] mices: is that a typo should page(params[:page]) be paginate(params[:page])
[23:06:50] mices: andybernard^
[23:07:46] mices: First, we modify our controller to call paginate(), passing it in the page and the order in which we want the results displayed.
[23:08:02] ashrocket: has joined #RubyOnRails
[23:11:34] RandyT_: has joined #RubyOnRails
[23:11:37] Limix: has joined #RubyOnRails
[23:11:48] Cache_Money: answering my own question ^ `rails g model Event description job:string:index`
[23:13:52] charliesome: has joined #RubyOnRails
[23:14:34] johntrails: is there a way to ommit the time on a date field being called through a view ?
[23:14:46] johntrails: obviously there is, but can someone point me in the right direction on the best practice to achieve this
[23:16:47] mices: wow rails really makes pagination a snap
[23:17:27] quazimodo: has joined #RubyOnRails
[23:18:30] allcentu1: has joined #RubyOnRails
[23:18:52] hahuang65: has joined #RubyOnRails
[23:18:56] johntrails: .strftime('%F') would be the best way?
[23:20:08] Radar: johntrails: It would be great if you could show us an example of what you want.
[23:20:15] Radar: johntrails: Show us what you have now and what you want it to be.
[23:21:55] kitsuneyo: so i worked out the command i needed was "rails g controller Games/EditSections"
[23:22:22] kitsuneyo: but now i have a ActiveModel::ForbiddenAttributesError when i go to the second step in my form
[23:22:29] kitsuneyo: anyone good with Wicked gem?
[23:24:17] Radar: kitsuneyo: !rule0
[23:24:17] helpa: kitsuneyo: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[23:24:25] Radar: kitsuneyo: !used
[23:24:25] helpa: kitsuneyo: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[23:24:43] kitsuneyo: ok Radar let me do a gist
[23:26:32] kitsuneyo: https://gist.github.com/kitsuneyo/c0d7588dc7486704be94
[23:27:09] kitsuneyo: in edit_sections_controller.rb, i get the error whether i define permitted game_params or not
[23:27:43] kitsuneyo: the error is with this line in the update action: @game.update_attributes(params[:game])
[23:27:46] ashrocket: Hey guys, is there a seperate IRC for rails deployment strategies?
[23:28:51] johntrails: Radar: my apolgoies, I will make sure to ask only with examples and pasties.. I was able to get my end result to be what I wanted.. Now I am just wondering if it's best practice to format on the controller or on the view.
[23:28:52] barhum2013: has joined #RubyOnRails
[23:29:01] kies: has joined #RubyOnRails
[23:29:05] sargas: has joined #RubyOnRails
[23:29:40] Radar: johntrails: formatting typically goes in the view.
[23:29:49] Radar: ashrocket: Nope, this one is the right place to ask.
[23:30:00] Radar: kitsuneyo: https://gist.github.com/kitsuneyo/c0d7588dc7486704be94#file-games_controller-rb-L12
[23:30:11] Radar: kitsuneyo: Here you are using game_params, but in the update action you're using params[:game]. Why?
[23:30:24] doodlehaus: has joined #RubyOnRails
[23:31:11] kitsuneyo: Radar, i don't have a good answer for that
[23:31:35] kitsuneyo: i figured they're two different ways to say the same thing
[23:31:41] ashrocket: Well, I???ll shoot my quesiton off then, I???m looking for anyone who has used Docker to execute the traditional Rails Production Deployment strategy of : ngninx => (puma|unicorn), postgres ???I???ve been in a Docker rabbit hole for a few days and figure I might need some help in understand the value of using Docker for production deployment over standard cap deploy
[23:31:43] Radar: kitsuneyo: Great. So the solution I think is to use game_params in your Wicked controller. You can work out how to share them as "homework"
[23:31:46] IRE92: has joined #RubyOnRails
[23:32:14] kitsuneyo: do i need a session?
[23:32:15] Radar: kitsuneyo: No, game_params permits the parameters where params[:game] contains a list of unpermitted parameters, hence your error.
[23:32:34] Radar: No, sessions won't help here. Move the game_params method out into a shared module which is included in both places.
[23:33:08] kitsuneyo: the only shared modules i can think of are application_controller or application_helper
[23:33:12] kitsuneyo: surely not those?
[23:33:18] kitsuneyo: do i create a new one?
[23:34:03] nahtnam: I am using AMS
[23:34:26] nahtnam: I have a custom serializer called ErrorSerializer. How can I call that?
[23:34:48] enitiz: has joined #RubyOnRails
[23:35:00] kitsuneyo: Radar, what if i move it to games_helper, then include games_helper in the edit_sections_controller?
[23:35:27] Radar: kitsuneyo: Helpers are for views, not controllers.
[23:35:57] Radar: ashrocket: The benefit of using Docker is that you can compile all your dependencies into a container and then deploy that container to a server. Using the traditional methods would require manually configuring all that yourself.
[23:36:06] ashrocket: nahtnam: YOu mean AWS?
[23:36:15] Radar: ashrocket: AMS, ActiveModelSerializers.
[23:36:17] nahtnam: ashrocket: Active Model serializer
[23:36:22] Radar: nahtnam: serialiser: ErrorSerializer
[23:36:26] northfurr: has joined #RubyOnRails
[23:36:50] nahtnam: Eh? Do I just put that in the controller methods?
[23:36:53] nahtnam: or something
[23:37:19] noodman: has joined #RubyOnRails
[23:37:30] kitsuneyo: Radar, could you please give me a hint? i really need to go to bed in a sec. my only guess is to create some third controller
[23:37:44] kitsuneyo: or maybe the games model
[23:37:53] nahtnam: Radar: Is kitsuneyo the new me?
[23:37:56] Radar: kitsuneyo: Create a module. Move game_params into the module. include the module in both GamesController + the wicked controller.
[23:38:01] Radar: nahtnam: no, you are irreplaceable.
[23:38:06] choke: has joined #RubyOnRails
[23:38:48] Miccet: has joined #RubyOnRails
[23:39:32] jenrzzz: has joined #RubyOnRails
[23:39:43] kitsuneyo: ok this will be my first ever module i guess, i'll try it tomorrow
[23:39:53] kitsuneyo: thanks for the help Radar, nite all
[23:40:03] Radar: gnight kitsuneyo
[23:42:51] maz-dev: has joined #RubyOnRails
[23:43:40] crdpink2: has joined #RubyOnRails
[23:43:55] Motoservo: has joined #RubyOnRails
[23:44:29] IRE92: has left #RubyOnRails: ()
[23:45:11] jenrzzz: has joined #RubyOnRails
[23:45:13] noodman: has joined #RubyOnRails
[23:45:41] nfk: has joined #RubyOnRails
[23:46:09] charliesome: has joined #RubyOnRails
[23:46:57] blnkammo: has joined #RubyOnRails
[23:49:15] Limix: has joined #RubyOnRails
[23:50:02] northfurr: has joined #RubyOnRails
[23:50:32] Ropeney: has joined #RubyOnRails
[23:51:31] kitsuneyo: has joined #RubyOnRails
[23:52:06] kitsuneyo: Radar, i did it... i defined a module and changed the line to @game.update_attributes(game_params), and it works!
[23:52:24] kitsuneyo: thanks so much, i've been trying to get this to work since last night
[23:52:34] kitsuneyo: the wicked guides don't mention anything like this
[23:52:38] Moonlight-Angel: has joined #RubyOnRails
[23:52:49] kitsuneyo: my only q is, is game_params still secure in that module?
[23:53:19] kitsuneyo: should i put it under 'private' there?
[23:53:50] baweaver: has joined #RubyOnRails
[23:54:24] erich: has joined #RubyOnRails
[23:54:32] kitsuneyo: i stuck a private in there anyway, doesn't seem to hurt
[23:55:41] Schalla: has joined #RubyOnRails
[23:56:09] nya: has joined #RubyOnRails
[23:57:26] stardiviner: has joined #RubyOnRails
[23:59:18] enitiz: has joined #RubyOnRails