« Back to channel list

#RubyOnRails - 28 January 2016

« Back 1 day Forward 1 day »
[00:00:27] tildes: has joined #RubyOnRails
[00:00:37] hardtail: I am having difficulty with the will_paginate gem in this project. I suspect my form the filter records is the culprit but I am not connecting the dots. If you look at the stack trace it seems to be adding 'filter' to the url. I can access the correct url by removing it manually, and the correct information is there - https://gist.github.com/jonath
[00:00:37] hardtail: anmusso/a1f9747e0f311588dacb
[00:00:40] rclanan: has joined #RubyOnRails
[00:01:11] Radar: nerium: Tried writing my hand at a test, but I can't get it to work... will just submit the PR as-is once I've done the writeup.
[00:01:25] rclanan: has joined #RubyOnRails
[00:02:10] rclanan: has joined #RubyOnRails
[00:02:55] rclanan: has joined #RubyOnRails
[00:03:40] rclanan: has joined #RubyOnRails
[00:03:52] ankhers: has joined #RubyOnRails
[00:04:25] rclanan: has joined #RubyOnRails
[00:04:37] Radar: nerium: https://github.com/rails/rails/pull/23296
[00:05:10] rclanan: has joined #RubyOnRails
[00:05:18] Radar: nerium: that was fun :) Thanks.
[00:05:21] ryanRT1: has joined #RubyOnRails
[00:05:38] robbyoconnor: has joined #RubyOnRails
[00:05:39] nerium: Radar: That???s what I aimed for :)
[00:06:00] rclanan: has joined #RubyOnRails
[00:06:00] s2013: has joined #RubyOnRails
[00:06:34] nerium: Radar: thanks
[00:06:41] rclanan: has joined #RubyOnRails
[00:07:06] pawnbox: has joined #RubyOnRails
[00:07:31] rclanan: has joined #RubyOnRails
[00:08:16] rclanan: has joined #RubyOnRails
[00:09:01] rclanan: has joined #RubyOnRails
[00:09:06] rhizome: Hardtail: filter_by appears to return an array
[00:09:09] rhizome: http://apidock.com/rails/v3.1.0/Rails/Paths/Root/filter_by
[00:09:11] tildes: has joined #RubyOnRails
[00:09:29] rhizome: 4.2 uses flat_map, but no matter
[00:09:46] rclanan: has joined #RubyOnRails
[00:10:31] rclanan: has joined #RubyOnRails
[00:10:54] rhizome: there is a way to get will_paginate to operate on arrays, btw
[00:11:16] rclanan: has joined #RubyOnRails
[00:12:01] rclanan: has joined #RubyOnRails
[00:12:45] K_r3aPeR: has joined #RubyOnRails
[00:12:46] rclanan: has joined #RubyOnRails
[00:13:32] rclanan: has joined #RubyOnRails
[00:14:17] rclanan: has joined #RubyOnRails
[00:15:02] rclanan: has joined #RubyOnRails
[00:15:47] rclanan: has joined #RubyOnRails
[00:16:28] robbyoconnor: has joined #RubyOnRails
[00:16:32] rclanan: has joined #RubyOnRails
[00:17:19] rclanan: has joined #RubyOnRails
[00:18:04] rclanan: has joined #RubyOnRails
[00:18:49] rclanan: has joined #RubyOnRails
[00:19:27] cicloid: has joined #RubyOnRails
[00:19:34] rclanan: has joined #RubyOnRails
[00:20:24] rclanan: has joined #RubyOnRails
[00:21:07] rclanan: has joined #RubyOnRails
[00:21:54] rclanan: has joined #RubyOnRails
[00:22:39] rclanan: has joined #RubyOnRails
[00:23:26] rclanan: has joined #RubyOnRails
[00:24:11] rclanan: has joined #RubyOnRails
[00:24:56] rclanan: has joined #RubyOnRails
[00:25:24] kirillzh: has joined #RubyOnRails
[00:25:41] rclanan: has joined #RubyOnRails
[00:26:04] nettoweb: has joined #RubyOnRails
[00:26:26] rclanan: has joined #RubyOnRails
[00:26:56] visudo: has joined #RubyOnRails
[00:27:11] rclanan: has joined #RubyOnRails
[00:27:40] alex88: has joined #RubyOnRails
[00:27:56] rclanan: has joined #RubyOnRails
[00:28:41] rclanan: has joined #RubyOnRails
[00:28:49] Radar: Bullshit.
[00:29:26] rclanan: has joined #RubyOnRails
[00:30:11] rclanan: has joined #RubyOnRails
[00:30:24] Radar: I'll just update the bot's code on GitH... oh wait
[00:30:49] ElFerna: has joined #RubyOnRails
[00:31:00] rclanan: has joined #RubyOnRails
[00:31:37] diegoviola: has joined #RubyOnRails
[00:31:39] SanguineAnomaly: has joined #RubyOnRails
[00:31:45] rclanan: has joined #RubyOnRails
[00:32:05] smathy: Yeah, 503s all over the shop.
[00:32:31] rclanan: has joined #RubyOnRails
[00:32:32] Radar: That's better.
[00:32:42] workmad3: has joined #RubyOnRails
[00:33:21] rclanan: has joined #RubyOnRails
[00:33:59] northfurr: has joined #RubyOnRails
[00:34:06] rclanan: has joined #RubyOnRails
[00:34:51] rclanan: has joined #RubyOnRails
[00:35:34] rclanan: has joined #RubyOnRails
[00:36:20] rclanan: has joined #RubyOnRails
[00:36:27] hnanon: has joined #RubyOnRails
[00:36:57] pawnbox: has joined #RubyOnRails
[00:37:10] rclanan: has joined #RubyOnRails
[00:37:55] rclanan: has joined #RubyOnRails
[00:38:39] rclanan: has joined #RubyOnRails
[00:39:24] rclanan: has joined #RubyOnRails
[00:39:41] visudo: has joined #RubyOnRails
[00:40:14] rclanan: has joined #RubyOnRails
[00:40:45] workmad3_: has joined #RubyOnRails
[00:40:59] rclanan: has joined #RubyOnRails
[00:41:44] rclanan: has joined #RubyOnRails
[00:42:28] rclanan: has joined #RubyOnRails
[00:42:43] smathy: has joined #RubyOnRails
[00:43:14] rclanan: has joined #RubyOnRails
[00:44:04] rclanan: has joined #RubyOnRails
[00:44:54] rclanan: has joined #RubyOnRails
[00:45:39] rclanan: has joined #RubyOnRails
[00:46:24] rclanan: has joined #RubyOnRails
[00:46:53] hnanon: I have an Admin::OrderPolicy class for Pundit.
[00:47:05] hnanon: In that policy I have: def fulfill? @user.role == "admin" end
[00:47:14] rclanan: has joined #RubyOnRails
[00:47:59] rclanan: has joined #RubyOnRails
[00:48:05] hnanon: In my orders controller I have "authorize @order" as is necessary.
[00:48:44] rclanan: has joined #RubyOnRails
[00:49:29] rclanan: has joined #RubyOnRails
[00:50:14] rclanan: has joined #RubyOnRails
[00:50:50] hnanon: However, I'm getting the error:
[00:50:53] hnanon: NoMethodError (undefined method `fulfill?' for #<OrderPolicy:0x007f4ccb6790e8>):
[00:51:04] rclanan: has joined #RubyOnRails
[00:51:12] hnanon: app/controllers/admin/orders_controller.rb:97:in `fulfill'
[00:51:21] s2013: has joined #RubyOnRails
[00:51:49] rclanan: has joined #RubyOnRails
[00:52:34] rclanan: has joined #RubyOnRails
[00:53:19] rclanan: has joined #RubyOnRails
[00:53:54] quazimodo: has joined #RubyOnRails
[00:54:04] rclanan: has joined #RubyOnRails
[00:54:49] rclanan: has joined #RubyOnRails
[00:55:37] rclanan: has joined #RubyOnRails
[00:55:50] workmad3: has joined #RubyOnRails
[00:55:50] moeabdol: has joined #RubyOnRails
[00:56:27] rclanan: has joined #RubyOnRails
[00:57:12] rclanan: has joined #RubyOnRails
[00:57:15] jottr: has joined #RubyOnRails
[00:57:58] rclanan: has joined #RubyOnRails
[00:58:43] rclanan: has joined #RubyOnRails
[00:59:05] craysiii: has joined #RubyOnRails
[00:59:09] DLSteve: has joined #RubyOnRails
[00:59:17] codedmart: has joined #RubyOnRails
[00:59:28] rclanan: has joined #RubyOnRails
[00:59:55] craysiii: has joined #RubyOnRails
[01:00:13] rclanan: has joined #RubyOnRails
[01:00:58] rclanan: has joined #RubyOnRails
[01:01:18] craysiii: has joined #RubyOnRails
[01:02:04] rclanan: has joined #RubyOnRails
[01:02:12] sevenseacat: has joined #RubyOnRails
[01:02:32] rclanan: has joined #RubyOnRails
[01:02:50] jgpawletko: has joined #RubyOnRails
[01:03:14] rclanan: has joined #RubyOnRails
[01:03:59] rclanan: has joined #RubyOnRails
[01:04:44] rclanan: has joined #RubyOnRails
[01:05:29] rclanan: has joined #RubyOnRails
[01:06:19] rclanan: has joined #RubyOnRails
[01:06:27] bePolite: has joined #RubyOnRails
[01:06:35] yoongkang: has joined #RubyOnRails
[01:06:56] pawnbox: has joined #RubyOnRails
[01:07:04] rclanan: has joined #RubyOnRails
[01:07:11] adamscott: has joined #RubyOnRails
[01:07:43] mrbubbles: has joined #RubyOnRails
[01:07:44] bePolite: has joined #RubyOnRails
[01:07:48] maneco: has joined #RubyOnRails
[01:07:49] rclanan: has joined #RubyOnRails
[01:08:37] rclanan: has joined #RubyOnRails
[01:09:23] rclanan: has joined #RubyOnRails
[01:10:08] rclanan: has joined #RubyOnRails
[01:10:13] aloneintheworld: has joined #RubyOnRails
[01:10:21] aloneintheworld: has left #RubyOnRails: ()
[01:10:53] rclanan: has joined #RubyOnRails
[01:11:01] WhatTheRails: has joined #RubyOnRails
[01:11:02] mrbubbles: has joined #RubyOnRails
[01:11:03] creyes: has joined #RubyOnRails
[01:11:38] rclanan: has joined #RubyOnRails
[01:12:28] rclanan: has joined #RubyOnRails
[01:12:55] WhatTheRails: I want to setup a view where I can create a new type of users. I came up with this url: /users/new?role=guest, where in my ???new??? action I will get the role param and depending on that role I will render the appropiated view. Is this a right approach to do this?
[01:13:13] rclanan: has joined #RubyOnRails
[01:13:13] creyes: I want to graph how many records existed on a certain day. That number changes, so the graph should increase linearly. (yesterday there were 10, today there are 17) - what's the best way to achieve that?
[01:13:23] WhatTheRails: and I???m passing the role parameter from my dashboard view
[01:13:58] rclanan: has joined #RubyOnRails
[01:14:45] rclanan: has joined #RubyOnRails
[01:15:27] rclanan: has joined #RubyOnRails
[01:16:12] rclanan: has joined #RubyOnRails
[01:17:03] rclanan: has joined #RubyOnRails
[01:17:43] rclanan: has joined #RubyOnRails
[01:18:02] stannard: has joined #RubyOnRails
[01:18:28] rclanan: has joined #RubyOnRails
[01:19:13] rclanan: has joined #RubyOnRails
[01:20:03] rclanan: has joined #RubyOnRails
[01:20:48] rclanan: has joined #RubyOnRails
[01:21:16] codedmart: has joined #RubyOnRails
[01:21:32] rclanan: has joined #RubyOnRails
[01:21:45] sleungcy_: has joined #RubyOnRails
[01:22:22] rclanan: has joined #RubyOnRails
[01:22:56] PlasmaStar: has joined #RubyOnRails
[01:23:07] rclanan: has joined #RubyOnRails
[01:23:52] rclanan: has joined #RubyOnRails
[01:24:37] rclanan: has joined #RubyOnRails
[01:25:22] rclanan: has joined #RubyOnRails
[01:26:09] rclanan: has joined #RubyOnRails
[01:26:54] rclanan: has joined #RubyOnRails
[01:27:39] rclanan: has joined #RubyOnRails
[01:28:24] rclanan: has joined #RubyOnRails
[01:29:09] rclanan: has joined #RubyOnRails
[01:29:54] rclanan: has joined #RubyOnRails
[01:29:54] atomical: has joined #RubyOnRails
[01:30:00] blackmesa: has joined #RubyOnRails
[01:30:38] WhatTheRails: I came up with this url: /users/new?role=guest, where in my ???new??? action I will get the role param and depending on that role I will render the appropiated create user view. Is this a right approach to do this?
[01:30:39] rclanan: has joined #RubyOnRails
[01:30:56] WhatTheRails: what???s the appropiated rails route to do that
[01:31:19] sevenseacat: sounds good, if you dont mind people changing the URL and signing up as admins instead
[01:31:24] rclanan: has joined #RubyOnRails
[01:31:37] jottr: has joined #RubyOnRails
[01:31:51] WhatTheRails: well, to manage users you need to be an admin as I???m using CanCan
[01:31:55] sakix: has joined #RubyOnRails
[01:32:09] rclanan: has joined #RubyOnRails
[01:32:15] WhatTheRails: but what???s the appropiated approach anyway?
[01:32:54] rclanan: has joined #RubyOnRails
[01:33:39] rclanan: has joined #RubyOnRails
[01:33:47] atomical_: has joined #RubyOnRails
[01:33:54] sevenseacat: whitelisting the valid roles that are assignable by that approach would be a good start
[01:34:21] maneco: has joined #RubyOnRails
[01:34:26] rclanan: has joined #RubyOnRails
[01:34:51] WhatTheRails: Thank you, and what about the route?
[01:34:53] acovrig: has joined #RubyOnRails
[01:35:13] rclanan: has joined #RubyOnRails
[01:35:39] herbst: has joined #RubyOnRails
[01:36:01] rclanan: has joined #RubyOnRails
[01:36:11] sevenseacat: seems fine as is
[01:36:49] rclanan: has joined #RubyOnRails
[01:36:56] pulgalipe: has joined #RubyOnRails
[01:37:11] maneco: Hi, I'm new to rails and I'm going to create a multi-tenancy app. I've been reading for a few days and I think default scopes with Devise will be dificult to implement. I've heard people using db's namespaces and having little impact on the app's code. Which strategy should a begginer choose to implement such app?
[01:37:14] pawnbox: has joined #RubyOnRails
[01:37:27] baweaver: has joined #RubyOnRails
[01:37:34] rclanan: has joined #RubyOnRails
[01:38:09] WhatTheRails: maneco: the Apartment gem is pretty straightforward, it creates a different DB schema for each tenant though
[01:38:16] sevenseacat: maneco: I think a beginner should choose a smaller app to learn on :)
[01:38:19] rclanan: has joined #RubyOnRails
[01:38:37] WhatTheRails: maneco: but I dont know if ???begginer??? enough
[01:39:04] rclanan: has joined #RubyOnRails
[01:39:49] rclanan: has joined #RubyOnRails
[01:40:27] smathy: has joined #RubyOnRails
[01:40:34] rclanan: has joined #RubyOnRails
[01:40:48] zeros0623: has joined #RubyOnRails
[01:41:08] WhatTheRails: sevenseacat: one more question, in the future I would like to point /users/new?role=guest to something like /users/guest or simply /guest
[01:41:19] rclanan: has joined #RubyOnRails
[01:41:41] WhatTheRails: how do I do that in my routes.rb ?
[01:41:45] sevenseacat: /guests/new would make more sense
[01:41:56] kirillzh: has joined #RubyOnRails
[01:42:09] rclanan: has joined #RubyOnRails
[01:42:54] rclanan: has joined #RubyOnRails
[01:43:03] WhatTheRails: I can???t wrap my head up on how to ???transform??? the user with an specific role to a ???controller???
[01:43:39] rclanan: has joined #RubyOnRails
[01:43:39] par[a]digm: has joined #RubyOnRails
[01:44:20] sevenseacat: well, routes direct users to controllers - so you could define another devise routing block
[01:44:22] ElFerna: has joined #RubyOnRails
[01:44:24] rclanan: has joined #RubyOnRails
[01:44:36] pulgalipe: has joined #RubyOnRails
[01:45:10] rclanan: has joined #RubyOnRails
[01:45:54] snguyen: has joined #RubyOnRails
[01:45:55] rclanan: has joined #RubyOnRails
[01:46:40] rclanan: has joined #RubyOnRails
[01:46:43] smathy: has joined #RubyOnRails
[01:47:25] rclanan: has joined #RubyOnRails
[01:47:29] jfelchner: has joined #RubyOnRails
[01:48:11] rclanan: has joined #RubyOnRails
[01:48:59] rclanan: has joined #RubyOnRails
[01:49:44] rclanan: has joined #RubyOnRails
[01:50:29] rclanan: has joined #RubyOnRails
[01:51:14] rclanan: has joined #RubyOnRails
[01:51:59] rclanan: has joined #RubyOnRails
[01:51:59] B1n4r10: has joined #RubyOnRails
[01:52:44] rclanan: has joined #RubyOnRails
[01:53:18] jcutrell: has joined #RubyOnRails
[01:53:18] dstarh: has joined #RubyOnRails
[01:53:29] rclanan: has joined #RubyOnRails
[01:53:52] jcutrell: I have an ActiveRecord question - perhaps more of a sql question.
[01:54:08] jcutrell: I have two records, and I want to get the lastest x records of both of them, regardless of what they are.
[01:54:14] rclanan: has joined #RubyOnRails
[01:54:33] jcutrell: I???d prefer not to do this in memory because we will need to paginate these results (this is for a unified feed).
[01:54:34] jkamenik: has joined #RubyOnRails
[01:55:03] jcutrell: Is it possible to combine queries in SQL this way, and bonus points to have them return their proper model objects?
[01:55:04] rclanan: has joined #RubyOnRails
[01:55:49] rclanan: has joined #RubyOnRails
[01:56:15] smathy: jcutrell, !querying look at limit and order for your specific question
[01:56:15] helpa: jcutrell: http://guides.rubyonrails.org/active_record_querying.html - ActiveRecord Querying Guide by Ryan Bigg
[01:56:34] rclanan: has joined #RubyOnRails
[01:56:41] sevenseacat: thats not going to be straightforward to do
[01:56:56] matthewd: jcutrell: Not really.. at least not without a fair bit of effort
[01:56:59] jcutrell: smathy: I???m familar with limit and order, but the issue is about combining queries from two separate tables (models)
[01:57:19] rclanan: has joined #RubyOnRails
[01:57:28] jcutrell: So - would the common way to do this be to create a FeedEntry model or something, with a polymorphic relationship to the different feed entries?
[01:58:01] smathy: jcutrell, OHHHHH. "two records" is what you said, it wasn't clear you meant from different models/tables.
[01:58:01] sevenseacat: that would likely be the easiest way of doing it
[01:58:04] rclanan: has joined #RubyOnRails
[01:58:08] jcutrell: smathy: sorry about that. :)
[01:58:21] jcutrell: sevenseacat: but is easy the ???right??? way??? hmmm.
[01:58:32] Nicely: has joined #RubyOnRails
[01:58:54] rclanan: has joined #RubyOnRails
[01:59:25] jcutrell: Presumably, loading everything into memory isn???t horrible if we only have 300-500 records.
[01:59:39] rclanan: has joined #RubyOnRails
[01:59:43] jcutrell: Assuming that we have a cache as well...
[01:59:45] smathy: jcutrell, well how big is x?
[02:00:00] jcutrell: x is big enough for a feed. So maybe 10?
[02:00:02] smathy: jcutrell, you wouldn't need more than x records from each table.
[02:00:20] jcutrell: smathy: the question is, how do you know where to start searching when on page y?
[02:00:21] matthewd: smathy: That's only true for the first page
[02:00:24] rclanan: has joined #RubyOnRails
[02:00:46] smathy: Ok, I seem to have missed a lot of this question somehow.
[02:00:49] jcutrell: Unless we did something really uncomfortable like store the last created_at on the session...
[02:00:59] smathy: jcutrell, I'd probably just write this as a view.
[02:01:07] matthewd: jcutrell: Ah, but you can paginate with a record count instead of a page number
[02:01:09] rclanan: has joined #RubyOnRails
[02:01:15] matthewd: .. and then use a record count per table
[02:01:20] creyes: How can I get build my model so I can get the count of records at a certain date? If I wanted to graph posts over time for example (yesterday there were 10, today there are 17)
[02:01:31] jcutrell: matthewd: So like a ???created_at??? as the page number.
[02:01:37] safety_cut: has joined #RubyOnRails
[02:01:40] jcutrell: But it certainly would be nice to be able to do a normal pagination scheme. :)
[02:01:58] sevenseacat: a db view would also work
[02:02:04] rclanan: has joined #RubyOnRails
[02:02:11] jcutrell: sevenseacat: is that essentially like caching a query?
[02:02:14] matthewd: jcutrell: So first page, you grab the first 10 from each table, and interleave them. Next time, you grab limit(10).offset(3) from posts, and limit(10).offset(7) from images.
[02:02:36] sevenseacat: jcutrell: its writing and storing a query, that you can then treat theresults of as a table
[02:02:38] jcutrell: matthewd: Where do you store 3 and 7?
[02:02:44] rclanan: has joined #RubyOnRails
[02:02:52] matthewd: jcutrell: They're your pagination value, instead of a single number
[02:03:18] matthewd: The advantage is you don't have to re-interleave the paged-past records each time
[02:03:21] sleungcy: has joined #RubyOnRails
[02:03:29] rclanan: has joined #RubyOnRails
[02:03:35] jcutrell: matthewd: sure - the disadvantage being the url structure may change in the future.
[02:03:44] jcutrell: Or rather, will change.
[02:04:11] pipework: has joined #RubyOnRails
[02:04:19] rclanan: has joined #RubyOnRails
[02:04:20] matthewd: It's a feed; its content is inherently transient
[02:04:28] jcutrell: So, page two won???t always look like ?i=3&p=7 - it may be i=5&p=5
[02:04:46] jcutrell: matthewd: That is true, but ???Page 2??? isn???t transient - the content therein is.
[02:05:04] rclanan: has joined #RubyOnRails
[02:05:39] jcutrell: domain.com/p/1 and domain.com/p/2 (or similar) are reliable for searching through posts.
[02:05:43] matthewd: Yeah.. if you actually need a well-known URL for "page 2", then you have no choice but to do the work (or cache it)
[02:05:49] rclanan: has joined #RubyOnRails
[02:05:59] jcutrell: if someone wanted to go from page 2 to page 10, you???d have to interleave 2-9.
[02:06:35] rclanan: has joined #RubyOnRails
[02:06:49] jcutrell: So is it normal to do this kind of thing in a callback? Create a little side-stepped record that tracks this as an item?
[02:07:19] jcutrell: And have it basically point to the created_at date of it???s :trackable polymorphic.
[02:07:20] rclanan: has joined #RubyOnRails
[02:07:21] matthewd: Unlike search results, feeds don't normally have page skips ??\_(???)_/??
[02:07:22] jcutrell: That seems reasonable.
[02:07:34] visudo: has joined #RubyOnRails
[02:07:35] jcutrell: matthewd: well, call it a feed or an index...
[02:08:00] jcutrell: Index of entries that are paginated, entries have different types.
[02:08:10] rclanan: has joined #RubyOnRails
[02:08:17] jcutrell: So not a RSS feed, but a viewable feed of items in an HTML page
[02:08:24] apotry: has joined #RubyOnRails
[02:08:50] matthewd: If you can stomach the extra table, I do think that's the easiest option by far
[02:08:55] rclanan: has joined #RubyOnRails
[02:09:35] jcutrell: matthewd: I can stomach the extra table as well as I can stomach a ???db view??? pseudo-table that I don???t understand but that has basically the same effect. :)
[02:09:40] rclanan: has joined #RubyOnRails
[02:09:47] jcutrell: Sorry - unnecessary quotations.
[02:10:24] rclanan: has joined #RubyOnRails
[02:10:35] jcutrell: dude, rclanan can???t make up his mind about being here. :)
[02:10:45] jcutrell: Or maybe that???s just my IRC client.
[02:11:13] rclanan: has joined #RubyOnRails
[02:11:58] rclanan: has joined #RubyOnRails
[02:12:47] rclanan: has joined #RubyOnRails
[02:13:23] smathy: ...only that you're not ignoring JOIN/PART/QUITs
[02:13:32] rclanan: has joined #RubyOnRails
[02:14:04] jcutrell: I???m unfamiliar smathy - what do you mean?
[02:14:17] rclanan: has joined #RubyOnRails
[02:15:02] rclanan: has joined #RubyOnRails
[02:15:08] smathy: jcutrell, it's just a commonly used feature of IRC clients - ie. to ignore the joins/parts/quits of other users so all you see is the conversation itself.
[02:15:42] cryptocronus: has joined #RubyOnRails
[02:15:47] rclanan: has joined #RubyOnRails
[02:15:48] jcutrell: smathy: Ah. I saw ???JOIN??? and immediately thought you were referring to SQL.
[02:15:50] smathy: That's the only aspect of whatever you're seeing that is related to your client (and its configuration).
[02:16:32] rclanan: has joined #RubyOnRails
[02:16:51] creaked: has joined #RubyOnRails
[02:17:22] rclanan: has joined #RubyOnRails
[02:18:12] rclanan: has joined #RubyOnRails
[02:18:57] rclanan: has joined #RubyOnRails
[02:19:42] rclanan: has joined #RubyOnRails
[02:20:27] rclanan: has joined #RubyOnRails
[02:21:17] rclanan: has joined #RubyOnRails
[02:21:59] crdpink: has joined #RubyOnRails
[02:22:02] rclanan: has joined #RubyOnRails
[02:22:49] rclanan: has joined #RubyOnRails
[02:22:55] kies^: has joined #RubyOnRails
[02:23:35] rclanan: has joined #RubyOnRails
[02:24:02] User458764: has joined #RubyOnRails
[02:24:20] rclanan: has joined #RubyOnRails
[02:25:05] rclanan: has joined #RubyOnRails
[02:25:50] rclanan: has joined #RubyOnRails
[02:25:53] adamscott: has joined #RubyOnRails
[02:26:37] rclanan: has joined #RubyOnRails
[02:27:10] yoongkang: has joined #RubyOnRails
[02:27:22] rclanan: has joined #RubyOnRails
[02:27:49] lemur: has joined #RubyOnRails
[02:28:12] rclanan: has joined #RubyOnRails
[02:28:57] rclanan: has joined #RubyOnRails
[02:29:42] rclanan: has joined #RubyOnRails
[02:30:30] rclanan: has joined #RubyOnRails
[02:30:50] jottr_: has joined #RubyOnRails
[02:31:12] rclanan: has joined #RubyOnRails
[02:32:04] rclanan: has joined #RubyOnRails
[02:32:46] rclanan: has joined #RubyOnRails
[02:33:31] rclanan: has joined #RubyOnRails
[02:34:21] rclanan: has joined #RubyOnRails
[02:35:06] rclanan: has joined #RubyOnRails
[02:35:49] rclanan: has joined #RubyOnRails
[02:36:31] duderonomy: has joined #RubyOnRails
[02:36:33] rclanan: has joined #RubyOnRails
[02:36:42] pawnbox: has joined #RubyOnRails
[02:36:45] Maletor: has joined #RubyOnRails
[02:37:21] rclanan: has joined #RubyOnRails
[02:37:46] dexter-tzu: has joined #RubyOnRails
[02:38:11] rclanan: has joined #RubyOnRails
[02:38:52] rclanan: has joined #RubyOnRails
[02:39:39] rclanan: has joined #RubyOnRails
[02:40:24] rclanan: has joined #RubyOnRails
[02:40:47] codedmart: has joined #RubyOnRails
[02:41:09] rclanan: has joined #RubyOnRails
[02:41:59] rclanan: has joined #RubyOnRails
[02:42:18] creaked: has joined #RubyOnRails
[02:42:44] rclanan: has joined #RubyOnRails
[02:43:29] rclanan: has joined #RubyOnRails
[02:43:40] Maletor: has joined #RubyOnRails
[02:44:14] rclanan: has joined #RubyOnRails
[02:45:04] rclanan: has joined #RubyOnRails
[02:45:13] gbgdev: has joined #RubyOnRails
[02:45:49] rclanan: has joined #RubyOnRails
[02:46:19] par[a]digm: has joined #RubyOnRails
[02:46:37] rclanan: has joined #RubyOnRails
[02:47:27] rclanan: has joined #RubyOnRails
[02:47:32] noodman: has joined #RubyOnRails
[02:48:12] rclanan: has joined #RubyOnRails
[02:48:57] rclanan: has joined #RubyOnRails
[02:49:05] symbole: has joined #RubyOnRails
[02:49:42] rclanan: has joined #RubyOnRails
[02:50:32] rclanan: has joined #RubyOnRails
[02:51:17] rclanan: has joined #RubyOnRails
[02:51:24] _djbkd: has joined #RubyOnRails
[02:52:02] rclanan: has joined #RubyOnRails
[02:52:50] rclanan: has joined #RubyOnRails
[02:53:35] rclanan: has joined #RubyOnRails
[02:53:54] Bloomer: has joined #RubyOnRails
[02:54:20] rclanan: has joined #RubyOnRails
[02:55:06] rclanan: has joined #RubyOnRails
[02:55:51] rclanan: has joined #RubyOnRails
[02:56:41] rclanan: has joined #RubyOnRails
[02:57:21] HenriettaSalt: has joined #RubyOnRails
[02:57:26] rclanan: has joined #RubyOnRails
[02:58:11] rclanan: has joined #RubyOnRails
[02:58:56] rclanan: has joined #RubyOnRails
[02:59:41] rclanan: has joined #RubyOnRails
[03:00:26] rclanan: has joined #RubyOnRails
[03:00:50] Thouren: has joined #RubyOnRails
[03:01:11] rclanan: has joined #RubyOnRails
[03:02:03] rclanan: has joined #RubyOnRails
[03:02:28] Thouren: has joined #RubyOnRails
[03:02:41] rclanan: has joined #RubyOnRails
[03:03:27] rclanan: has joined #RubyOnRails
[03:03:28] Thouren: has joined #RubyOnRails
[03:03:40] jcutrell: has left #RubyOnRails: ()
[03:04:12] rclanan: has joined #RubyOnRails
[03:04:57] rclanan: has joined #RubyOnRails
[03:05:42] rclanan: has joined #RubyOnRails
[03:06:27] rclanan: has joined #RubyOnRails
[03:06:57] adam12: wall of quits
[03:07:03] pawnbox: has joined #RubyOnRails
[03:07:12] rclanan: has joined #RubyOnRails
[03:07:57] rclanan: has joined #RubyOnRails
[03:08:32] Or1on: has joined #RubyOnRails
[03:08:38] srinidhi: has joined #RubyOnRails
[03:08:42] rclanan: has joined #RubyOnRails
[03:09:27] rclanan: has joined #RubyOnRails
[03:10:14] rclanan: has joined #RubyOnRails
[03:10:57] rclanan: has joined #RubyOnRails
[03:11:43] rclanan: has joined #RubyOnRails
[03:12:12] nahwar: has joined #RubyOnRails
[03:12:28] rclanan: has joined #RubyOnRails
[03:13:18] rclanan: has joined #RubyOnRails
[03:13:23] tego: has joined #RubyOnRails
[03:14:05] rclanan: has joined #RubyOnRails
[03:14:50] rclanan: has joined #RubyOnRails
[03:15:35] rclanan: has joined #RubyOnRails
[03:15:55] iateadonut: has joined #RubyOnRails
[03:16:20] rclanan: has joined #RubyOnRails
[03:17:05] rclanan: has joined #RubyOnRails
[03:17:29] B1n4r10: has joined #RubyOnRails
[03:17:50] rclanan: has joined #RubyOnRails
[03:17:53] paradisaeidae: has joined #RubyOnRails
[03:18:35] rclanan: has joined #RubyOnRails
[03:19:20] rclanan: has joined #RubyOnRails
[03:20:08] rclanan: has joined #RubyOnRails
[03:20:57] rclanan: has joined #RubyOnRails
[03:21:42] rclanan: has joined #RubyOnRails
[03:22:26] rclanan: has joined #RubyOnRails
[03:23:11] rclanan: has joined #RubyOnRails
[03:23:56] rclanan: has joined #RubyOnRails
[03:24:46] rclanan: has joined #RubyOnRails
[03:25:28] rclanan: has joined #RubyOnRails
[03:26:13] rclanan: has joined #RubyOnRails
[03:27:00] rclanan: has joined #RubyOnRails
[03:27:38] Synthead: has joined #RubyOnRails
[03:27:45] rclanan: has joined #RubyOnRails
[03:28:30] rclanan: has joined #RubyOnRails
[03:28:44] B1n4r10: has joined #RubyOnRails
[03:29:15] rclanan: has joined #RubyOnRails
[03:30:00] rclanan: has joined #RubyOnRails
[03:30:07] pawnbox: has joined #RubyOnRails
[03:30:48] rclanan: has joined #RubyOnRails
[03:31:32] rclanan: has joined #RubyOnRails
[03:31:37] zworks: has joined #RubyOnRails
[03:32:17] rclanan: has joined #RubyOnRails
[03:32:34] Synthead: has joined #RubyOnRails
[03:33:02] rclanan: has joined #RubyOnRails
[03:33:47] rclanan: has joined #RubyOnRails
[03:34:32] rclanan: has joined #RubyOnRails
[03:35:13] f00dMonsta: has joined #RubyOnRails
[03:35:22] rclanan: has joined #RubyOnRails
[03:35:49] zworks: ermission denied to create database STATEMENT: CREATE DATABASE "rail_test" ENCODING = 'unicode' TEMPLATE = "template0" rake aborted! ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied to create database
[03:36:07] rclanan: has joined #RubyOnRails
[03:36:52] rclanan: has joined #RubyOnRails
[03:37:18] herbst: has joined #RubyOnRails
[03:37:20] Synthead: has joined #RubyOnRails
[03:37:42] rclanan: has joined #RubyOnRails
[03:38:27] rclanan: has joined #RubyOnRails
[03:38:35] Synthead: has joined #RubyOnRails
[03:39:05] ElFerna: has joined #RubyOnRails
[03:39:15] rclanan: has joined #RubyOnRails
[03:39:57] rclanan: has joined #RubyOnRails
[03:40:48] rclanan: has joined #RubyOnRails
[03:41:34] rclanan: has joined #RubyOnRails
[03:42:20] rclanan: has joined #RubyOnRails
[03:43:08] rclanan: has joined #RubyOnRails
[03:43:53] rclanan: has joined #RubyOnRails
[03:44:40] rclanan: has joined #RubyOnRails
[03:45:30] rclanan: has joined #RubyOnRails
[03:46:15] rclanan: has joined #RubyOnRails
[03:47:04] rclanan: has joined #RubyOnRails
[03:47:17] HenriettaSalt: has joined #RubyOnRails
[03:47:45] rclanan: has joined #RubyOnRails
[03:47:51] par[a]digm: has joined #RubyOnRails
[03:48:30] rclanan: has joined #RubyOnRails
[03:49:15] WhatTheRails: Any more Rails-ish approach to do this? https://gist.github.com/anonymous/16f8f59ede1511fb3e54
[03:49:15] rclanan: has joined #RubyOnRails
[03:49:50] WhatTheRails: I know it smells bad
[03:50:00] rclanan: has joined #RubyOnRails
[03:50:45] rclanan: has joined #RubyOnRails
[03:51:05] mostlybadfly: has joined #RubyOnRails
[03:51:30] rclanan: has joined #RubyOnRails
[03:52:00] crystal77: has joined #RubyOnRails
[03:52:15] rclanan: has joined #RubyOnRails
[03:52:25] visudo: has joined #RubyOnRails
[03:53:00] rclanan: has joined #RubyOnRails
[03:53:45] rclanan: has joined #RubyOnRails
[03:54:30] rclanan: has joined #RubyOnRails
[03:55:20] rclanan: has joined #RubyOnRails
[03:56:05] rclanan: has joined #RubyOnRails
[03:56:50] rclanan: has joined #RubyOnRails
[03:57:15] Graphettion: has joined #RubyOnRails
[03:57:37] rclanan: has joined #RubyOnRails
[03:58:21] rclanan: has joined #RubyOnRails
[03:58:52] Radar: zworks: Ask for permission then.
[03:59:07] rclanan: has joined #RubyOnRails
[03:59:09] Radar: WhatTheRails: https://gist.github.com/anonymous/16f8f59ede1511fb3e54#file-new-rb-L2-L4 double assignment to role is useless.
[03:59:24] Radar: WhatTheRails: no brackets around if statements typically in Ruby.
[03:59:38] Radar: WhatTheRails: ['groom', 'bride'].include?(role)
[03:59:50] matthewd: Presence check is useless
[03:59:52] rclanan: has joined #RubyOnRails
[04:00:39] rclanan: has joined #RubyOnRails
[04:00:57] matthewd: Radar: You mean `role.in?(['groom', 'bride'])`, right? :trollface:
[04:01:06] Radar: matthewd: Calm down there DHH
[04:01:24] rclanan: has joined #RubyOnRails
[04:02:09] rclanan: has joined #RubyOnRails
[04:02:59] rclanan: has joined #RubyOnRails
[04:03:09] aloneintheworld: has joined #RubyOnRails
[04:03:44] rclanan: has joined #RubyOnRails
[04:04:34] rclanan: has joined #RubyOnRails
[04:05:19] rclanan: has joined #RubyOnRails
[04:06:04] rclanan: has joined #RubyOnRails
[04:06:49] rclanan: has joined #RubyOnRails
[04:07:34] rclanan: has joined #RubyOnRails
[04:07:54] hellomynameisjos: has joined #RubyOnRails
[04:08:19] rclanan: has joined #RubyOnRails
[04:09:04] rclanan: has joined #RubyOnRails
[04:09:32] no8d571: has joined #RubyOnRails
[04:09:44] treaki__: has joined #RubyOnRails
[04:09:50] rclanan: has joined #RubyOnRails
[04:10:33] sakix: has joined #RubyOnRails
[04:10:35] rclanan: has joined #RubyOnRails
[04:10:45] aloneintheworld: has left #RubyOnRails: ()
[04:10:49] safetypin: has joined #RubyOnRails
[04:11:25] rclanan: has joined #RubyOnRails
[04:12:10] rclanan: has joined #RubyOnRails
[04:12:55] rclanan: has joined #RubyOnRails
[04:13:40] rclanan: has joined #RubyOnRails
[04:14:00] arup_r: has joined #RubyOnRails
[04:14:30] rclanan: has joined #RubyOnRails
[04:14:38] yfeldblum: has joined #RubyOnRails
[04:15:16] rclanan: has joined #RubyOnRails
[04:16:05] rclanan: has joined #RubyOnRails
[04:17:05] rclanan: has joined #RubyOnRails
[04:17:08] s2013: has joined #RubyOnRails
[04:17:35] rclanan: has joined #RubyOnRails
[04:17:57] braincras: has joined #RubyOnRails
[04:18:22] rclanan: has joined #RubyOnRails
[04:19:03] rclanan: has joined #RubyOnRails
[04:19:48] rclanan: has joined #RubyOnRails
[04:20:33] rclanan: has joined #RubyOnRails
[04:21:19] rclanan: has joined #RubyOnRails
[04:22:04] rclanan: has joined #RubyOnRails
[04:22:54] rclanan: has joined #RubyOnRails
[04:23:16] workmad3: has joined #RubyOnRails
[04:23:42] rclanan: has joined #RubyOnRails
[04:24:27] rclanan: has joined #RubyOnRails
[04:25:12] rclanan: has joined #RubyOnRails
[04:25:58] rclanan: has joined #RubyOnRails
[04:26:41] rclanan: has joined #RubyOnRails
[04:27:31] rclanan: has joined #RubyOnRails
[04:28:16] rclanan: has joined #RubyOnRails
[04:28:29] kp666: has joined #RubyOnRails
[04:28:32] DLSteve: has joined #RubyOnRails
[04:28:36] baweaver: has joined #RubyOnRails
[04:29:01] rclanan: has joined #RubyOnRails
[04:29:13] baweaver: has joined #RubyOnRails
[04:29:30] adamscott: has joined #RubyOnRails
[04:29:46] rclanan: has joined #RubyOnRails
[04:30:31] rclanan: has joined #RubyOnRails
[04:31:16] rclanan: has joined #RubyOnRails
[04:31:18] broman: has joined #RubyOnRails
[04:32:03] rclanan: has joined #RubyOnRails
[04:32:48] rclanan: has joined #RubyOnRails
[04:33:34] rclanan: has joined #RubyOnRails
[04:34:19] rclanan: has joined #RubyOnRails
[04:35:04] rclanan: has joined #RubyOnRails
[04:35:37] chouhoulis: has joined #RubyOnRails
[04:35:49] rclanan: has joined #RubyOnRails
[04:36:07] tildes: has joined #RubyOnRails
[04:36:36] rclanan: has joined #RubyOnRails
[04:37:21] rclanan: has joined #RubyOnRails
[04:38:06] rclanan: has joined #RubyOnRails
[04:38:46] arBmind1: has joined #RubyOnRails
[04:38:56] rclanan: has joined #RubyOnRails
[04:39:41] rclanan: has joined #RubyOnRails
[04:39:56] dexter_: has joined #RubyOnRails
[04:40:26] rclanan: has joined #RubyOnRails
[04:41:12] rclanan: has joined #RubyOnRails
[04:41:57] rclanan: has joined #RubyOnRails
[04:42:33] B1n4r10: has joined #RubyOnRails
[04:42:42] rclanan: has joined #RubyOnRails
[04:43:32] rclanan: has joined #RubyOnRails
[04:44:17] rclanan: has joined #RubyOnRails
[04:45:02] rclanan: has joined #RubyOnRails
[04:45:22] srinidhi: has joined #RubyOnRails
[04:45:48] rclanan: has joined #RubyOnRails
[04:46:33] rclanan: has joined #RubyOnRails
[04:47:21] rclanan: has joined #RubyOnRails
[04:48:07] rclanan: has joined #RubyOnRails
[04:48:11] petricore: has joined #RubyOnRails
[04:48:52] rclanan: has joined #RubyOnRails
[04:49:23] par[a]digm: has joined #RubyOnRails
[04:49:27] leofrozenyogurt: has joined #RubyOnRails
[04:49:37] rclanan: has joined #RubyOnRails
[04:49:49] leofrozenyogurt: im having an issue with curb connecting to an ssl endpoint
[04:50:24] rclanan: has joined #RubyOnRails
[04:51:10] leofrozenyogurt: or how would this transfer into curb
[04:51:12] leofrozenyogurt: curl -s --insecure
[04:51:14] rclanan: has joined #RubyOnRails
[04:51:59] rclanan: has joined #RubyOnRails
[04:52:44] rclanan: has joined #RubyOnRails
[04:53:29] rclanan: has joined #RubyOnRails
[04:54:16] eljimmy: has joined #RubyOnRails
[04:54:17] rclanan: has joined #RubyOnRails
[04:55:08] rclanan: has joined #RubyOnRails
[04:55:27] tego: has joined #RubyOnRails
[04:55:49] rclanan: has joined #RubyOnRails
[04:56:34] rclanan: has joined #RubyOnRails
[04:57:21] B1n4r10: has joined #RubyOnRails
[04:57:24] rclanan: has joined #RubyOnRails
[04:58:10] rclanan: has joined #RubyOnRails
[04:58:55] rclanan: has joined #RubyOnRails
[04:59:40] silverdust: How can I add more params to a post request being sent through a link like <a href="/path" data-method="post" data-name="john doe">Click</a>
[04:59:44] rclanan: has joined #RubyOnRails
[05:00:29] rclanan: has joined #RubyOnRails
[05:00:36] silverdust: I want name to be in params when recieved by controller
[05:01:09] fryguy: silverdust: add to the url referenced in the href
[05:01:14] rclanan: has joined #RubyOnRails
[05:01:16] Radar: silverdust: hello again
[05:02:04] rclanan: has joined #RubyOnRails
[05:02:10] silverdust: oh like the regular http GET params
[05:02:44] rclanan: has joined #RubyOnRails
[05:03:23] eljimmy: has joined #RubyOnRails
[05:03:29] rclanan: has joined #RubyOnRails
[05:04:08] harly: has joined #RubyOnRails
[05:04:16] rclanan: has joined #RubyOnRails
[05:05:01] rclanan: has joined #RubyOnRails
[05:05:32] pawnbox: has joined #RubyOnRails
[05:05:50] rclanan: has joined #RubyOnRails
[05:06:30] rclanan: has joined #RubyOnRails
[05:07:20] rclanan: has joined #RubyOnRails
[05:08:05] rclanan: has joined #RubyOnRails
[05:08:52] rclanan: has joined #RubyOnRails
[05:09:37] rclanan: has joined #RubyOnRails
[05:10:27] rclanan: has joined #RubyOnRails
[05:11:12] rclanan: has joined #RubyOnRails
[05:11:18] Radar: harly: hello
[05:11:20] Radar: harly: Chapter 12?
[05:11:30] Radar: harly: It's quite a large book and I'm surprised you have gotten that far.
[05:11:47] harly: yhuh. in between jobs, so have been storming through from chapter 6 since last week. :)
[05:11:53] Radar: harly: sevenseacat holds the speed record for going through that book top to bottom... though to be fair she did write most of it.
[05:11:58] rclanan: has joined #RubyOnRails
[05:12:01] Guest96: has joined #RubyOnRails
[05:12:03] harly: looking forward to deploying. it's something i actually know what i'm doing :)
[05:12:14] Radar: Let us know when you do :)
[05:12:14] harly: but really enjoying the learning, clean code, and good practise.
[05:12:41] sevenseacat: https://github.com/rubysherpas/r4ia_examples/commits/master speed run.
[05:12:42] rclanan: has joined #RubyOnRails
[05:13:12] HenriettaSalt: has joined #RubyOnRails
[05:13:33] rclanan: has joined #RubyOnRails
[05:13:42] harly: looks comparable :)
[05:14:19] rclanan: has joined #RubyOnRails
[05:14:21] sakix: has joined #RubyOnRails
[05:14:39] sevenseacat: hope you're enjoying it :) any faults you find are solely mine
[05:14:57] harly: it's great. love the format.
[05:15:04] rclanan: has joined #RubyOnRails
[05:15:13] harly: only found 1 error which was minor so far
[05:15:32] sevenseacat: one or two technical errors did sneak through. I'll build a proper errata list one day.
[05:15:32] harly: some css which was claimed to be in a file i'm pretty sure was put in a different one and never moved. maybe an editing thing. (or my bad following/searching)
[05:15:54] rclanan: has joined #RubyOnRails
[05:16:12] sevenseacat: ACTION puts it on TODO list for this weekend
[05:16:27] harly: there's some falling back on let(:foo) { Something.new... } rather than using the factories which i felt to be a bit inconsistent. i wrote them using the factories instead and it was ok.
[05:16:39] rclanan: has joined #RubyOnRails
[05:16:39] harly: but hey, that's cosmetic.
[05:17:20] sevenseacat: there will be some differences in code style, due to Radar writing heaps, then me coming in and rewriting parts of it
[05:17:24] rclanan: has joined #RubyOnRails
[05:17:31] sevenseacat: we have similar styles, but not identical
[05:18:09] rclanan: has joined #RubyOnRails
[05:18:47] workmad3: has joined #RubyOnRails
[05:18:54] rclanan: has joined #RubyOnRails
[05:19:39] rclanan: has joined #RubyOnRails
[05:20:26] rclanan: has joined #RubyOnRails
[05:20:59] rubyonrails692: has joined #RubyOnRails
[05:21:06] arup_r: has joined #RubyOnRails
[05:21:12] rclanan: has joined #RubyOnRails
[05:22:00] rclanan: has joined #RubyOnRails
[05:22:43] rclanan: has joined #RubyOnRails
[05:23:28] rclanan: has joined #RubyOnRails
[05:24:16] rclanan: has joined #RubyOnRails
[05:25:01] rclanan: has joined #RubyOnRails
[05:25:31] sakix: has joined #RubyOnRails
[05:25:46] rclanan: has joined #RubyOnRails
[05:26:29] rclanan: has joined #RubyOnRails
[05:27:19] rclanan: has joined #RubyOnRails
[05:28:04] rclanan: has joined #RubyOnRails
[05:28:54] rclanan: has joined #RubyOnRails
[05:29:39] rclanan: has joined #RubyOnRails
[05:30:26] rclanan: has joined #RubyOnRails
[05:31:13] rclanan: has joined #RubyOnRails
[05:32:03] rclanan: has joined #RubyOnRails
[05:32:46] rclanan: has joined #RubyOnRails
[05:32:59] shibly: has joined #RubyOnRails
[05:33:31] rclanan: has joined #RubyOnRails
[05:34:10] ChanServ: +o baweaver
[05:34:18] rclanan: has joined #RubyOnRails
[05:34:23] baweaver: rclanan: fix your connection
[05:34:25] baweaver: baweaver kicked rclanan:
[05:34:37] ChanServ: -o baweaver
[05:35:03] rclanan: has joined #RubyOnRails
[05:35:48] rclanan: has joined #RubyOnRails
[05:35:58] ChanServ: +o baweaver
[05:36:38] rclanan: has joined #RubyOnRails
[05:37:21] Radar: +b rclanan!*@*
[05:37:31] ChanServ: -o baweaver
[05:37:46] sevenseacat: out come the cinnamon rolls, uh oh
[05:38:40] baweaver: noisy noise
[05:38:46] herbst: has joined #RubyOnRails
[05:39:20] sevenseacat: ACTION loud noises
[05:39:23] Radar: Pretty much on the minute.
[05:41:31] arup_r: I like that +o, +b :)
[05:44:28] Radar: Way too spammy today. Don't need that.
[05:44:46] andchar: has joined #RubyOnRails
[05:48:46] pulgalipe: has joined #RubyOnRails
[05:49:21] ur5us: has joined #RubyOnRails
[05:49:36] Thouren: has joined #RubyOnRails
[05:50:15] yogeshrt: has joined #RubyOnRails
[05:50:53] par[a]digm: has joined #RubyOnRails
[05:52:59] Cohedrin: has joined #RubyOnRails
[05:53:38] smoitra: has joined #RubyOnRails
[05:54:20] jahbrewski: has joined #RubyOnRails
[05:54:25] dexter_: has joined #RubyOnRails
[05:54:59] smoitra: hi all, What is the best way to update parts of page automatically using JS/Coffee ?
[05:55:11] smoitra: I read the guides but got confused
[05:56:01] smoitra: I want to refresh the data in instance variable
[05:57:36] arup_r: smoitra: part of page means Ajax call. Which can be written either way..
[05:58:03] kirillzh: What would be the best way to store gender: as string "male"/"female" or as binary 0/1?
[05:58:08] arup_r: you can use JS or Coffee
[05:58:39] arup_r: kirillzh: You need Enum ,, which is 0 and 1
[05:59:14] arup_r: http://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html
[05:59:22] lxsameer: has joined #RubyOnRails
[05:59:24] kirillzh: arup_r so I should use binary as the column. In this case, what is 0, what is 1? :D
[05:59:37] arup_r: enum gender: [ :mail, :female ]
[05:59:56] arup_r: kirillzh: it is upto you ;)
[06:00:20] kirillzh: Feminists will hate anyway.
[06:00:24] smoitra: arup_r: I mean I wrote coffee with $.ajax call but this is not playing well with turbolinks
[06:00:24] Radar: kirillzh: Solution: don't. Store them as either male or female.
[06:00:32] arup_r: but using enum very helpful ... you should try it once, and you will use it many times
[06:00:38] kirillzh: Radar as strings?
[06:00:41] Radar: kirillzh: Not a nice comment about feminists TBH.
[06:00:42] Radar: kirillzh: yes.
[06:00:49] arup_r: Radar: reason ?
[06:01:24] Radar: arup_r: because then it's very clear what rows are male and female in any instance and you don't have to dedicate brainspace to 0 == male 1 == female
[06:01:26] sevenseacat: the best way to store gender would be a free text field.
[06:02:09] Radar: sevenseacat: yeah I think we are working our way up there.
[06:02:15] arup_r: having integer column over string has no advantage ?
[06:02:38] matthewd: .. assuming you actually have a reason to ask
[06:02:39] Radar: arup_r: DB will load 0.000000000003ms faster
[06:02:51] ss_much: has joined #RubyOnRails
[06:02:53] sevenseacat: matthewd: indeed.
[06:03:10] Radar: matthewd: Useful for product information imo. Lots of people on our site want to know if those bike shorts are mens or womens.
[06:03:26] sevenseacat: I had that same discussion with a coworker yesterday. 'why are you asking users their gender?' 'for analytics purposes'
[06:03:47] jahbrewski: has joined #RubyOnRails
[06:03:50] arup_r: and enum gives much more flexibility.. anyway, I will use enum, it is very useful and powerful. integers are faster than string.. that is me will adopt enum in this case. :)
[06:04:01] Radar: arup_r: lol
[06:04:15] Radar: [17:02:39] <Radar> arup_r: DB will load 0.000000000003ms faster
[06:04:23] Radar: you take this as "integers are faster than strings"
[06:04:26] Radar: I am chuckling
[06:04:29] sevenseacat: talk about premature optimization
[06:04:40] smoitra: I wrote a ajax script to fire every second to get new data and put it in the page but even if I move to another page the script keeps on firing how do I get around the problem
[06:05:19] smoitra: I dont want to use data-no-turbolinks.
[06:05:24] tfittsy: has joined #RubyOnRails
[06:05:42] arup_r: smoitra: show the code..
[06:05:44] matthewd: "female\0" is smaller than an int64 #justsayin'
[06:06:09] sevenseacat: they see me trollin'
[06:06:28] kirillzh: Why int64? Just binary
[06:06:40] helpa: http://i.imgur.com/tyViD.gif
[06:06:42] smoitra: arup_r : https://gist.github.com/xw19/d894e47a9c0def51809a
[06:06:44] Radar: !popcorn5
[06:06:44] helpa: http://i.imgur.com/yc1b4Wa.gif
[06:06:50] Radar: I think this is a level 5 popcorn moment.
[06:07:14] Puffball: has joined #RubyOnRails
[06:07:56] Malgorath: Just a heads up on folks cause this just happened this week to me, if you find yourself very lethargic, sleeping a lot, and/or signs of depression go have a blood test done. I found out for some reason I have almost no levels of Vitamin D in my system. just a PSA from me to ya'll.
[06:08:17] Radar: Malgorath: Strongly confirm I suffer from the same thing.
[06:08:43] Malgorath: Radar, they put me on a once a week 50,000 unit pill to get it up to something.
[06:08:56] visudo: more info on vitamin d: https://twit.tv/shows/security-now/episodes/540
[06:09:05] arup_r: smoitra: your JS is actually included through application.js, which is why it is running all over the place. if you want to bind it to a specific page, then write it as page specific js.
[06:09:15] kirillzh: That's why I eat omega 3 :D
[06:09:21] arup_r: not a global one
[06:09:56] smoitra: arup_r: its in a specific page
[06:10:00] Malgorath: I used to eat lots of fish and shrimp, but since my wife and I split, I hardly eat anything but salads. IDK why, just thats all I crave
[06:10:18] kirillzh: http://www.amazon.com/Omega-Fish-Triple-Strength-Burpless/dp/B00CAZAU62/ref=sr_1_1?ie=UTF8&qid=1453961403&sr=8-1-spons&keywords=fish+oil&psc=1
[06:10:42] kirillzh: I don't like fish, but still need vitamins.
[06:10:46] sevenseacat: how did we even
[06:11:07] kirillzh: That's all starts with gender.
[06:12:00] Malgorath: kirillzh, I'm gonna take your bear poking stick away :P
[06:12:34] harly: also, take care with gender vs sex. if you're asking gender, be inclusive and include other or custom fields: http://itspronouncedmetrosexual.com/2012/06/how-can-i-make-the-gender-question-on-an-application-form-more-inclusive/ (and if asking sex, take care too!)
[06:12:36] smoitra: arup_r: If I go to a specfic page with no_turbolinks the problem dont happens
[06:12:46] kirillzh: No more bears then
[06:13:40] ChanServ: +o baweaver
[06:13:52] sleungcy: has joined #RubyOnRails
[06:13:56] kirillzh: binary column easier to validate than text field
[06:13:58] Malgorath: ACTION runs off to smoke
[06:13:59] arup_r: eeh, see the +o
[06:14:25] baweaver: #ruby-offtopic if we want to keep on for nutrition
[06:14:27] kirillzh: I will use enums
[06:14:32] baweaver: I don't really have a problem with it
[06:14:38] baweaver: but it distracts the rest of the channel
[06:14:46] yoongkang: has joined #RubyOnRails
[06:14:55] sevenseacat: why do you need to validate a gender?
[06:15:20] sevenseacat: like, are you going to be giving everyone a psychological test to make sure what they write is true?
[06:15:28] kirillzh: 'for analytics purposes'?
[06:15:43] kirillzh: Just kidding.
[06:15:47] baweaver: as much as this seems like a fun topic though, let's just leave it to the programming portion of things, shall we?
[06:15:54] rhizome: TERSE: trans exclusionary radical software engineer
[06:16:46] kirillzh: sevenseacat anyways, I decided to try binary with enums
[06:17:21] ChanServ: -o baweaver
[06:17:26] baweaver: ACTION takes off special hat
[06:18:12] arup_r: love that hat. :)
[06:18:49] arup_r: kirillzh: hum, you will love the enum .. it is very nice.. good luck!
[06:18:54] baweaver: I'm saving it just for you arup_r, but you survive another day :)
[06:19:09] sevenseacat: enums in Rails are pretty awesome. there are some downsides though.
[06:19:30] baweaver: mainly that it's a pain to query
[06:19:31] arup_r: sevenseacat: I would like to here that,, would you please share ?
[06:20:06] baweaver: I prefer to just have a validation of includes on the ingress that way if I need something else I just add to that validation.
[06:20:31] sevenseacat: I was thinking more along the lines of 'theyre not fun to add values/reorder unless you specifically set the values at the start', and you cant have more than one of them on a model with the same values
[06:20:34] baweaver: easier to add onto later, less headaches, and easier to query against later.
[06:20:37] sevenseacat: or any of the same values
[06:20:55] baweaver: that too, found that one out the hard way.
[06:21:18] baweaver: I still call shenanigans on that one.
[06:21:34] qejk: has joined #RubyOnRails
[06:21:59] sevenseacat: I wonder if you could add a `prefix` option to an enum, which would allow the generated methods to be prefixed with some string
[06:22:39] arup_r: yes when we have 2 columns having same values.. happened with me lot of times..
[06:22:56] baweaver: Ah, yes, my idea I had earlier
[06:23:06] baweaver: I hate writing factory girl setups for tests
[06:23:11] arup_r: sevenseacat: you can prefix to enum.
[06:23:19] baweaver: so I get a model and all the data I want and tell it to make the factories for me
[06:23:28] sevenseacat: arup_r: oh really
[06:23:46] arup_r: "You can use the :_prefix or :_suffix options when you need to define multiple enums with same values. If the passed value is true, the methods are prefixed/suffixed with the name of the enum. It is also possible to supply a custom value:"
[06:23:59] baweaver: just saw it too.
[06:24:08] sevenseacat: thats exactly what I was talking about... why are they underscored though
[06:24:22] baweaver: ACTION shrugs
[06:24:35] arup_r: say once "TIL" :D
[06:25:13] baweaver: today I found out
[06:25:33] arup_r: ACTION was supposed to ask the meaning.. thanks baweaver in advance
[06:25:46] sevenseacat: where are those docs, its not listed api.rubyonrails.org/classes/ActiveRecord/Enum.html
[06:25:54] arup_r: http://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html
[06:25:59] baweaver: http://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html
[06:26:07] arup_r: just above **Methods**
[06:27:28] sevenseacat: ahhhh edge, right
[06:27:33] arup_r: whay rails docs are so scattered ?
[06:27:41] sevenseacat: must be new in rails 5
[06:27:44] HenriettaSalt: has joined #RubyOnRails
[06:27:55] arup_r: no, I used it in Rails 4 app
[06:28:12] arup_r: dunno ... :(
[06:37:53] Maletor: has joined #RubyOnRails
[06:39:31] harly: the joy of debugging TDD to find it was simply a <% instead of a necessary <%= template directive.
[06:44:25] pulgalipe: has joined #RubyOnRails
[06:46:11] AndChat|119664: has joined #RubyOnRails
[06:47:10] darutoko: has joined #RubyOnRails
[06:48:03] solars: has joined #RubyOnRails
[06:48:04] yfeldblum: has joined #RubyOnRails
[06:51:40] rvanlieshout: has joined #RubyOnRails
[06:52:24] par[a]digm: has joined #RubyOnRails
[06:52:53] wldcordeiro: has joined #RubyOnRails
[06:58:47] hololeap: has joined #RubyOnRails
[07:00:12] workmad3: has joined #RubyOnRails
[07:12:22] Mia: has joined #RubyOnRails
[07:12:22] Mia: has joined #RubyOnRails
[07:12:40] chipotle: has joined #RubyOnRails
[07:15:40] yoongkang: has joined #RubyOnRails
[07:18:09] harly: yay! 13: deployment. tomorrow though. brain fried.
[07:18:30] harly: are you planning to do a 15: docker ? :)
[07:20:13] tego: has joined #RubyOnRails
[07:21:21] tvw: has joined #RubyOnRails
[07:21:24] matthewd: enum _prefix/_suffix are underscored because the enum name is itself a hash key in the call... alternatives were to squat on some awfully-reasonable-looking enum names, or use an ugly double hash
[07:22:49] PedramT: has joined #RubyOnRails
[07:23:11] kerunaru: has joined #RubyOnRails
[07:24:15] montagne_goat: has joined #RubyOnRails
[07:24:21] tego: has left #RubyOnRails: ()
[07:24:36] Cohedrin: has joined #RubyOnRails
[07:27:01] Radar: harly: no more extra chapters for the book
[07:27:05] Radar: harly: we're done writing for Manning for all time.
[07:27:32] harly: ah right. i've seen some stuff about getting paid timely
[07:27:37] Bloodberet: has joined #RubyOnRails
[07:28:07] sevenseacat: ACTION still waiting for payment
[07:28:09] yogeshrt: has joined #RubyOnRails
[07:28:30] HenriettaSalt: has joined #RubyOnRails
[07:29:08] duncannz: has joined #RubyOnRails
[07:29:20] croc: has joined #RubyOnRails
[07:30:07] arup_r: has joined #RubyOnRails
[07:30:31] piotrj: has joined #RubyOnRails
[07:31:07] workmad3: has joined #RubyOnRails
[07:32:03] smathy: has joined #RubyOnRails
[07:33:16] Radar: harly: Lotsa info here: http://ryanbigg.com/2015/08/my-self-publishing-success-story/
[07:33:21] pawnbox: has joined #RubyOnRails
[07:33:28] Radar: "The long and short of it is that I found Manning incredibly hard to work with due to their tooling and my tendency to want to control everything from how the book looks to when I push updates to its content."
[07:33:30] sevenseacat: ooh you changed your blog
[07:35:55] comrad: has joined #RubyOnRails
[07:36:06] harly: lol: that royalties comparison.
[07:36:09] Radar: I was using https://coolors.co/ for something else and I saw the very-light-blue and red pop up and I thought that it would look nice.
[07:36:16] Radar: harly: IKR
[07:36:26] Radar: "Fucked" is the best term I've found so far to describe it.
[07:36:56] sevenseacat: ooh i like coolors
[07:37:42] aganov: has joined #RubyOnRails
[07:38:20] Radar: p.s. surprise update of MTWR going out now
[07:39:13] duncannz: has joined #RubyOnRails
[07:39:53] piotrj_: has joined #RubyOnRails
[07:40:24] herbst: has joined #RubyOnRails
[07:40:30] harly: Radar, sevenseacat, http://paletton.com/ is kinda cool too. finding it easier to experiment and randomize.
[07:40:45] zworks: has joined #RubyOnRails
[07:41:04] zworks: why pg_dump does not dump data ?
[07:41:27] pulgalipe: has joined #RubyOnRails
[07:42:25] rvanlieshout: zworks: you tell us
[07:42:40] rvanlieshout: also it's documentation will tell you how to use it
[07:42:48] piotrj: has joined #RubyOnRails
[07:43:11] sevenseacat: harly: ooh I think I've seen that one before
[07:43:13] Bloodberet: has joined #RubyOnRails
[07:43:22] artto: has joined #RubyOnRails
[07:43:57] mdw: has joined #RubyOnRails
[07:44:38] harly: sevenseacat, really liking it. (just found it). the circle selectors, the randomize options, and then the "Examples..." tab to see a lorum ipsum webpage layout using it. grat!
[07:44:46] sakix: has joined #RubyOnRails
[07:45:21] sevenseacat: I'm hopeless with colours, which is why every blog I've designed for myself is pretty much technicolour
[07:45:30] sevenseacat: and psychedelic
[07:45:48] harly: lol. same. 'cept i go for monotonal
[07:47:36] harly: it's really hard to go wrong with this paletton one
[07:47:56] harly: when on the example... view, there's a randomize shortcut on the bottom right. click-click-click-click-ooohhh
[07:49:07] mices: has joined #RubyOnRails
[07:51:05] sevenseacat: ACTION playes with greens, blues, and purples, cackling madly
[07:52:25] harly: :) this is a bit addictive. i'm totally using it next time i try to style a mock page.
[07:53:12] harly: oh no. have you seen the Artwork submenu on the examples... view?
[07:53:41] PedramT: has joined #RubyOnRails
[07:53:46] par[a]digm: has joined #RubyOnRails
[07:54:02] harly: tartan, and animate bubbles.
[07:54:20] pawnbox: has joined #RubyOnRails
[07:54:21] PedramT: has joined #RubyOnRails
[07:54:51] dexter_: has joined #RubyOnRails
[07:56:03] sevenseacat: omg I was just looking at those
[07:56:39] sevenseacat: http://paletton.com/#uid=6440A0kramchz-LmVrXvMfzLv5V :D
[07:56:45] tego101: has joined #RubyOnRails
[07:56:46] sevenseacat: the kinds of colours I like
[07:56:53] creaked: has joined #RubyOnRails
[07:57:23] dionysus69: has joined #RubyOnRails
[07:57:28] harly: that makes a cool tartan
[07:58:38] tetraktys: has joined #RubyOnRails
[08:00:25] harly: i like the kinda washed out ones. in browns, greens, and purples. http://paletton.com/#uid=52k0e0k2ljc6hnI3vhb50fr6wdx
[08:00:26] HenriettaSalt: has joined #RubyOnRails
[08:00:35] andchar: has joined #RubyOnRails
[08:00:46] yogeshrt: has joined #RubyOnRails
[08:01:31] defsdoor: has joined #RubyOnRails
[08:01:58] sevenseacat: I have no idea how I would make a design using all my cool colours
[08:03:26] baweaver: https://color.adobe.com/ - I tend to use that.
[08:03:36] gbgdev: has joined #RubyOnRails
[08:04:47] harly: baweaver, oh that's cool too
[08:07:10] msyvich__: has joined #RubyOnRails
[08:07:54] solars: has joined #RubyOnRails
[08:09:03] mdw: has joined #RubyOnRails
[08:13:12] qejk: has joined #RubyOnRails
[08:15:12] harly_: has joined #RubyOnRails
[08:15:42] Bloodberet: has joined #RubyOnRails
[08:16:26] workmad3_: has joined #RubyOnRails
[08:19:53] PedramT: has joined #RubyOnRails
[08:20:42] jgpawletko: has joined #RubyOnRails
[08:21:53] camilasan: has joined #RubyOnRails
[08:28:21] fbandov: has joined #RubyOnRails
[08:29:08] cfjk: has joined #RubyOnRails
[08:29:54] cfjk: has left #RubyOnRails: ()
[08:30:11] DoubleMalt: has joined #RubyOnRails
[08:30:25] arup_r: has joined #RubyOnRails
[08:30:56] ziyadb: has joined #RubyOnRails
[08:31:26] yoongkang: has joined #RubyOnRails
[08:31:43] nettoweb: has joined #RubyOnRails
[08:32:05] lord4163: has joined #RubyOnRails
[08:33:49] zworks: has joined #RubyOnRails
[08:34:24] zworks: I have done the pg_dump as normal as the documentation says
[08:34:45] zworks: but anyhow only the structure is there when i restore it to another new db
[08:35:03] cfjk: has joined #RubyOnRails
[08:35:42] zworks: data is not copied
[08:35:54] sevenseacat: what command did you run?
[08:36:29] zworks: pg_dump rail_development > dev.sql
[08:36:35] zworks: that's for the dump
[08:36:49] Psy-Q: has joined #RubyOnRails
[08:36:51] zworks: pg_restore rail_test dev.sql
[08:36:53] zworks: for restore
[08:38:59] sevenseacat: that should also dump the data
[08:39:02] sevenseacat: what version of psql?
[08:39:08] cfjk: hello. using Model.select('model.*, other_table.custom_property') i get object with custom_property, but if i add includes(:some_relation) to the query then custom_property is lost. is there a way to have includes and custom_property?
[08:39:22] sevenseacat: in my test with psql 9.4.5, it does dump the data
[08:39:42] zworks: psql (9.4.4)
[08:40:04] EasyCo: has joined #RubyOnRails
[08:40:20] zworks: I see the commands for the table structure indexes etc..
[08:40:21] fox_mulder_cp: some body uses IPv6? i need a minimal required ip6tables rules for normal IPv6 network accessibility in default -j DROP politic
[08:40:43] zworks: and also i see some copy commands in the dump file, i think that's what supposed to do the copying of data
[08:41:08] noodman: has joined #RubyOnRails
[08:41:20] sevenseacat: so the data is being dumped
[08:41:58] tjbiddle: has joined #RubyOnRails
[08:42:08] sevenseacat: i dont think thats the pg_restore command you ran
[08:43:24] dionysus69: has joined #RubyOnRails
[08:45:07] zworks: [archiver] input file appears to be a text format dump. Please use psql.
[08:45:40] andchar: has joined #RubyOnRails
[08:46:09] zworks: I get this when i try to restore
[08:47:03] sakix: has joined #RubyOnRails
[08:47:28] piotrj_: has joined #RubyOnRails
[08:47:30] Ergo: has joined #RubyOnRails
[08:49:58] yfeldblum: has joined #RubyOnRails
[08:53:26] zworks: okay, i used pg_dump -Fc mydb > db.dump
[08:53:40] zworks: and used pg_restore -d newdb db.dump
[08:53:53] zworks: but still only the structure is copied
[08:55:19] rvanlieshout: zworks: so you read the pg_dump documentation?
[08:55:31] par[a]digm: has joined #RubyOnRails
[08:56:47] bahar: has joined #RubyOnRails
[08:56:48] mark2: has joined #RubyOnRails
[08:56:54] kitsuneyo: has joined #RubyOnRails
[08:57:01] rvanlieshout: and what if you leave out the custom format, does it dump the data? or is the restore here lacking
[08:57:49] zworks: if i do so it creates dump as a plain text file
[08:58:11] rvanlieshout: but it includes data?
[08:58:12] zworks: and i get
[08:58:15] zworks: [archiver] input file appears to be a text format dump. Please use psql.
[08:58:52] zworks: then i tried psql restore, still only the structure copied
[08:59:03] rvanlieshout: but do you see data in the file yourself?
[08:59:20] zworks: no, i see some copy commands
[08:59:36] rvanlieshout: don't perform the restore yet
[08:59:54] rvanlieshout: look at the output of pg_dump, when not using some custom format
[09:00:49] mikecmpbll: has joined #RubyOnRails
[09:01:18] zworks: https://gist.github.com/haswow/78889e3ccf00da2a7be6
[09:01:24] PedramT: has joined #RubyOnRails
[09:01:27] zworks: that's how it looks
[09:01:39] zworks: I pasted part of the dump file
[09:01:57] HenriettaSalt: has joined #RubyOnRails
[09:02:06] kerunaru: Hey, guys! What's up? ????
[09:02:15] rvanlieshout: could you add a gist where you confirm that there actually is data in those tables?
[09:04:09] mdw: has joined #RubyOnRails
[09:05:04] andchar: zworks: maybe you need type pg_restore -d newdb < db.dump?
[09:05:08] zworks: only way is dumping, so when the dump doesn't include the data how can i show
[09:05:21] rvanlieshout: you don't have access to the actual db?
[09:05:22] zworks: i confirm it by looking via pgAdmin tool
[09:05:36] zworks: I see data in the rail_development db
[09:05:50] PedramT_: has joined #RubyOnRails
[09:06:08] rvanlieshout: zworks: are you using multiple schema's?
[09:06:21] sandstrom: has joined #RubyOnRails
[09:06:28] lexiMon: has joined #RubyOnRails
[09:06:43] elaptics`away: has left #RubyOnRails: ()
[09:07:03] elaptics: has joined #RubyOnRails
[09:07:18] zworks: Just now checked the rail_development db via pgAdmin
[09:07:33] zworks: the db seems completely empty!!
[09:07:49] zworks: how did that happened!
[09:08:57] kerunaru: Calm down, zworks??? You need to think before panic. Did you execute a 'rake db:reset' command?
[09:09:08] codezomb: has joined #RubyOnRails
[09:09:11] sevenseacat: well, thats why no data got dumped then
[09:09:58] codezomb: If my rails app (json api only) is not serving static assets, is there any good reason to include nginx between rails and aws elb?
[09:10:14] zworks: i ran some commands for preparing for testing
[09:10:24] codezomb: I've always done this "just because", and I'm wondering if it's even necessary with a json api.
[09:10:32] zworks: coz this is the first time i intended to test my app
[09:10:42] jsrn_: has joined #RubyOnRails
[09:10:52] zworks: also started the server as "rails s -e test"
[09:11:24] silverdust: where's the best place to store cart for users that aren't signed in? localStorage? Cookies?
[09:11:25] sevenseacat: wait, what's dumping and restoring got to do with testing?
[09:11:38] silverdust: in an ecommerce kinda app I mean
[09:12:01] kerunaru: Testing database is delete each time you do testing, zworks
[09:12:02] zworks: There has to be data in the test db before testing, right?
[09:12:15] titeiko: has joined #RubyOnRails
[09:12:27] drptbl: has joined #RubyOnRails
[09:12:56] zworks: then how will the website function without necessary data?
[09:13:04] rvanlieshout: silverdust: i personally prefer to actually have them sign in
[09:13:10] rvanlieshout: without prompting that
[09:13:11] rvanlieshout: as a guest user
[09:13:24] kerunaru: The test environment is tended to be used with 'rake test' not to server, zworks
[09:13:30] rvanlieshout: so for your application it's similar to having an actual user
[09:13:59] silverdust: I think it may kill the UX for some that want to aggregate the price and are too lazy to sign up
[09:14:27] zworks: ok, anyone here can you please kindly send me the steps needed to start some unit/performance testing?
[09:14:27] sandstrom: has joined #RubyOnRails
[09:14:28] rvanlieshout: silverdust: they don't actually have to sign in
[09:14:28] silverdust: *prices of items they are interested in
[09:14:33] baweaver: has joined #RubyOnRails
[09:15:11] kerunaru: http://guides.rubyonrails.org/testing.html zworks
[09:15:21] cheeti: has joined #RubyOnRails
[09:16:29] zworks: that don't answer some of my clarifications i think
[09:16:40] silverdust: I may be missing your point. I'm a new user on xyz.com your ecommerce website and after looking through your content I decide to put it all together in one place to see the things I really want. How will that work out for me as the user?
[09:16:50] zworks: should i start rails with test environment before all?
[09:17:18] zworks: then why there is an option as "rails start -e test" ?
[09:17:21] cheeti: after admin signin they can create login for users in rails 4
[09:17:33] mdw: has joined #RubyOnRails
[09:17:36] cheeti: is this posible
[09:17:41] sevenseacat: if for some reason you wanted to serve your app up in test mode. thats not for normal usage.
[09:17:54] CornishPasty: Also, doesn't -e just take any argument?
[09:18:13] sevenseacat: its also `rails server`, not `rails start`
[09:18:16] zworks: it takes the environment as arg
[09:18:34] zworks: yeah it's rails server, mistyped
[09:19:23] sevenseacat: in tests you create the data you need, in the tests you need it in
[09:19:39] sevenseacat: so all your tests run in complete isolation of each other
[09:20:49] cheeti: hi any possible to create devise admin to create login for users in rails 4
[09:20:50] sevenseacat: i personally think https://pragprog.com/book/nrtest2/rails-4-test-prescriptions is a great book all about testing in rails
[09:21:02] zworks: https://gist.github.com/haswow/776479902ac9f073591e
[09:21:09] kerunaru: In the guides there are plenty information about testing a Rails app???
[09:21:17] kerunaru: +1 sevenseacat
[09:21:21] zworks: Please that gist
[09:21:33] zworks: it's in the folder test/performance
[09:21:42] zworks: so how can i run this test?
[09:21:47] pulgalipe: has joined #RubyOnRails
[09:21:47] sevenseacat: with `rake test`
[09:22:39] zworks: rake aborted! LoadError: cannot load such file -- test_helper
[09:22:59] sevenseacat: do you have a file called test_helper in your test directory?
[09:23:32] zworks: inside the test folder, there is only one item
[09:23:32] sevenseacat: you should. did you delete it?
[09:23:40] zworks: that's the performace folder
[09:23:41] sevenseacat: because i just generated a brand new rails app and it is there
[09:23:57] sevenseacat: you should have much more than that.... did you skip generating tests when you created your app?
[09:23:59] zworks: no idea, can i create it?
[09:24:08] zworks: i think so :)
[09:24:10] sevenseacat: create a new app, and copy the test folder over.
[09:24:25] smoitra: has joined #RubyOnRails
[09:25:40] Cervajz: has joined #RubyOnRails
[09:25:52] blackhuey: has joined #RubyOnRails
[09:26:09] yoongkang: has joined #RubyOnRails
[09:27:06] Cervajz__: has joined #RubyOnRails
[09:27:36] workmad3: has joined #RubyOnRails
[09:28:40] Bloodberet: has joined #RubyOnRails
[09:29:08] zworks: Gem::LoadError: You have already activated rake 10.5.0, but your Gemfile requires rake 10.4.2. Prepending `bundle exec` to your command may solve this.
[09:29:22] sevenseacat: follow the instructions.
[09:29:56] Graphettion: has joined #RubyOnRails
[09:30:02] zworks: rake aborted! NameError: uninitialized constant ActionDispatch::PerformanceTest
[09:30:18] sevenseacat: ok, so where did this test come from?
[09:30:53] kerunaru: What do you want to test, zworks?
[09:31:08] zworks: http://guides.rubyonrails.org/v3.2.13/performance_testing.html
[09:31:13] sevenseacat: it's not a default rails test, nor is there a generator for generating performance tests
[09:31:14] zworks: i ran the following command
[09:31:16] sevenseacat: ok thats an old version of rails
[09:31:23] zworks: http://guides.rubyonrails.org/v3.2.13/performance_testing.html
[09:31:33] zworks: rails generate performance_test homepage
[09:31:52] sevenseacat: those tests don't exist anymore
[09:32:20] sevenseacat: 3.2.13 is three years old
[09:32:38] sevenseacat: and if your app is using it, then we have bigger problems
[09:32:50] sevenseacat: I don't think it is though
[09:33:08] zworks: rails --version
[09:33:09] zworks: Rails 4.2.4
[09:33:16] sevenseacat: right. those tests dont exist in rails 4.
[09:33:26] sevenseacat: so what are you actually trying to test?
[09:33:26] zworks: horraay!!
[09:34:00] zworks: trying to test the performance of my app..to see if i can some idea to improve the coding
[09:34:20] sevenseacat: i dont think that's relevant for you right now
[09:34:35] sevenseacat: I'd start with basic testing
[09:34:58] zworks: i decided this because yesterday i noticed that my app is slower
[09:35:10] zworks: then i restarted the server and it seems faster then
[09:35:11] sevenseacat: R4TP (the book I linked earlier) is a good read that covers all kinds of testing, both basic and advanced
[09:35:15] sevenseacat: and it has zero tests? :/
[09:35:22] zworks: so i thought there might be some mem leaks
[09:35:32] msyvich: has joined #RubyOnRails
[09:35:42] CornishPasty: I wonder when rails 5 is coming out...
[09:36:00] CornishPasty: I was sure dhh said 2015 :P
[09:36:13] kerunaru: I'd start reading about testing in general before proceed, zworks
[09:36:14] sevenseacat: I'd start by writing some lower level unit tests, to see where the bottlenecks are (which tests are slowest)
[09:36:22] sevenseacat: CornishPasty: it was originally slated for september 2015.
[09:36:33] CornishPasty: sevenseacat: yeah
[09:36:38] CornishPasty: Hey sevenseacat, do you have cats?
[09:36:44] sevenseacat: CornishPasty: two!
[09:36:57] CornishPasty: I've got a cat and a dog ;P
[09:36:59] sevenseacat: though I may be getting two more soon.
[09:37:03] sevenseacat: <-- crazy cat lady
[09:37:08] CornishPasty: I hope you eventually get 7!
[09:37:17] kerunaru: It has a big delay, then??? I didn't know that
[09:37:19] CornishPasty: We had 9 for a short time when I was a kid
[09:37:36] dexter_: has joined #RubyOnRails
[09:38:19] CornishPasty: ACTION stops talking off topic
[09:38:33] joy4u: has joined #RubyOnRails
[09:38:37] CornishPasty: ACTION wonders what webserver zworks is using
[09:38:42] joy4u: has left #RubyOnRails: ()
[09:39:04] zworks: am developing a job portal
[09:39:20] CornishPasty: I've no idea what web server I'm using :$
[09:39:21] zworks: is there any other server i should use which is better than webrick?
[09:39:25] kerunaru: That's too bad, zworks
[09:39:46] zworks: mm, i am just about 5 / 6 months with rails,
[09:39:52] zworks: so no idea!
[09:39:52] kerunaru: Webrick is single-process
[09:40:24] zworks: so what you guys recommend as a good server?
[09:40:26] kerunaru: So there you have your performance issue explained
[09:40:38] zworks: what you mean?
[09:41:01] kerunaru: Because your app dispatch each request one by one
[09:41:39] kerunaru: If, for example, there are 500 requests at the same time the last one will wait for the rest to finish
[09:41:44] arBmind: has joined #RubyOnRails
[09:42:03] AimlessRAven: has joined #RubyOnRails
[09:42:05] sevenseacat: wait are we talking about a development performance problem, or a production performance problem, or running webrick in production?
[09:42:07] zworks: though still am at localhost
[09:42:23] kerunaru: Oh??? Ok ok
[09:42:24] CornishPasty: Oh, localhost, ignore me
[09:42:29] CornishPasty: ACTION runs away
[09:42:29] zworks: I think in general they say webrick is not good
[09:42:32] zworks: so what you guys recommend as a good server?
[09:42:41] zerg_lurker: has joined #RubyOnRails
[09:42:55] AimlessRAven: how to expect this Product.reflect_on_association(:option_types) to be true ?
[09:43:10] gbgdev: has joined #RubyOnRails
[09:43:24] sevenseacat: well I'm not a guy, but I use webrick in development just fine. rails 5 is moving to puma by default though
[09:43:43] zworks: and in production ?
[09:43:51] rvanlieshout: something that fits your needs
[09:43:55] rvanlieshout: there is no single best rails server
[09:44:09] kerunaru: Well, we are using apache with passenger for example in my company
[09:44:09] sevenseacat: I have no idea what we use in production, I don't manage the prod servers.
[09:44:17] User458764: has joined #RubyOnRails
[09:44:28] sevenseacat: apache and passenger are a decent enough choice though.
[09:44:42] rvanlieshout: we also use that combination in dev
[09:44:48] CornishPasty: It's less bricky, more catty
[09:44:48] rvanlieshout: cause we have all our projects in vagrant + puppet
[09:44:50] kerunaru: Yep, quite standard actually
[09:45:17] kerunaru: vagrant??? ????
[09:45:23] ddv: you can also use nginx to reverse proxy your requests to something like unicorn. puma or whatever
[09:45:43] kerunaru: Yes, there are lots of combinations
[09:45:58] AimlessRAven: i have Product model who associated with has_and_belongs_to many :option_types.. how to create rspec test to chech if to product i can set option_values
[09:46:16] AimlessRAven: and return return wrong if doesent set right option types
[09:46:25] zerg_lurker: Hey rails chat, I'm working out of the pragmatic programmers book for rails, and i'm having some trouble understanding the unit testing..Could anyone explain a chunk of code to me? Also, is pastebin.com an acceptable medium tro hand you code , or do we prefer something else here?
[09:46:36] rvanlieshout: zerg_lurker: !gist
[09:46:36] helpa: zerg_lurker: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[09:46:42] helpa: Make deryl happy, please use http://gist.github.com instead.
[09:46:52] sevenseacat: zerg_lurker: we prefer gist or pastie, as specified in the channel rules.
[09:46:53] titeiko_: has joined #RubyOnRails
[09:47:03] sevenseacat: if you havent read them, I highly recommend it.
[09:47:45] sakix: has joined #RubyOnRails
[09:49:55] snowy: has joined #RubyOnRails
[09:50:00] zerg_lurker: rvanlieshout: thank you, also thank you to everyone else who answered.
[09:51:46] zerg_lurker: The code block i'm talking about is here : https://gist.github.com/tikonwc3/f4cf16c29a716aa5fbea/653a956e464290d0dbb1c7a84154eda3c9507390#file-unit-test-example . I don't see how calling .invalid? on line 6 could possibly know that the price must be >= 0.01. I did create some validation earlier, is it possible its pulling from there?
[09:52:09] sevenseacat: yes, calling invalid? will run all of the validations on the object
[09:52:14] sevenseacat: and return either true or false
[09:52:59] zerg_lurker: thanks, that makes sense. Just wanted to make sure thats where it was pulling from
[09:53:52] pawnbox: has joined #RubyOnRails
[09:55:40] rodfersou: has joined #RubyOnRails
[09:56:32] AimlessRAven: if i try my rspec test like this
[09:56:32] AimlessRAven: expect(Product.reflect_on_association(:option_types))
[09:56:37] par[a]digm: has joined #RubyOnRails
[09:56:41] AimlessRAven: is it check and return me wrong if something is wrong ?
[09:57:01] rvanlieshout: AimlessRaven: to just check for associations you might want to use shoulda_matchers
[09:57:29] pec: has joined #RubyOnRails
[09:58:05] pawnbox: has joined #RubyOnRails
[09:58:44] AimlessRAven: ok can i check in this way?
[09:58:55] marr: has joined #RubyOnRails
[09:59:12] PedramT: has joined #RubyOnRails
[09:59:57] workmad3: has joined #RubyOnRails
[10:00:32] rvanlieshout: by this you mean what you just pasted?
[10:00:33] krz: has joined #RubyOnRails
[10:01:59] rapha: Good morning
[10:03:34] rapha: I'm trying to use TurboLinks 3's partial replacement with Rails 4.2, but the element with data-turbolinks-permanent is still being replaced. According to the README on GitHub I shouldn't have to do more than that. Is it possible that that's not true for Rails 4.2?
[10:04:02] HenriettaSalt: has joined #RubyOnRails
[10:05:25] fbandov: has joined #RubyOnRails
[10:05:34] piotrj: has joined #RubyOnRails
[10:06:47] noodman: has joined #RubyOnRails
[10:07:01] solars: hi, if I want to track attribute changes in an external module, after the record has been saved is creating a) an after_save hook that calls mymodule.check(self) so i can use b) model.previous_changes, the right solution?
[10:07:18] noodman_: has joined #RubyOnRails
[10:07:19] PedramT_: has joined #RubyOnRails
[10:08:13] msyvich: has joined #RubyOnRails
[10:09:51] blackmesa: has joined #RubyOnRails
[10:11:45] AimlessRAven: expect(Product.reflect_on_association(:option_types)).to_not be_nil :: is this is a good test for check for valid association ?
[10:12:26] blackmes1: has joined #RubyOnRails
[10:13:03] kitsuneyo: has joined #RubyOnRails
[10:13:39] tbuehlmann: AimlessRaven, is this test meant to be for documentation? if not, what does it test?
[10:13:45] jayprakash: has joined #RubyOnRails
[10:16:18] nettoweb: hello guys, Im trying to understand well how to figure out which OS resources I need to run my website without problem... in terms of emory, cpu, disk usage and etc. Do you know some page or website helping with this subject? Or some work I use to search for this thing.
[10:16:34] drptbl: has joined #RubyOnRails
[10:16:36] PedramT: has joined #RubyOnRails
[10:17:05] rvanlieshout: well no. it's a quite common problem for speed issues
[10:19:12] crdpink2: has joined #RubyOnRails
[10:19:22] AimlessRAven: badeball: i exped to check if have a valid association in thees habtm assoc..
[10:20:18] rvanlieshout: and the people who created shoulda_matches did an awesome job in creating validators for that
[10:20:28] nettoweb: rvanlieshout I common question I have if a 4GB memory/2cpus it's good for my app, looking new relic it's using 19% cpu, 34% memory, 0.22% disk i/o and 84% fullest disk
[10:20:39] AimlessRAven: tbuehlmann: i exped to check if have a valid association in thees habtm assoc..
[10:20:48] nettoweb: it's a good number for my app I guess
[10:20:50] nettoweb: but dont know exactly
[10:21:08] mdw: has joined #RubyOnRails
[10:21:09] rvanlieshout: a good number for what?
[10:21:22] tbuehlmann: AimlessRaven, I don't think that's useful
[10:21:27] rvanlieshout: if there is no growth 34% memory usage is pointless
[10:23:49] nettoweb: rvanlieshout good number to run my web app well
[10:23:53] nettoweb: with good performance
[10:24:04] rvanlieshout: how long does a request take?
[10:24:30] nettoweb: I dont know if it's better to upgrade to a 8gb memory or a better CPU, looking for that number seems ok for me...
[10:24:41] rvanlieshout: it's never better to randomly upgrade
[10:25:23] nettoweb: a single ping takes 176.626 ms
[10:25:28] hmsimha_: has joined #RubyOnRails
[10:26:26] rvanlieshout: what's a 'single ping'?
[10:26:33] rvanlieshout: and why does it take 176ms?
[10:26:59] nodejunkie: has joined #RubyOnRails
[10:28:09] ldnunes: has joined #RubyOnRails
[10:28:48] nettoweb: rvanlieshout ping mysite.com
[10:28:57] rvanlieshout: ah. that's not related to your application
[10:29:07] rvanlieshout: just the poor internet connection between you and that server
[10:29:27] rvanlieshout: and also quite irrelevant for proper benchmarks
[10:29:43] rvanlieshout: or it's just a small part of it
[10:30:49] nettoweb: rvanlieshout ok... that's a information that I didnt know about performance, I want to learn more about these things, and Im trying to look for articles/book about it. So it's more related to devops? unix in general?
[10:31:08] rvanlieshout: it's related to almost everything
[10:31:18] nettoweb: I dont know exatcly how to perform this kind of analyse
[10:31:21] msyvich: has joined #RubyOnRails
[10:31:32] rhizome: sizing servers is a skill
[10:31:35] rvanlieshout: if this kind of analyse is only that ping
[10:31:41] rvanlieshout: then it's just the internet connection
[10:32:14] rvanlieshout: it's not a thing a sysadmin can fix. nor is it something a developer can fix
[10:32:17] rvanlieshout: you need to have both
[10:32:58] nettoweb: well... I think the whole picture is more related with a sysadmin
[10:33:09] conta: has joined #RubyOnRails
[10:33:24] rvanlieshout: a poor app will run with poor performance
[10:33:32] rvanlieshout: now matter how much memory is pushed against it
[10:34:09] nettoweb: yes, but I have to know how to find out if it's a app problems as well..
[10:34:11] rhizome: what is the app? where does it grunt?
[10:34:50] rvanlieshout: what rhizome wrote, start with an actual problem
[10:34:50] PedramT: has joined #RubyOnRails
[10:34:59] srinidhi1: has joined #RubyOnRails
[10:35:16] rhizome: imgur has different needs than slack
[10:35:18] nettoweb: ok... I think I got it, so in my case I think I have to earn more about what a sysadmin do.
[10:35:49] rhizome: look at what is going on when any of those averages spike
[10:35:58] nettoweb: rhizome it's a web app, just pages that users read. we have about 10.000 visitors by day.
[10:36:15] rhizome: oh, a web app with pages.
[10:36:24] nettoweb: rhizome sorry
[10:37:06] nettoweb: it's a web app because we have a dashboard and a admin interface, in fact its an classifieds website. like OLX.com, do you know?
[10:37:17] rvanlieshout: nettoweb: start with a single request
[10:37:26] rhizome: ok, so you have lots of db action
[10:37:29] nettoweb: I call it a web app because has a lot of exchange of data between users and the website
[10:37:31] rvanlieshout: don't include all kinds of irrelevant data
[10:37:32] rhizome: or net i/o
[10:37:41] rvanlieshout: just a single request
[10:38:13] arup_r: has joined #RubyOnRails
[10:38:40] rhizome: i'm sure the ads themselves are cachable for at least part of their lifetimes
[10:38:48] nettoweb: rvanlieshout How I do it? I just know with ping.. how to find out this? logged in my droplet?
[10:39:06] rvanlieshout: nettoweb: do you have a request that is slow?
[10:39:07] rhizome: what are you trying to diagnose
[10:39:55] nettoweb: rhizome I start to cache a lot of pages recently...And the performance improved a lot. but I still dont know which droplet it's a good fit for my app.
[10:40:15] gbgdev: has joined #RubyOnRails
[10:40:50] rhizome: it doesn't sound like you're bumping up on any limitws
[10:41:03] nettoweb: rhizome for now Im not analysing a single things... I just know more about what I need to know so I can choose a good droplet, which will suits the requests with no problem. I dont know if my approach is wrong.
[10:41:13] rhizome: well but you have new relic
[10:41:33] nettoweb: rhizome yes.. that data seems ok for me.
[10:41:45] ddv: nettoweb: ping won't render the page it will just use the ICMP protocol.... there are various tools available to simulate requests and also parallelizing them
[10:41:54] gbgdev: has joined #RubyOnRails
[10:42:02] nettoweb: rhizome but I dont know for example if it'll be a good deal downgrade to a 2GB memory if I need someday.
[10:42:18] rhizome: i just use the network graph on chrome developer tools
[10:42:31] rhizome: downgrade?
[10:42:41] herbst: has joined #RubyOnRails
[10:43:27] rhizome: going from 4GB to 2GB means you're saving what, $2/mo?
[10:44:58] nahwar: has joined #RubyOnRails
[10:45:02] nettoweb: rhizome Its just a assumtion, that's why Im asking you what I have to concerned before take this decision
[10:45:33] ddv: nettoweb: you need to measure this stuff
[10:46:18] nettoweb: sre, Im getting a some tips here
[10:46:21] ddv: nettoweb: not asking people's opinion
[10:46:32] CornishPasty: Do you think I should get a new car?
[10:46:45] ddv: yes spend that money CornishPasty
[10:46:54] CornishPasty: ddv: But I'm not sure if I need it, can't you tell me?
[10:47:07] ddv: nettoweb ^
[10:47:18] nettoweb: ddv jey, I dont asking opinios.. guys answaered good things, not opinios
[10:47:58] ddv: rhizome can't give you any good advice, he knows nothing about your application, the number of users, requests etc
[10:48:06] nettoweb: you cling to the value... it's not about it, forget it please
[10:49:07] rvanlieshout: nettoweb: there is nothing sane to say about those numbers
[10:50:18] nettoweb: guys, dont get me wrong, I was just wondering that things I have to be concerned to understando the whole picture of resources I need to my websites running well.. I know how much users I have, but dont know how decide the resource I need to support this
[10:50:50] ddv: nettoweb: you have no clue what you're doing
[10:50:54] ddv: to be honest
[10:51:35] fahrradflucht: has joined #RubyOnRails
[10:51:48] nettoweb: ddv I agree with you... I was trying to get some clues here what I can start looking for. but maybe I can take a look at some things before ask here
[10:52:26] nettoweb: maybe I could express well in english what I'm looking for. but it's ok
[10:53:13] kitsuneyo: has joined #RubyOnRails
[10:57:09] rvanlieshout: nettoweb: i understand your question
[10:57:15] rvanlieshout: but there just nothing sane to say about it
[10:57:18] rvanlieshout: using only those numbers
[10:57:23] noodman: has joined #RubyOnRails
[10:58:58] piotrj: has joined #RubyOnRails
[10:59:52] Diabolik: has joined #RubyOnRails
[11:00:37] baweaver: has joined #RubyOnRails
[11:00:42] Diabolik: how would you recommend refactoring this?
[11:00:43] Diabolik: https://gist.github.com/askl56/899e10374e93c31427b5
[11:02:04] adre: has joined #RubyOnRails
[11:02:14] rvanlieshout: something like see comment
[11:03:23] kitsuneyo: has joined #RubyOnRails
[11:04:47] HenriettaSalt: has joined #RubyOnRails
[11:06:23] par[a]digm: has joined #RubyOnRails
[11:07:43] codedmart: has joined #RubyOnRails
[11:08:44] FooMunki: has joined #RubyOnRails
[11:09:38] swarm_lurker: has joined #RubyOnRails
[11:10:38] matthewd: return unless last_incomplete_order && user = try_spree_current_user
[11:11:11] matthewd: .. assuming it's worth keeping the 'user' variable. Is it really costly enough to avoid doing twice?
[11:15:02] nettoweb: rvanlieshout yes.. thank you for it.
[11:17:53] c355E3B: has joined #RubyOnRails
[11:19:36] SanguineAnomaly: has joined #RubyOnRails
[11:19:42] czerasz: has joined #RubyOnRails
[11:19:44] hololeap: has joined #RubyOnRails
[11:21:17] tvw: has joined #RubyOnRails
[11:27:55] msyvich: has joined #RubyOnRails
[11:28:25] enkristoffer: has joined #RubyOnRails
[11:30:03] SanguineAnomaly: has joined #RubyOnRails
[11:31:49] zarubin: has joined #RubyOnRails
[11:32:23] mices: has joined #RubyOnRails
[11:33:40] louisshepherd: has joined #RubyOnRails
[11:34:30] moei: has joined #RubyOnRails
[11:34:48] PedramT: has joined #RubyOnRails
[11:35:01] nocontrol: has joined #RubyOnRails
[11:35:04] adre: has joined #RubyOnRails
[11:36:19] SanguineAnomaly: has joined #RubyOnRails
[11:36:52] mbreedlove: has joined #RubyOnRails
[11:38:29] workmad3: has joined #RubyOnRails
[11:41:55] Diabolik: hmm matthewd
[11:42:16] solars: model.previous_changes works to detect changes _after_ save, right?
[11:42:26] SanguineAnomaly: has joined #RubyOnRails
[11:43:56] matthewd: solars: It should contain the set of changes that were just saved, yes
[11:44:49] solars: thanks a lot! just wanted to make sure
[11:44:49] mrbubbles: has joined #RubyOnRails
[11:45:56] smoitra: has joined #RubyOnRails
[11:46:21] lacrymology: has joined #RubyOnRails
[11:47:37] zworks: has joined #RubyOnRails
[11:48:02] zworks: what is the best way to store gender preferences for a users?
[11:48:17] Bloodberet: has joined #RubyOnRails
[11:48:28] sakix: has joined #RubyOnRails
[11:48:36] zworks: I am currently having it as integer either 0 or 1, and a switch case to convert it to male/female
[11:48:46] platzhirsch: has joined #RubyOnRails
[11:48:57] zworks: is this good ? It's better to store directly as male/female ?
[11:50:16] zworks: https://gist.github.com/haswow/2750b2b988f8bf2d390e
[11:50:23] zworks: I have it current like this
[11:50:35] tbuehlmann: have an enum or a string column
[11:50:57] tbuehlmann: also, don't only allow 0/1 male/female, there are more than just those two
[11:51:35] zworks: well, It's better if they keep away from my website :)
[11:52:02] zworks: coz they have altered their natural type
[11:52:18] zworks: in reality there are only two 0/1
[11:52:29] doodlehaus: has joined #RubyOnRails
[11:52:53] enkristoffer: I have a very simple test that posts JSON to my app to create a model in the db. However, it's posting null to both timestamps, which is throwing an error. Any idea why it would do that?
[11:54:09] piotrj: has joined #RubyOnRails
[11:54:13] tbuehlmann: zworks, wow, just wow
[11:55:01] matthewd: enkristoffer: ... a bug in your code somewhere?
[11:56:40] enkristoffer: matthewd: Well I mean the test is just "post books_url, params: { book: { ... }", I'm not setting the value of the timestamps myself.
[11:57:39] tetraktys: has joined #RubyOnRails
[11:57:52] matthewd: What timestamps? What error? What's the controller doing?
[11:58:48] enkristoffer: The default timestamps created on my model by Rails. "ERROR: null value in column "created_at" violates not-null constraint".
[11:59:12] snowy: has joined #RubyOnRails
[11:59:38] arup_r: enkristoffer: matthewd, giving hints to show the code you have
[11:59:44] enkristoffer: It's just a completely basic create method. "@book = Book.new(book_params)" and then @book.save
[11:59:52] ElFerna: has joined #RubyOnRails
[12:00:04] lacrymology: has joined #RubyOnRails
[12:00:06] arup_r: zworks: :D
[12:00:11] enkristoffer: Yes yes :P I can pastebin it if you'd like to see but there's really nothing else to it.
[12:01:00] arup_r: enkristoffer: pls gits :)
[12:01:06] matthewd: enkristoffer: Either your code is doing something wrong, you're expecting something incorrect, or you've run into a bug in Rails itself
[12:01:14] zpe: has joined #RubyOnRails
[12:03:04] matthewd: enkristoffer: The chances it's the latter are pretty low, so we need to explore the other two possibilities. "I'm doing the normal thing, and it's not doing what I expect" isn't really enough to work with there.
[12:03:25] PedramT: has joined #RubyOnRails
[12:05:31] HenriettaSalt: has joined #RubyOnRails
[12:07:06] enkristoffer: https://gist.github.com/sachse/ffed81836ea9f042d318
[12:07:53] srinidhi: has joined #RubyOnRails
[12:08:43] drptbl: has joined #RubyOnRails
[12:08:50] Bloodberet: has joined #RubyOnRails
[12:09:58] pawnbox: has joined #RubyOnRails
[12:11:38] sandstrom: has joined #RubyOnRails
[12:11:56] kitsuneyo: has joined #RubyOnRails
[12:12:31] kitsuneyo: has joined #RubyOnRails
[12:12:42] pawnbox: has joined #RubyOnRails
[12:13:01] Ropeney: has joined #RubyOnRails
[12:14:09] kitsuneyo: has joined #RubyOnRails
[12:17:22] handcode: has joined #RubyOnRails
[12:20:24] quazimodo: has joined #RubyOnRails
[12:23:10] enkristoffer: has joined #RubyOnRails
[12:23:21] enkristoffer: Sorry I timed out.
[12:23:36] arBmind1: has joined #RubyOnRails
[12:26:22] kleinerdrache: has joined #RubyOnRails
[12:26:44] kleinerdrache: what is the usual way for having user editing their own data and having admin editing all user data?
[12:26:46] mdw: has joined #RubyOnRails
[12:27:08] kleinerdrache: do you make only one controller for that, and only one route? (so the users see their databaseid in the url)
[12:27:12] kleinerdrache: or is there a better way?
[12:28:05] tvw: has joined #RubyOnRails
[12:29:12] paulvt: has joined #RubyOnRails
[12:29:14] cryptocronus: has joined #RubyOnRails
[12:30:53] AimlessRAven: has joined #RubyOnRails
[12:30:57] workmad3_: has joined #RubyOnRails
[12:31:06] AimlessRAven: can i associate 2 models without migration ????/
[12:31:28] rvanlieshout: AimlessRaven: wut?
[12:31:38] rvanlieshout: not if your change requires a schema change
[12:31:46] paulvt: AimlessRaven: the association is declared in the models, so yes.. except if your schema needs to be changed
[12:32:03] pulgalipe: has joined #RubyOnRails
[12:33:19] the_drow: has joined #RubyOnRails
[12:33:23] bahar: has joined #RubyOnRails
[12:34:46] the_drow: Is there a way to inject a logger attribute to each controller? I'm guessing that it can be done with a concern (at least by it's name)
[12:36:30] rclanan_: has joined #RubyOnRails
[12:36:42] msyvich: has joined #RubyOnRails
[12:38:34] artto: has joined #RubyOnRails
[12:41:45] kerunaru: has joined #RubyOnRails
[12:44:13] herbst: has joined #RubyOnRails
[12:45:48] arup_r: the_drow: You can use application_controller though, as it is being inherited by all others
[12:46:14] the_drow: arup_r: Yeh I just noticed
[12:46:38] the_drow: The problem is that the codebase I'm looking into uses Rails.logger all over the place
[12:46:51] the_drow: I'd like to have a specific logger for each controller
[12:47:11] the_drow: I'm using the logging gem which allows you to do that
[12:48:01] arup_r: ok, if the behaviours are not same for all controller, then application_controller doesn't make any sense.
[12:48:32] arup_r: but need to see the actual thing, to advise properly.
[12:49:34] the_drow: Each controller should have a logger like https://github.com/TwP/logging/blob/efbfa242094e77db9275f4fcb6bcb1d3d983f5c3/examples/classes.rb#L25
[12:49:39] kp666: has joined #RubyOnRails
[12:49:44] tvw: has joined #RubyOnRails
[12:49:49] arup_r: Klumben: User edit their own data in their profile, which you can do using Profiles controller.. and show users#index as an Admin deashboard ?
[12:50:16] the_drow: arup_r: I want to allow DevOps to be able to filter by the controller name
[12:50:20] arup_r: sorry,, :( he is not here amymore
[12:50:59] kp666: has joined #RubyOnRails
[12:51:25] sakix: has joined #RubyOnRails
[12:51:29] arup_r: yes there are ways.. to do it.. What you then will do is like `logger.info "In #{controller_name} we found something..."` <~~ this can be greped
[12:51:39] arup_r: it is an example ^^ though
[12:51:43] drptbl: has joined #RubyOnRails
[12:51:57] the_drow: We don't grep. We use structured logging
[12:52:26] arup_r: ok.. so as I said, it needs to look at the actual code..
[12:52:36] arup_r: that was my example..
[12:53:22] andchar: has joined #RubyOnRails
[12:53:29] the_drow: I think that if we had a way to tell Rails.logger to return Logging.logger[self] where self is the controller name that would do the trick
[12:54:04] artto: has joined #RubyOnRails
[12:54:15] arup_r: not `self`, it is `self.class` .. :) it will work.. also you can use `controller_name` method
[12:54:41] the_drow: So how exactly?
[12:54:41] arup_r: Logging.logger[controller_name] ..
[12:55:02] the_drow: Yeh but the code uses Rails.logger which I was told not to find/replace
[12:55:56] arup_r: dunno, need to think. I never needed that or didn't get chance to work in that kind of project. Ofcourse prossible, but now idea/
[12:56:30] arup_r: the_drow: there are some third party services, for this, i think
[12:57:45] the_drow_mobile: has joined #RubyOnRails
[12:57:52] arup_r: something like that https://aws.amazon.com/cloudtrail/ .. not sure. I heard something exist..
[12:58:09] arup_r: as I have never used, so can't help you.
[12:59:39] kerunaru: has joined #RubyOnRails
[13:02:03] baweaver: has joined #RubyOnRails
[13:03:14] lacrymology: has joined #RubyOnRails
[13:03:38] Bloodberet: has joined #RubyOnRails
[13:04:02] AimlessRAven: if i wanna add has_many assiciation in chema
[13:04:16] AimlessRAven: add_foreign_key :articles, :authors is been something like this ?
[13:06:17] HenriettaSalt: has joined #RubyOnRails
[13:07:08] sevenseacat: has joined #RubyOnRails
[13:07:21] PedramT: has joined #RubyOnRails
[13:07:32] rickmasta: has joined #RubyOnRails
[13:07:58] tvw: has joined #RubyOnRails
[13:09:19] Pumukel: has joined #RubyOnRails
[13:10:29] AimlessRAven: i have product and category model i wanna make my category has_many products.. ok
[13:10:37] AimlessRAven: how to update this in schema
[13:10:39] arup_r: has joined #RubyOnRails
[13:10:53] AimlessRAven: in products schema i need to add t.belongs_to :category, index: true
[13:11:10] rvanlieshout: you shoulnd't edit existing migrations
[13:11:18] rvanlieshout: so if you already created that table before, add a new migration
[13:11:26] rvanlieshout: just to add that reference
[13:11:49] hnanon: has joined #RubyOnRails
[13:11:58] PedramT: has joined #RubyOnRails
[13:12:24] AimlessRAven: rvanlieshout: theese models exist ..
[13:12:31] AimlessRAven: and i wanna make has_many
[13:14:17] AimlessRAven: rvanlieshout: ok this be something like rails g migration AddCategoriesToProduct category:reference ?
[13:14:22] hnanon: I need some help with a pundit issue.
[13:14:27] hnanon: I have: https://gist.github.com/anonymous/a8dc6a2fdc1ea7e8c604
[13:14:33] hnanon: I'm getting the error:
[13:14:48] hnanon: NoMethodError (undefined method `fulfill?' for #<OrderPolicy:0x007f4ccb6790e8>):
[13:15:05] hnanon: app/controllers/admin/orders_controller.rb:97:in `fulfill'
[13:15:50] PedramT_: has joined #RubyOnRails
[13:16:01] sevenseacat: hnanon: remember, policies relate to models, not controllers. read the error carefully.
[13:16:47] yogeshrt: has joined #RubyOnRails
[13:17:09] mdw: has joined #RubyOnRails
[13:17:20] zpe: has joined #RubyOnRails
[13:17:32] hnanon: sevenseacat: The error is referencing the controller.
[13:17:39] sevenseacat: no, it's not.
[13:17:49] sevenseacat: "undefined method `fulfill?' for #<OrderPolicy:0x007f4ccb6790e8>"
[13:21:17] hnanon: Another hint?
[13:22:22] sevenseacat: hnanon: does your OrderPolicy have a fulfill? method?
[13:23:14] hnanon: See link above?
[13:23:24] sevenseacat: thats not an OrderPolicy.
[13:23:52] hnanon: What is it?
[13:24:06] sevenseacat: https://gist.github.com/anonymous/a8dc6a2fdc1ea7e8c604#file-order_policy-rb-L1
[13:24:34] hnanon: My admin order policy...
[13:24:44] sevenseacat: indeed. it's not an OrderPolicy.
[13:24:54] tjbiddle: has joined #RubyOnRails
[13:25:36] hnanon: That's my admin orders controller too...
[13:26:02] sevenseacat: like I originally said, policies have nothing to do with controllers.
[13:27:29] milan: has joined #RubyOnRails
[13:28:23] hnanon: How do I then get it to call Admin::OrderPolicy?
[13:28:48] sevenseacat: you don't. why do you want to do that?
[13:28:56] User458764: has joined #RubyOnRails
[13:29:01] hnanon: I have two policies.
[13:29:13] hnanon: One for orders and one for admin orders.
[13:29:14] sevenseacat: why? all your latter one does is check for admin
[13:29:56] hnanon: For now only.
[13:30:25] Craigimus: has joined #RubyOnRails
[13:32:05] arup_r: has joined #RubyOnRails
[13:34:06] atomical: has joined #RubyOnRails
[13:34:44] hnanon: Apparently, it can't be cleanly done: http://stackoverflow.com/questions/21255020/using-pundit-with-namespace
[13:35:22] jkamenik: has joined #RubyOnRails
[13:35:26] cryptocronus: has joined #RubyOnRails
[13:36:42] mrbubbles: has joined #RubyOnRails
[13:36:47] sevenseacat: it doesn't really make sense to do so.
[13:36:57] Bloodberet: has joined #RubyOnRails
[13:37:47] sevenseacat: things like not permitting non-admins to access your admin area is best done in a before_action in the entire namespace.
[13:39:19] cryptocronus_: has joined #RubyOnRails
[13:41:04] Palsson: has joined #RubyOnRails
[13:41:35] piotrj: has joined #RubyOnRails
[13:43:13] gbgdev: has joined #RubyOnRails
[13:43:34] rickmasta: has joined #RubyOnRails
[13:45:00] herbst: has joined #RubyOnRails
[13:46:50] kerunaru: has joined #RubyOnRails
[13:48:10] sergey_makagon: has joined #RubyOnRails
[13:49:46] treaki__: has joined #RubyOnRails
[13:49:51] hnanon: sevenseacat: a lot of discussion about it here: https://github.com/elabs/pundit/issues/178, just and fyi
[13:50:03] sevenseacat: I am well aware.
[13:50:40] hnanon: I'm gonna go with the before_action for the admin namespace.
[13:50:50] AimlessRAven: rails g migration AddCategoriesToProduct category_id:integer
[13:50:55] hnanon: Just check that the user role is admin, right?
[13:51:00] AimlessRAven: is this g relation something like reference
[13:51:26] ramortegui: has joined #RubyOnRails
[13:51:48] sevenseacat: hnanon: if thats what you want to do.
[13:52:15] sakix: has joined #RubyOnRails
[13:55:29] dstarh: has joined #RubyOnRails
[13:58:11] msyvich: has joined #RubyOnRails
[13:58:40] arup_r: the_drow_mobile: i m back again.. :)
[13:59:52] AimlessRAven: i have 2 exist models Category and Product, i wanna make reference migration to join categories in product
[13:59:56] AimlessRAven: how to create this migration
[14:00:14] AlexJakeGreen: has joined #RubyOnRails
[14:00:14] AimlessRAven: rails g migration AddCategoriesToProduct category_id:reference ?
[14:00:19] AimlessRAven: is that make my migration
[14:00:55] hnanon: rails g migration AddCategoriesToProducts category:references
[14:01:44] AimlessRAven: hnanon: are you sure Products is need to plural
[14:02:51] hnanon: rails g migration AddCategoryToProducts category:references
[14:03:01] rvanlieshout: AimlessRaven: you did read _any_ documentation about migrations yet?
[14:03:05] arup_r: AimlessRaven: in your console just type `rails g migration` and hit {ENTER} read the docs. it is very helpful I always use it..
[14:03:06] hnanon: Plural Products, singular Category
[14:03:21] stannard: has joined #RubyOnRails
[14:03:34] sevenseacat: rvanlieshout: I'd say thats very very unlikely.
[14:03:35] arup_r: don't need to get confused, it is there with all examples written.. what you can do.. etc
[14:03:44] Cervajz__: has joined #RubyOnRails
[14:04:05] sevenseacat: I recommended The Well-Grounded Rubyist for them to get a grip on basic Ruby, but I think that's unlikely too.
[14:04:20] workmad3: has joined #RubyOnRails
[14:04:36] Cervajz: has joined #RubyOnRails
[14:04:49] arup_r: sevenseacat: I read the book to learn Ruby .. and it was helpful.
[14:04:58] gbgdev: has joined #RubyOnRails
[14:05:11] Cervajz: has joined #RubyOnRails
[14:06:25] atomical_: has joined #RubyOnRails
[14:06:29] robbyoconnor: has joined #RubyOnRails
[14:07:01] HenriettaSalt: has joined #RubyOnRails
[14:08:08] HenriettaSalt: has joined #RubyOnRails
[14:08:13] voidDotClass: has joined #RubyOnRails
[14:08:51] voidDotClass: Is it safe to run rake db:migrate if your database has other tables not related to the rails app? i.e will it drop the db / truncate the non-related tables?
[14:09:02] voidDotClass: i know rake db:reset will try to drop & recreate the db
[14:09:13] rvanlieshout: voidDotClass: it'll at least create a schema_migrations if you don't have one
[14:09:21] ddv: voidDotClass: You can also test this locally
[14:09:22] rvanlieshout: but beside that i would expect it to just run what's in the migrations
[14:09:35] voidDotClass: ddv, can't without copying everything to dev
[14:09:44] ddv: voidDotClass: and why would that be a problem?
[14:09:54] voidDotClass: ddv, large amt of data
[14:10:02] ddv: voidDotClass: really how much?
[14:10:10] rvanlieshout: voidDotClass: but you'll never reach your deadline of you screw things here
[14:10:14] ddv: you should always try to mirror production in development
[14:10:23] voidDotClass: So no one knows the answer?
[14:10:45] ddv: voidDotClass: You don't like my answers?
[14:10:53] sevenseacat: on whether you should run migrations on production without testing them locally first? sorry, you should be the guinea pig for that one.
[14:10:57] voidDotClass: your answer is basically, see for yourself
[14:11:01] sevenseacat: none of us here follow those kinds of practices.
[14:12:45] arup_r: voidDotClass: rake --dry-run db:migrate and then watch it..
[14:12:54] artto: has joined #RubyOnRails
[14:12:55] voidDotClass: arup_r, thank you
[14:13:28] Cervajz: has joined #RubyOnRails
[14:14:07] dbackeus: has joined #RubyOnRails
[14:15:04] gbgdev: has joined #RubyOnRails
[14:16:40] tetraktys: has joined #RubyOnRails
[14:18:07] Cervajz__: has joined #RubyOnRails
[14:19:24] scottyrunyan: has joined #RubyOnRails
[14:21:09] flashpoint9: has joined #RubyOnRails
[14:21:19] doodlehaus: has joined #RubyOnRails
[14:23:47] krz: has joined #RubyOnRails
[14:25:05] WhatTheRails: has joined #RubyOnRails
[14:26:00] n1lo: has joined #RubyOnRails
[14:26:53] Doddlin: has joined #RubyOnRails
[14:27:31] crystal77: has joined #RubyOnRails
[14:27:39] codelahoma: has joined #RubyOnRails
[14:27:42] artto: has joined #RubyOnRails
[14:29:58] zworks: has joined #RubyOnRails
[14:30:27] fbandov: has joined #RubyOnRails
[14:30:57] zworks: I have a model called user and user has one cv model.
[14:31:05] zworks: I want the user to be able to control who can view their cvs or parts of cvs
[14:33:27] tuelz: has joined #RubyOnRails
[14:33:45] WhatTheRails: you can use Rolify and CanCanCan
[14:33:57] AimlessRAven: has joined #RubyOnRails
[14:33:58] safetypin: has joined #RubyOnRails
[14:34:27] AimlessRAven: when i have reference between 2 models ... how to initialize in form .. f.input, f.association ?
[14:34:34] tvw: has joined #RubyOnRails
[14:34:47] Zadrel: has joined #RubyOnRails
[14:36:50] AimlessRAven: rvanlieshout: if you dont want conversation between us.. :) i can ignore me
[14:37:09] rvanlieshout: a form always represents one object
[14:37:18] rvanlieshout: unless you add some using fields_for
[14:38:12] gbgdev: has joined #RubyOnRails
[14:38:32] rvanlieshout: and don't get me wrong. i'm willing to help people here
[14:38:32] VeryBewitching: has joined #RubyOnRails
[14:38:38] rvanlieshout: but i do expect some effort in return
[14:38:48] scottyrunyan: has joined #RubyOnRails
[14:39:22] blackmes1: has joined #RubyOnRails
[14:41:06] User458764: has joined #RubyOnRails
[14:41:34] puria: has joined #RubyOnRails
[14:42:37] gregf_: has joined #RubyOnRails
[14:47:11] syzygy_: has joined #RubyOnRails
[14:50:21] andchar: has joined #RubyOnRails
[14:53:02] sakix: has joined #RubyOnRails
[14:54:50] platzhirsch: has joined #RubyOnRails
[14:56:43] atomical: has joined #RubyOnRails
[14:56:56] ryanRT: has joined #RubyOnRails
[14:58:21] andchar: has joined #RubyOnRails
[14:59:08] Bloodberet: has joined #RubyOnRails
[14:59:20] chipotle: has joined #RubyOnRails
[15:00:45] atomical_: has joined #RubyOnRails
[15:01:09] voidDotClass: i'm getting the error 'ActionController::RoutingError (No route matches [GET] "/"):' even though i have defined root 'home#index' . It is working in development but not in production. any ideas?
[15:02:13] renews: has joined #RubyOnRails
[15:02:15] rubyonrails262: has joined #RubyOnRails
[15:03:27] baweaver: has joined #RubyOnRails
[15:05:14] nettoweb: has joined #RubyOnRails
[15:05:32] Toledo|gone: has joined #RubyOnRails
[15:05:32] fsteim: has joined #RubyOnRails
[15:06:47] andchar: has joined #RubyOnRails
[15:08:00] udiudi: has joined #RubyOnRails
[15:08:50] Toledo|gone: has left #RubyOnRails: ()
[15:08:58] pulgalipe: has joined #RubyOnRails
[15:09:10] croberts: has joined #RubyOnRails
[15:10:10] dtordable: has joined #RubyOnRails
[15:10:45] Frem: has joined #RubyOnRails
[15:12:25] scottyrunyan_: has joined #RubyOnRails
[15:12:56] diegoviola: has joined #RubyOnRails
[15:18:16] griffindy: has joined #RubyOnRails
[15:21:22] tego101: has joined #RubyOnRails
[15:21:27] skullcrasher_: has left #RubyOnRails: ()
[15:24:43] sandstrom: has joined #RubyOnRails
[15:26:18] herbst: has joined #RubyOnRails
[15:26:49] dbugger_: has joined #RubyOnRails
[15:27:36] dbugger_: has left #RubyOnRails: ()
[15:27:49] Dbugger: has joined #RubyOnRails
[15:27:52] Dbugger: Hello everyone
[15:28:53] Bloomer: has joined #RubyOnRails
[15:29:07] Dbugger: I have a small problem, and I was wondering if anyone could help me... I have to create a resource called "Voucher", but this can be either for a certain amount of money or for a specific service. How would you model that??
[15:29:17] blackmes1: has joined #RubyOnRails
[15:30:00] Doddlin: has joined #RubyOnRails
[15:30:47] pulgalipe: has joined #RubyOnRails
[15:30:52] jtong: has joined #RubyOnRails
[15:32:10] msyvich: has joined #RubyOnRails
[15:32:24] lexileo: has joined #RubyOnRails
[15:33:03] tvw: has joined #RubyOnRails
[15:33:11] Palsson: has joined #RubyOnRails
[15:33:11] eljimmy: has joined #RubyOnRails
[15:34:26] lexiMon: has joined #RubyOnRails
[15:34:27] elaptics: dbugger: we'd need to know about your problem domain before being able to offer any real solid advice
[15:35:23] uris: has joined #RubyOnRails
[15:35:36] Dbugger: elaptics, well, I just have "Services" and Vouchers. Not really much more.
[15:35:40] elaptics: for starters, what are these services you're referring to. What's the vouchers for? How do they apply to things? Are they against some total in a checkout scenario?
[15:35:54] elaptics: what's the app purpose then?
[15:36:24] dionysus69: has joined #RubyOnRails
[15:36:59] sasasekaric: has joined #RubyOnRails
[15:37:32] lexileo: has joined #RubyOnRails
[15:37:38] sankaber: has joined #RubyOnRails
[15:39:23] sasasekaric: has joined #RubyOnRails
[15:40:40] kies^: has joined #RubyOnRails
[15:41:45] sankaber: has joined #RubyOnRails
[15:42:58] Doddlin: has joined #RubyOnRails
[15:46:53] andchar: has joined #RubyOnRails
[15:47:51] centrx: has joined #RubyOnRails
[15:49:37] eyck: has joined #RubyOnRails
[15:49:42] rickmasta: has joined #RubyOnRails
[15:50:25] andchar: has joined #RubyOnRails
[15:50:30] platzhirsch: When I have something like "Hello there" + content_tag(:i, class: 'woop')" the <i> wil be escaped unless I call .html_safe on the whole string (which resides in a helper method). Is that the right thing to do?
[15:51:27] neshmi: has joined #RubyOnRails
[15:52:17] Dbugger: elaptics, there is nothing about that. Nothing will be integrated. I just want to be able to create the vouchers. There will be no checkout or anything
[15:53:23] Ergo: has joined #RubyOnRails
[15:53:46] sakix: has joined #RubyOnRails
[15:54:08] sasasekaric: has joined #RubyOnRails
[15:56:01] tuelz: is it pretty standard to use a hidden_field_tag to pass current URL params to a POST request?
[15:56:42] shibabu: has joined #RubyOnRails
[15:56:54] arup_r: platzhirsch: Are you really using that `+` there, or just shown here like that ?
[15:57:11] platzhirsch: arup_r: I am actually using it
[15:57:19] arup_r: tuelz: I do it when need..
[15:57:42] tuelz: arup_r: cool, just making sure there wasn't some magic rails had for that sort of thing that was more conventional
[15:58:19] platzhirsch: or maybe I should just call html_safe on the static string?
[15:59:40] andchar: has joined #RubyOnRails
[16:00:18] arup_r: both works..
[16:00:32] mary5030: has joined #RubyOnRails
[16:01:38] mary5030: has joined #RubyOnRails
[16:02:41] sandstrom: What is a robust way of testing whether a (namespaced) class exists? My issue with "MyCompiled::String::Foo" is that `constantize` can throw name errors for different reasons, including code issues in the class.
[16:03:02] sandstrom: (I'm currently using constantize + catching NameError; but sometimes this will swallow a valid exception)
[16:05:16] Papierkorb: sandstrom: you could do MyCompiled.constants.include? :String to check if :String is defined in MyCompiled. This does not do a scoped lookup though.
[16:05:44] pyemkey: has joined #RubyOnRails
[16:06:46] centrx: sandstrom, Looks like there is a const_defined?
[16:07:28] workmad3: has joined #RubyOnRails
[16:07:54] pyemkey: Hello all. I would like to know how to do add_column on table with almost 300k record without... pain. It takes forever to alter table. How pros do this kind of operations?
[16:08:46] centrx: pyemkey, What RDBMS are you using?
[16:08:49] sandstrom: centrx Good point, do you know if `const_defined?` is autoload-aware (works with rails autoloading)
[16:08:50] noodman: I'm trying to rotate a UIImageView around an anchor point - however it only seems to anchor to the x axis. Anyone know what I'm doing wrong?
[16:08:52] centrx: pyemkey, It should be very quick
[16:09:08] centrx: noodman, Sounds like iPhone not Rails?
[16:09:16] andchar: has joined #RubyOnRails
[16:09:29] noodman: centrx: wrong channel, apologies
[16:09:33] centrx: sandstrom, I don't know. It looks like there is another caveat, that it will find names in parent namespaces
[16:09:56] jkamenik: has joined #RubyOnRails
[16:10:34] Sylario: has joined #RubyOnRails
[16:12:33] titeiko: has joined #RubyOnRails
[16:13:01] pyemkey: centrx: MySQL
[16:13:30] centrx: pyemkey, It could be the table is locked by other processes while you are trying to add the column?
[16:13:50] centrx: pyemkey, In that case, the add column itself is not taking very long, but it waits to start the operation until the table is clear of other locks
[16:13:51] pyemkey: it can be locked by sidekiq
[16:13:56] ankhers: I'm in the process of a rails 4.1 -> 4.2 upgrade. I'm getting an error when calling #to_a on an ActiveRecord_Relation. Is ActiveRecord_Relation the same as ActiveRecord::Relation? Why may I be getting the error ?unsupported: TrueClass"?
[16:14:11] Papierkorb: pyemkey: at least for postgres, make sure that the column does not have a default value and is null-able
[16:14:31] disgrntld: has joined #RubyOnRails
[16:15:07] ximmus: has joined #RubyOnRails
[16:16:54] ximmus: has left #RubyOnRails: ()
[16:18:21] pyemkey: I'm trying to add datetime column. Actually table has... 20 columns, where 4 of them have text type
[16:18:22] treehug88: has joined #RubyOnRails
[16:18:22] Limix: has joined #RubyOnRails
[16:19:06] pyemkey: Table has exactly 241863 records
[16:19:35] pyemkey: that's really strange it takes so long
[16:19:40] moeabdol: has joined #RubyOnRails
[16:20:24] visudo: has joined #RubyOnRails
[16:21:06] matthewd: Ankhers: Blind guess: you're calling `where(true)` somewhere
[16:22:00] ankhers: matthewd: I checked for that, but I will double check. Thanks.
[16:22:36] benoror: has joined #RubyOnRails
[16:23:46] kies^: has joined #RubyOnRails
[16:24:07] Meow-J: has joined #RubyOnRails
[16:25:27] chouhoulis: has joined #RubyOnRails
[16:26:57] herbst: has joined #RubyOnRails
[16:27:15] mdw: has joined #RubyOnRails
[16:28:37] tvw: has joined #RubyOnRails
[16:31:13] mmealling: has joined #RubyOnRails
[16:31:55] Doddlin: has joined #RubyOnRails
[16:32:42] mmealling: design question: I'm building a Rails 4 (hopefully 5) engine that fronts a backend SaaS service that has some reasonable REST and SOAP apis. I want the system to survive that SaaS service being down so I'm saving all backend objects locally as 'normal' ActiveRecord models.
[16:33:50] mmealling: to get ActiveRecord to do the right thing I'm overriding find() and a few other things to deal with fetching the SaaS object when that system is up and fails gracefully when its down.
[16:34:10] voidDotClass: has joined #RubyOnRails
[16:34:15] mmealling: I also override create() to keep the caller from creating something that doesn't exist.
[16:34:43] mmealling: (although that should probably be done as a validation)
[16:34:59] MarkAValdez: has joined #RubyOnRails
[16:35:28] MarkAValdez1: has joined #RubyOnRails
[16:36:37] apg: has joined #RubyOnRails
[16:36:37] leofrozenyogurt: has joined #RubyOnRails
[16:36:43] hobodave: has joined #RubyOnRails
[16:36:49] ElFerna: has joined #RubyOnRails
[16:37:11] leofrozenyogurt: im having some issues translating curl into curb, in curl the action works correctly but when i use curl::easy it breaks
[16:37:20] mmealling: Anyway, that SaaS has an object ID. My choice is I can put both IDs in the Model or I can 'hack' the migration to turn off auto_increment on the table and give create() the SaaS ID to use instead. Like this: create_table :routers, { id: false } do |t| t.integer :id end execute "ALTER TABLE routers ADD PRIMARY KEY (id);"
[16:37:47] apg: has joined #RubyOnRails
[16:37:47] apg: has joined #RubyOnRails
[16:37:49] leofrozenyogurt: here is my issue in code btw
[16:37:49] leofrozenyogurt: https://github.com/taf2/curb/issues/283
[16:38:35] mmealling: what are the odds that doing that in a migration is going to work into the future? Is there a better way to architect a local version of a remote data store not as a cache, but as a usable database?
[16:39:31] sergey_makagon: has joined #RubyOnRails
[16:41:04] maesitos: has joined #RubyOnRails
[16:41:53] reckoner: has joined #RubyOnRails
[16:42:18] enkristoffer: As per http://edgeapi.rubyonrails.org/classes/ActiveRecord/FixtureSet.html Rails is supposed to add autofilled timestamp columns to my fixtures, but it's not doing it. Instead it's trying to insert null when loading the fixtures, which throws an error. Any idea how to find out why it's working as it should?
[16:44:58] jtong: has joined #RubyOnRails
[16:45:38] AndChat|119664: has joined #RubyOnRails
[16:46:38] arup_r: has joined #RubyOnRails
[16:47:53] msyvich: has joined #RubyOnRails
[16:49:57] pwnd_nsfw`: has joined #RubyOnRails
[16:50:25] tildes: has joined #RubyOnRails
[16:50:54] doei: has joined #RubyOnRails
[16:52:13] doei: Hi, what would be your gem of choice for a token based authentication with rails-api ? Also, is there anything integrated in rails 5 for this ?
[16:52:25] reckoner: roll your own
[16:52:34] teaearlgraycold: Is there any way to have some kind of high level view template in rails? What I want is something where I can reference a partial and then pass theit blocks of HTML to insert into specific portions
[16:52:48] doei: reckoner: do you reckon ?
[16:53:20] teaearlgraycold: I know about content_for. I guess I could leverage that...
[16:53:21] yoongkang: has joined #RubyOnRails
[16:53:27] teaearlgraycold: I kinda want soemthing like a Java interface
[16:53:46] teaearlgraycold: So you reference this partial and then you have certain requirements that need to be met
[16:53:55] reckoner: teaearlgraycold partial blocks and inheritance is probably what you want
[16:54:31] reckoner: doei, i think devise has a basic article on token authentication
[16:54:32] sakix: has joined #RubyOnRails
[16:54:39] teaearlgraycold: reckoner: oh, neat
[16:54:49] reckoner: you can probably gleam enough info to use with whatever auth gem you're using
[16:55:04] dopamean_: has joined #RubyOnRails
[16:55:10] teaearlgraycold: That'll only let me do one yield though, right?
[16:55:56] teaearlgraycold: Maybe it'll work for me. Thanks
[16:55:56] reckoner: i think you can then use content_for in that block
[16:57:47] enkristoffer: doei: Check out Knock.
[16:57:52] doei: reckoner: Yeah, i'll check the article thanks. I'm currently using devise_token_auth but i couldn't figure out if there was some sort of standard gem..
[16:58:18] doei: enrikstoffer: i'm actually reading the readme right now
[16:59:58] rapha: I'm trying to use TurboLinks 3's partial replacement with Rails 4.2, but the element with data-turbolinks-permanent is still being replaced. According to the README on GitHub I shouldn't have to do more than that. Is it possible that that's not true for Rails 4.2?
[17:02:15] tbuehlmann: rapha, can you gist your controller and view code?
[17:02:23] sarink: has joined #RubyOnRails
[17:02:46] adam12: There was a gem released a few months ago that helped clone data from production to staging / dev environment, and anonymized it during the process. Anybody remember the name?
[17:04:09] arup_r: has joined #RubyOnRails
[17:04:11] [Butch]: has joined #RubyOnRails
[17:04:13] baweaver: has joined #RubyOnRails
[17:04:48] mmealling: ACTION thinks there should be an ActiveRecord plugin that lets you multiplex between two different data stores for the same model. Sort of like waterfall in SailsJS.
[17:05:08] baweaver: has joined #RubyOnRails
[17:05:13] mmealling: ACTION realizes that he is unqualified to write such a thing.
[17:06:35] crystal77: has joined #RubyOnRails
[17:06:40] mmealling: err.... s/waterfall/waterline/g
[17:06:53] smathy: has joined #RubyOnRails
[17:07:40] doei: has left #RubyOnRails: ("WeeChat 1.4")
[17:08:10] hardtail: has joined #RubyOnRails
[17:09:45] robbyoconnor: has joined #RubyOnRails
[17:09:46] syzygy_: has joined #RubyOnRails
[17:10:26] rogue_koder: has joined #RubyOnRails
[17:10:34] thecyclone: has joined #RubyOnRails
[17:10:48] platzhirsch: How would I apply html_safe to an interpolated string in a template? %p= "This is not #{link_to('escaped', my_cool_path).html_safe}"
[17:11:45] rakm: has joined #RubyOnRails
[17:13:01] thecyclone: I have been learning RoR for the past couple months. To hone my skills, I would like to contribute to some projects on github. Suggestions are appreciated
[17:13:11] andchar: has joined #RubyOnRails
[17:13:22] wldcordeiro: has joined #RubyOnRails
[17:15:25] platzhirsch: ah I guess append html_safe to the end of the string :D
[17:17:55] sneakerhax: has joined #RubyOnRails
[17:18:16] chridal: I've got some indexes that are like these: "add_index :users, :username, unique: true". And after adding that last index I am getting some grief when running my model tests because apparently these aren't being cleaned out properly. Anyone have experience with that?
[17:19:52] ElFerna: has joined #RubyOnRails
[17:21:09] adre: has joined #RubyOnRails
[17:25:02] jocuman: has joined #RubyOnRails
[17:26:49] a1fa: i have an odd issue. my coffee code does not get loaded when i "click" and load the page, but it works if i refresh my screen on the already loaded page
[17:27:32] shinnya: has joined #RubyOnRails
[17:27:32] tbuehlmann: are you using turbolinks?
[17:28:37] tbuehlmann: your handlers might be wrong then. can you gist an example?
[17:28:42] apg: has joined #RubyOnRails
[17:29:26] safety_cut: has joined #RubyOnRails
[17:29:40] brenop: has joined #RubyOnRails
[17:29:44] a1fa: $('#stard_date').datepicker({
[17:30:41] teaearlgraycold: a1fa: how are you importing the datepicker JS file into the view?
[17:30:48] tbuehlmann: where do you call that?
[17:31:13] teaearlgraycold: Or - the datepicker JS and the JS that calls datepicker
[17:31:26] teaearlgraycold: Anyone know why I get this: http://pastie.org/private/7jqzep4peqv74e1wwobrg ?
[17:31:43] a1fa: tbuehlmann: in my controller.js
[17:31:58] tbuehlmann: a1fa, can you gist that, please?
[17:32:27] brahman: has joined #RubyOnRails
[17:32:40] teaearlgraycold: a1fa: if you're manually calling javascript_include_tag you need to add "data-turbolinks-track" => true as an option
[17:32:54] a1fa: https://gist.github.com/anonymous/7d1104e503c232a8416f
[17:33:06] a1fa: teaearlgraycold: its controller.js.coffee
[17:33:25] nettoweb: has joined #RubyOnRails
[17:33:41] tbuehlmann: I don't get coffee script that well, is `$ ->` the jQuery ready function?
[17:34:02] brahman: HI, possibly a dumb question. I have inadvertently overwritten some files in my code directory with an older version of the same files. rsync gone wrong. the running rails server is still showing the old views, is there any way to get rails to dump out the view it's currently using?
[17:34:12] tbuehlmann: change that to this: $(document).on('ready page:load', function(event) { ... });
[17:34:27] teaearlgraycold: brahman: you're not using source control?
[17:35:14] teaearlgraycold: tbuehlmann: a1fa: or use the JQuery turbolinks patch and do $(function() { ... });
[17:35:39] tbuehlmann: that's correct
[17:36:19] brahman: teaearlgraycold: I am but had not set up a remote git repo
[17:36:47] teaearlgraycold: brahman: why couldn't you just get the old version out of source control though?
[17:36:56] teaearlgraycold: Not at your workstation I guess
[17:38:59] teaearlgraycold: brahman: pretty sure there's no way to get that template out of memory - there shouldn't be a way to get rails to give you the pre-processed contents of a template
[17:39:03] teaearlgraycold: For security reasons
[17:39:12] chubijs: has joined #RubyOnRails
[17:39:55] teaearlgraycold: reckoner: http://pastie.org/private/7jqzep4peqv74e1wwobrg - any idea?
[17:40:28] brahman: yeah am just taking tons of screenshots of the running app so I can work to those.
[17:40:44] brahman: ACTION day went bad real quick!
[17:41:42] pulgalipe: has joined #RubyOnRails
[17:41:46] robbyoconnor: has joined #RubyOnRails
[17:42:10] teaearlgraycold: brahman: you can take the HTML source of course
[17:42:23] teaearlgraycold: Then build in any ruby manually
[17:43:49] brahman: teaearlgraycold: yeah am doing that also. Thanks. :) Man this sucks!
[17:44:15] platzhirsch: How do I html_safe this? <%= yield(:blah) || "<p>Hey I am safe" %> ? Putting .html_safe to the second operand doesn't wor
[17:48:45] ss_much: has joined #RubyOnRails
[17:49:10] n00bDev: has joined #RubyOnRails
[17:50:30] _djbkd: has joined #RubyOnRails
[17:51:12] safety_cut: has joined #RubyOnRails
[17:51:21] juddey: has joined #RubyOnRails
[17:54:31] Trynemjoel: has joined #RubyOnRails
[18:02:07] Aherin: has joined #RubyOnRails
[18:05:56] enkristoffer: As per http://edgeapi.rubyonrails.org/classes/ActiveRecord/FixtureSet.html Rails is supposed to add autofilled timestamp columns to my fixtures, but it's not doing it. Instead it's trying to insert null when loading the fixtures into the test db, which throws an error. Any idea how to find out why it isn't working as it should?
[18:07:39] musicnode: has joined #RubyOnRails
[18:07:43] herbst: has joined #RubyOnRails
[18:09:34] uris: has joined #RubyOnRails
[18:11:45] akshat: has joined #RubyOnRails
[18:12:20] rapha: tbuehlmann: sorry, I should probably install some means of receiving IRC notifications. Gist coming up...
[18:14:08] pulgalipe: has joined #RubyOnRails
[18:16:46] flashpoint9: has joined #RubyOnRails
[18:17:50] sleungcy: has joined #RubyOnRails
[18:18:44] rapha: tbuehlmann: in case you're still around, here's the Gist: https://gist.github.com/sixtyfive/9f06ac24620b3f87fcc4
[18:19:24] brahman: teaearlgraycold: Hey, thanks for your help earlier. I have now calmed down a bit. :) turns out that I was able to save the majority of my changes due to "git diff" commands issued in my screen session. :)
[18:19:31] AndChat|119664: has joined #RubyOnRails
[18:19:37] baweaver: has joined #RubyOnRails
[18:22:46] uris: has joined #RubyOnRails
[18:25:09] _djbkd: has joined #RubyOnRails
[18:25:59] gambl0re: has joined #RubyOnRails
[18:25:59] gambl0re: has joined #RubyOnRails
[18:26:32] doodleha_: has joined #RubyOnRails
[18:31:57] uris: has joined #RubyOnRails
[18:32:21] tbuehlmann: rapha, so you are just talking about simple links and not creating/updating things right now?
[18:32:41] Sheperson: has joined #RubyOnRails
[18:33:49] dtordable: has joined #RubyOnRails
[18:33:58] rapha: tbuehlmann: correct, i just want the -permanent div to keep its state (and state is mostly the place it's scrolled to)
[18:34:10] rapha: s/div/aside/
[18:34:17] Sheperson: Is it possible to detect the domain of the website in an initializer?
[18:34:28] manfrin: has joined #RubyOnRails
[18:34:48] Sheperson: or maybe the router?
[18:35:32] Sheperson: something like `request.domain` but inside the router or in an initializer
[18:36:02] slash_nick: What do you folks use (must be free) for creating mockups/wireframes?
[18:36:12] HenriettaSalt: has joined #RubyOnRails
[18:36:17] pipework: slash_nick: Rails, why?
[18:37:00] slash_nick: i wanted THIS audience's feedback
[18:37:38] pipework: comes to rails channel, asks for things not rails. Psh. :p
[18:38:02] rapha: slash_nick: Pen and Paper; it's probably patented by someone, though. I prefer the "Plain White" and "Ballpoint" flavours, myself.
[18:38:30] hobodave: has joined #RubyOnRails
[18:38:43] dopie: has joined #RubyOnRails
[18:38:59] slash_nick: rapha: where do you get your free pen and paper?
[18:39:11] pipework: slash_nick: downloadmorepenandpaper.com
[18:39:48] slash_nick: pipework: 404, you sure that's right?
[18:40:02] pipework: slash_nick: downloadmoreram.com, you might need some of this first.
[18:40:02] rapha: slash_nick: Well, the pens, mostly from people's secretaries' desks. Paper at the library (there's always a copy machine without a lock on the paper compartment).
[18:40:18] pipework: rapha: A foraging developer!
[18:40:18] slash_nick: rapha: you deviant!
[18:40:26] stamina: has joined #RubyOnRails
[18:40:39] rapha: Well, "the right tool for the job", right?
[18:40:46] pipework: rapha: So, I heard you like the taste of ballpoint.
[18:41:14] rapha: pipework: nah, don't be silly. That's just Rails lingo for "variant"!
[18:41:16] tbuehlmann: rapha, no idea, sorry. do you have a repo I can checkout and try myself?
[18:42:08] cnk: has joined #RubyOnRails
[18:42:09] musicnode: has joined #RubyOnRails
[18:42:34] rapha: tbuehlmann: this ain't secret stuff so I guess I could upload it to GitHub. Let me just make sure I didn't put any passwords or other stuff in there.
[18:42:49] uris: has joined #RubyOnRails
[18:44:54] ElFerna: has joined #RubyOnRails
[18:47:59] rapha: hah! go figure, i already had a github repo for it :-P
[18:48:41] enkristoffer: has joined #RubyOnRails
[18:50:38] gambl0re: has joined #RubyOnRails
[18:50:38] gambl0re: has joined #RubyOnRails
[18:51:00] rapha: tbuehlmann: https://github.com/sixtyfive/miteinander/tree/startingover and it will need https://github.com/sixtyfive/toolbox-on-rails
[18:51:18] rapha: tbuehlmann: for the first one, the "startingover" branch!
[18:51:41] alex88: has joined #RubyOnRails
[18:52:13] rogue_koder: has joined #RubyOnRails
[18:54:25] tbuehlmann: rapha, will have a look at it later
[18:55:15] sakix: has joined #RubyOnRails
[18:56:38] musicnode: has joined #RubyOnRails
[18:56:55] mdw: has joined #RubyOnRails
[18:57:09] jtong: has joined #RubyOnRails
[18:57:17] spyd3r: has joined #RubyOnRails
[18:59:03] Sigfrid: has joined #RubyOnRails
[18:59:13] baweaver: has joined #RubyOnRails
[18:59:15] Ducky-: has joined #RubyOnRails
[18:59:25] kirillzh: has joined #RubyOnRails
[19:01:06] uris: has joined #RubyOnRails
[19:03:04] dtordable: what's uglifier?
[19:04:09] visudo: has joined #RubyOnRails
[19:04:39] syzygy_: has joined #RubyOnRails
[19:04:50] dexter_: has joined #RubyOnRails
[19:05:11] Malgorath: dtordable, https://rubygems.org/gems/uglifier/versions/2.7.2
[19:06:10] dtordable: rails fails loading
[19:06:46] piotrj: has joined #RubyOnRails
[19:06:48] Malgorath: er, thats not what I wanted it to post but you need to give us more then just it wont work
[19:06:50] dtordable: with that gem and coffee whatever
[19:07:09] Malgorath: Error logs, gists of where is breaks, so on and so forth
[19:07:26] dtordable: Malgorath: removed them and works
[19:08:01] ElFerna: has joined #RubyOnRails
[19:08:37] dtordable: will get an analysis...
[19:09:10] workmad3: has joined #RubyOnRails
[19:09:26] Malgorath: as those are basic things installed with rails, removing them and it works isn't 'works' its a circumventing meaning something in relation to either your JS or coffee scripts are broken.
[19:09:45] rakm: has joined #RubyOnRails
[19:10:52] dtordable: Malgorath: realised about that
[19:11:34] musicnode: has joined #RubyOnRails
[19:11:37] kirillzh: has joined #RubyOnRails
[19:12:25] vsamaco13: has joined #RubyOnRails
[19:12:32] nettoweb: has joined #RubyOnRails
[19:12:54] Ergo: has joined #RubyOnRails
[19:13:15] Malgorath: dtordable, my suggestion would be to check your js/sass/less files to ensure they are not broken. usually when you run rails server it says what the problem is and even the line its on.
[19:13:24] platzhirsch: has left #RubyOnRails: ()
[19:14:01] rapha: tbuehlmann: sure, no hurry. I'll be idling here.
[19:14:29] vsamaco13: has joined #RubyOnRails
[19:15:30] vsamaco13: has joined #RubyOnRails
[19:16:16] netzfisch: has joined #RubyOnRails
[19:19:14] vsmak: has joined #RubyOnRails
[19:20:05] titeiko_: has joined #RubyOnRails
[19:21:47] titeiko__: has joined #RubyOnRails
[19:22:43] musicnode: has joined #RubyOnRails
[19:22:46] draig: has joined #RubyOnRails
[19:23:09] LambdaSource: has joined #RubyOnRails
[19:24:14] doodlehaus: has joined #RubyOnRails
[19:24:42] vsmak: has joined #RubyOnRails
[19:26:04] vsmak: has joined #RubyOnRails
[19:27:08] [Butch]_: has joined #RubyOnRails
[19:30:38] matthias_: has joined #RubyOnRails
[19:31:04] musicnode: has joined #RubyOnRails
[19:34:59] cnk: has joined #RubyOnRails
[19:37:09] HenriettaSalt: has joined #RubyOnRails
[19:37:23] kirillzh: has joined #RubyOnRails
[19:38:08] arup_r: has joined #RubyOnRails
[19:38:30] dopie: has joined #RubyOnRails
[19:40:07] atomical: has joined #RubyOnRails
[19:41:13] moeabdol: has joined #RubyOnRails
[19:41:48] ur5us: has joined #RubyOnRails
[19:42:16] HenriettaSalt: has joined #RubyOnRails
[19:42:39] musicnode: has joined #RubyOnRails
[19:43:34] diggitydane: has joined #RubyOnRails
[19:44:34] diggitydane: I'm using Puma/Heroku. Where's the best place to a redirect/rewrite from url1.com/path/1.jpg -> url2.com/path/1.jpg
[19:46:32] diggitydane: I'm trying to do something like .htaccess rewrite without using rails routing to do it. I can't find info anywhere if using puma/heroku that it actually uses nginx for routing
[19:48:55] jacobat: diggitydane: I don't think you can do anything like that with Heroku
[19:49:12] jacobat: diggitydane: You'll need to do the redirect in your application I believe (not sure though)
[19:49:37] jacobat: diggitydane: What's the issue with doing it in the Ruby process?
[19:50:47] [Butch]_: has joined #RubyOnRails
[19:50:51] diggitydane: jacobat, main issue is speed. I'd rather the request redirect at the load balancer than actually hit the app
[19:51:53] diggitydane: jacobat, looks like rack-reverse-proxy may do something similar
[19:52:48] atomical_: has joined #RubyOnRails
[19:52:59] Bloodberet: has joined #RubyOnRails
[19:53:47] PedramT: has joined #RubyOnRails
[19:54:12] musicnode: has joined #RubyOnRails
[19:54:37] tvw: has joined #RubyOnRails
[19:54:41] dopie: has joined #RubyOnRails
[19:55:21] rakm: has joined #RubyOnRails
[19:57:16] yoongkang: has joined #RubyOnRails
[19:57:50] HenriettaSalt: has joined #RubyOnRails
[19:58:24] [Butch]_: has joined #RubyOnRails
[19:59:15] tvw: has joined #RubyOnRails
[20:00:07] yfeldblum: has joined #RubyOnRails
[20:01:10] moeabdol: has joined #RubyOnRails
[20:02:16] baweaver: has joined #RubyOnRails
[20:03:03] FCser: has joined #RubyOnRails
[20:06:24] meoblast001: has joined #RubyOnRails
[20:07:22] KucukMubasir: has joined #RubyOnRails
[20:07:35] cryptocronus_: has joined #RubyOnRails
[20:07:43] KucukMubasir: guys what helper does this route create?
[20:07:46] musicnode: has joined #RubyOnRails
[20:08:03] KucukMubasir: get ???/account???, :to => ???accounts#edit???, :as => :edit_account
[20:08:14] [Butch]: has joined #RubyOnRails
[20:08:43] KucukMubasir: I thought it should create edit_account_path, but the books says it should create account_path , am I wrong?
[20:09:15] herbst: has joined #RubyOnRails
[20:09:16] herbst: has joined #RubyOnRails
[20:09:21] Radar: GOOD MORNING
[20:10:03] chrisarcand: Radar: :wave:
[20:10:04] Radar: KucukMubasir: You'e right: it has the path helper of edit_account_path
[20:10:28] KucukMubasir: oh radar! the error is in your book ! can???t believe the responder !
[20:10:35] sarink: has joined #RubyOnRails
[20:10:38] KucukMubasir: also it is in your code on github, hold on
[20:11:42] sneakerhax: has joined #RubyOnRails
[20:11:50] KucukMubasir: radar, here is the helper, you used in your code account_path : https://github.com/radar/saas_book_examples/blob/master/subscribem/app/views/subscribem/shared/_login.html.erb
[20:12:09] mdw: has joined #RubyOnRails
[20:12:17] KucukMubasir: and radar, this is the route you created : https://github.com/radar/saas_book_examples/blob/master/subscribem/config/routes.rb
[20:12:31] brainslug: has joined #RubyOnRails
[20:12:54] ElFerna_: has joined #RubyOnRails
[20:13:03] Radar: KucukMubasir: thank you :)
[20:13:23] KucukMubasir: this is an error, right? I was about to test the code on the command line
[20:13:27] Radar: KucukMubasir: Hm, I wonder then how it is supposed to work
[20:13:36] jkamenik: has joined #RubyOnRails
[20:14:19] KucukMubasir: do you mean you are surprised that tests passed or I am wrong or something else? :)
[20:14:40] sar1nk: has joined #RubyOnRails
[20:16:32] atomical: has joined #RubyOnRails
[20:16:51] Radar: Yes I am surprised the tests passed.
[20:17:03] [Butch]_: has joined #RubyOnRails
[20:17:07] maxx88: radar: this is what i used to get it to work. https://gist.github.com/KudosX/59afc392a1f3b0e14ea9
[20:17:25] Radar: maxx88: that's the sign in path
[20:17:59] KucukMubasir: I am checking it, maybe I should send a pull request :)
[20:18:00] sarink: has joined #RubyOnRails
[20:18:01] snowy: has joined #RubyOnRails
[20:19:14] Radar: KucukMubasir: account_path does exist, it's just for the update route. By using it in that context, you make it a GET request
[20:19:20] Radar: KucukMubasir: So while it works, it's not correct.
[20:19:56] kitsuneyo: has joined #RubyOnRails
[20:20:07] Radar: I've pushed an update to saas_book_examples for that now
[20:20:22] Radar: KucukMubasir: Why are you reading the 1st edition when the 2nd edition has been published?
[20:20:30] FernandoBasso: has joined #RubyOnRails
[20:20:33] KucukMubasir: because it isn???t full, is it?
[20:20:44] KucukMubasir: I mean it isn???t completed yet
[20:20:44] kitsuneyo: can AWS host a whole rails site?
[20:21:16] Radar: KucukMubasir: It's as complete as the first edition was, as of yesterday
[20:21:32] Radar: kitsuneyo: yes it can. We're considering moving bikeexchange.com.au and our other sites to AWS.
[20:22:09] kitsuneyo: thanks Radar. i'm thinking about AWS too, going to an 'AWSome Day' next month
[20:22:48] snowy: has joined #RubyOnRails
[20:22:52] Andr3as: good evening
[20:23:31] KucukMubasir: @Radar it still looks ???75% complete???, and to tell the truth, I am about to finish the first edition and don???t want to reread the updated book, I prefer to just read the updated code
[20:23:39] akshat: has joined #RubyOnRails
[20:23:55] Andr3as: i am running into an isse proly everybody of you had before.. i want to update an entry but validations says "no" as i have a uniqueness check for the name
[20:24:01] sarink: has joined #RubyOnRails
[20:24:14] Radar: KucukMubasir: Oh right I should update that :)
[20:24:27] Andr3as: however, this uniqueness validation makes sense, even on update
[20:24:28] Radar: KucukMubasir: Updated code is at https://github.com/radar/twist/tree/my-saas
[20:24:49] Andr3as: but, it shouldnt prevent it from being updated
[20:25:02] Andr3as: anyone has a hint where to look?
[20:25:43] Radar: Andr3as: !rule0
[20:25:43] helpa: Andr3as: 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. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[20:26:32] workmad3: has joined #RubyOnRails
[20:26:59] [Butch]_: has joined #RubyOnRails
[20:27:24] blackmes1: has joined #RubyOnRails
[20:27:51] ElFerna_: has joined #RubyOnRails
[20:28:59] arup_r: Andr3as: show the code and the error message with the data you passed to it
[20:29:15] Andr3as: yeah, i am on it
[20:30:47] Andr3as: so, here's the code and error https://gist.github.com/awunder/74d377b66ff69f945b7c
[20:31:32] workmad3: has joined #RubyOnRails
[20:31:44] arup_r: can't u show full rails error stack.. ? :)
[20:32:02] petricore: has joined #RubyOnRails
[20:32:14] Radar: Andr3as: Logs too please.
[20:32:24] Radar: And yes, the stacktrace would be great.
[20:32:25] arup_r: I mean you submit the form, and then what all happened in the log.. please
[20:33:04] arup_r: validations are to validate data, so we need the data to see :p
[20:33:38] kitsuneyo: has joined #RubyOnRails
[20:33:59] qejk: has joined #RubyOnRails
[20:34:21] dtordable: has joined #RubyOnRails
[20:36:50] manfrin: has joined #RubyOnRails
[20:36:59] Radar: Andr3as: stacktrace too
[20:37:17] Andr3as: how can i get that? i've posted everything i got
[20:37:33] stannard: has joined #RubyOnRails
[20:37:38] Radar: Andr3as: Oh sorry, it's not a typical error. Never mind.
[20:37:42] arup_r: You are upcasing an upcased string with *bang* .. which seems throws error... and cancelling it? self.symbol.upcase!
[20:37:45] Radar: Andr3as: Stock.find(1).symbol please
[20:38:12] _djbkd: has joined #RubyOnRails
[20:38:48] Andr3as: s = Stock.find(1).symbol --> Stock Load (0.4ms) SELECT "stocks".* FROM "stocks" WHERE "stocks"."id" = $1 LIMIT 1 [["id", 1]]
[20:39:01] Radar: Andr3as: More interested in what the symbol is that's saved to the DB
[20:39:17] Andr3as: yeah, missed theat in the copy
[20:39:25] arup_r: generally, ok not error, it is `nil` .. sorry for wrong inf
[20:39:38] Radar: Hm, I am not sure what is going on then.
[20:39:47] Pumukel: has joined #RubyOnRails
[20:40:13] arup_r: Andr3as: try .upcase and tell me.. what you see
[20:40:20] Andr3as: so, it should "get it" and just update, without a hassle, or?
[20:40:21] smathy: Andr3as, looks like, somehow, you already have two records with AAPL, id=1 and something else.
[20:40:51] Andr3as: s = Stock.find(1).symbol.upcase --> "AAPL"
[20:40:55] arup_r: I forgot, if a validation returns false, does it cancell others in chain.. Asking, I got confused now.
[20:41:31] Andr3as: smathy: there's only one #1 and only one AAPL
[20:41:46] sandstrom: has joined #RubyOnRails
[20:41:55] smathy: Andr3as, do a Stock.where( %{ LOWER("stocks"."symbol") = LOWER('AAPL') }).count
[20:42:09] Andr3as: hold on.. argh
[20:42:20] Andr3as: smathy, there were 2 apples
[20:42:28] logorrhea: has joined #RubyOnRails
[20:42:46] Andr3as: i'd never had found this.. was looking after it for ages
[20:42:54] smathy: Andr3as, it's ok, at least you did what I asked to confirm :)
[20:43:00] Andr3as: renamed the 2nd aapl and all good
[20:43:07] smathy: Andr3as, cool.
[20:43:15] Radar: There we go.
[20:43:40] Andr3as: layer 8 problem.. ;)
[20:43:42] Andr3as: thanks everyone
[20:44:07] atomical_: has joined #RubyOnRails
[20:44:42] Jon30: has joined #RubyOnRails
[20:45:00] Jon30: has joined #RubyOnRails
[20:45:01] Jon30: does anybody use vagrant+rails on windows?
[20:45:10] smathy: I'm sure someone does.
[20:45:10] ur5us: has joined #RubyOnRails
[20:45:22] KucukMubasir: Radar: , oh great. thanks ! and you fixed the code, I was about to send a request :)
[20:45:56] ur5us: has joined #RubyOnRails
[20:46:03] arup_r: hmm.. good
[20:47:33] smathy: TIL `case_sensitive: false`
[20:47:39] Jon30: I was wondering how people handling the problem of public folder getting overwritten when using vagrant and rsync-auto. basically whenever I make a change on the host, it will use rsync to overwrite the entire directory on the guest machine, getting rid of any uploaded assets within public/system
[20:49:59] snguyen: has joined #RubyOnRails
[20:50:08] snguyen: has left #RubyOnRails: ()
[20:50:24] KucukMubasir: radar, didn???t you use apartment or houser or subscribem or even act_as_tenant in the second version ? I couldn???t find them when I searched the repo
[20:52:16] Cohedrin: has joined #RubyOnRails
[20:53:27] Radar: KucukMubasir: I use them as examples, but they don't scale to large customer bases and so I use foreign key scoping instead
[20:53:32] baweaver: has joined #RubyOnRails
[20:54:53] safety_cut: has joined #RubyOnRails
[20:56:02] sakix: has joined #RubyOnRails
[20:57:21] yoongkang: has joined #RubyOnRails
[20:57:40] _djbkd: has joined #RubyOnRails
[21:00:45] kitsuneyo: has joined #RubyOnRails
[21:02:58] Scriptonaut: Hey guys, I have a field on a model called externally_visible. This field is a boolean, but sometimes it's nil. I have a select that displays a dropdown with either visible, or not visible. The problem is, it's just automatching the first option when the externally_visible field is nil. Is there any way to make it match both false and nil?
[21:04:00] phantummm: has joined #RubyOnRails
[21:04:25] Scriptonaut: I'm using the form helpers by the way, form.select
[21:05:37] Scriptonaut: I'd like to do something like: form.select :externally_visible, option_for_select( [['Visible', true], ['Not Visible', false || nil]]), my_model.externally_visible, {}
[21:05:59] hobodave_: has joined #RubyOnRails
[21:06:23] [Butch]_: has joined #RubyOnRails
[21:07:17] HenriettaSalt: has joined #RubyOnRails
[21:07:52] Scriptonaut: I guess I could do: !!my_model.externally_visible
[21:11:29] KucukMubasir: Radar: I was trying to test your multitenant 1st repo, ???bundle install??? in subscribem directory and ???rake db:migrate RAILS_ENV=test???, now I get the error of: PG::DuplicateTable: ERROR: relation "subscribem_accounts" already exists
[21:11:57] mordof_work: has joined #RubyOnRails
[21:12:17] HenriettaSalt_: has joined #RubyOnRails
[21:12:22] KucukMubasir: what am I doing wrong ?
[21:12:35] astrofog: has joined #RubyOnRails
[21:12:48] Radar: KucukMubasir: drop the database and try to migrate again
[21:13:05] Radar: Scriptonaut: set a default on the boolean field of either true/false to prevent it from ever being nil
[21:13:16] MarkAValdez1: has left #RubyOnRails: ()
[21:13:18] Scriptonaut: ya, that was my first thoguht
[21:13:25] Scriptonaut: I found a frontend solution
[21:14:02] Scriptonaut: if I made a migration that made that field default to false, would it change all the existing ones that weren't explicitly set?
[21:15:29] powersurge: has joined #RubyOnRails
[21:15:45] powersurge: so I've got a record with a has_many relationship
[21:15:53] powersurge: think store -> locations
[21:16:28] powersurge: I used a right join on stores.id = locations.store_id so that I can get each location with the store name listed as a single row
[21:16:40] powersurge: this is working fine in ActiveRecord if I use something like, say, pluck
[21:17:08] powersurge: Store.joins('RIGHT JOIN locations ON stores.id = locations.store_id').pluck(:state)
[21:17:19] powersurge: ^ gives ['IN', 'KY'] like I expect.
[21:17:40] powersurge: how can I provide these state columns as a property on each individual activerecord object in the collection?
[21:18:46] tubbo: GOOD MORNING
[21:19:08] Radar: Scriptonaut: no
[21:20:27] atomical: has joined #RubyOnRails
[21:21:04] podman: has joined #RubyOnRails
[21:21:24] workmad3: has joined #RubyOnRails
[21:22:15] jscheel: has joined #RubyOnRails
[21:23:48] KucukMubasir: Radar: I dropped subscribem_test , and then run rake db:migrate. now rspec . gives no database error for subscribem_test :/
[21:24:31] KucukMubasir: should I run rake db:create ?
[21:25:10] Jon30: Any suggestions on how to improve performance of Ruby/Rails on Windows 10? I am trying to get it working on vagrant, and it runs at a blazing speed, but I am having issues rsyncing the project directory with host (it's overwriting public directory and all the uploaded assets all the time). ....major sigh.... are there any alternative to make Ruby work faster on Windows?
[21:25:56] tubbo: Jon30: install linux and run windows in a virtual machine? ;)
[21:26:22] tubbo: Jon30: nah i think the issue there is due to the slow speed of NFS, which is how Vagrant mounts the local windows drive into its VM
[21:26:28] atomical_: has joined #RubyOnRails
[21:27:09] tubbo: Jon30: oh wait, i'm sorry. that was wrong.
[21:27:13] rickmasta: has joined #RubyOnRails
[21:27:57] tubbo: i'm not sure you can `rsync` to "deploy" your code up, because you'll always have different files in tmp/, log/, public/, et.c
[21:29:47] KucukMubasir: radar, I tried rake db:migrate RAILS_ENV=test but it comes down to ERROR: relation "subscribem_accounts" already exists
[21:30:01] KucukMubasir: I can???t run this code :/
[21:30:08] Radar: KucukMubasir: then I guess you didn't delete the right database
[21:30:23] powersurge: for those of you playing along at home, you would have to add in an explicit select method at the end
[21:30:33] herbst: has joined #RubyOnRails
[21:30:52] powersurge: Store.joins('RIGHT JOIN locations ON stores.id = locations.store_id').select('*')[0].state # => ['IN']
[21:31:31] gbgdev: has joined #RubyOnRails
[21:31:31] powersurge: of course you probably ought to be more explicit than select('*'), but to be illustrative, the above does what I was looking for
[21:31:39] KucukMubasir: I dropped subscribem_test , shall I drop both that and subscribem_development ?
[21:31:44] AzaToth: has joined #RubyOnRails
[21:31:52] Radar: KucukMubasir: !try
[21:31:52] helpa: KucukMubasir: Why don't you try it and find out for yourself?
[21:31:54] powersurge: now. unfortunately there's already a #state method. anyone know how I can default to normal activerecord behavior if state exists?
[21:32:06] KucukMubasir: I fear for losing data , sorry for nagging you
[21:32:06] Radar: KucukMubasir: I'm trying to not encourage people to continue reading the 1st edition
[21:33:30] ElFerna_: has joined #RubyOnRails
[21:34:25] powersurge: aha, #read_attribute
[21:35:50] KucukMubasir: Radar: I see, but I don???t want to reread the similar book. I tried dropping subscribem_test and subscribem_development, still I stuck at ERROR: relation "subscribem_accounts" already exists . shall I give up on this :(
[21:36:26] Radar: KucukMubasir: I can't help you with this because I cannot see the issue happening for myself. Sorry.
[21:37:31] KucukMubasir: Radar: http://stackoverflow.com/questions/31088743/why-am-i-being-asked-to-run-rake-dbmigrate-rails-env-test someone else run into the same problem
[21:37:53] Radar: KucukMubasir: Please, stop.
[21:38:05] Radar: KucukMubasir: Show me how I can reproduce this issue on my machine or stop pinging me.
[21:38:11] KucukMubasir: oh, ok. I am sorry
[21:38:12] Radar: I literally cannot help without being able to do that.
[21:38:24] Jon30: tubbo: that's the problem yeah, not sure how these guys are handling this problem: https://github.com/rails/rails-dev-box
[21:38:51] tubbo: Jon30: they don't need what you need. "Please note this VM is not designed for Rails application development, only Rails core development."
[21:39:10] tubbo: so for the most part, they probably don't give a shit about saving public/ or tmp/ across changes.
[21:39:22] Radar: Jon30: Fire up a VM running Ubuntu and install Rails onto that
[21:39:24] Radar: Jon30: !ubuntu
[21:39:24] helpa: Jon30: Ubuntu, Ruby, ruby-install, chruby, Rails setup guide: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/ - Gauranteed to work 100% of the time or your money back!
[21:40:20] tetraktys: has joined #RubyOnRails
[21:40:54] Jon30: Radar: yeah that's one way. I was looking for alternative to that as well.
[21:41:16] KucukMubasir: rake db:reset solved the issue,
[21:43:22] workmad3: has joined #RubyOnRails
[21:44:07] pawnbox: has joined #RubyOnRails
[21:45:23] tape88: has joined #RubyOnRails
[21:46:46] tape88: has joined #RubyOnRails
[21:48:16] akshat: has joined #RubyOnRails
[21:48:38] tape88: has joined #RubyOnRails
[21:51:15] [Butch]: has joined #RubyOnRails
[21:53:09] fox_mulder_cp: Radar: i have rbenv manual on my blogapp github repo. haha
[21:57:20] Radar: fox_mulder_cp: huh?
[21:57:32] puria_: has joined #RubyOnRails
[21:57:43] VeryBewitching: ACTION drinks his coffee quietly.
[21:59:28] drale2k: i have Rails 4.x and 5beta1 installed. How do i reference the beta now when i want to create a new project ?
[21:59:32] fox_mulder_cp: Radar: https://github.com/foxmuldercp/blogapp
[21:59:33] renews: has joined #RubyOnRails
[21:59:40] drale2k: where is the rails beta bin folder?
[21:59:48] Radar: drale2k: rails _5.0.0.beta1_ new
[22:00:18] drale2k: Radar: oh, nice thanks. When i am inside the project later, do i still need to prefix it with _5.0.0.beta1_ for every command?
[22:00:35] Radar: drale2k: no
[22:00:38] Radar: drale2k: bundle exec rails
[22:00:57] ElFerna_: has joined #RubyOnRails
[22:01:14] drale2k: i have never needed to use "bundle exec" usually. Do i need wit the beta? (always just called rails g controller.. f.e.)
[22:01:24] fox_mulder_cp: drale2k: http://www.christopherbloom.com/2015/04/26/setting-up-a-rails-5-app-from-edge/
[22:01:40] Radar: drale2k: the "rails" command should be smart enough to use the bundled version, but if it's not then `bundle exec rails` will be.
[22:01:42] fox_mulder_cp: drale2k: read this )
[22:01:51] drale2k: thanks guys
[22:01:58] jkamenik: has joined #RubyOnRails
[22:02:27] sarink: has joined #RubyOnRails
[22:03:22] fox_mulder_cp: can you help me, plz - i have some classes, and want create class with some properties, which enhance my main classes by common properties
[22:04:24] fox_mulder_cp: i want take this common properties for all classes in one object and extend my main classes
[22:06:20] dexter_: has joined #RubyOnRails
[22:07:57] kitsuneyo: has joined #RubyOnRails
[22:08:01] creaked: has joined #RubyOnRails
[22:08:16] mordof_work: has joined #RubyOnRails
[22:08:36] mary5030: has joined #RubyOnRails
[22:08:37] bruce_lee: has joined #RubyOnRails
[22:09:09] kirillzh: has joined #RubyOnRails
[22:09:12] f00dMonsta_: has joined #RubyOnRails
[22:10:09] kallisti5: I think i've run across a neat way to have my ActiveRecord objects self-update from an external rest api... does this look valid? http://pastebin.com/UB14x6Ls
[22:10:42] kirillzh: has joined #RubyOnRails
[22:10:49] Scriptonaut: I like SPRUNGE
[22:10:55] Scriptonaut: because I'm lazy
[22:11:04] Scriptonaut: has anyone made a commandline gist uploader?
[22:12:10] Radar: kallisti5: I'd take a look except pastebin is blocked on my machine on purpose.
[22:14:23] dtordable: therubyracer don't compile
[22:15:07] smathy: fox_mulder_cp, sounds like you're looking for the pattern commonly called a mixin in Ruby circles.
[22:15:13] kallisti5: Radar: https://gist.github.com/avongluck-r1soft/f80b7ec49561bd22d1f3
[22:15:37] smathy: Scriptonaut, https://github.com/defunkt/gist
[22:15:38] FCser: has joined #RubyOnRails
[22:15:58] Scriptonaut: that's awesome smathy
[22:16:02] Scriptonaut: I will definitely be adopting this
[22:16:13] Scriptonaut: sprunge is still nice on a new system before you have ruby installed, all it requires is curl
[22:16:43] jgpawletko: has joined #RubyOnRails
[22:17:37] Scriptonaut: wow smathy that tool is very slick
[22:17:40] Scriptonaut: just tried it out
[22:18:05] yfeldblum: has joined #RubyOnRails
[22:18:05] agit0: has joined #RubyOnRails
[22:18:19] Limix: has joined #RubyOnRails
[22:18:41] smathy: Scriptonaut, you're welcome.
[22:18:44] rubyonrails633: has joined #RubyOnRails
[22:19:02] segy: has joined #RubyOnRails
[22:20:56] f00dMonsta__: has joined #RubyOnRails
[22:22:28] kitsuneyo: has joined #RubyOnRails
[22:22:56] pulgalipe: has joined #RubyOnRails
[22:25:01] fox_mulder_cp: smathy: maybe mixin. i want something, which like as concern, but such as class - methods, migration etc
[22:25:13] spyd3r: has joined #RubyOnRails
[22:25:40] kitsuneyo: has joined #RubyOnRails
[22:26:04] mices: has joined #RubyOnRails
[22:26:20] pulgalipe: has joined #RubyOnRails
[22:26:30] fox_mulder_cp: as example - class WebSite, class EmailDomain, class DNSDomain has a class AdminFutures {approved, payed_until, admin_blocked, can_backup} etc
[22:27:16] fox_mulder_cp: and if i change this AdminFutures class his properties and methods added into main parent classes...
[22:28:05] fox_mulder_cp: EmailDomain.admin_blocked?, WebSite.payed_until = '2017.01.01' ...
[22:30:28] mices: has joined #RubyOnRails
[22:30:37] Radar: kallisti5: I would move the require to the top of the class, above the class definition itself
[22:30:52] smathy: fox_mulder_cp, sorry, I'm not understanding what you're after.
[22:30:56] Radar: kallisti5: I don't see where in that method you're actually updating any of the model's information.
[22:31:24] f00dMonsta_: has joined #RubyOnRails
[22:31:33] leofrozenyogurt: has joined #RubyOnRails
[22:31:43] leofrozenyogurt: hey how would i be able to do an each loop with a ,
[22:31:45] leofrozenyogurt: https://gist.github.com/leofrozenyogurt/ad4f7db4a0e9aef47696
[22:31:57] yoongkang: has joined #RubyOnRails
[22:32:31] Radar: leofrozenyogurt: Are you interacting with Paypal's API?
[22:32:31] manfrin: has joined #RubyOnRails
[22:32:47] Radar: leofrozenyogurt: any particular reason why you're not using https://github.com/paypal/PayPal-Ruby-SDK?
[22:33:03] leofrozenyogurt: Radar: it doesnt work with parallel express payments
[22:33:25] leofrozenyogurt: Radar: I need to use the NVP api
[22:33:35] Radar: leofrozenyogurt: fun
[22:33:38] bruce_lee: I'm new to ruby and rubyOnRails
[22:33:52] leofrozenyogurt: Radar: its probably one of the worst experiences of my dev life
[22:33:56] smathy: I'm so curious what "an each loop with a ," is.
[22:34:03] Radar: leofrozenyogurt: I don't have an answer then, sorry. I've never used Curl::PostField and I don't know what you're expecting it to do.
[22:34:12] bruce_lee: I wanted to try out "zena-cms" so I did: gem install zena
[22:34:19] KucukMubasir: radar, sorry for pinging, but two tests in blorgh failed after I cloned it from github , sign_in_spec.rb:12 and sign_up_spec:8 .
[22:34:20] Radar: bruce_lee: welcome
[22:34:22] KucukMubasir: also I had to add fake_braintree_redirect in blorgh???s gemfile, otherwise it couldn???t require it from the engine.
[22:34:38] leofrozenyogurt: I need to loop through the products and created the Postfield
[22:34:42] Radar: KucukMubasir: I am no longer maintaining the code from the 1st edition. It is too hard to keep it up to date AND work on 2nd edition at the same time.
[22:34:44] bruce_lee: Radar: thx \(^_^)/
[22:34:51] bruce_lee: I got a: ERROR: Could not find a valid gem 'authlogic' (= 2.1.9) in any repository
[22:34:56] leofrozenyogurt: smathy: check out the gist
[22:34:57] smathy: leofrozenyogurt, maybe your question is because you have a syntax error in your code, you have more (s than )s
[22:35:14] smathy: leofrozenyogurt, yeah, it doesn't explain what you're trying to do, what you're seeing, and what you expect to be seeing.
[22:35:25] leofrozenyogurt: correct , its saying expecting end because of the ,
[22:35:26] KucukMubasir: oh ok, Radar . I had better read the 2nd version???s code then. thanks for your help
[22:35:35] bruce_lee: the authlogic-gem version 2.1.9 is not available anymore, it looks like version 2.1.10 is going to work....
[22:35:47] leofrozenyogurt: the , at the end of the second line is the one throwing the error
[22:36:17] bruce_lee: how can I make the zena-gem use authlogic-gem version 2.1.10 instead of version 2.1.9 ????
[22:36:17] smathy: bruce_lee, 2.1.9 has been yanked: https://rubygems.org/gems/authlogic/versions
[22:36:26] fox_mulder_cp: smathy: oh, may be time to sleep. thanks for mixin idea, google it tomoroow
[22:36:31] leofrozenyogurt: I would like to loop through a product list in a cart , create the post fields from the cart and then plug them back into a curl easy
[22:36:31] fox_mulder_cp: good night all
[22:36:43] Radar: bruce_lee: doesn't look like zena is maintained any more
[22:36:47] Radar: bruce_lee: I'd recommend RefineryCMS
[22:37:22] mices: i ran bundle exec rake assets:precompile as root on my production machine, is that gonna be a problem, the server's returning 404's for all requests, i did that while troubleshooting
[22:37:43] smathy: leofrozenyogurt, right, so before you can do anything you need to get the syntax right, so fix that in your gist and we'll have more of an idea about what you're trying to do.
[22:37:54] f00dMonsta__: has joined #RubyOnRails
[22:37:58] Radar: smathy: What if the syntax was right?
[22:38:07] smathy: leofrozenyogurt, hint, you can't have more (s than )s
[22:38:23] smathy: Radar, well I don't know where the missing ) is going to go, so I'll tell you then.
[22:38:38] MarkAValdez: has joined #RubyOnRails
[22:38:47] leofrozenyogurt: https://gist.github.com/leofrozenyogurt/ad4f7db4a0e9aef47696
[22:38:50] leofrozenyogurt: i saw what you ment
[22:38:57] leofrozenyogurt: but that wasnt the issue , the (
[22:39:03] Radar: leofrozenyogurt: what is the issue then?
[22:39:05] leofrozenyogurt: rails is complaining about the ,
[22:39:08] Radar: leofrozenyogurt: what gem provides Curl::PostField?
[22:39:11] ekinmur: has joined #RubyOnRails
[22:39:12] Radar: leofrozenyogurt: !didntwork
[22:39:12] helpa: leofrozenyogurt: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[22:39:17] smathy: leofrozenyogurt, ok, so why do you have a comma at the end of line 2 ?
[22:39:18] Radar: leofrozenyogurt: be more precise when saying things didn't work, please.
[22:39:34] Radar: smathy: spoilers
[22:40:06] leofrozenyogurt: smathy: one sec i will update the gist more details
[22:40:47] KucukMubasir: is Spree also unmaintained and is its future bleak ?
[22:41:12] Radar: KucukMubasir: there's a fork of Spree now called Solidus: https://github.com/solidusio/solidus
[22:41:44] leofrozenyogurt: smathy: updated https://gist.github.com/leofrozenyogurt/ad4f7db4a0e9aef47696
[22:41:58] leofrozenyogurt: That is essentially what i am trying to accomplish
[22:42:04] Radar: leofrozenyogurt: https://gist.github.com/leofrozenyogurt/ad4f7db4a0e9aef47696#file-gistfile1-txt-L8
[22:42:09] Radar: leofrozenyogurt: why is there a comma on the end of this line
[22:42:12] Radar: leofrozenyogurt: and on line 12
[22:42:42] Radar: looks like it's a list.
[22:42:59] KucukMubasir: radar, did you read the recent 2016 roadmap announcement of spree, it still looks promising but I can???t be sure https://github.com/spree/spree/wiki/Spree-Commerce-development-roadmap-2016
[22:43:01] smathy: Radar, yeah, look at the full context here, he's trying to make an each in the middle of an argument list.
[22:43:04] leofrozenyogurt: because the http post expects it to have a , after each content
[22:43:15] smathy: leofrozenyogurt, you can't do that.
[22:43:17] Radar: Yeah that's not going to work.
[22:43:35] leofrozenyogurt: any suggestions on what to do instead?
[22:43:50] smathy: leofrozenyogurt, you CAN create an array of those values, and then use the splat operator to send them in to the method as arguments.
[22:44:04] Radar: smathy: "did you just tell me to go fuck myself bob?"
[22:44:30] leofrozenyogurt: well gonna go try that then
[22:44:44] Radar: leofrozenyogurt: half the answer is now in a comment on the gist
[22:45:31] kallisti5: Radar: so I need to save? or do this.thing = blah ?
[22:45:38] pawnbox: has joined #RubyOnRails
[22:45:43] Radar: kallisti5: both, I think
[22:45:48] Radar: smathy: Oh yeah I forget about that.
[22:45:56] smathy: leofrozenyogurt, the real answer though is to go learn (more) Ruby.
[22:46:04] leofrozenyogurt: Radar: thanks! will work off of that!
[22:46:13] leofrozenyogurt: smathy: every day I learn something new :)
[22:46:40] smathy: leofrozenyogurt, I mean explicitly/intentionally: https://www.ruby-lang.org/en/documentation/
[22:46:52] flashpoint9: has joined #RubyOnRails
[22:47:21] nfk|laptop: has joined #RubyOnRails
[22:47:25] bklane: has joined #RubyOnRails
[22:48:41] zcreative: has joined #RubyOnRails
[22:50:39] piotrj: has joined #RubyOnRails
[22:50:50] Diabolik: what's an example of a brilliantly coded open source RoR app?
[22:51:08] zcreative: Morning all. How do I make sure an operation like: Parent.first.parents << Child.where(id: [1,2,3]); doesnt fail?
[22:51:15] Radar: Diabolik: https://github.com/solidusio/solidus
[22:51:24] Radar: zcreative: define "fail"
[22:51:40] Diabolik: Radar im familiarish with Solidus
[22:51:54] Radar: https://github.com/radar/twist
[22:51:58] zcreative: fail as in not persist into the db
[22:51:58] Radar: Although I am biased toward that one.
[22:52:05] hobodave: has joined #RubyOnRails
[22:52:09] Radar: And the code is not exactly brilliant in some places :P
[22:54:02] zcreative: I'm sorry, i misstyped that. Its actually this i'm trying to make sure is successful: Parent.first.children << Child.where(id: [1,2,3])
[22:54:15] Radar: Write a test for it?
[22:54:23] Radar: Why wouldn't it be successful?
[22:54:45] tubbo: Radar: gtfo
[22:54:46] Diabolik: Radar im working through MTIR atm
[22:54:47] zcreative: a validation error on a child record
[22:54:57] Radar: tubbo: no u
[22:55:03] zcreative: its actually a has_many :through association
[22:55:12] robbyoconnor: has joined #RubyOnRails
[22:55:35] Radar: zcreative: Did you write a test for that?
[22:56:03] quazimodo: has joined #RubyOnRails
[22:56:10] Scriptonaut: Does anyone know why when submitting a form, there are no params besides controller and action, but when I look in the network tab of the developer console, it's full of all the form data I'd expect?
[22:56:25] zcreative: no. not yet.
[22:56:29] Scriptonaut: I put a binding.pry in a before action in my application_controller, and even then there are still no params
[22:56:34] zcreative: let me write one
[22:56:41] zcreative: maybe it will answer my problem
[22:56:45] zcreative: thanks for your help sir
[22:56:48] sakix: has joined #RubyOnRails
[22:57:25] Radar: Scriptonaut: code to reproduce issue or new app which reproduces the issue pleas
[22:57:59] jgpawletko: has joined #RubyOnRails
[22:59:29] BaNzounet: Can someone help me with this error : https://gist.github.com/AlexGaspar/0f532669546922af815e, I don't understand why he's complinaing about that field, adding an attr_accessible doesn't help
[22:59:31] Ducky-: has joined #RubyOnRails
[22:59:54] Scriptonaut: I'd basically have to gist you the entire app. I suppose there isn't a good way for me to show you guys
[23:00:24] Radar: Scriptonaut: My goal is for you to try and reproduce it within a new app, discover the cause and then we don't have to do any work here.
[23:00:38] Radar: BaNzounet: My guess is that you didn't run the migrations in the rails test env.
[23:01:38] one_zero: has joined #RubyOnRails
[23:01:59] _djbkd: has joined #RubyOnRails
[23:03:07] mices: has joined #RubyOnRails
[23:03:40] BaNzounet: Radar: 100% true
[23:04:55] BaNzounet: rake db:migrate RAILS_ENV=test
[23:05:56] zcreative: Radar: what do you think is the best way to check if the array of records each saved? I am trying to refactor adding one child to the parent and I have currently: if child.save; else respond with an error.
[23:06:13] zcreative: i need to make sure all children are in the db
[23:07:45] snowy: has joined #RubyOnRails
[23:09:01] nerium: has joined #RubyOnRails
[23:10:18] quazimodo: has joined #RubyOnRails
[23:11:59] mices: has joined #RubyOnRails
[23:12:05] agit0: has joined #RubyOnRails
[23:12:34] akaiiro: has joined #RubyOnRails
[23:14:15] Craigimus: has joined #RubyOnRails
[23:15:14] musicnode: has joined #RubyOnRails
[23:15:19] altair118: has joined #RubyOnRails
[23:16:26] ryanRT1: has joined #RubyOnRails
[23:16:46] robbyoconnor: has joined #RubyOnRails
[23:16:48] BaNzounet: Radar: thanks dude you saved me some headache there.
[23:17:13] rogue_koder: has joined #RubyOnRails
[23:17:58] ss_much: has joined #RubyOnRails
[23:19:05] mary5030: has joined #RubyOnRails
[23:20:00] kirillzh: has joined #RubyOnRails
[23:26:06] yfeldblum: has joined #RubyOnRails
[23:27:35] pawnbox: has joined #RubyOnRails
[23:32:23] herbst: has joined #RubyOnRails
[23:34:02] gbgdev: has joined #RubyOnRails
[23:37:25] crystal77: has joined #RubyOnRails
[23:38:08] baweaver: has joined #RubyOnRails
[23:38:59] Palsson: has joined #RubyOnRails
[23:39:13] mostlybadfly: has joined #RubyOnRails
[23:39:34] `aspiRe: has joined #RubyOnRails
[23:41:09] car54: has joined #RubyOnRails
[23:44:19] creaked: has joined #RubyOnRails
[23:47:14] car54: has left #RubyOnRails: ()
[23:48:04] car54: has joined #RubyOnRails
[23:48:55] matt_d: car54: where are you?
[23:48:56] car54: has left #RubyOnRails: ()
[23:49:15] car54: has joined #RubyOnRails
[23:50:31] matt_d: car54: wb
[23:52:06] baweaver: Say I have an association which might or might not exist yet (belongs_to) and I want to query / set it if it doesn't
[23:52:13] baweaver: how would I go about that?
[23:52:21] baweaver: was trying ivars, but they're defined as methods
[23:52:41] car54: has left #RubyOnRails: ()
[23:52:59] baweaver: jumping around in pry trying to find a way to override them, super doesn't appear to work either.
[23:54:29] baweaver: I might just do something like: def association; association_id ? Association.find(association_id) : find_and_set end
[23:54:30] zcreative: baweaver: create_or_initialize_by
[23:54:44] bruce_lee: \(^_^)/ @all
[23:54:54] bruce_lee: I did a: gem install rails -v=2.3.18
[23:54:55] zcreative: Parent.first.children.create_or_initialize_by name: 'hello'
[23:54:57] matt_d: hey bruce_lee
[23:55:22] bruce_lee: and got a: ERROR: Error installing rails: "rails" from rails conflicts with installed executable from railties
[23:55:54] bruce_lee: btw. I'm new to rubyOnRails
[23:56:05] baweaver: ha! association(:#{name})
[23:56:40] baweaver: well, association(:#{name}).reader(*args)
[23:57:16] bruce_lee: during the installation-try a got a: rails's executable "rails" conflicts with railties, Overwrite the executable? [yN]
[23:57:25] bruce_lee: I chose "N"
[23:57:27] pawnbox: has joined #RubyOnRails
[23:57:37] bruce_lee: anybody a hint?
[23:58:44] matt_d: bruce_lee: never seen that message, which OS are you using?
[23:58:57] matt_d: bruce_lee: sounds like you told it not to install rails 2.3.18
[23:59:00] bruce_lee: I'm on fedora-linux