« Back to channel list

#RubyOnRails - 22 April 2017

« Back 1 day Forward 1 day »
[00:12:38] hndk: has joined #RubyOnRails
[00:21:39] hotpancakes: has joined #RubyOnRails
[00:24:40] cam27: has joined #RubyOnRails
[00:25:44] cam27: So I just started a .NET job to long ago and I am about to get training on service layers, I’m just wondering if Rails also uses service layers and if so, any good references to look at so I can see the Rails way too
[00:31:35] hotpancakes: has joined #RubyOnRails
[00:39:10] fourcolors: has joined #RubyOnRails
[00:41:21] gbgdev: has joined #RubyOnRails
[01:08:28] HoierM: has joined #RubyOnRails
[01:10:27] michael_mbp: thought on how to approach ranking content?
[01:11:18] michael_mbp: as in weighing data in separate collections, then creating a composite collection where the ranking will affect which items are closer to the start of the collection (array)
[01:11:47] michael_mbp: i.e. a = [], b = [] then I want to apply equal weighting to items in a and items in b
[01:12:35] michael_mbp: then I would do stack << a; stack << b // but that would take the weighting into considering before doing a randomised 'jumbling'
[01:13:52] ravster: michael_mbp: I think elasticsearch does something like this. It might help to look at some of the ruby-elasticsearch interface gems to see if the code gives a hint to how they do it.
[01:15:39] bronson: has joined #RubyOnRails
[01:17:00] michael_mbp: ranking re. facets or ?
[01:18:55] spicerack: has joined #RubyOnRails
[01:38:19] romeoh: has joined #RubyOnRails
[01:55:57] Aytan72: has joined #RubyOnRails
[01:57:32] Jameser: has joined #RubyOnRails
[02:04:34] libastral: has joined #RubyOnRails
[02:05:15] rakm: has joined #RubyOnRails
[02:17:32] cerulean: has joined #RubyOnRails
[02:17:35] cerulean: trying to install git deploy
[02:17:37] cerulean: https://gist.github.com/mixflame/b0d763e8166dde3776c83040317456ff
[02:17:44] cerulean: what did it mean by this?
[02:17:53] cerulean: i just did git-deploy on two other projects
[02:17:55] cerulean: now it brokey
[02:20:27] hotpancakes: has joined #RubyOnRails
[02:21:40] irishfromua: has joined #RubyOnRails
[02:30:23] fschuindt: has joined #RubyOnRails
[02:30:26] irishfromua: has joined #RubyOnRails
[02:31:44] fschuindt: Folks, kinda confused here, what Exception should I raise for a "can't find the expected data on Redis" like error?
[02:38:55] romeoh: has joined #RubyOnRails
[02:41:39] hotpancakes: has joined #RubyOnRails
[02:45:11] havenwood: fschuindt: Create your own error that subclasses from RuntimeError.
[02:45:42] havenwood: fschuindt: RuntimeError's parent is StandardError.
[02:45:58] havenwood: "A generic error class raised when an invalid operation is attempted."
[02:46:15] fschuindt: havenwood: thanks, I will do that
[02:46:56] havenwood: fschuindt: Alternatively you could subclass from ArgumentError, but I'm not sure why the missing data is exceptional in your case.
[02:47:22] havenwood: (Aso a child of StandardError.)
[02:47:34] havenwood: See the right side of: https://www.gliffy.com/go/publish/5152080
[02:47:44] fschuindt: yes, RuntimeError sounds more apropriated
[02:47:46] duderonomy: has joined #RubyOnRails
[02:48:19] fschuindt: havenwood: amazing diagram! :o
[02:48:37] havenwood: you're welcome
[02:49:16] mooser: has joined #RubyOnRails
[03:17:38] |PiP|: has joined #RubyOnRails
[03:30:41] Jameser: has joined #RubyOnRails
[03:41:04] fourcolors: has joined #RubyOnRails
[03:41:11] Jameser: has joined #RubyOnRails
[03:41:20] romeoh: has joined #RubyOnRails
[03:56:14] hotpancakes: has joined #RubyOnRails
[03:57:59] armyriad: has joined #RubyOnRails
[03:58:51] irishfromua: has joined #RubyOnRails
[04:07:55] sdwrage: has joined #RubyOnRails
[04:12:27] bronson: has joined #RubyOnRails
[04:13:35] gusrub: has joined #RubyOnRails
[04:25:54] Technodrome: has joined #RubyOnRails
[04:26:29] Technodrome: whats the best way, say if i want to run an old rails 3 app for fun, should i run it in a vm? just use RVM? least effort as possible without messing anything up
[04:29:50] cerulean: has left #RubyOnRails: ()
[04:41:10] gusrub: has joined #RubyOnRails
[04:58:49] hotpancakes: has joined #RubyOnRails
[05:25:31] rodrigovlds: has joined #RubyOnRails
[05:42:46] Lauer: has joined #RubyOnRails
[05:57:34] Aytan72: has joined #RubyOnRails
[06:09:43] hotpancakes: has joined #RubyOnRails
[06:27:24] armyriad: has joined #RubyOnRails
[06:34:47] gusrub: has joined #RubyOnRails
[06:35:20] v|sh: has joined #RubyOnRails
[06:46:32] armyriad: has joined #RubyOnRails
[07:03:00] brent__: has joined #RubyOnRails
[07:12:43] bronson: has joined #RubyOnRails
[07:16:11] cam27: has joined #RubyOnRails
[07:16:49] irishfromua: has joined #RubyOnRails
[07:21:26] romeoh: has joined #RubyOnRails
[07:22:11] pLaTo0n: has joined #RubyOnRails
[07:31:23] jaequery: has joined #RubyOnRails
[07:48:12] patarr: has joined #RubyOnRails
[07:51:53] romeoh: has joined #RubyOnRails
[07:52:33] lxsameer: has joined #RubyOnRails
[07:53:04] v|sh: has joined #RubyOnRails
[08:03:24] marr: has joined #RubyOnRails
[08:27:10] hotpancakes: has joined #RubyOnRails
[08:43:46] Qchmqs: has joined #RubyOnRails
[09:18:23] hotpancakes: has joined #RubyOnRails
[09:29:37] AzaToth: has joined #RubyOnRails
[09:39:56] romeoh: has joined #RubyOnRails
[09:48:59] patarr: has joined #RubyOnRails
[09:54:33] srinidhi: has joined #RubyOnRails
[09:59:09] Aytan72: has joined #RubyOnRails
[09:59:12] gambl0re: has joined #RubyOnRails
[10:00:43] mostlybadfly: has joined #RubyOnRails
[10:42:32] platoon23: has joined #RubyOnRails
[10:51:00] mikecmpbll: has joined #RubyOnRails
[10:55:24] wethu: has joined #RubyOnRails
[11:00:50] brent__: has joined #RubyOnRails
[11:28:39] romeoh: has joined #RubyOnRails
[11:40:35] irishfromua: has joined #RubyOnRails
[11:47:53] xco: has left #RubyOnRails: ()
[11:49:53] patarr: has joined #RubyOnRails
[11:52:06] quazimodo: has joined #RubyOnRails
[11:56:59] hotpancakes: has joined #RubyOnRails
[12:15:21] kristofferR: has joined #RubyOnRails
[12:21:19] arBmind: has joined #RubyOnRails
[12:22:14] uks: has joined #RubyOnRails
[12:24:42] mikecmpbll: has joined #RubyOnRails
[12:32:37] andywww: has joined #RubyOnRails
[12:32:57] irishfromua: has joined #RubyOnRails
[12:33:30] andywww: n00b question, whats a better way of assigning a value to an attribute after modifying it in a before filter?
[12:33:34] andywww: self.assign_attributes(screen_name: CGI.unescapeHTML(screen_name))
[12:33:43] andywww: feels a bit clunky
[12:36:56] andywww: ah, nvm self.screen_name =
[12:37:00] Jameser: has joined #RubyOnRails
[12:37:03] andywww: has left #RubyOnRails: ()
[12:45:20] hotpancakes: has joined #RubyOnRails
[12:48:01] patarr: has joined #RubyOnRails
[12:59:08] fernandomm: has joined #RubyOnRails
[13:01:21] romeoh: has joined #RubyOnRails
[13:22:37] brent__: has joined #RubyOnRails
[13:25:26] ikoma: has joined #RubyOnRails
[13:29:17] timotei: has joined #RubyOnRails
[13:31:44] Fernando-Basso: has joined #RubyOnRails
[13:32:37] Jameser: has joined #RubyOnRails
[13:34:11] User458764: Can someone explain me how does method authenticate works? where do I pass credentials?http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Basic.html#method-i-authenticate
[13:34:52] HoierM: has joined #RubyOnRails
[13:39:30] srinidhi: has joined #RubyOnRails
[13:43:59] hotpancakes: has joined #RubyOnRails
[13:46:08] hotpancakes: has joined #RubyOnRails
[13:46:55] quirkycoders: has joined #RubyOnRails
[13:48:46] quirkycoders: has joined #RubyOnRails
[13:49:44] User458764: Otherwise do you know a good tutorial for implementing authentication with Rails?
[14:01:10] lxsameer: has joined #RubyOnRails
[14:09:38] pulkit4tech: has joined #RubyOnRails
[14:20:13] DLSteve: has joined #RubyOnRails
[14:20:26] big|bad|wolf: has joined #RubyOnRails
[14:39:26] hotpancakes: has joined #RubyOnRails
[14:47:39] irishfromua: has joined #RubyOnRails
[14:49:17] quirkycoders: has joined #RubyOnRails
[14:50:37] pavelz: i am gettng spring error. how can i get rid of it? undefined method `spring' for #<ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition
[14:52:04] hotpancakes: has joined #RubyOnRails
[15:02:01] netzfisch: has joined #RubyOnRails
[15:06:22] Technodrome: has joined #RubyOnRails
[15:09:29] armyriad: has joined #RubyOnRails
[15:14:31] pavelz: sorry silly mistake
[15:18:00] arBmind: has joined #RubyOnRails
[15:18:28] hotpancakes: has joined #RubyOnRails
[15:23:26] dps: has joined #RubyOnRails
[15:32:49] irishfromua: has joined #RubyOnRails
[15:34:03] irishfromua: has joined #RubyOnRails
[15:34:12] TinkerTyper: has joined #RubyOnRails
[15:46:04] brent__: has joined #RubyOnRails
[15:47:45] cam27: has joined #RubyOnRails
[15:48:00] cam27: has joined #RubyOnRails
[15:51:48] quirkycoders: has joined #RubyOnRails
[15:53:00] rodrigovlds_: has joined #RubyOnRails
[16:13:54] netzfisch: has joined #RubyOnRails
[16:17:50] FernandoBasso: has joined #RubyOnRails
[16:19:21] hotpancakes: has joined #RubyOnRails
[16:28:35] hotpancakes: has joined #RubyOnRails
[16:31:38] hotpancakes: has joined #RubyOnRails
[16:34:47] Technodrome: has joined #RubyOnRails
[16:36:12] User458764: When I create a user fixture with a username and password and debug, the record has no password_digest what do I have to do?
[16:38:19] hotpancakes: has joined #RubyOnRails
[16:41:27] hotpancakes: has joined #RubyOnRails
[16:54:39] arBmind: has joined #RubyOnRails
[16:58:23] fredolinhares: has joined #RubyOnRails
[17:06:38] irishfromua: has joined #RubyOnRails
[17:26:41] rakm: has joined #RubyOnRails
[17:30:09] DoctorMonocular: has joined #RubyOnRails
[17:39:08] hotpancakes: has joined #RubyOnRails
[17:49:44] hotpancakes: has joined #RubyOnRails
[18:01:04] brent__: has joined #RubyOnRails
[18:09:55] carlosd: has joined #RubyOnRails
[18:12:52] carlosd: when doing a model1.model2_has_many_associations.create and raising ActiveRecord::Rollback in Model2 should trigger a database rollback, right?
[18:15:50] carlosd: I had to invert my creating logic to `Model2.create(model1: model1)` for the database trigger a rollback
[18:21:01] rodrigovlds: has joined #RubyOnRails
[18:26:02] hotpancakes: has joined #RubyOnRails
[18:39:13] DarkBushido: has joined #RubyOnRails
[18:43:25] netzfisch: has joined #RubyOnRails
[18:47:05] hotpancakes: has joined #RubyOnRails
[18:48:33] User458764: I raised this exception BCrypt::Errors::InvalidHash Exception: invalid hash when running a test. https://gist.github.com/gsorbier/058d39ec8832fd948c43a122d7123ead. I use has_secure_password but in the test the attribute password_digest is nil, can someone help me?
[19:14:34] hotpancakes: has joined #RubyOnRails
[19:14:34] arBmind: has joined #RubyOnRails
[19:19:59] quirkycoders: has joined #RubyOnRails
[19:22:55] hotpancakes: has joined #RubyOnRails
[19:54:33] hotpancakes: has joined #RubyOnRails
[19:59:29] hndk: has joined #RubyOnRails
[20:03:20] blackmesa: has joined #RubyOnRails
[20:15:24] quirkycoders: has joined #RubyOnRails
[20:34:09] quirkycoders: has joined #RubyOnRails
[20:43:25] catbusters: has joined #RubyOnRails
[20:51:33] hotpancakes: has joined #RubyOnRails
[20:59:15] Technodrome: has joined #RubyOnRails
[21:02:03] hotpancakes: has joined #RubyOnRails
[21:22:11] hotpancakes: has joined #RubyOnRails
[21:26:42] mjora7: has joined #RubyOnRails
[21:27:46] hotpancakes: has joined #RubyOnRails
[21:43:34] Dysp: has joined #RubyOnRails
[21:44:28] Dysp: Hey! I am trying to build a quiz. I have a problem when you spam answers. I don't know how to fix it. I've read that some javascript could help out, but I am a complete novice in javascript. Is there any rails magic I could apply? Or is it easily fixed?
[21:44:30] Dysp: https://studmed.herokuapp.com/quizzes/show
[21:45:30] rodrigovlds: has joined #RubyOnRails
[21:46:29] havenwood: Dysp: Say more about the problem?
[21:46:56] havenwood: Dysp: Ah, you can click the button multiple times?
[21:47:14] Dysp: Yes, that is probably the correct way of describing it
[21:48:28] havenwood: Dysp: Check the docs for a :disable_with option. Here's an example with #button_tag: http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-button_tag
[21:49:24] Dysp: Yeah. I tried to read up on it, but I couldn't really understand it. The difference between link_to do {} end and just link_to is confusing to me.
[21:49:51] Dysp: I got <%= link_to action: 'check_answer', answer: illness do %> at the moment. How would I pass that option correctly?
[21:50:32] Dysp: I'm also trying to use it on a div, if that does a difference.
[21:52:25] havenwood: Dysp: Maybe try #button_to, there's an example with a :disable_with in the docs: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-button_to
[21:52:57] havenwood: Dysp: Though I'm not sure why :disable_with isn't working with your link_to, are you using it?
[21:52:58] Dysp: Okay, I will play around with it.
[21:53:18] Dysp: I don't understand how to pass the option correctly, I think
[21:53:32] havenwood: , disable_with: '...'
[21:53:43] havenwood: inside data:
[21:53:52] havenwood: I said that badly, lemme try again.
[21:54:08] havenwood: Dysp: link_to ..., data: { disable_with:
[21:54:58] havenwood: Dysp: Check the docs for #button_tag or #button_to, since the usage is the same for #link_to.
[21:55:02] Dysp: When I do it, I get http://localhost:3000/quizzes/check_answer?answer=17&data%5Bdisable_with%5D=... as the link
[21:55:41] Dysp: https://gist.github.com/Dysp/72cd91c9fe228048f078edb212c1ebb3
[21:55:51] Dysp: This is how I try to do it.
[21:56:41] havenwood: Dysp: Maybe a browser quirk that it doesn't work? I'd suggest trying #button_to.
[22:06:15] fernandomm: has joined #RubyOnRails
[22:09:39] bronson: has joined #RubyOnRails
[22:23:16] Technodrome: has joined #RubyOnRails
[22:32:19] mjora7: has joined #RubyOnRails
[22:36:44] Tempesta: has joined #RubyOnRails
[22:38:53] nahtnam: has joined #RubyOnRails
[22:45:11] jaequery: has joined #RubyOnRails
[23:02:08] hndk: has joined #RubyOnRails
[23:07:12] rodrigovlds: has joined #RubyOnRails
[23:11:24] quazimodo: has joined #RubyOnRails
[23:21:53] mjora7: Are there any definitive (and up to date) Rails learning resources that will take me from 0 knowledge (about Rails) to a fully fledged app?
[23:23:46] blackmesa: has joined #RubyOnRails
[23:31:55] bronson: has joined #RubyOnRails
[23:33:55] romeoh: has joined #RubyOnRails
[23:56:40] baweaver: Rails 4 in Action will, but it's one version behind. Realistically that matters very little though
[23:56:52] baweaver: I've not read any of the other recent books
[23:57:06] baweaver: The Rails 5 Way isn't a complete tutorial, it's a Tome style reference