« Back to channel list

#RubyOnRails - 21 July 2016

« Back 1 day Forward 1 day »
[00:00:00] artto: has joined #RubyOnRails
[00:00:56] n90b0jjf: hey what is the proper way to update an object/factory in an rspec/factoryGirl file? (i.e not using update_attribute etc.)
[00:01:13] n90b0jjf: (when you're checking for persisted updates)
[00:02:10] Oliphaunte: has joined #RubyOnRails
[00:03:23] vjacob: has joined #RubyOnRails
[00:04:01] DoctorMonocular: has joined #RubyOnRails
[00:04:11] vjacob: has joined #RubyOnRails
[00:06:07] mostlybadfly: has joined #RubyOnRails
[00:09:10] moeabdol3: has joined #RubyOnRails
[00:11:24] Radar: n90b0jjf: I don't understand the question.
[00:12:44] maxdoubt: has joined #RubyOnRails
[00:13:52] SirOliver: has joined #RubyOnRails
[00:14:33] abhinavmehta: has joined #RubyOnRails
[00:15:59] maxdoubt: has joined #RubyOnRails
[00:16:12] apotry: has joined #RubyOnRails
[00:19:57] maxdoubt: has joined #RubyOnRails
[00:20:27] rickmasta: has joined #RubyOnRails
[00:20:58] DoiDoi7: has joined #RubyOnRails
[00:21:30] syndikate: has joined #RubyOnRails
[00:30:23] macsteps: has joined #RubyOnRails
[00:30:56] jheathco: has joined #RubyOnRails
[00:31:36] maxdoubt: has joined #RubyOnRails
[00:35:58] wethu: has joined #RubyOnRails
[00:36:41] chipotle: has joined #RubyOnRails
[00:37:27] zacts: has joined #RubyOnRails
[00:37:52] SirOliver: has joined #RubyOnRails
[00:39:24] fernandomm: has joined #RubyOnRails
[00:40:25] ProofTechnique: Is there a nice way to have the name of a resource be displayed in a form field, but actually send the id to the backend? I'm trying to get autocompletion with searchkick and typeahead but not have to expose bare ids to users.
[00:40:36] jenrzzz: has joined #RubyOnRails
[00:43:10] ProofTechnique: I'm currently demoing it in a very ugly way by just having the controller look up the resource by name, but there will inevitably be name clashes, so I want something more robust
[00:44:11] douglascorrea: has joined #RubyOnRails
[00:44:32] ss_much: has joined #RubyOnRails
[00:49:16] maxdoubt: has joined #RubyOnRails
[00:49:48] fryguy: prooftechnique: use a hidden field
[00:50:43] amperry: has joined #RubyOnRails
[00:51:23] ProofTechnique: fryguy: Oh, duh. That's sensible
[00:52:48] superlou: has joined #RubyOnRails
[00:52:56] amperry: I'm wondering if the 'wicked' gem is right for my needs and ADHD-scanning the docs and google, I can't determine if it handles multiple different models, so I could create a wizard to (in my case) add a Ledger entry if one of my Residents changes Apartments. Anyone know if this is often done?
[00:53:20] jhack: has joined #RubyOnRails
[00:57:02] chipotle: has joined #RubyOnRails
[00:57:10] Devalo: has joined #RubyOnRails
[00:58:13] chipotle: has joined #RubyOnRails
[01:02:16] amperry: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[01:03:56] glasz_: has joined #RubyOnRails
[01:05:09] abhinavmehta: has joined #RubyOnRails
[01:05:12] yfeldblum: has joined #RubyOnRails
[01:08:11] chipotle: has joined #RubyOnRails
[01:09:34] pur3eval: has joined #RubyOnRails
[01:12:07] NeilCarvalho: has joined #RubyOnRails
[01:13:00] cleopatra: has joined #RubyOnRails
[01:13:23] l4v2: has joined #RubyOnRails
[01:13:32] n90b0jjf: has joined #RubyOnRails
[01:13:40] banisterfiend: anyone here familiar with puma? how do i turn off the worker timeout? (for local development so i can debug during a request without the puma worker being killed)
[01:15:22] fryguy: banisterfiend: does "worker_timeout: 0" do what you want?
[01:16:38] wd40s: has joined #RubyOnRails
[01:16:50] banisterfiend: fryguy no, that times them out immediately
[01:17:08] banisterfiend: (just checked)
[01:17:58] n90b0jjf: Radar: with rspec/factoryGirl, when messing with a factory in a spec, what is the best way to change an attribute so that it will 'persist', is it just making an instance setting the attribute and .save, .update_attribute(s), etc.
[01:18:44] gopz: has joined #RubyOnRails
[01:18:46] hastur: has joined #RubyOnRails
[01:19:45] gopz: Has anyone every gotten a 400 error back with 200 response header? It's coming through via an ajax request, the error text reports to be 400 but the status is 200
[01:19:51] Radar: n90b0jjf: !rule0
[01:19:51] helpa: n90b0jjf: 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.
[01:21:34] gopz: Radar: I don't really have anything to show, there's nothing in the logs about a 400 at that time, I'm not sure what else would be of value
[01:21:44] Coldblackice: has joined #RubyOnRails
[01:21:46] Radar: gopz: I didn't direct my message at you.
[01:21:58] gopz: Radar: oh sorry
[01:22:24] Axsuul: has joined #RubyOnRails
[01:24:03] sevenseacat: has joined #RubyOnRails
[01:24:51] rafaelflores: has joined #RubyOnRails
[01:25:17] maxdoubt: has joined #RubyOnRails
[01:27:11] n90b0jjf: Radar: I think im ok for this second, thanks for telling me rule0! ;)
[01:29:14] pawnbox: has joined #RubyOnRails
[01:29:14] daffy_duck: has joined #RubyOnRails
[01:30:31] DoctorMonocular: has joined #RubyOnRails
[01:31:11] A_Drone: has joined #RubyOnRails
[01:31:57] Oliphaunte: has joined #RubyOnRails
[01:33:34] Ropeney: has joined #RubyOnRails
[01:36:06] rafaelflores: has joined #RubyOnRails
[01:36:52] xall: has joined #RubyOnRails
[01:36:54] abhinavmehta: has joined #RubyOnRails
[01:36:59] wd40s: has joined #RubyOnRails
[01:37:05] Axilla: has joined #RubyOnRails
[01:38:02] neilvilela: has joined #RubyOnRails
[01:38:24] dunpeal: has joined #RubyOnRails
[01:40:13] rafaelflores: has joined #RubyOnRails
[01:40:15] jheathco: has joined #RubyOnRails
[01:42:06] Hobogrammer: has joined #RubyOnRails
[01:44:25] Mia: has joined #RubyOnRails
[01:44:25] Mia: has joined #RubyOnRails
[01:45:28] Rodya_: has joined #RubyOnRails
[01:49:45] maxdoubt: has joined #RubyOnRails
[01:49:53] rafaelflores: has joined #RubyOnRails
[01:53:57] blackmesa: has joined #RubyOnRails
[01:56:47] sarink: has joined #RubyOnRails
[02:01:17] pawnbox: has joined #RubyOnRails
[02:01:24] jiblet: has left #RubyOnRails: ()
[02:02:33] yoongkang: has joined #RubyOnRails
[02:03:07] GoranPavlovic: has joined #RubyOnRails
[02:08:36] SteenJobs: has joined #RubyOnRails
[02:10:17] A_Drone: has joined #RubyOnRails
[02:12:16] SteenJobs: has joined #RubyOnRails
[02:14:06] maxdoubt: has joined #RubyOnRails
[02:16:40] dionysus69: has joined #RubyOnRails
[02:22:46] cleopatra: hello people :)
[02:22:53] hastur: has joined #RubyOnRails
[02:24:41] Oliphaunte: has joined #RubyOnRails
[02:33:21] rubyonrails572: has joined #RubyOnRails
[02:34:42] _Tariq: has joined #RubyOnRails
[02:34:46] pawnbox: has joined #RubyOnRails
[02:35:07] one_zero_i: has joined #RubyOnRails
[02:39:01] adre: has joined #RubyOnRails
[02:39:34] rafaelfranca: has joined #RubyOnRails
[02:39:37] pawnbox_: has joined #RubyOnRails
[02:45:57] Ropeney: has joined #RubyOnRails
[02:49:22] rafaelflores: has joined #RubyOnRails
[02:53:56] epitron: has joined #RubyOnRails
[02:54:05] tego101: has joined #RubyOnRails
[02:54:57] n90b0jjf: has joined #RubyOnRails
[02:56:31] yunior: has joined #RubyOnRails
[02:56:33] rafaelflores: has joined #RubyOnRails
[02:56:55] blackmesa: has joined #RubyOnRails
[02:57:28] sarink: has joined #RubyOnRails
[02:58:40] yunior: how want to implement the simplest deployment i can to a single instance in AWS
[02:58:51] yunior: i was trying with ngnix
[02:59:01] yunior: and passenger and using git hooks
[02:59:09] yunior: but is not working well
[02:59:48] yunior: when the git hooks script runs i get many error when is executing bundle and rake
[02:59:54] yunior: what do you advice me?
[03:01:16] _Tariq: has joined #RubyOnRails
[03:04:11] n90b0jjf: has joined #RubyOnRails
[03:05:17] artto: has joined #RubyOnRails
[03:06:47] Mia: has joined #RubyOnRails
[03:06:47] Mia: has joined #RubyOnRails
[03:11:30] padi: has joined #RubyOnRails
[03:13:21] n90b0jjf: has joined #RubyOnRails
[03:14:59] quazimodo: has joined #RubyOnRails
[03:15:03] quazimod1: has joined #RubyOnRails
[03:18:02] hastur: has joined #RubyOnRails
[03:18:34] Jayson_Virissimo: has joined #RubyOnRails
[03:20:06] sevenseacat: fix the errors
[03:20:32] Devalo: has joined #RubyOnRails
[03:20:56] k3rn31: has joined #RubyOnRails
[03:20:58] _Tariq: has joined #RubyOnRails
[03:22:27] n90b0jjf: has joined #RubyOnRails
[03:28:27] andrecastelo: has joined #RubyOnRails
[03:28:49] A_Drone: has joined #RubyOnRails
[03:29:52] epitron: has joined #RubyOnRails
[03:30:51] andrecastelo: hey can someone help me with a Passenger + Apache issue? passenger says everything works, but isn't serving any apps
[03:32:38] andrecastelo: related hastebin: http://hastebin.com/onitihaden.cs
[03:35:15] epitron: has joined #RubyOnRails
[03:36:12] n90b0jjf: has joined #RubyOnRails
[03:38:19] pwnd_nsfw`: andrecastelo, what happens when you try to visit your application?
[03:38:43] padi: has joined #RubyOnRails
[03:39:53] andrecastelo: pwnd_nsfw`: on api.mysite.com, which I have no routes for, I'm redirected to another site of mine (hosting more than one on the same machine)
[03:40:23] andrecastelo: and api.mysite.com/contact, which I have a route configured, I'm redirected to the 404 apache page
[03:40:53] sevenseacat: have you explicitly enabled your site within apache? i think it's a2ensite something or other
[03:41:11] andrecastelo: it says it's already enabled
[03:43:32] andrecastelo: sevenseacat: tried disabling, reloading apache, enabling and reloading again just in case
[03:45:36] n90b0jjf: has joined #RubyOnRails
[03:46:43] baash05: has joined #RubyOnRails
[03:46:55] baash05: Hey guys/girls.
[03:48:48] baash05: Conversational style question. I've got a test suite that's taking over 40 minutes to run.. I was wondering what some strategies you've all used to mitigate these.
[03:49:11] sevenseacat: make the tests faster.
[03:49:44] baash05: Oh snap. :)
[03:50:12] evansbee: ugh, 40 minutes
[03:50:20] baash05: over that..
[03:50:24] evansbee: are there duplicate tests
[03:50:31] evansbee: or rather mutliple tests that overlap functionality
[03:51:30] baash05: If I start it when I get on the bus, it won't finish before I get off the bus.
[03:53:23] baash05: We write TDD so I don't think there's overlap.
[03:55:15] jenrzzz: has joined #RubyOnRails
[03:55:59] xall_: has joined #RubyOnRails
[03:56:00] EvilEpoch: has joined #RubyOnRails
[03:56:06] EvilEpoch: Warm Greetings to all, I am The EvilEpoch.
[03:56:30] baash05: I was thinking of breaking the app into engines or gems..
[03:56:35] baash05: But it seems extream.
[03:56:41] sevenseacat: warm greetings to The EvilEpoch from sevenseacat, how has The EvilEpoch been doing?
[03:56:52] EvilEpoch: Greetings to sevenseacat from The EvilEpoch.
[03:56:55] baash05: He's just getting started.
[03:56:58] EvilEpoch: The EvilEpoch is splendid.
[03:59:35] sarink: has joined #RubyOnRails
[03:59:42] Mirubiri: has joined #RubyOnRails
[03:59:58] blackmesa: has joined #RubyOnRails
[04:03:30] AmiMoench: has joined #RubyOnRails
[04:04:59] jishankai: has joined #RubyOnRails
[04:05:08] conta: has joined #RubyOnRails
[04:15:44] xall_: has joined #RubyOnRails
[04:16:12] arreis: has joined #RubyOnRails
[04:17:00] arreis: Hello Everyone, I'm trying to make a simple ERD for a User Course Role relationtship, I mean that i want users to be able to both join and create courses but I just don't know how to illustrate it. Can anyone help me? I made this sample ERD @ lucidchart
[04:17:11] arreis: https://www.lucidchart.com/invitations/accept/338dd623-ea89-48a5-941e-87ec0105290b
[04:19:41] epitron: has joined #RubyOnRails
[04:22:01] Rodya_: has joined #RubyOnRails
[04:23:10] n90b0jjf: has joined #RubyOnRails
[04:24:22] alfiemax: has joined #RubyOnRails
[04:24:39] pawnbox: has joined #RubyOnRails
[04:26:43] roamingdog: has joined #RubyOnRails
[04:30:57] DoctorMonocular: has joined #RubyOnRails
[04:31:05] k3rn31: has joined #RubyOnRails
[04:33:07] pawnbox: has joined #RubyOnRails
[04:36:41] pawnbox: has joined #RubyOnRails
[04:43:04] n90b0jjf: has joined #RubyOnRails
[04:43:05] A_Drone: has joined #RubyOnRails
[04:44:50] beilabs: has joined #RubyOnRails
[04:45:33] hahuang61: has joined #RubyOnRails
[04:56:39] n90b0jjf: has joined #RubyOnRails
[04:59:54] dminuoso: has joined #RubyOnRails
[05:00:02] dgs: has joined #RubyOnRails
[05:00:32] crdpink: has joined #RubyOnRails
[05:01:06] dgs: bit of a weird question, but is 300 controllers and 320 models abnormally large for a rails app?
[05:01:18] wmoxam: 99 bottles of OOP is fun so far 👌
[05:01:30] sevenseacat: wmoxam: oh thanks for the reminder, I was going to pick that up
[05:01:47] wmoxam: dgs: it's large, I wouldn't call it abnormal
[05:02:26] EvilEpoch: Greetings to wmoxam from The EvilEpoch.
[05:02:32] wmoxam: sevenseacat: 20% discount if you get it today
[05:02:39] dgs: wmoxam: ok. ta
[05:02:46] wmoxam: Warm greetings to you as well EvilEpoch
[05:04:17] n90b0jjf: has joined #RubyOnRails
[05:06:27] sevenseacat: *goes to purchase and notices no ssl...?
[05:07:30] Rodya_: has joined #RubyOnRails
[05:08:50] beilabs_: has joined #RubyOnRails
[05:09:14] n90b0jjf: has joined #RubyOnRails
[05:09:27] wmoxam: sevenseacat: I get ssl ...
[05:09:46] sevenseacat: yeah there seems to be ssl on the popup but not on the site itself
[05:09:48] l4v2: has joined #RubyOnRails
[05:09:58] sevenseacat: still, that kinda encourages dodginess
[05:10:34] wmoxam: the link in the email took me to https://sandimetz.dpdcart.com/
[05:11:05] hd1: has joined #RubyOnRails
[05:11:07] sevenseacat: ah right, I was going from http://www.sandimetz.com/99bottles :)
[05:11:19] sevenseacat: all good *purchasing from dpdcart directly
[05:11:44] hd1: is acts_as_votable usable without devise or should I just have the one user logged in automatically?
[05:11:58] dgs: has left #RubyOnRails: ()
[05:13:27] blackmesa: has joined #RubyOnRails
[05:14:55] sevenseacat: i dont know what acts_as_votable would have to do with devise specifically
[05:16:06] mwcmitchell: has joined #RubyOnRails
[05:16:13] zacts: has joined #RubyOnRails
[05:17:05] cheeti: has joined #RubyOnRails
[05:17:27] hd1: has joined #RubyOnRails
[05:18:00] moeabdol3: has joined #RubyOnRails
[05:19:24] cheeti: Hi is this possible to edit the role of the devise usere using rolify? UsersRoles.update(:role_id => 3) giving NameError (uninitialized constant EditrolesController::UsersRoles) error
[05:19:54] sevenseacat: UsersRoles makes no sense
[05:20:01] sevenseacat: you don't have a class called that
[05:22:27] alfiemax: has joined #RubyOnRails
[05:22:53] n90b0jjf: has joined #RubyOnRails
[05:25:21] lxsameer: has joined #RubyOnRails
[05:26:14] alfiemax: i've a rails+angular app running in an aws ec2 instance with 1GB ram
[05:26:52] alfiemax: but when i try to deploy it now(using mina) during the asset precompilation everything just froze
[05:26:55] DoctorMonocular: has joined #RubyOnRails
[05:27:00] alfiemax: i can't even ssh into the server anymore
[05:27:11] alfiemax: ssh_exchange_identification: read: Connection reset by peer
[05:27:28] alfiemax: this is the error i get, which i understand is because the server isn't responding
[05:27:55] alfiemax: would i have to upgrade the server and provide more memory?
[05:31:24] jenrzzz: has joined #RubyOnRails
[05:32:29] n90b0jjf: has joined #RubyOnRails
[05:33:49] arBmind: has joined #RubyOnRails
[05:37:32] abhinav: has joined #RubyOnRails
[05:39:02] Radar: alfiemax: !try
[05:39:02] helpa: alfiemax: Why don't you try it and find out for yourself?
[05:39:05] Radar: alfiemax: Very likely, I would think.
[05:39:41] alfiemax: i need to be sure before i propose the idea to my client
[05:40:21] Radar: and double the hosting bill from $10 to $20 a month?
[05:40:33] sevenseacat: some clients would totally bitch at that
[05:40:44] sevenseacat: even though you're charging them much more (I hope) for your time
[05:41:02] dragon9783: has joined #RubyOnRails
[05:41:07] Ropeney: alfiemax, precompile on your machine and put it up there.
[05:44:00] alfiemax: Ropeney, i dnt think that's a good solution :D
[05:44:35] Ropeney: alfiemax, well when your being on the cheap your gunna have to sacrifice luxuries of "good" :)
[05:44:42] alfiemax: everytime i need to deploy(very frequently) i'd have to go through this, even if i write a script for it, there wold be network delay
[05:44:59] Ropeney: make a commit hook that does it
[05:45:24] alfiemax: going to talk to the client, lets see if he agrees
[05:46:50] moeabdol3: has joined #RubyOnRails
[05:48:10] rickmasta: has joined #RubyOnRails
[05:48:14] Dimik--: has joined #RubyOnRails
[05:48:30] rafaelfranca: has joined #RubyOnRails
[05:48:37] xall_: has joined #RubyOnRails
[05:49:25] abhinav: has joined #RubyOnRails
[05:50:51] n90b0jjf: has joined #RubyOnRails
[05:51:11] rafaelflores: has joined #RubyOnRails
[05:53:25] jishankai: has joined #RubyOnRails
[05:56:01] gregf_: has joined #RubyOnRails
[06:00:04] n90b0jjf: has joined #RubyOnRails
[06:01:59] sevenseacat: spend $50 bucks on a book and then 'btw, you have to generate your own kindle book if you want one'
[06:02:37] zotherstupidguy: has joined #RubyOnRails
[06:04:58] sar1nk: has joined #RubyOnRails
[06:05:56] Hyuk: has joined #RubyOnRails
[06:07:00] ur5us: has joined #RubyOnRails
[06:08:05] dminuoso: has joined #RubyOnRails
[06:09:20] Cohedrin: has joined #RubyOnRails
[06:10:12] roamingdog: has joined #RubyOnRails
[06:12:39] hd1: has joined #RubyOnRails
[06:14:58] moeabdol3: has joined #RubyOnRails
[06:16:28] blackmesa: has joined #RubyOnRails
[06:16:48] moeabdol: has joined #RubyOnRails
[06:18:29] dunpeal: has joined #RubyOnRails
[06:21:04] yfeldblum: has joined #RubyOnRails
[06:22:28] yfeldblum: has joined #RubyOnRails
[06:22:35] jishankai: has joined #RubyOnRails
[06:24:59] dminuoso_: has joined #RubyOnRails
[06:25:07] abhinav: has joined #RubyOnRails
[06:29:11] gc: has joined #RubyOnRails
[06:30:22] aganov: has joined #RubyOnRails
[06:31:25] roamingdog: has joined #RubyOnRails
[06:31:30] Devalo: has joined #RubyOnRails
[06:35:27] conta: has joined #RubyOnRails
[06:35:31] zacts: has joined #RubyOnRails
[06:36:25] n90b0jjf: has joined #RubyOnRails
[06:39:29] xall_: has joined #RubyOnRails
[06:39:40] bazzy: has joined #RubyOnRails
[06:40:15] adre: has joined #RubyOnRails
[06:41:44] yardenbar: has joined #RubyOnRails
[06:44:06] ur5us: has joined #RubyOnRails
[06:45:48] n90b0jjf: has joined #RubyOnRails
[06:47:50] creature: has joined #RubyOnRails
[06:47:51] creature: has joined #RubyOnRails
[06:48:17] rickmasta: has joined #RubyOnRails
[06:50:13] jenrzzz: has joined #RubyOnRails
[06:51:01] dminuoso: has joined #RubyOnRails
[06:52:35] padi: has joined #RubyOnRails
[06:53:06] Devalo: has joined #RubyOnRails
[06:53:09] zacts: has joined #RubyOnRails
[06:54:07] xibalba: has joined #RubyOnRails
[06:54:41] finnnnnnnnnnn_: has joined #RubyOnRails
[06:55:04] abhinavmehta: has joined #RubyOnRails
[06:56:31] k3rn31: has joined #RubyOnRails
[06:59:07] Coldblackice_: has joined #RubyOnRails
[06:59:11] dminuoso: has joined #RubyOnRails
[06:59:27] n90b0jjf: has joined #RubyOnRails
[07:03:33] dionysus69: has joined #RubyOnRails
[07:04:02] ur5us: has joined #RubyOnRails
[07:05:39] fernandomm: has joined #RubyOnRails
[07:05:45] sarink: has joined #RubyOnRails
[07:08:41] n90b0jjf: has joined #RubyOnRails
[07:10:07] epitron: has joined #RubyOnRails
[07:11:03] rickmasta: has joined #RubyOnRails
[07:11:06] TomyWork: has joined #RubyOnRails
[07:11:53] xall_: has joined #RubyOnRails
[07:13:49] darutoko: has joined #RubyOnRails
[07:14:42] Macaveli: has joined #RubyOnRails
[07:15:37] qejk: has joined #RubyOnRails
[07:18:01] n90b0jjf: has joined #RubyOnRails
[07:19:32] blackmesa: has joined #RubyOnRails
[07:20:44] epitron: has joined #RubyOnRails
[07:22:00] antgel: has joined #RubyOnRails
[07:23:52] cheeti: Hi is this possible to edit the role of the devise usere using rolify? UsersRoles.update(:role_id => 3) giving NameError (uninitialized constant EditrolesController::UsersRoles) error
[07:24:23] dminuoso: Let's say you have a view "show" for a resource called "city". So I pass a city decorator to the view. Now my view shall also render a partial "street/index" that should list the collection of city.streets.
[07:24:40] sevenseacat: [13:19:54] sevenseacat: UsersRoles makes no sense
[07:24:40] sevenseacat: [13:20:01] sevenseacat: you don't have a class called that
[07:24:44] dminuoso: My question now is: Would you expose a decorator for that "street collection" through the city decorator, or have the controller provide for a second decorator?
[07:25:53] dminuoso: Until now I have strictly followed the rule, that once the controller passes control to the view, that all database queries need to be finished.
[07:26:02] apotry: has joined #RubyOnRails
[07:26:43] dminuoso: But I'm just questioning that practice for no reason other than I have never actually wondered whether it was a good approach.
[07:27:13] n90b0jjf: has joined #RubyOnRails
[07:27:23] dminuoso: And it does not feel like its my decorators job to initiate database queries either, even if its during initialization.
[07:28:14] cheeti: sevenseacat then how to update users roles?
[07:28:33] sevenseacat: use the classes and associations you actually have, not made up ones
[07:29:22] cheeti: sevenseacat we cant update users_roles table data?
[07:29:35] sevenseacat: yes, you can, via the models and associations you have
[07:29:45] beilabs: has joined #RubyOnRails
[07:29:53] sevenseacat: you cant just make up a class like UsersRoles and expect it to work
[07:30:08] cheeti: sevenseacat can you suggest some url i am new to this
[07:30:21] sevenseacat: http://guides.rubyonrails.org/association_basics.html
[07:30:30] abhinavmehta: has joined #RubyOnRails
[07:31:17] sevenseacat: I have been around much longer than that.
[07:32:33] n90b0jjf: has joined #RubyOnRails
[07:37:17] mark_66: has joined #RubyOnRails
[07:37:18] cheeti: sevenseacat we cant delete users_roles data also like UsersRoles.delete(:id => 1)
[07:37:22] artto: has joined #RubyOnRails
[07:37:38] sevenseacat: no, because you don't have a UsersRoles class.
[07:38:05] cheeti: sevenseacatthen how to delete can explain
[07:38:23] sevenseacat: did you check through the associations guide?
[07:39:10] cheeti: sevenseacat yes till yet i am not used associations that's why i am not getting
[07:39:27] sevenseacat: cheeti: so what models and associations do you have?
[07:39:34] sevenseacat: please gist your code
[07:40:00] siaw23: has joined #RubyOnRails
[07:40:25] jishankai: has joined #RubyOnRails
[07:40:28] cheeti: sevenseacat i am using rolify gem and devise users model
[07:40:40] sevenseacat: cheeti: please gist your code.
[07:42:16] Macaveli: has joined #RubyOnRails
[07:42:19] dminuoso: has joined #RubyOnRails
[07:45:47] Dimik--: has joined #RubyOnRails
[07:45:53] abhinavmehta: has joined #RubyOnRails
[07:46:42] cheeti: sevenseacat https://gist.github.com/mamatharao/6830e8fe27b5fdd2355fe2b63113208f
[07:47:12] sevenseacat: ... but what models and associations do you have? :/
[07:47:22] sevenseacat: thats the code I wanted to see, thats what I asked for
[07:48:16] edwinvdgraaf: has joined #RubyOnRails
[07:48:20] n90b0jjf: has joined #RubyOnRails
[07:49:17] wethu: has joined #RubyOnRails
[07:50:20] cheeti: sevenseacat schema that i sent to you
[07:50:29] cheeti: models that i have
[07:50:33] sevenseacat: I thought it was a pretty straightforward question
[07:51:19] cheeti: sevenseacat imin i will send all models gist
[07:51:34] sevenseacat: then maybe you'll find someone who can help you.
[07:53:49] cheeti: sevenseacat https://gist.github.com/mamatharao/435435c0a7485194320fd87d3b026df2
[07:54:08] cheeti: sevenseacat these are the models i have
[07:55:49] twinklerock: has joined #RubyOnRails
[07:55:53] cheeti: sevenseacat role.rb model have association
[07:56:03] cheeti: sevenseacat can you help me now
[07:56:18] pawnbox: has joined #RubyOnRails
[07:56:25] epitron: has joined #RubyOnRails
[07:57:30] abhinavmehta: has joined #RubyOnRails
[07:57:31] n90b0jjf: has joined #RubyOnRails
[08:00:50] cheeti: sevenseacat ??
[08:00:52] beilabs: has joined #RubyOnRails
[08:00:56] andywww: has joined #RubyOnRails
[08:01:19] sevenseacat: that someone will not be me after it took half an hour to get you to answer a simple quesation.
[08:01:25] rrawlins: has joined #RubyOnRails
[08:02:37] dionysus69: has joined #RubyOnRails
[08:02:58] roshanavand: has joined #RubyOnRails
[08:04:08] artto: has joined #RubyOnRails
[08:04:17] jhack: has joined #RubyOnRails
[08:04:36] rafaelflores: has joined #RubyOnRails
[08:05:00] cheeti: sevenseacat can you please it's urgent
[08:06:40] n90b0jjf: has joined #RubyOnRails
[08:06:42] tbuehlmann: don't pressure people in here, please. we don't get money for it
[08:06:49] tbuehlmann: also, if it's that urgent, get professional (paid) help
[08:07:56] siaw23: morning, in the console when i do something like notice.title (for a model where “notice” is a Notice object) i get a title. but my test is failing with “undefined method `title' for nil:NilClass” https://gist.github.com/siaw23/81df4e42be649380dc780daf5daf9e5a i need some help i believe the error is on this line https://gist.github.com/siaw23/81df4e42be649380dc780daf5daf9e5a#file-spec-rb-L37 where 'notice' is nil. but I am not
[08:07:56] siaw23: sure how to fix it. i want to get rid of this failure: https://gist.github.com/siaw23/81df4e42be649380dc780daf5daf9e5a#file-failure-txt
[08:08:21] arBmind: has joined #RubyOnRails
[08:10:17] conta: has joined #RubyOnRails
[08:11:36] tbuehlmann: siaw23: looks like @youtube_trademark_d_notice is nil, right?
[08:12:08] tbuehlmann: great, fix it and you're done
[08:12:09] siaw23: and @youtube_otherlegal_notice as well
[08:12:25] siaw23: hahaha i want to know how to fix it. i need help :p
[08:12:33] siaw23: i don’t know how to
[08:12:51] sevenseacat: you don't know how to define an instance variable?
[08:12:57] roshanavand: has joined #RubyOnRails
[08:13:15] tbuehlmann: I'd binding.pry at the line before the variable assignment and check what it returns
[08:13:46] tbuehlmann: then debug the issue why it's not returning what you're expecting it to return
[08:15:46] n90b0jjf: has joined #RubyOnRails
[08:15:57] beilabs: has joined #RubyOnRails
[08:18:33] adre: has joined #RubyOnRails
[08:20:49] roshanavand: has joined #RubyOnRails
[08:22:05] lizard2010: has joined #RubyOnRails
[08:23:54] blackmesa: has joined #RubyOnRails
[08:24:24] snowy: has joined #RubyOnRails
[08:24:54] siaw23: is my use of binding.pry correct? https://gist.github.com/siaw23/54130345db8d1b9b98c5a4648e873ff7#file-pry-rb-L38 because i’m not getting a return value, it’s just showing a section of my test file. nothing more. https://gist.github.com/siaw23/54130345db8d1b9b98c5a4648e873ff7#file-pry-rb-L38
[08:25:06] n90b0jjf: has joined #RubyOnRails
[08:27:21] tbuehlmann: you're using it right, you get a rails console at the point of execution and can look around
[08:27:31] tbuehlmann: but I would place it where the variable is assigned and check there
[08:28:53] r3vel: has joined #RubyOnRails
[08:29:19] marr: has joined #RubyOnRails
[08:31:16] sarink: has joined #RubyOnRails
[08:32:08] jarred: has joined #RubyOnRails
[08:32:26] AzaToth: has joined #RubyOnRails
[08:32:54] jarred: Can anyone help me figure out how to make this migration finish? It just hosed my site that had 900 active concurrent users on it...
[08:33:14] jarred: All it did was add one column to a ~70k row table. Postgres
[08:33:23] siaw23: i placed it here now https://gist.github.com/siaw23/54130345db8d1b9b98c5a4648e873ff7#file-pry-rb-L31 and then did this: https://gist.github.com/siaw23/54130345db8d1b9b98c5a4648e873ff7#file-console-txt and i see my @youtube_counterfeit_notice is nil
[08:33:32] r3vel: has left #RubyOnRails: ()
[08:34:10] sevenseacat: jarred: let us get our crystal balls out
[08:34:20] n90b0jjf: has joined #RubyOnRails
[08:34:29] sevenseacat: ACTION nods.
[08:34:34] jarred: add_column(:seens, :expires_at, :datetime)
[08:34:37] jarred: is the migration
[08:34:38] jarred: that's it
[08:34:50] padi: has joined #RubyOnRails
[08:34:54] sevenseacat: and what exactly does 'hosing your site' mean?
[08:35:25] jarred: database timeouts
[08:35:40] jarred: to like all the requests
[08:35:45] tbuehlmann: siaw23: that's a bad place for it
[08:35:50] sevenseacat: you're migrating and accessing the db at the same time?
[08:36:14] jarred: haha, well i guess i'm a newb
[08:36:29] sevenseacat: I hope not, if youre running a site that has hundreds of concurrent users
[08:36:32] tbuehlmann: put it right before `(@youtube_tradem ...`, then check what Trademark.order(:id) returns
[08:36:36] siaw23: tbuehlmann: oops. again? how do i know a good place to put it?
[08:36:47] tbuehlmann: as I said, just before the variable assignment
[08:36:59] alfiemax: has joined #RubyOnRails
[08:37:42] jarred: sevenseacat i am!!
[08:37:55] sevenseacat: thats rather sad.
[08:38:07] jarred: i built this like a week ago, i haven't had time for best practices really
[08:38:27] sevenseacat: and now you know why they're best practices, eh
[08:38:45] redasus: has joined #RubyOnRails
[08:38:57] apotry: has joined #RubyOnRails
[08:39:01] r3vDev: has joined #RubyOnRails
[08:39:12] tbuehlmann: redasus: das pferd frisst keinen gurkensalat
[08:39:19] redasus: English please
[08:40:05] sevenseacat: sprichst du Deutsch?
[08:40:47] siaw23: tbuehlmann: i place it here: https://gist.github.com/siaw23/54130345db8d1b9b98c5a4648e873ff7#file-pry-rb-L25 and i get and empty array when i do Trademark.order(:id)
[08:40:47] redasus: the horses does not eat cucumber salad ?
[08:40:59] tbuehlmann: see https://en.wikipedia.org/wiki/Reis_telephone
[08:41:41] tbuehlmann: siaw23: great! now check why it returns something you don't expect
[08:42:19] Diabolik: is it possible to order associations within a has and belongs to many relationship
[08:42:23] Diabolik: [with a join table
[08:42:53] redasus: Diabolik: why not ?
[08:43:13] Diabolik: i want to add a position column to the join table
[08:43:22] Diabolik: but idk if that's possible
[08:43:24] Diabolik: or advisable
[08:43:31] sevenseacat: not to the join table with a HABTM.
[08:43:31] Diabolik: im stuck with this HABTM table
[08:43:32] n90b0jjf: has joined #RubyOnRails
[08:43:42] Diabolik: so how would you do it sevenseacat
[08:43:52] sevenseacat: if you want to add data to the join, use has many through.
[08:44:06] Diabolik: im stuck with this for now...
[08:44:13] sevenseacat: no you're not
[08:44:29] siaw23: tbuehlmann: can you please give me a clue? on why it’s returning [], which i don’t expect?
[08:44:52] tbuehlmann: um, actually, no. you put that up
[08:45:13] sevenseacat: siaw23: you want us to diagnose a bug in your code for you?
[08:45:31] sevenseacat: without seeing it, with just seeing the test?
[08:45:34] tbuehlmann: why exactly do you do it the way it's done? what do you expect Trademark.order(:id) to return?
[08:45:37] siaw23: sevenseacat: nope. i want help
[08:45:43] sujith: has joined #RubyOnRails
[08:46:20] Diabolik: sevenseacat its impossible retaining the has and belongs to many?
[08:46:23] sevenseacat: siaw23: so why do you expect it to not be [] ?
[08:46:41] sevenseacat: Diabolik: if you want to add data to the join, use has many through.
[08:46:52] Diabolik: i just want to be able to reorder the associations
[08:46:54] sevenseacat: I don't get why one code change would be sacred but not another
[08:47:05] siaw23: tbuehlmann: i expect it to return an instance of a Notice model
[08:47:18] sevenseacat: siaw23: how? why?
[08:47:42] EvilEpoch: has joined #RubyOnRails
[08:47:42] siaw23: sevenseacat: because down in the test there’s “notice.title”. “title” is an attribute on a Notice model
[08:48:02] siaw23: which i can call and have a title (string) returned in rails console
[08:48:10] sevenseacat: what does "notice.title" have to do with an instance variable having a Notice instance?
[08:48:15] tbuehlmann: you expect Trademark.order(:id) to return 3 objects
[08:48:32] tbuehlmann: https://gist.github.com/siaw23/54130345db8d1b9b98c5a4648e873ff7#file-pry-rb-L25-L29
[08:48:32] sevenseacat: also, "down in the test" doesnt help with a 287-line test
[08:48:44] tbuehlmann: and it doesn't. so it's up to you to find out why it doesn't return 3 objects
[08:48:55] sujith_: has joined #RubyOnRails
[08:49:03] sujith_: has left #RubyOnRails: ()
[08:49:44] sujithss: has joined #RubyOnRails
[08:50:15] nyasha: has joined #RubyOnRails
[08:50:58] siaw23: sevenseacat: with “down in the test” i meant a line like https://gist.github.com/siaw23/54130345db8d1b9b98c5a4648e873ff7#file-pry-rb-L43
[08:51:27] sevenseacat: siaw23: that doesnt say anything about how or why that instance variable gets populated
[08:52:43] n90b0jjf: has joined #RubyOnRails
[08:53:14] padi: has joined #RubyOnRails
[08:54:02] tercenya: has joined #RubyOnRails
[08:59:34] tvw: has joined #RubyOnRails
[09:01:12] kitsuneyo: has joined #RubyOnRails
[09:01:47] n90b0jjf: has joined #RubyOnRails
[09:02:05] blackmesa: has joined #RubyOnRails
[09:02:29] ur5us: has joined #RubyOnRails
[09:09:56] pydave6367: has joined #RubyOnRails
[09:10:19] roamingdog: has joined #RubyOnRails
[09:10:57] n90b0jjf: has joined #RubyOnRails
[09:11:32] Zadrel: has joined #RubyOnRails
[09:11:57] yfeldblum: has joined #RubyOnRails
[09:13:38] dminuoso: Naming question, Ive been splitting my views into wrapper views and partials that can be reused from other views. These parials are currently named "_index_impl.html.haml" - would you name them differently?
[09:14:23] jhass: not sure I heard "wrapper views" before
[09:14:33] beilabs: has joined #RubyOnRails
[09:14:38] jhass: what do they do?
[09:14:48] blackhuey: has joined #RubyOnRails
[09:15:05] dminuoso: jhass: In this case the actual "index.html.haml" provides some basic framing and then renders the partial of that implementation.
[09:15:26] kitsuneyo: is this yaml guide out of date?: http://stackoverflow.com/questions/16324567/how-do-i-parse-yaml-into-a-hash-object
[09:15:26] jhass: so just _index.haml
[09:15:35] jhass: that'd be the rails convention, no?
[09:15:42] dminuoso: jhass: It feels a bit weird to have index.haml and _index.haml.
[09:15:53] jhass: I'd don't think so
[09:16:10] kitsuneyo: i need to learn how to load a yaml file as objects in a class, is there a good current guide for this? my google searches have turned up a lot of conflicting stuff
[09:16:23] dminuoso: jhass: In a sense this _impl thing is just a habit I picked up from in C++.
[09:16:34] jhass: dminuoso: alternatively name them after the model? posts/index.html.haml posts/_posts.haml
[09:17:20] adre: has joined #RubyOnRails
[09:17:46] dminuoso: jhass: That would leave me with both posts/_post.haml and posts/_posts.haml if I needed the show logic too, which again feels weird.
[09:18:08] jhass: ah I don't think it does :)
[09:18:09] dminuoso: But then again when I say weird, I just mean "Im not used to it"
[09:18:16] jhass: less weird than impl anyway
[09:18:33] dminuoso: jhass: See, _impl makes perfect sense to me, but it just occured to me that it might not to others.
[09:18:44] dminuoso: (Since that bit is the actual implementation of the indexing logic)
[09:18:49] jhass: and I think you're right
[09:18:59] jhass: let's approach this differently, where/how would it be reused?
[09:19:39] dminuoso: jhass: Let's say you have this cities/districts/streets. So you might have an overview of all streets. city#show might render a partial of all streets in that city.
[09:19:54] jhass: kitsuneyo: just YAML.load_file whatever
[09:20:18] n90b0jjf: has joined #RubyOnRails
[09:20:19] dminuoso: So streets#index and city#show should reuse the same inner table, because they do the same thing, the only difference is the collection.
[09:20:41] workmad3: has joined #RubyOnRails
[09:21:00] dminuoso: And district#show would also list the streets of that district.
[09:21:02] jhass: so render "streets/index_impl" vs render "streets/streets" vs render "streets/index" vs render "streets/???"
[09:21:23] kitsuneyo: thanks jhass, if the .yml file is in /config do i need to specify a path?
[09:21:29] jhass: I think _index.haml is best there
[09:21:41] jhass: kitsuneyo: of course
[09:21:46] dminuoso: jhass: Can you explain why?
[09:22:04] jhass: kitsuneyo: Rails.root.join("config/foo.yml")
[09:22:05] Diabolik: sevenseacat ive done the change
[09:22:06] Diabolik: https://gist.github.com/askl56/38d331fe767e4b42a2b28860bdf1e32e
[09:22:18] Diabolik: what needs to change in the params for the look_book_images_controller?
[09:22:27] kitsuneyo: thanks jhass
[09:22:33] jhass: dminuoso: it just reads best to me, it's clear that it's a list, it's not redundant, it's not having noise
[09:22:43] dminuoso: jhass: Initially I had "streets/streets_table" since I might have different ways of representing that collection.
[09:22:46] dminuoso: By the way.
[09:22:53] workmad3: jhass: or Rails.root/"config/foo.yml"
[09:23:13] jhass: workmad3: not sure I like that :P
[09:23:17] dminuoso: jhass: But I scrapped that since until now I did not have the need for extra representations. ;-)
[09:23:25] jhass: dminuoso: I guess I could see a simple render "streets/list" too
[09:23:32] tbuehlmann: yeah, I prefer Rails.root / 'config' / 'foo.yml'
[09:23:33] workmad3: jhass: heh :) I tend to prefer + personally... but I like that Pathname overrides `/` for that style
[09:24:08] epitron: has joined #RubyOnRails
[09:24:45] workmad3: kitsuneyo: if you have a yml in `config` with env-specific sections, you can also use http://apidock.com/rails/v4.2.1/Rails/Application/config_for
[09:26:51] dminuoso: jhass: Moments like these make it really hard when you frequently change between C++ and Ruby. Syntax-wise I manage to switch easily, but quite often I start thinking in patterns and naming schemes from the other language.
[09:27:16] dminuoso: I see a problem in Ruby and immediately think "Hey, method overloading could give the kind of dynamic behavior Im looking for".
[09:28:11] dminuoso: Does anyone else have a thought on this?
[09:28:13] jhass: hehe, imagine it between Ruby and Crystal, list.includes? item, oh no list.include? item
[09:29:24] dminuoso: jhass: Elaborate, please.
[09:29:25] jhass: dminuoso: my main point is that I see the _impl as noise, it gives me no semantic information, it just tries to make stuff more distinct on a purely visual level. And visually the leading _ has become enough for me
[09:29:32] n90b0jjf: has joined #RubyOnRails
[09:29:39] workmad3: I used to have a fair bit of pain switching between ruby and coffeescript for syntax and method names
[09:30:11] jhass: dminuoso: Crystal flips Ruby's naming policy, instead of always using the infinite, use what sounds better in most situations
[09:30:14] dminuoso: jhass: In C++ for example it's often necessary to split the actual implementation of a class into a separate class, and then derive from that class to create a pseudo wrapper class.
[09:30:29] mbreedlove: has joined #RubyOnRails
[09:30:38] tercenya: has joined #RubyOnRails
[09:30:56] jhass: eh, infinitive ?
[09:32:59] yoongkang: has joined #RubyOnRails
[09:33:33] sarink: has joined #RubyOnRails
[09:35:38] herbst: has joined #RubyOnRails
[09:36:00] dminuoso: jhass: Though Im a big fan of consistency regarding these things. Its what drove me away from Python, where you sometimes had receiver.method(argument), argument.method(receiver), arg1.method(arg2, receiver), arg1.method(receiver, arg2) - all mixed throughout the core libraries.
[09:36:49] jhass: well, it ends up fairly consistent, it's mainly includes? instead of include? and .exists? instead of .exist?
[09:37:33] dminuoso: Ah, fair enough then - that makes sense.
[09:37:51] epitron: has joined #RubyOnRails
[09:37:59] jhass: also we do away with aliases and have a inbuilt code formatter (like go), so that generally leads to a little bit higher consistency compared to Ruby
[09:38:01] n90b0jjf: has joined #RubyOnRails
[09:38:44] dminuoso: jhass: So, do you have a graal/truffle port already? :-)
[09:39:35] jhass: heh no, I don't see how that would make sense
[09:40:02] dminuoso: jhass: Performance?
[09:40:23] dminuoso: I mean granted, its still only a research project..
[09:40:40] jhass: Crystal is compiled, LLVM frontend
[09:40:49] jhass: the runtime is only GC + libevent2
[09:41:10] jhass: no interpreter, VM or anything like that
[09:41:24] dminuoso: jhass: The beauty is that you get the JIT optimization while still offering complete dynamic aspects. :-)
[09:41:36] dminuoso: Ah alright.
[09:41:39] jhass: yes but it's not Crystal's aim
[09:41:56] jhass: and the macro language gets you very far, further than Ruby in some places
[09:42:10] jhass: (of course not so far in others)
[09:42:18] xpl0iter: has joined #RubyOnRails
[09:43:06] dminuoso: jhass: How is the crystal compiler structured? Is it a plain AST to LLVM?
[09:43:19] jhass: pretty much, yes
[09:44:30] quazimodo: has joined #RubyOnRails
[09:47:06] artto_: has joined #RubyOnRails
[09:47:25] arup_r: has joined #RubyOnRails
[09:47:45] mrd_: has joined #RubyOnRails
[09:48:19] beilabs_: has joined #RubyOnRails
[09:48:31] abhinavmehta: has joined #RubyOnRails
[09:49:11] apotry: has joined #RubyOnRails
[09:49:31] quazimod1: has joined #RubyOnRails
[09:49:32] Diabolik: if i have a rails class called LookBookImageProductIndex
[09:49:47] Diabolik: would the has_many version for that be
[09:49:53] Diabolik: has_many :look_book_image_product_indices
[09:50:07] roshanavand: has joined #RubyOnRails
[09:50:39] davee_: has joined #RubyOnRails
[09:52:43] Sylario: I have a deprecation warning on a line, but I am not sure what to do : has_many :good_strategies, dependent: :destroy,order: "created_at DESC"
[09:52:44] hd1: has joined #RubyOnRails
[09:53:40] Sylario: it says i should use this syntax : has_many :spam_comments, -> { where spam: true }, class_name: 'Comment'
[09:53:50] wd40s: has joined #RubyOnRails
[09:53:57] Sylario: but it really do not like when i put created at in a hash
[09:54:07] tbuehlmann: oh, it's not a hash
[09:54:13] tbuehlmann: can you gist what you got?
[09:54:52] SirOliver: has joined #RubyOnRails
[09:55:30] Sylario: tbuehlmann: i got that : https://gist.github.com/bsylvain/74cba4432c3a23c110eed8a5ebe1d6ca
[09:55:59] Sylario: I tried variation of has_many :good_strategies, dependent: :destroy,-> {order: "created_at DESC"}
[09:56:41] tbuehlmann: think of a scope you're applying
[09:56:59] tbuehlmann: that scope would look like `-> { order('created_at DESC') }`
[09:58:41] Sylario: i already tried that, does not work
[09:58:57] c355E3B: has joined #RubyOnRails
[09:59:07] tbuehlmann: can you gist what you tried?
[10:02:01] wethu: has joined #RubyOnRails
[10:02:17] Sylario: https://gist.github.com/bsylvain/74cba4432c3a23c110eed8a5ebe1d6ca
[10:02:33] Sylario: i am just trying multiple exemple from the net
[10:03:15] tbuehlmann: first the scope, then the options
[10:03:24] tbuehlmann: the signature is has_many(name, scope = nil, options = {}, &extension), so try
[10:05:15] kitsuneyo: hey, i made a class called CreativeCommons that uses a yaml file to set new CreativeCommons license objects. here's the gist: https://gist.github.com/kitsuneyo/c811a63688bd29b317bfaa78c9bcb932
[10:06:03] kitsuneyo: would anyone mind taking a look? i have two Qs. first, when i create a new object rails console returns all the yaml data, not just the new object
[10:06:29] epitron: has joined #RubyOnRails
[10:06:32] rafaelflores: has joined #RubyOnRails
[10:06:39] kitsuneyo: second, how can i make CreativeCommons.all return all possible objects? can i do 'def all'?
[10:07:30] xall_: has joined #RubyOnRails
[10:08:53] Sylario: tbuehlmann: thx, that was it, depedent destroy had to be at the end. i had to realise that previously order was not a scope but an option
[10:08:59] dminuoso: jhass: So, regarding that last topic I have a follow up question.
[10:09:45] dminuoso: So let's say you have a city#show action, would your city controller provide a separete (from the city decorator) decorated streets collection?
[10:10:22] blackmesa: has joined #RubyOnRails
[10:10:52] gremly: has joined #RubyOnRails
[10:12:00] ur5us: has joined #RubyOnRails
[10:13:52] r3vDev: has joined #RubyOnRails
[10:14:12] jhass: you mean whether to rely in the partial on @streets being defined?
[10:14:31] n90b0jjf: has joined #RubyOnRails
[10:14:41] rbr: kitsuneyo: The console returns the new CreativeCommons object. It's just that it has the cc_data instance_variable, which contains all the yaml-data, that causes it to be printed.
[10:15:35] rbr: kitsuneyo: You can use a class-method "def self.all".
[10:16:18] kitsuneyo: is there a better way to load the yaml file?
[10:16:21] mbreedlove: has joined #RubyOnRails
[10:16:57] jhass: kitsuneyo: are you unsatisfied with the current way? what would you dream API look like?
[10:17:46] jhass: I would probably keep the data in a class level constant
[10:17:57] jhass: DATA = YAML.load_file ...
[10:17:59] kitsuneyo: i guess i'm not unsatisfied. at the moment i think i just need new and all methods. but i'm interested in any tips
[10:18:07] kitsuneyo: ok, that sounds good
[10:18:32] dminuoso: jhass: Well, the parial just accepts locals. But how would you pass those streets into the partial? Would it be render 'streets/streets'. { streets: @streets }, or rather {streets: @district.streets }
[10:18:58] dminuoso: jhass: Until now I have followed my own rule of avoiding to trigger queries once Im inside a decorator/view.
[10:20:14] jhass: I think the fewer instance variables the better
[10:20:35] rickmasta: has joined #RubyOnRails
[10:20:42] jhass: though it indeed gets hard when you want to avoid triggering queries (which is a good goal)
[10:21:10] kitsuneyo: thanks jhass, that really simplified things
[10:21:20] jhass: could do @city = CityDecorator.new(city, city.streets)
[10:21:35] jhass: or give up the constraint for decorators, which is IMO fair
[10:22:48] jhass: of course there's the question of no actual queries vs no potential queries
[10:23:40] jhass: a city = City.includes(:streets).find(params[:id]) would prevent the actual query on city.streets anywhere
[10:23:55] n90b0jjf: has joined #RubyOnRails
[10:24:08] srinidhi: has joined #RubyOnRails
[10:24:55] cheti: has joined #RubyOnRails
[10:26:08] cheti: hi how to update has_and_belongs_to_many :users, :join_table => :users_roles, Users_roles data from controller
[10:27:22] Kedare: has joined #RubyOnRails
[10:28:27] Circuit8: has joined #RubyOnRails
[10:28:27] jhass: What did you try, how does it fail? show code
[10:28:35] Circuit8: Hey guys, if I have a javascript File object, how do I attach it to an input field so that it gets submitted along with a form? I can't seem to find the answer on Google
[10:29:36] cheti: jhass UsersRoles.update() not working how to update users_roles data?
[10:29:45] adre: has joined #RubyOnRails
[10:30:07] jhass: cheti: "not working" is not any error message rails gives you
[10:30:18] JamieD: has joined #RubyOnRails
[10:30:52] jhass: What did you try, how does it fail? show code
[10:30:59] cheti: jhass NameError (uninitialized constant EditrolesController::UsersRoles)
[10:31:55] jhass: so there's no model called UsersRoles ;)
[10:32:19] cheti: jhass i am using rolify gem
[10:32:48] jhass: I don't know the gem
[10:33:20] n90b0jjf: has joined #RubyOnRails
[10:33:28] jhass: did you read http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association and http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many yet?
[10:33:53] cheti: jhass this gem created users_roles table with has_and_belongs_to_many :users, :join_table => :users_roles
[10:37:10] Axilla: has joined #RubyOnRails
[10:41:59] siaw23: has left #RubyOnRails: ()
[10:45:00] maxdoubt: has joined #RubyOnRails
[10:45:25] pawnbox: has joined #RubyOnRails
[10:46:19] Velizar: has joined #RubyOnRails
[10:48:03] rodfersou: has joined #RubyOnRails
[10:48:52] wethu: has joined #RubyOnRails
[10:49:38] kitsuneyo: i wrote a self.all method that does return an array of all possible CreativeCommons objects, but i think my code is pretty bad since it uses map twice: https://gist.github.com/kitsuneyo/c811a63688bd29b317bfaa78c9bcb932
[10:50:50] kitsuneyo: i'm struggling with getting the key values from CCDATA hash, so i turned into an array with map and then used map again to make the .all array
[10:51:00] blackmesa: has joined #RubyOnRails
[10:52:40] wd40s: has joined #RubyOnRails
[10:52:46] universa1: kitsuneyo: ccdata.each_with_object ...... you probably also want to look at memoization.
[10:54:00] bruce_lee: has joined #RubyOnRails
[10:54:00] bruce_lee: has joined #RubyOnRails
[10:54:22] jhass: just CCDATA.map {|license, _| new(license) }
[10:55:10] jhass: or even just do INSTANCES = YAML.load_file(...).map {|license, data| new(license, data) } and def self.all; INSTANCES; end
[10:55:24] universa1: simplified speaking: one could also do that in the constant, then one would only have one object for each variant.
[10:56:28] kitsuneyo: brilliant, thanks
[10:58:18] bruce_lee: \(^_^)/ @all
[10:58:37] bruce_lee: I'm new to rails and building a site with only static-pages
[10:59:11] bruce_lee: at the end I would like to generate human-readable html, but I do have a lot of empty lines
[10:59:31] universa1: no human reads html.
[10:59:35] bruce_lee: how can I replace the empty lines of the "final-rendering"?
[10:59:45] universa1: do not insert them in the first place.
[10:59:58] GodFather: has joined #RubyOnRails
[11:00:52] moeabdol: has joined #RubyOnRails
[11:01:09] universa1: there are probably some after-rendering filters, which clean it up, but why?
[11:01:44] bruce_lee: ok, I guess I got something wrong, I'll check
[11:02:09] jmignault: has joined #RubyOnRails
[11:05:11] universa1: bruce_lee: in this case, i really wonder why you even care? ;)
[11:05:38] conta: has joined #RubyOnRails
[11:07:49] Cervajz: has joined #RubyOnRails
[11:07:49] Cervajz: has joined #RubyOnRails
[11:08:03] bruce_lee: universa1: I'm using vi/vim to read the final html-code, I need nice "indent" to fold the html-code, just to get an overview of what is finally generated
[11:08:56] universa1: bruce_lee: filter it through some html formatter? even vi/vim probably has an autoformat option.
[11:09:47] n90b0jjf: has joined #RubyOnRails
[11:09:51] contradictioned: has joined #RubyOnRails
[11:10:54] MajorTennis: has joined #RubyOnRails
[11:11:34] Cervajz: has joined #RubyOnRails
[11:11:34] Cervajz: has joined #RubyOnRails
[11:18:09] beilabs: has joined #RubyOnRails
[11:19:16] alfiemax: has joined #RubyOnRails
[11:19:39] sujith: has joined #RubyOnRails
[11:19:44] n90b0jjf: has joined #RubyOnRails
[11:20:03] tvw: has joined #RubyOnRails
[11:27:15] andywww: has joined #RubyOnRails
[11:28:25] lessless: has joined #RubyOnRails
[11:29:17] phredus: has joined #RubyOnRails
[11:30:15] ldnunes: has joined #RubyOnRails
[11:31:23] moeabdol: has joined #RubyOnRails
[11:31:25] abhinav: has joined #RubyOnRails
[11:34:33] Cervajz_: has joined #RubyOnRails
[11:36:41] mbreedlove: has joined #RubyOnRails
[11:37:26] andywww: i’m really struggling with the twitter gem cursor settings and rate limiting
[11:37:38] n90b0jjf: has joined #RubyOnRails
[11:37:39] andywww: its so well abstracted now that i can’t actually get into anyhting to add a sleep
[11:37:53] Megamos: has joined #RubyOnRails
[11:38:07] andywww: and when i hit a rate limit, its sleeping and starting the entire gathering process from the first follower again
[11:38:53] andywww: i need to maintain the cursor position when it throws the exception or somehow add a pause into the cursored requests
[11:39:01] andywww: *pulling hair out*
[11:43:45] n90b0jjf: has joined #RubyOnRails
[11:44:37] pickandmix: has joined #RubyOnRails
[11:44:52] mbreedlove: has joined #RubyOnRails
[11:47:03] armyriad: has joined #RubyOnRails
[11:47:48] hd1: has joined #RubyOnRails
[11:48:07] camilasan: has joined #RubyOnRails
[11:49:15] nyasha: has joined #RubyOnRails
[11:51:36] mbreedlove: has joined #RubyOnRails
[11:52:48] n90b0jjf: has joined #RubyOnRails
[11:54:00] antgel: has joined #RubyOnRails
[11:54:15] chipotle: has joined #RubyOnRails
[11:56:00] xall_: has joined #RubyOnRails
[11:58:19] yardenbar: has joined #RubyOnRails
[11:59:15] andywww: has left #RubyOnRails: ()
[12:01:36] hd1: has joined #RubyOnRails
[12:02:11] n90b0jjf: has joined #RubyOnRails
[12:09:10] pawnbox: has joined #RubyOnRails
[12:10:59] cd-rum: has joined #RubyOnRails
[12:12:04] augcesar: has joined #RubyOnRails
[12:12:07] n90b0jjf: has joined #RubyOnRails
[12:14:33] czerasz: has joined #RubyOnRails
[12:18:16] mbreedlove: has joined #RubyOnRails
[12:19:43] artto: has joined #RubyOnRails
[12:20:32] cd-rum: has joined #RubyOnRails
[12:20:58] n90b0jjf: has joined #RubyOnRails
[12:23:24] l4v2: has joined #RubyOnRails
[12:23:31] umdstu: has joined #RubyOnRails
[12:25:07] pawnbox: has joined #RubyOnRails
[12:25:10] carlosd: has joined #RubyOnRails
[12:28:46] rafaelflores: has joined #RubyOnRails
[12:29:36] zotherst1: has joined #RubyOnRails
[12:31:55] dionysus69: has joined #RubyOnRails
[12:32:38] Ergo: has joined #RubyOnRails
[12:43:24] hd1: has joined #RubyOnRails
[12:44:58] wethu: has joined #RubyOnRails
[12:48:16] n90b0jjf: has joined #RubyOnRails
[12:48:55] JamesGames: has joined #RubyOnRails
[12:49:54] roamingdog: has joined #RubyOnRails
[12:50:16] xall_: has joined #RubyOnRails
[12:51:08] ur5us: has joined #RubyOnRails
[12:51:20] JamesGames: hei dee hi - having problems with arrays. Trying to move an object from one array to another. Using ajax. Unsuccessfully. https://gist.github.com/anonymous/d18fce54f3ba598a0f04bcd5b1962a8f the code is for a game where users take objects and combine them and I need persistant storage of the collected items. I had them dragging from the room to the user inventory but once the r
[12:51:27] jenrzzz: has joined #RubyOnRails
[12:53:29] Tempesta: has joined #RubyOnRails
[12:54:20] sevenseacat: has joined #RubyOnRails
[12:54:38] carlosd: I never developed for android and with the release of turbolinks-android I started my first one \o/
[12:54:48] JamesGames: sevenseacat: we meet again sevenseacat !!
[12:55:15] sevenseacat: I timed that well didn't I
[12:55:26] carlosd: from my understanding right now you can do with this everything that a webview can in android
[12:56:19] carlosd: I'm curious about what goods it brings to the bag
[12:56:52] carlosd: what cool thinks you can do with this, that can't be done with webviews?
[13:00:27] JamesGames: sevenseacat: u a professional rails peep?
[13:01:00] mbreedlo_: has joined #RubyOnRails
[13:01:17] JamesGames: hows that working out for you? i guess it would be less claustrophobic if you knew more..
[13:01:31] hd1: has joined #RubyOnRails
[13:03:06] JamesGames: it's probably stoopid to make games w rails. I shouldn't have attempted this. saying that though, it's nearly funcitonal
[13:03:40] blackmesa: has joined #RubyOnRails
[13:03:46] JakFrist: has joined #RubyOnRails
[13:04:27] JamesGames: https://gist.github.com/anonymous/d18fce54f3ba598a0f04bcd5b1962a8f btw
[13:04:48] sevenseacat: that's horrible code.
[13:04:57] Mia: has joined #RubyOnRails
[13:04:57] Mia: has joined #RubyOnRails
[13:05:06] sevenseacat: it's not stupid to make games with Rails, but I recommend learning the basics of Ruby and Rails first.
[13:05:08] JamesGames: u ain't seen nothing. that's pretty
[13:05:22] sevenseacat: no, it really isn't.
[13:05:26] hahuang65: has joined #RubyOnRails
[13:05:40] epitron: has joined #RubyOnRails
[13:05:49] JamesGames: sevenseacat: u wanna see my show.html.erb?
[13:06:19] JamesGames: sevenseacat: ud probably live a long and happy life without seeing it
[13:07:11] JamesGames: sevenseacat: out of intrest. what apps do u make day to day if ur a rails peep?
[13:08:01] ramortegui: has joined #RubyOnRails
[13:10:30] JamesGames: sevenseacat: ok. nevermind. baring in mind the code is an abomination. how would i proceed? (other than wiping it and reading a bunch of books)
[13:11:02] codelahoma: has joined #RubyOnRails
[13:14:41] King_Rex: has joined #RubyOnRails
[13:16:10] desmondhume: has joined #RubyOnRails
[13:16:49] JamesGames: the lost art of talking to yourself in public...
[13:21:33] dvinciguerra_: has joined #RubyOnRails
[13:23:03] JamesGames: the boys midichlorian count is off the scale. Not even master yoda has a midichlorian count that high
[13:24:21] gopz: has joined #RubyOnRails
[13:24:54] moeabdol: has joined #RubyOnRails
[13:25:44] dminuoso: So I have a tiny HouseNumber class that implements the interface for Range, where would you put it? My initial instinct was to place the class inside my "House" model, since it kind of belongs there.
[13:26:03] dminuoso: Placing this simple 6 line class into an extra lib file with auto loading seems like too much.
[13:26:39] Macaveli: has joined #RubyOnRails
[13:26:57] sevenseacat: I would put it in its own file in lib.
[13:27:11] universa1: or in model.
[13:27:37] dminuoso: sevenseacat: So far the lib directory was for larger things that I plan to move into separate gems.
[13:27:39] sevenseacat: either way, I would indeed let the autoloading deal.
[13:27:42] dminuoso: For me at any rate.
[13:28:02] dminuoso: sevenseacat: Well, if placed under lib I would have to register the class for autoloading first.
[13:28:12] sevenseacat: ? you don't autoload lib?
[13:28:59] fmcgeough: has joined #RubyOnRails
[13:28:59] dminuoso: sevenseacat: Haven't had the need for it yet.
[13:29:46] tennis: has joined #RubyOnRails
[13:32:32] aegis3121: has joined #RubyOnRails
[13:34:04] gopz: Does anyone have a suggestion on where I can start learning about lower level error handling in Rails? Like what happens exactly from the point an exception is raised to the when an error messages is shown on a user's browser?
[13:34:38] qejk: has joined #RubyOnRails
[13:35:06] willwright: has joined #RubyOnRails
[13:35:17] dminuoso: gopz: Which exceptions in particular are you interested in?
[13:35:54] dminuoso: gopz: For example, there is a couple exceptions which may have a default behavior in some scenarios. For example ActiveRecord::NotFoundError might be caught by your controller, responding with a 404.
[13:36:06] SirOliver: has joined #RubyOnRails
[13:37:23] gopz: dminuoso: The problem is that I am not sure what exception is generating this error because I cannot find it in the logs, I think it is a malformed params issue because the error is a 400: Bad Request. However what is driving me insane is the it gets return with a status code of 200 for some reason.
[13:38:05] sevenseacat: what makes you think that?
[13:38:45] dminuoso: gopz: So let's take a look at your log first.
[13:39:12] fox_mulder_cp: irb(main):023:0> Encoding.list.count
[13:39:16] hd1: has joined #RubyOnRails
[13:39:26] fox_mulder_cp: O_O.. 100+ encodins...
[13:40:27] mbreedlove: has joined #RubyOnRails
[13:41:05] gopz: dminuoso: this is the request in the log file: https://gist.github.com/gopz/2623bed30fe0663ac604d7c7dad8bb7c
[13:41:28] blackmesa: has joined #RubyOnRails
[13:41:38] dminuoso: gopz: That looks fairly non-standard. What modifications did you do?
[13:41:59] willwright: Hi everyone! Quick question, which is driving me crazy... I have Users which have many Events which have a Schedule which have a has_finished? method. I'm trying to do the following console query for each user (as |u|): `u.events.includes(:schedule).where('schedule.has_finished? == ?', false).count` with no success :( Any ideas?
[13:42:02] sevenseacat: and what makes you think thats a 400?
[13:42:02] gopz: dminuoso: why does it look non-standard?
[13:42:53] dminuoso: gopz: I cannot tell you why. You have to tell me.
[13:43:17] dminuoso: gopz: Though please answer sevenseacat's question.
[13:43:32] gopz: The request in question is handled in an ajax function which takes the response and then changes the DOM based on what it gets back. Obviously it will only replace things in the DOM if it gets a successful response, however it is getting back a 400 error page and then failing to replace anything because the status code is 200
[13:44:13] gopz: And consequently not hitting the 'error: function..' handler
[13:44:17] sevenseacat: show us the complete logs of everything, including what page is coming back
[13:44:29] sevenseacat: because that log is doing database work, which it wouldnt do in a params-based 400 error
[13:44:36] xall_: has joined #RubyOnRails
[13:44:39] Tref: has joined #RubyOnRails
[13:44:48] sevenseacat: (unless you have a shitload of before-action stuff)
[13:45:49] gopz: The complete server log of all requests? I'm not sure what you mean by the complete logs of everything
[13:45:53] sevenseacat: it's also spending time in the view, which it definitely wouldn't do in a params-based 400 error.
[13:46:17] sevenseacat: gopz: show us the code making the request, the request being made, and the response.
[13:47:09] desmondhume: has joined #RubyOnRails
[13:48:12] Oliphaunte: has joined #RubyOnRails
[13:51:50] jenrzzz: has joined #RubyOnRails
[13:51:50] jenrzzz: has joined #RubyOnRails
[13:51:51] rickmasta: has joined #RubyOnRails
[13:53:37] trifling-jest: has joined #RubyOnRails
[13:54:40] gopz: https://gist.github.com/gopz/51a2b53dbf9ae35aad749d99024ea877
[13:55:04] desmondhume: has joined #RubyOnRails
[13:56:06] sevenseacat: ok thats from nginx, so thats not even hitting your rails app
[13:56:34] SirOliver: has joined #RubyOnRails
[13:56:56] sevenseacat: theres also no error callback in your js function so how do you know its not returning an error?
[13:57:12] GodFather: has joined #RubyOnRails
[13:57:34] matthewd: gopz: If you're trying to understand what's going on, you might be better served turning off a gem whose goal is to "tame Rails' default policy to log everything"
[13:57:50] rafaelflores: has joined #RubyOnRails
[13:59:03] gopz: sevenseacat: there is an error handler that I omitted, and I have sent back bad request errors from a test controller and on a typical request that hits the test controller it will correctly fall into the error handler
[13:59:24] sevenseacat: well that error isnt coming from Rails
[13:59:26] Oliphaunte: has joined #RubyOnRails
[13:59:29] Phoop: has joined #RubyOnRails
[13:59:56] gopz: sevenseacat: thank you, I did not realize that
[13:59:57] sevenseacat: so whatever that line of the logs was, it wasnt to do with this request and this problem
[14:01:09] gopz: sevenseacat: but I am positive that was the request has something to do with it because as you may see I logged the form values getting sent by that ajax request and it matches those in that request I posted in the logs
[14:02:04] gopz: So that request must have been made in some manifestation and then gotten a weird response back as far as I can see
[14:03:35] sevenseacat: well no, because your request from the JS is a POST request, but the logs say PATCH
[14:03:56] sevenseacat: where are those logs from, anyway?
[14:04:02] sevenseacat: that is indeed a weird logging format
[14:04:19] macsteps: has joined #RubyOnRails
[14:04:30] abhinavmehta: has joined #RubyOnRails
[14:04:36] gopz: I'm not sure, it's the default production.log, there may be a gem used to format it
[14:04:46] matthewd: sevenseacat: It's lograge
[14:04:58] hd1: has joined #RubyOnRails
[14:05:16] gopz: also I thought that setting `_method=>'PATCH'` in the params was the equivalent of doing a PATCH request
[14:05:18] sevenseacat: yeah I'd be testing things in development, not production
[14:06:52] SirOliver: has joined #RubyOnRails
[14:06:55] gopz: well the error has only ever occurred in production so it was necessary to add logging info there
[14:07:28] gopz: I have set up a testing environment where I can simulate the error which is how i've been testing the implementation of the code I added
[14:09:02] SirOliver: has joined #RubyOnRails
[14:09:03] n90b0jjf: has joined #RubyOnRails
[14:09:24] Leepoff: has joined #RubyOnRails
[14:10:05] lessless: has joined #RubyOnRails
[14:10:29] willwright: Hi everyone! Quick question, which is driving me crazy... I have Users which have many Events which have a Schedule which have a has_finished? method. I'm trying to do the following console query for each user (as |u|): `u.events.includes(:schedule).where('schedule.has_finished? == ?', false).count` with no success :( Any ideas?
[14:11:09] whoughton: has joined #RubyOnRails
[14:12:18] Tref: has joined #RubyOnRails
[14:12:32] alfiemax: has joined #RubyOnRails
[14:12:54] universa1: willwright: database level vs application level.
[14:13:15] lessless: hey folks, how to make Rails properly parse '.json?keywords=asd' query? Right now it consider it as a format: "format"=>"json&keywords=asd"
[14:14:11] universa1: lessless: no, it does not.
[14:14:32] lessless: universa1 it does in my case...
[14:14:37] universa1: lessless: !code
[14:14:37] helpa: lessless: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[14:16:22] universa1: lessless: routes.rb , log excerpt showing the behavior should be sufficient in the first step
[14:17:24] n90b0jjf: has joined #RubyOnRails
[14:17:34] willwright: Thanks universa1! But how would I perform a query like this?
[14:18:19] universa1: willwright: define the conditions for has_finished = false as sql conditions, or load the records into your app and filter them there.
[14:19:04] daffy_duck: has joined #RubyOnRails
[14:19:47] lessless: universa1 https://gist.github.com/lessless/9a19e36948323456c47c5bcbba4e91ac
[14:19:53] Diabolik: what does is mean if there is a "0" => at the start of my params
[14:19:54] Diabolik: for example
[14:20:06] jhack: has joined #RubyOnRails
[14:20:23] Diabolik: {"0"=>{"spree_product_id"=>["354", "335", "348", "357", ""]}}}
[14:20:29] universa1: lessless: https://gist.github.com/lessless/9a19e36948323456c47c5bcbba4e91ac#file-gistfile1-txt-L1 you use an ampersand, where you should use a question mark.
[14:21:21] universa1: Diabolik: nested form?
[14:22:09] universa1: Diabolik: new entries?
[14:22:24] Diabolik: will that affect how it enters my has_many through table?
[14:22:53] sevenseacat: not enough info to say
[14:23:46] lessless: universa1 oh, cool. thank you
[14:23:54] willwright: Thanks a lot universa1! Will give it a go! :)
[14:24:00] doodlehaus: has joined #RubyOnRails
[14:26:40] trifling_jest2: has joined #RubyOnRails
[14:27:00] Jet4Fire: has joined #RubyOnRails
[14:28:27] eljimbo: has joined #RubyOnRails
[14:29:14] douglasc_: has joined #RubyOnRails
[14:31:16] agent_white: has joined #RubyOnRails
[14:31:48] bbrowning: has joined #RubyOnRails
[14:31:52] SirOliver: has joined #RubyOnRails
[14:32:01] agent_white: Mornin' folks
[14:35:28] arBmind: has joined #RubyOnRails
[14:35:48] hd1: has joined #RubyOnRails
[14:36:12] trifling_jest2: anyone here an expert on carrierwave or paperclip?
[14:36:30] pLaTo0n: has joined #RubyOnRails
[14:36:36] trifling-jest: anyone here an expert on carrierwave or paperclip?
[14:38:11] universa1: ohh couldn't even post:
[14:38:13] helpa: Nope. No one. Ever. In the history of the world.
[14:40:06] ankhers: What is "the right way" to deal with migrations and engines?
[14:40:40] seaworthy: has joined #RubyOnRails
[14:42:34] knight_: has joined #RubyOnRails
[14:43:48] jpterry: has joined #RubyOnRails
[14:46:03] dminuoso: has joined #RubyOnRails
[14:47:19] Sylario: I was about to do something stupid, but i realized that RSpec was probably doing it and, yes, you can specify a before hook only for controller in Rspec. Thx Rspec!
[14:48:36] chipotle: has joined #RubyOnRails
[14:49:23] DouweM_: has joined #RubyOnRails
[14:49:25] DouweM_: has left #RubyOnRails: ()
[14:51:37] chipotle: has joined #RubyOnRails
[14:53:11] polishdub: has joined #RubyOnRails
[14:53:18] Terens: has joined #RubyOnRails
[14:54:40] isberg: has joined #RubyOnRails
[14:55:23] t4nkD: has joined #RubyOnRails
[14:56:44] Velizar: has joined #RubyOnRails
[14:58:45] aaronr: has joined #RubyOnRails
[15:00:17] shinnya: has joined #RubyOnRails
[15:01:31] pawnbox: has joined #RubyOnRails
[15:01:37] hd1: has joined #RubyOnRails
[15:02:59] JamesGames: has joined #RubyOnRails
[15:03:44] JamesGames: https://gist.github.com/anonymous/42ae24019666eb02f4e8efc50b07e8fd problem moving stuff from array to array
[15:03:51] pawnbox: has joined #RubyOnRails
[15:05:28] pawnbox: has joined #RubyOnRails
[15:06:31] unreal_: has joined #RubyOnRails
[15:09:49] one_zero: has joined #RubyOnRails
[15:11:04] blackmesa: has joined #RubyOnRails
[15:13:14] chipotle: has joined #RubyOnRails
[15:17:04] rogue_koder: has joined #RubyOnRails
[15:17:56] chipotle_: has joined #RubyOnRails
[15:18:06] prithaj: has joined #RubyOnRails
[15:19:40] GnuYawk: has joined #RubyOnRails
[15:20:40] chipotle: has joined #RubyOnRails
[15:20:43] Tref: has joined #RubyOnRails
[15:24:17] spion: How would you model the following in ActiveRecord? User has_and_belongs_to_many Project, but the association itself can have zero or more roles. Every project has a separate set of roles.
[15:24:38] sevenseacat: User has many projects through project roles
[15:24:50] sevenseacat: we modelled this exact thing in Rails 4 in Action ;)
[15:25:04] spion: But the user may also have no roles in a project at the moment.
[15:25:16] spion: or more than 1 role.
[15:25:54] sevenseacat: then you'd have something like a ProjectMembership, that would habtm Roles
[15:26:25] spion: yup, that sounds right.
[15:26:37] maxdoubt: has joined #RubyOnRails
[15:26:40] sevenseacat: did i pass? :D
[15:27:07] spion: haha yeah. I have the tables in my head, I'm just trying to figure out the right combinations of has_many and through :D
[15:28:12] let_jesus_take_t: has joined #RubyOnRails
[15:29:13] moeabdol: how can I "rails g model user:references user:references" giving both columns different names?
[15:29:29] sevenseacat: name the columns and the associations for what they are
[15:29:44] sevenseacat: eg. author:references or approver:references
[15:30:00] moeabdol: sevenseacat: they are both users in the system
[15:30:04] moeabdol: they have the same model
[15:30:07] DoubleMalt: has joined #RubyOnRails
[15:30:11] sevenseacat: what model they have is irrelevant
[15:30:18] sevenseacat: what do they represent? why do you have two of them?
[15:30:33] moeabdol: a user can be a buyer or a seller
[15:30:45] moeabdol: both are stored in users table
[15:30:53] sevenseacat: okay, so whatever you're generating has buyer:references and seller:references
[15:31:03] sevenseacat: then you can configure your model so that they both use the User class
[15:31:59] moeabdol: so "rails g model lead buyer:references seller:references"
[15:32:28] hd1: has joined #RubyOnRails
[15:32:38] moeabdol: and in the leads model "has_one :buyer, class: 'User'"
[15:32:39] whoughton: has joined #RubyOnRails
[15:32:47] SteenJobs: has joined #RubyOnRails
[15:32:55] moeabdol: "has_one :seller, class: 'User'"
[15:33:04] xall_: has joined #RubyOnRails
[15:33:06] let_jesus_take_t: normally users have a user/pass. when you use OAuth (facebook), what collumns do you do instead? I was thinking user_id and access_token, is that the usual practice?
[15:33:29] SteenJobs: hey all! has anyone here used God on their prod server to make sure resque workers are always running? if so, how did you implement it generally (did you use upstart, etc.)?
[15:33:41] sevenseacat: no, references generates a belongs_to association
[15:34:23] let_jesus_take_t: basically, instead of username/password, what is the standard way of storing OAuth'd users in the database?
[15:34:39] sevenseacat: just the external id, usually
[15:34:57] let_jesus_take_t: what about the access token?
[15:35:04] Leepoff: has joined #RubyOnRails
[15:37:24] harfangk: has joined #RubyOnRails
[15:37:28] Leepoff: has joined #RubyOnRails
[15:37:33] SteenJobs: sevenseacat: sup o/
[15:38:21] sevenseacat: SteenJobs: halloo
[15:38:29] sevenseacat: let_jesus_take_t: what about it? why do you need to save it?
[15:40:37] let_jesus_take_t: is it not the metaphorical 'password'?
[15:41:20] SteenJobs: isn’t the thumbs up response from the OAuth request the metaphorical password?
[15:41:52] qejk: has joined #RubyOnRails
[15:42:05] SteenJobs: let_jesus_take_t: which platform are you OAuthing with?
[15:42:28] let_jesus_take_t: Facebook's JS SDK
[15:42:42] let_jesus_take_t: I suppose it is then yeah...
[15:43:15] sevenseacat: you store that user 12 is facebook user 12345. user clicks "login with facebook", facebook says "this user is user 12345". all you need to know really
[15:43:24] sevenseacat: you log user id 12 in
[15:43:28] SteenJobs: for example with facebook, you can store the uid
[15:44:01] rafaelflores: has joined #RubyOnRails
[15:44:58] JamieD: has joined #RubyOnRails
[15:45:09] let_jesus_take_t: but then how does ServyMcServeface access facebooks graphing api? Didn't we just dispose of the access_key for doing that?
[15:45:40] sloggerkhan: has joined #RubyOnRails
[15:45:41] let_jesus_take_t: like the thumbs up is rad and all, don't get me wrong, but we also want to use facebooks delicious data
[15:45:50] sevenseacat: well thats different, because you said oauth
[15:46:38] sevenseacat: on each request you check the authentication of the user, and facebook will also give you back tokens to use
[15:46:41] sevenseacat: you don't store them though
[15:47:11] n90b0jjf_: has joined #RubyOnRails
[15:47:21] sevenseacat: well you can, but that's a whole 'nother kettle of fish
[15:48:01] sevenseacat: because that token can be invalidated at any time
[15:48:04] bga57: has joined #RubyOnRails
[15:48:19] rafaelflores: has joined #RubyOnRails
[15:49:18] let_jesus_take_t: as in, you can, but its pointless, or, you can, but its incredibly complex and has extremely obscure use cases?
[15:49:51] [Butch]: has joined #RubyOnRails
[15:50:27] sevenseacat: facebook deprecated their offline access permission a long time ago for a good reason
[15:51:06] sevenseacat: basically, you need to validate the token before each usage, so you may as well just fetch it fresh and not store it
[15:51:50] let_jesus_take_t: how do you fetch it fresh without asking the user to log in again?
[15:52:01] abhinavmehta: has joined #RubyOnRails
[15:52:40] jenrzzz: has joined #RubyOnRails
[15:52:52] rickmasta: has joined #RubyOnRails
[15:52:57] sevenseacat: the token can expire or be revoked while the user is still logged in
[15:53:05] sevenseacat: and logging in can be a seamless process once they've done it once
[15:53:08] manfrin_: has joined #RubyOnRails
[15:54:17] tycoon177: Could someone help me out? I have a link_to that fails, saying "No route matches..." but if I run rake routes, it's right there. I even went through and made sure to delete any other occurrences of the path in the routes file (It's now a nested route)
[15:54:29] tycoon177: if i go to the route manually by making the url, it works just fine
[15:54:36] tycoon177: so i am unsure of why this is the case
[15:54:47] let_jesus_take_t: how do you make it seamless? obviously it can be done I just don't understand the principal behind it. can you recommend a guide in particular to follow?
[15:54:48] sevenseacat: tycoon177: code?
[15:54:48] tycoon177: i'll put together a gist with the relevant info
[15:58:09] emachnic: has joined #RubyOnRails
[15:59:11] tycoon177: sevenseacat: this is all of the areas involved in the problem https://gist.github.com/BenMcH/a6d2df94f8b665ba298630befd306a07
[15:59:22] pur3eval: has joined #RubyOnRails
[15:59:46] sevenseacat: that rake routes output has nothing to do with the link
[16:00:01] sevenseacat: there's also no error message
[16:00:03] tycoon177: it was for the path variable
[16:00:18] sevenseacat: please gist the error, and the relevant output from rake routes
[16:00:30] tycoon177: i also just commented the error method..sorry
[16:00:35] tycoon177: I realized after I sent it
[16:00:48] tycoon177: Oh! I forgot the controller
[16:00:49] dragon9783: has joined #RubyOnRails
[16:00:51] tycoon177: give me a second
[16:01:03] rafaelflores: has joined #RubyOnRails
[16:01:06] sevenseacat: the controller is not relevant
[16:01:12] sevenseacat: the error message does not relate to that link_to either
[16:01:27] sevenseacat: professional_designation_assignments vs. job_title_assignment
[16:01:41] sevenseacat: whats on app/views/people/_personal.html.erb:86 ?
[16:02:15] hd1: has joined #RubyOnRails
[16:02:19] tycoon177: That link_to sevenseacat.
[16:03:11] zacts: has joined #RubyOnRails
[16:03:25] tycoon177: https://i.gyazo.com/aa609b986b2ce03f0f181ab24f907237.png
[16:03:50] sevenseacat: thats a different link_to
[16:03:51] Axsuul: has joined #RubyOnRails
[16:03:52] sevenseacat: professional_designation_assignments vs. job_title_assignment
[16:04:20] sevenseacat: and that link_to doesnt have the @person argument passed
[16:04:29] sevenseacat: whereas the one in your gist does
[16:04:52] Coldblackice_: has joined #RubyOnRails
[16:05:22] tycoon177: oh my gosh...i'm so sorry
[16:05:29] tycoon177: i really thought that i grabbed the right link
[16:05:44] tycoon177: you were right..that was the issue
[16:06:04] sevenseacat: all good now? :)
[16:06:14] FooMunki: has joined #RubyOnRails
[16:06:27] tycoon177: Yeah! I had tunnel vision there.
[16:06:57] sevenseacat: it happens, sometimes a second set of eyes to question your assumptions is all thats needed
[16:07:36] banisterfiend: has joined #RubyOnRails
[16:08:27] Leepoff: has joined #RubyOnRails
[16:09:45] tycoon177: it's been super repetitive as i have been transferring my work's old systems (written in asp.net) to rails
[16:10:30] Axilla: has joined #RubyOnRails
[16:13:10] let_jesus_take_t: sevenseacat: I've done some reading still don't entirely understand - if I'm disposing of the access_token after login, what enables me to access fb data the next time I sign the user in using my own session cookies?
[16:13:35] sevenseacat: you ask facebook for new ones
[16:14:10] sevenseacat: you have to auth on every request, and facebook will give you tokens when you do
[16:14:10] blackmesa: has joined #RubyOnRails
[16:15:55] harfangk: has joined #RubyOnRails
[16:17:10] beilabs: has joined #RubyOnRails
[16:17:20] let_jesus_take_t: Just to be clear, auth =/= popup that asks 'do you want to authorize this app to use <blah>'?
[16:18:15] sevenseacat: they only have to authorize your app in that way once.
[16:18:36] banisterfiend: does anyone here know how to turn puma worker timeouts off? it's legit for producdtion, but annoying for development where i might have a debug console open in the request
[16:18:38] sevenseacat: after that, you can reauth without that popup, as long as the permissions or anything havent changed.
[16:19:13] willwright: has left #RubyOnRails: ()
[16:19:15] sevenseacat: building the flow and testing it out really is the easiest way to see it in action, if the docs aren't clear enough
[16:19:32] sevenseacat: there are also many oauth tutorials out there, including some from facebook
[16:21:33] blackmesa: has joined #RubyOnRails
[16:22:41] let_jesus_take_t: is it possible to build this workflow while using the facebook JS SDK?
[16:22:48] let_jesus_take_t: or do I need to use something like omniauth
[16:23:01] sevenseacat: check the facebook docs.
[16:27:13] xall_: has joined #RubyOnRails
[16:27:24] let_jesus_take_t: alright thanks :)
[16:27:36] tycoon177: are you using devise, let_jesus_take_t?
[16:27:50] tycoon177: or just the oauth?
[16:28:56] tycoon177: i've never used koala, but omniauth is super easy to use
[16:29:08] let_jesus_take_t: yeah i may just give that a go tbh
[16:29:40] tycoon177: i'm using google_oauth in my personal project and it took maybe a half hour to read through the docs and get it set up and working
[16:30:47] let_jesus_take_t: hmm - so you aren't using any JS?
[16:31:07] tycoon177: I have local accounts that validate with the google oauth
[16:31:27] boogeyman: has joined #RubyOnRails
[16:31:28] tycoon177: but it'd be a small change to add facebook oauth as well (adding a gem and configuring it)
[16:31:29] sevenseacat: koala? not the js sdk?
[16:32:27] let_jesus_take_t: yeah thats what i'll do I think. sevenseacat I'm using both... :P
[16:32:45] sevenseacat: for oauth? i... wat?
[16:33:03] let_jesus_take_t: yeah i dont get it either lol
[16:33:09] markelite: has joined #RubyOnRails
[16:33:16] tycoon177: what sevenseacat? I'm using omniauth and devise in conjunction together
[16:33:43] tycoon177: it's a pretty common way of doing it from what i can tell
[16:33:52] sevenseacat: tycoon177: thats a wee bit different than using a ruby and a js solution to do the same thing
[16:34:13] whathappens: has joined #RubyOnRails
[16:34:21] tycoon177: i mean, you can use omniauth without devise and it'd give the same end product, no?
[16:34:33] diegoviola: has joined #RubyOnRails
[16:34:41] sevenseacat: whats that got to do with the question I asked let_jesus_take_t ?
[16:35:12] tycoon177: oh i didnt notice that you were talking about koala
[16:35:12] let_jesus_take_t: sevenseacat: https://github.com/arsduo/koala <--- "..............If your application uses Koala and the Facebook JavaScript SDK (formerly Facebook Connect), you can use the OAuth class to parse the cookies......"
[16:35:26] Keepbro: has joined #RubyOnRails
[16:35:33] tjbiddle: has joined #RubyOnRails
[16:35:43] tycoon177: you're only using it to parse data?
[16:35:45] sevenseacat: thats right, you can.
[16:35:52] rubyonrails974: has joined #RubyOnRails
[16:35:58] let_jesus_take_t: Can you use it to do the whole thing?
[16:36:00] sevenseacat: forget it, sorry i asked already
[16:36:35] beilabs: has joined #RubyOnRails
[16:36:52] Keepbro: Hi guys - noob here asking noob questions so please dont kill me - Was wondering if I could ask an expert for some help on my first going it alone project
[16:37:08] helpa: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[16:37:11] tjbiddle: Hey guys. Is it a bad practice to have a use-case where you would never use a mailer or model directly, but only through a service object? Example: Always call the service object to mail people about their canceled subscription so it always checks if they’re subscribed to those notifications
[16:37:26] Keepbro: You again?
[16:37:41] rubyonrails974: Random question, but under http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#method-i-stylesheet_link_tag documentation,
[16:37:41] jhass: I'm everywhere!
[16:37:46] rubyonrails974: it says "For historical reasons, the 'media' attribute will always be present and defaults to “screen”, so you must explicitly set it to “all” for the stylesheet(s) to apply to all media types."
[16:37:49] jhass: ACTION puts on his evil laugh
[16:37:53] rubyonrails974: I'm curious if anyone knows what those historical reasons are
[16:37:58] tjbiddle: Haha, Keepbro just ask
[16:38:00] Keepbro: Did you follow me here? I mean I know Im attractive but....?
[16:38:00] sevenseacat: guys guys guys guys guys
[16:38:31] jhass: sevenseacat: yeah don't dare to answer!
[16:38:37] tjbiddle: sevenseacat: Ha! You gave me crap for being gender-specific before ;-)
[16:38:44] tjbiddle: Seeeeeeee :)
[16:39:00] sevenseacat: tjbiddle: and you still did it
[16:39:07] tjbiddle: sevenseacat: Shit!
[16:39:09] jhass: I don't think so...
[16:39:14] jenrzzz: has joined #RubyOnRails
[16:39:23] tjbiddle: Point being - I still consider guys gender agnostic. Just saying; you gave me crap and you do it too
[16:40:04] tjbiddle: You…. you.. you just said guys like 6 times
[16:40:15] Keepbro: First off brought my first computer two years ago - started learning to code last year - just finished the rails tutorials and all that - uber noob!! right so I run a print shop and I am looking to make a small social network for my clients (artists) to post their art and pics online where they can be sociallised and the likey stuff BUT also where people can choose to buy them
[16:40:28] jhass: tjbiddle: I invite you to #ruby-offtopic or #RubyOnRails-offtopic for that discussion, let's focus on Rails here ;)
[16:40:54] tycoon177: tjbiddle: "everyone" refers to everyone. "guys" refers to guys. they are not gender agnostic
[16:40:59] tjbiddle: jhass: Is that a new channel? Because I swear this place is off-topic half the time I come in ha
[16:41:07] arBmind: has joined #RubyOnRails
[16:41:09] jhass: tycoon177: you're invited over there too!
[16:41:14] sevenseacat: i do not invite random people to those channels, no.
[16:41:17] tycoon177: thanks jhass :P
[16:41:29] let_jesus_take_t: meh screw facebook oauth i'll just make my own obscure social network and SSH into the database for user auth... I'll call it DOHAuth
[16:41:57] tycoon177: let_jesus_take_t: https://github.com/mkdynamic/omniauth-facebook literally tells you how to use the js stuff as well
[16:42:56] tycoon177: open yer eyes
[16:43:14] tjbiddle: tycoon177: As I said *I* consider it gender agnostic. If I walk into a room with guys and gals - I’ll still say hey guys. If it was all ladies, I say hey ladies. My girl friends would do the same thing. Geographic differences probably. I’ve never run into someone offended by it; was just pointing it out to sevenseacat since (I think - she?) just did the same and was making a joke (that was not received apparently). Anyhow -
[16:43:14] tjbiddle: offtopic channel I go.
[16:43:23] tycoon177: tjbiddle: not in this channel
[16:43:25] beilabs: has joined #RubyOnRails
[16:43:28] tjbiddle: Can anyone shed like on my service object question/discussion though?
[16:43:37] zacts: has joined #RubyOnRails
[16:43:53] tjbiddle: tycoon177: I know. Just finishing my thought before switching channels and confusing everyone.
[16:44:01] banisterfiend: did this guy buy followers on twitter? *scratches head* https://twitter.com/nzkoz
[16:44:57] tycoon177: did #RubyOnRails and #ruby-offtopic switch places in the past 5 minutes?
[16:45:06] sevenseacat: banisterfiend: i very much doubt it
[16:45:42] banisterfiend: sevenseacat 233K followers ? :) that's more than DHH, and nearly any other famous programmer i know....
[16:45:43] let_jesus_take_t: wait so tycoon177 if the longest period the access_token can live for is 60 days how come I don't need to login to tinder every 60 days?
[16:46:18] banisterfiend: sevenseacat hell, it's more than most celebrities
[16:46:22] jhass: Keepbro: going to ask some actual question? ;)
[16:46:28] Cohedrin: has joined #RubyOnRails
[16:46:33] tycoon177: let_jesus_take_t: they probably do not store the token. They probably store their own key on your device that tells them who you are
[16:46:58] xall_: has joined #RubyOnRails
[16:46:58] abhinavmehta: has joined #RubyOnRails
[16:48:18] n90b0jjf: has joined #RubyOnRails
[16:48:40] let_jesus_take_t: tinder only lets you select from pictures you have uploaded to FB when customising your profile; so when you upload a new image on facebook what are they doing to be able to access those new images?
[16:48:58] maxdoubt: has joined #RubyOnRails
[16:49:10] sevenseacat: re-authing. getting new tokens and using them.
[16:49:20] tycoon177: let me go check the tinder code i have on github
[16:49:30] Keepbro: so my problem is creating the right app models - I have a user class and profile class and Im guessing that I am going to have to create a sort of viewer class for other people but trying to put a shopping cart into this is where I am having so difficulty
[16:49:43] tycoon177: ... /s let_jesus_take_t
[16:50:00] let_jesus_take_t: I know you've said re-authing twice already but in my mind re-authing means logging in again
[16:50:14] zacts|pi: has joined #RubyOnRails
[16:50:42] renegadeandy: has joined #RubyOnRails
[16:50:43] let_jesus_take_t: https://developers.facebook.com/docs/facebook-login/reauthentication
[16:50:50] let_jesus_take_t: Sometimes you just need to google it
[16:50:55] sevenseacat: funny what happens when i say check the docs and then people dont
[16:51:08] tycoon177: https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension let_jesus_take_t
[16:51:13] let_jesus_take_t: i did I just didn't check the right docs
[16:52:06] Keepbro: my guess is that I have to create a shop class (?) which links with a viewer class?
[16:52:31] Keepbro: but Im not sure because Im kinda new to all this
[16:52:54] let_jesus_take_t: tycoon177 and sevenseacat you are both legends I wish you many rubys and diamonds in fortune :) goodest of nights!
[16:53:34] tycoon177: i just asked a question because i didn't make a link_to correctly..but legend status is nice
[16:53:53] HalcyonicStorm: tycoon177: don't get used to it
[16:54:12] adavia: has joined #RubyOnRails
[16:54:12] tycoon177: i wont HalcyonicStorm
[16:54:26] tycoon177: i work with rails at my job so this is like a weekly adventure
[16:54:29] mbreedlove: has joined #RubyOnRails
[16:54:36] HalcyonicStorm: i was gonna say a funny snarky comment, but nothing is coming to me, so now my comment just seems mean
[16:54:47] let_jesus_take_t: tycoon177 is still a legend as of 2:54am
[16:55:04] HalcyonicStorm: yeah the time is 12:55pm
[16:55:13] Oliphaunte: has joined #RubyOnRails
[16:55:13] HalcyonicStorm: the rest of the times are pretenders
[16:55:18] let_jesus_take_t: HalcyonicStorm bollocks its 2:55am
[16:55:32] let_jesus_take_t: do you live under a rock?
[16:55:34] tycoon177: EVERYONE USE UGT! then we wont have this issue
[16:55:36] let_jesus_take_t: get with the times, mate
[16:55:41] tycoon177: http://www.total-knowledge.com/~ilya/mips/ugt.html
[16:55:44] HalcyonicStorm: let_jesus_take_t: I live under a roof
[16:55:53] tycoon177: always morning when someone joins, night when they leave
[16:56:19] lxsameer: has joined #RubyOnRails
[16:56:26] hd1: has joined #RubyOnRails
[16:56:30] HalcyonicStorm: tycoon177: but i have an irc bouncer...so im always heeeere
[16:56:41] tycoon177: i have irccloud, same situation HalcyonicStorm
[16:56:48] mbreedlove: has joined #RubyOnRails
[16:56:50] harfangk: has joined #RubyOnRails
[16:56:50] let_jesus_take_t: helo i live under brige i make the 'book face' in railstheruby for money i dream being billionare in silicon valley :))))))))
[16:57:18] tycoon177: oh it's around lunch time
[16:57:27] jhass: Keepbro: I'd create an order and have a flag on it whether it was submitted. The most recent unsubmitted order of an user is your shopping cart
[16:57:29] tycoon177: i'll be back later people :D
[16:57:58] HalcyonicStorm: tycoon177: take me with youuuuuu
[16:58:01] HalcyonicStorm: i wants some food
[16:58:11] tycoon177: what should we get HalcyonicStorm?
[16:58:15] tycoon177: ACTION doesnt know what to get
[16:58:21] HalcyonicStorm: I'm thinking kati rolls
[16:58:38] let_jesus_take_t: Cant go wrong with a KFC mate
[16:58:40] HalcyonicStorm: let_jesus_take_t: no
[16:58:58] ur5us: has joined #RubyOnRails
[16:59:04] helpa: Why not try Chinese Food? http://www.youtube.com/watch?v=wWLhrHVySgA
[16:59:10] helpa: Why not try Chinese Food? http://www.youtube.com/watch?v=wWLhrHVySgA
[16:59:12] tycoon177: i havent had kfc in like ages
[16:59:12] DoctorMonocular: has joined #RubyOnRails
[16:59:19] nettoweb: has joined #RubyOnRails
[16:59:31] let_jesus_take_t: kfc is good for the heart
[16:59:43] tycoon177: quite the opposite :P
[16:59:45] let_jesus_take_t: i love eating slaughtered animals it makes me feel biologically superior
[16:59:50] let_jesus_take_t: good for the ego too
[17:00:11] Tref: has joined #RubyOnRails
[17:00:13] tycoon177: i think i may go eat a sandwich and soup down the road
[17:00:17] nettoweb: hey guys, is it possible to add an "dashboard" class on body tag if the page has before_action :authenticate_user! using devise?
[17:00:23] let_jesus_take_t: tycoon177 solid plan
[17:00:25] HalcyonicStorm: tycoon177: im thinking hale and hearty?
[17:00:36] nettoweb: I dont know if I can know it in view, maybe only in controller
[17:00:44] tercenya: has joined #RubyOnRails
[17:01:08] tycoon177: that doesnt sound like the right way to do things nettoweb
[17:01:26] Keepbro: jhass - so not an actual shopping cart then? more just if a flag is raised on an unsubmitted order which I get then I just get in touch and do the sale in real time and not automagically?
[17:02:21] jhass: an actual shopping cart, just not a distinct model for it
[17:03:51] jenrzzz: has joined #RubyOnRails
[17:03:52] Keepbro: ok back to bad hacking and continuing my adventure of becoming ever so slightly crappy at things
[17:03:58] nettoweb: tycoon177 but you understand what Im looking for? just a class so I can set some styles for dashboard. do you suggest me another way? or the right way?
[17:04:03] Keepbro: sorry less crappy at things
[17:04:10] Keepbro: me being crappy again
[17:04:26] aegis3121: has joined #RubyOnRails
[17:04:37] Keepbro: thank you jhass god bless and may the interweb rain love and money on you
[17:04:43] let_jesus_take_t: storing passwords in plaintext is fine as long as you dont get hacked
[17:05:28] Keepbro: has left #RubyOnRails: ()
[17:05:37] tycoon177: Make a helper method nettoweb
[17:06:04] macsteps: has joined #RubyOnRails
[17:07:13] Tref: has joined #RubyOnRails
[17:09:14] tercenya: has joined #RubyOnRails
[17:11:29] Tref: has joined #RubyOnRails
[17:11:46] gopz: has joined #RubyOnRails
[17:12:17] snowy: has joined #RubyOnRails
[17:13:07] tvon: has joined #RubyOnRails
[17:13:17] douglascorrea: has joined #RubyOnRails
[17:13:38] FooMunki: has joined #RubyOnRails
[17:14:08] rickmasta: has joined #RubyOnRails
[17:14:37] King_Rex: has joined #RubyOnRails
[17:16:03] aegis3121: has joined #RubyOnRails
[17:17:18] gopz: has joined #RubyOnRails
[17:19:59] SteenJobs: has joined #RubyOnRails
[17:21:52] zacts: has joined #RubyOnRails
[17:23:15] zacts|pi: has joined #RubyOnRails
[17:24:23] tvon: has joined #RubyOnRails
[17:26:09] Oliphaunte: has joined #RubyOnRails
[17:28:41] Ericx2x_: has joined #RubyOnRails
[17:29:41] mdw: has joined #RubyOnRails
[17:29:56] Velizar: Is there a way to re-render the current form and keep the URL of the form for JS purposes?
[17:30:55] Velizar: since my JS has URL-specific .ready() code, and my pages with forms have JS validation
[17:33:56] gopz: has joined #RubyOnRails
[17:36:02] hahuang65: has joined #RubyOnRails
[17:36:02] zacts|pi: has joined #RubyOnRails
[17:36:42] tildes: has joined #RubyOnRails
[17:37:01] aegis3121: has joined #RubyOnRails
[17:39:47] roamingdog: has joined #RubyOnRails
[17:40:52] fernandomm: has joined #RubyOnRails
[17:41:49] Ericx2x_: Is there an off topic for rubyonrails?
[17:42:08] Guest08090: has joined #RubyOnRails
[17:42:08] Lehat: has joined #RubyOnRails
[17:42:08] TaFFY: has joined #RubyOnRails
[17:42:08] ^Pangeran: has joined #RubyOnRails
[17:42:08] Itik_Gambut: has joined #RubyOnRails
[17:42:08] Bugoy: has joined #RubyOnRails
[17:42:08] Chandra: has joined #RubyOnRails
[17:42:08] buttface4: has joined #RubyOnRails
[17:42:08] ^_VamPire_^: has joined #RubyOnRails
[17:42:08] preetybabe: has joined #RubyOnRails
[17:42:08] co_chn_SPA: has joined #RubyOnRails
[17:42:08] putra_XneT-: has joined #RubyOnRails
[17:42:09] NoFree_jua: has joined #RubyOnRails
[17:42:09] Penyiar_net: has joined #RubyOnRails
[17:42:09] ineer: has joined #RubyOnRails
[17:42:09] CuMi2: has joined #RubyOnRails
[17:42:09] BisPaK: has joined #RubyOnRails
[17:42:09] ^co_sunter^: has joined #RubyOnRails
[17:42:09] BuTeRfLy: has joined #RubyOnRails
[17:42:09] Lehat: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:09] P0PPY: has joined #RubyOnRails
[17:42:09] Guest08090: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:09] ^_VamPire_^: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:09] putra_XneT-: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:09] buttface4: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:09] co_chn_SPA: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:10] Bugoy: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:10] Penyiar_net: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:10] Itik_Gambut: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:10] CuMi2: PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP! PLEASE JOIN #WRONGPLANET AND GET FREE STUFF! FROM BITCOINS TO RANDOM CRAP!
[17:42:10] PenuSiluk: has joined #RubyOnRails
[17:42:10] Maffiozo: has joined #RubyOnRails
[17:42:10] www-indosat-us: has joined #RubyOnRails
[17:42:13] Guest08090: has left #RubyOnRails: ()
[17:42:13] Lehat: has left #RubyOnRails: ()
[17:42:13] www-indosat-us: has left #RubyOnRails: ()
[17:42:13] Itik_Gambut: has left #RubyOnRails: ()
[17:42:13] buttface4: has left #RubyOnRails: ()
[17:42:13] ^Pangeran: has left #RubyOnRails: ()
[17:42:14] ^_VamPire_^: has left #RubyOnRails: ()
[17:42:14] Chandra: has left #RubyOnRails: ()
[17:42:14] Bugoy: has left #RubyOnRails: ()
[17:42:14] putra_XneT-: has left #RubyOnRails: ()
[17:42:14] Penyiar_net: has left #RubyOnRails: ()
[17:42:14] co_chn_SPA: has left #RubyOnRails: ()
[17:42:14] NoFree_jua: has left #RubyOnRails: ()
[17:42:14] TaFFY: has left #RubyOnRails: ()
[17:42:14] CuMi2: has left #RubyOnRails: ()
[17:42:14] ineer: has left #RubyOnRails: ()
[17:42:14] PenuSiluk: has left #RubyOnRails: ()
[17:42:14] BuTeRfLy: has left #RubyOnRails: ()
[17:42:14] BisPaK: has left #RubyOnRails: ()
[17:42:14] Maffiozo: has left #RubyOnRails: ()
[17:42:14] P0PPY: has left #RubyOnRails: ()
[17:42:15] ^co_sunter^: has left #RubyOnRails: ()
[17:42:19] preetybabe: has left #RubyOnRails: ()
[17:42:24] Zoddo: has joined #RubyOnRails
[17:42:27] GnuYawk: has joined #RubyOnRails
[17:42:28] xall_: has joined #RubyOnRails
[17:42:41] Guest08090: has joined #RubyOnRails
[17:42:41] Maffiozo: has joined #RubyOnRails
[17:42:41] BisPaK: has joined #RubyOnRails
[17:42:41] ^Pangeran: has joined #RubyOnRails
[17:42:41] Itik_Gambut: has joined #RubyOnRails
[17:42:42] TaFFY: has joined #RubyOnRails
[17:42:42] PenuSiluk: has joined #RubyOnRails
[17:42:42] Bugoy: has joined #RubyOnRails
[17:42:42] ^_VamPire_^: has joined #RubyOnRails
[17:42:42] putra_XneT-: has joined #RubyOnRails
[17:42:42] NoFree_jua: has joined #RubyOnRails
[17:42:42] co_chn_SPA: has joined #RubyOnRails
[17:42:42] Penyiar_net: has joined #RubyOnRails
[17:42:42] CuMi2: has joined #RubyOnRails
[17:42:42] BuTeRfLy: has joined #RubyOnRails
[17:42:42] buttface4: has joined #RubyOnRails
[17:42:42] Chandra: has joined #RubyOnRails
[17:42:42] ineer: has joined #RubyOnRails
[17:42:42] www-indosat-us: has joined #RubyOnRails
[17:42:43] P0PPY: has joined #RubyOnRails
[17:42:43] ^co_sunter^: has joined #RubyOnRails
[17:42:43] preetybabe: has joined #RubyOnRails
[17:42:43] Lehat: has joined #RubyOnRails
[17:42:44] Guest08090: has left #RubyOnRails: ()
[17:42:44] BuTeRfLy: has left #RubyOnRails: ()
[17:42:44] buttface4: has left #RubyOnRails: ()
[17:42:44] Bugoy: has left #RubyOnRails: ()
[17:42:44] Itik_Gambut: has left #RubyOnRails: ()
[17:42:44] ^Pangeran: has left #RubyOnRails: ()
[17:42:44] NoFree_jua: has left #RubyOnRails: ()
[17:42:44] Chandra: has left #RubyOnRails: ()
[17:42:44] ^_VamPire_^: has left #RubyOnRails: ()
[17:42:44] co_chn_SPA: has left #RubyOnRails: ()
[17:42:44] putra_XneT-: has left #RubyOnRails: ()
[17:42:44] Penyiar_net: has left #RubyOnRails: ()
[17:42:44] CuMi2: has left #RubyOnRails: ()
[17:42:44] TaFFY: has left #RubyOnRails: ()
[17:42:44] ineer: has left #RubyOnRails: ()
[17:42:45] PenuSiluk: has left #RubyOnRails: ()
[17:42:45] Lehat: has left #RubyOnRails: ()
[17:42:45] BisPaK: has left #RubyOnRails: ()
[17:42:45] Maffiozo: has left #RubyOnRails: ()
[17:42:45] Ebok: has joined #RubyOnRails
[17:42:46] P0PPY: has left #RubyOnRails: ()
[17:42:46] www-indosat-us: has left #RubyOnRails: ()
[17:42:47] preetybabe: has left #RubyOnRails: ()
[17:42:49] ^co_sunter^: has left #RubyOnRails: ()
[17:43:58] Ebok: I have a question. I need to have a rails controller redirect a post request to another website, and I need to be able to change the headers of this request.
[17:44:14] Papierkorb: Another website?
[17:44:42] Ebok: Yup. I have control over both, and the other is expecting a very specific type of entry.
[17:45:24] Papierkorb: POST requests can't be redirected, as in, they'll get "transformed" into GET requests
[17:45:52] Papierkorb: Do that through Javascript on the client, keeping in mind the cross origin stuff
[17:46:02] macsteps: has joined #RubyOnRails
[17:46:13] abhinavmehta: has joined #RubyOnRails
[17:46:35] jenrzzz: has joined #RubyOnRails
[17:46:35] jenrzzz: has joined #RubyOnRails
[17:46:55] tjbiddle: has joined #RubyOnRails
[17:46:55] Papierkorb: Ebok: Huh, looks like actually, status code 307 Temporary Redirect does that
[17:47:55] Papierkorb: Ebok: https://tools.ietf.org/html/rfc7231#section-6.4.7 Yup, from what the RFC says, it actually works with any request method
[17:50:20] hd1: has joined #RubyOnRails
[17:50:28] desmondhume: has joined #RubyOnRails
[17:51:50] GnuYawk: has joined #RubyOnRails
[17:54:05] qejk: has joined #RubyOnRails
[17:57:30] whathappens: has joined #RubyOnRails
[17:58:11] yoongkang: has joined #RubyOnRails
[17:58:34] adre: has joined #RubyOnRails
[17:58:49] blackmesa: has joined #RubyOnRails
[17:59:03] jenrzzz: has joined #RubyOnRails
[17:59:03] jenrzzz: has joined #RubyOnRails
[17:59:40] roamingdog: has joined #RubyOnRails
[18:00:08] mbreedlove: has joined #RubyOnRails
[18:01:50] hd1: has joined #RubyOnRails
[18:03:10] pur3eval: has joined #RubyOnRails
[18:03:25] desmondhume: has joined #RubyOnRails
[18:03:50] dat1guy: has joined #RubyOnRails
[18:04:47] dat1guy: I'd like to have a non-database activemodel attribute (defined as a method on the model) that is taken into account when using the path_helper of this model. Anybody have an idea of how I could achieve this?
[18:05:02] mbreedlo_: has joined #RubyOnRails
[18:06:20] Ratler: has joined #RubyOnRails
[18:06:49] Ratler: has joined #RubyOnRails
[18:07:17] mbreedlove: has joined #RubyOnRails
[18:08:43] jhass: are you looking to define to_param ?
[18:10:27] Leepoff: has joined #RubyOnRails
[18:11:56] dat1guy: jhass: if the rails path helpers use to_param to get the data, I guess I am?
[18:12:53] mbreedlove: has joined #RubyOnRails
[18:13:22] openstruct: has joined #RubyOnRails
[18:15:12] mbreedlove: has joined #RubyOnRails
[18:15:33] dat1guy: Thanks a lot
[18:17:31] mbreedlove: has joined #RubyOnRails
[18:17:33] chipotle: has joined #RubyOnRails
[18:17:43] openstruct: Might be the wrong place for this, but I'm using Devise with omniauth-github. If I wanted to make authorized requests on the user's behalf, I should get an access token separately than the one that omniauth-github returns, right?
[18:17:48] tycoon177: what was all that spam while i was gone?
[18:18:15] jiblet: has joined #RubyOnRails
[18:19:23] jiblet: Hello, I have a multi_select form which is being passed a collection. I want to add an "edit" button next to each opject which takes it to the object's edit page. I cant think of how to do this at all
[18:19:27] jiblet: http://pastebin.com/7m5x5Ghx
[18:19:48] Axy: has joined #RubyOnRails
[18:19:48] Axy: has joined #RubyOnRails
[18:19:57] jiblet: https://gist.github.com/wschievink-fiksu/b73eb284ca74918ad023e523cf771647
[18:21:05] tercenya: has joined #RubyOnRails
[18:21:23] rafaelfranca: has joined #RubyOnRails
[18:21:31] tycoon177: first off, why wouldn't you do f.select :clients, @clients_for_multiselect ?
[18:22:11] jiblet: wasn't aware of that short hand. I will change it
[18:22:35] tycoon177: there are for most, if not all input types
[18:24:36] rickmasta: has joined #RubyOnRails
[18:25:42] jenrzzz: has joined #RubyOnRails
[18:26:35] rodferso1: has joined #RubyOnRails
[18:28:06] manfrin_: has joined #RubyOnRails
[18:28:11] arup_r: has joined #RubyOnRails
[18:35:01] dionysus69: has joined #RubyOnRails
[18:39:21] abhinavmehta: has joined #RubyOnRails
[18:40:06] sypheren: has joined #RubyOnRails
[18:40:32] zacts: has joined #RubyOnRails
[18:40:51] disgrntld: has joined #RubyOnRails
[18:41:06] MrPunkin: has joined #RubyOnRails
[18:41:38] macsteps: has joined #RubyOnRails
[18:41:41] chipotle: has joined #RubyOnRails
[18:45:33] hd1: has joined #RubyOnRails
[18:50:21] yardenbar: has joined #RubyOnRails
[18:50:44] douglascorrea: has joined #RubyOnRails
[18:51:29] conta: has joined #RubyOnRails
[18:52:26] desmondhume: has joined #RubyOnRails
[18:53:11] rickmasta: has joined #RubyOnRails
[18:59:12] whathappens: has joined #RubyOnRails
[18:59:45] yoongkang: has joined #RubyOnRails
[18:59:50] MrPunkin: Without wanting to actually make calls to an external service, as VCR does, is there a currently preferred GEM to help with mocking up API responses from third-party APIs?
[19:00:47] whathapp_: has joined #RubyOnRails
[19:01:47] hd1: has joined #RubyOnRails
[19:02:01] conta: has joined #RubyOnRails
[19:02:19] mbreedlove: has joined #RubyOnRails
[19:03:02] meoblast001: has joined #RubyOnRails
[19:08:40] newbism: has joined #RubyOnRails
[19:09:01] hd1: has joined #RubyOnRails
[19:10:59] apotry: has joined #RubyOnRails
[19:11:02] newbism: Hello. I created an initializer to run a bot script, how can I get my bot to write to activerecord models?
[19:12:26] bphogan: Mrpunkin: https://github.com/bblimke/webmock
[19:13:44] mbreedlove: has joined #RubyOnRails
[19:14:30] epochwolf: newbism: The initializers are a bad place to make database queries. What are you trying to do?
[19:15:26] newbism: epochwolf: get https://github.com/dblock/slack-ruby-bot to write to activerecord
[19:15:56] mbreedlove: has joined #RubyOnRails
[19:15:58] pwnd_nsfw: has joined #RubyOnRails
[19:16:29] epitron: has joined #RubyOnRails
[19:16:46] epochwolf: newbism: you're running a slack bot in a rails app?
[19:18:06] mbreedlove: has joined #RubyOnRails
[19:18:18] newbism: epochwolf: well currently I have it just ruby using the sequel gem, which can be a bear. Then I realized I wanted the bot to consume from another app's api so I found https://github.com/remiprev/her but I need authentication and it seems easiest in activerecord
[19:18:41] apotry: has joined #RubyOnRails
[19:18:50] newbism: epochwolf: there is a rails example but it does not use active recrod https://github.com/dblock/slack-bot-on-rails
[19:20:15] mbreedlove: has joined #RubyOnRails
[19:20:49] epochwolf: This is horrifying. It's using a rails initializer to launch another thread containing the bot.
[19:21:25] epochwolf: And then it's rails caching for message passing.
[19:21:29] epochwolf: it's using*
[19:21:35] jhack: has joined #RubyOnRails
[19:22:27] mbreedlove: has joined #RubyOnRails
[19:22:31] yardenbar: has joined #RubyOnRails
[19:23:34] arBmind: has joined #RubyOnRails
[19:24:35] mbreedlove: has joined #RubyOnRails
[19:24:40] aegis3121: has joined #RubyOnRails
[19:24:46] pur3eval: has joined #RubyOnRails
[19:25:24] travismathis: has joined #RubyOnRails
[19:26:50] lunaelli: has joined #RubyOnRails
[19:28:43] beilabs: has joined #RubyOnRails
[19:29:34] Coldblackice_: has joined #RubyOnRails
[19:30:24] epochwolf: newbism: you'd be better off just using active record on it's own.
[19:30:54] epochwolf: All you need to do is set up a database connection when the bot starts and then require all models you want to use.
[19:31:00] dblessing: has joined #RubyOnRails
[19:31:20] newbism: epochwolf: hmm interesting, I didn't consider you can separate activerecord like that from rails
[19:31:51] petor: has joined #RubyOnRails
[19:32:03] epochwolf: It's fully functional as a seperate library.
[19:32:57] pickandmix: Hey, just wanna ask.
[19:33:12] pickandmix: Isn't 'partial' in RoR a similar concept to reactJS?
[19:33:20] pickandmix: Why is there a need for React on Rails?
[19:33:58] epochwolf: PickAndMix: thin client vs. thick client.
[19:34:11] pickandmix: epochwolf: do you mind explaining that?
[19:34:21] pickandmix: All I know is the D.R.Y concept
[19:34:42] epochwolf: Thin client = render everything server side and send minimal code to the client to make things work.
[19:34:56] pickandmix: And both of them seems to apply the same logic, but ReactJS seems to be breaking itself into the smallest possible piece to be re-usable.
[19:35:10] pickandmix: Though somehow I thought partial is the same thing tool
[19:35:16] epochwolf: Thick client = render everything on the client and have minimal rendering server side.
[19:35:51] pickandmix: So I'm assuming server side would be rails, while client side would be react?
[19:36:05] epochwolf: Or Angular, Ember, etc.
[19:36:17] pickandmix: epochwolf: I see!
[19:36:24] pickandmix: thank you for clearing that up.
[19:36:40] epochwolf: Some applications are better when everything is in javascript and rails is just a json api.
[19:37:05] pickandmix: would you have an example
[19:37:07] epochwolf: Others are better with rails rendering the html and having as little javascript as you can get away with.
[19:37:19] pickandmix: of when it's better to use reactjs and when to use ruby on rails?
[19:37:23] epochwolf: Gmail is much better as a thick client.
[19:38:18] epochwolf: A blog is much better as a thin client. It's basically a page with text.
[19:38:27] abhinavmehta: has joined #RubyOnRails
[19:38:27] mbreedlove: has joined #RubyOnRails
[19:38:46] jstransky: has joined #RubyOnRails
[19:38:48] pickandmix: but doesn't both have like a datbaase to store
[19:38:54] pickandmix: the mails/text
[19:39:07] epochwolf: Yes, they do.
[19:39:19] epochwolf: Gmail communicates back to the server via api.
[19:39:33] havenwood: PickAndMix: It's true that Rails partials and React components are both used to break the rendering into more manageable chunks. You can have components in your Rails views (see the react-rails gem) just like partials.
[19:40:24] pur3eval: has joined #RubyOnRails
[19:40:35] Synthead: I'm building a docker image with passenger in it, and I'm putting passenger-install-nginx-module in the Dockerfile. I want to keep the image size small, so it'd be great to delete the downloaded files, the sources it compiled from, etc. Is there a supported way to do this, or should I just rm -r some of the directories in /usr/lib/ruby/gems/2.3.0/gems/passenger-5.0.29?
[19:40:48] epochwolf: PickAndMix: the rendering is just which side makes the html. All of the database actions still happen on the server.
[19:40:49] GnuYawk: has joined #RubyOnRails
[19:40:50] pickandmix: Okay, I should stop probing into these. haha It's confusing me and I should really get to understanding rails first before proceed to react or anything else.
[19:41:09] pickandmix: Thanks guys, at least I got a better understanding on what's going on. It's just boggling my mind earlier so much.
[19:41:15] Or1on: has joined #RubyOnRails
[19:41:17] Zoddo: has left #RubyOnRails: ()
[19:41:18] epochwolf: PickAndMix: It's best to understand how the parts underneath work.
[19:41:38] pickandmix: epochwolf: Yeah but is my approach to understand how rails work before moving forward a good choice?
[19:41:43] pickandmix: Right now I'm doing railstutorial.org
[19:41:51] epochwolf: PickAndMix: it's not a terrible one.
[19:42:28] epochwolf: I'd definitely look up on how http works when you have a minute.
[19:42:34] hd1: has joined #RubyOnRails
[19:43:00] pickandmix: Ah, just probing for a sec, is there like a.. systematic approach to how I should be approaching these?
[19:43:02] Darmani: has joined #RubyOnRails
[19:43:07] pickandmix: So example ruby -> rails -> something else
[19:43:17] epochwolf: You can learn ruby and rails at the same time.
[19:43:36] pickandmix: I'm loving rails right now, it's seems really fun to work with.
[19:43:51] pickandmix: So my current plan is to build a personal project out of it once I'm done with the tutorial.
[19:43:55] epochwolf: I'm recommending learning http so you know how data is communicated between the web browser and rails.
[19:44:14] pickandmix: epochwolf: so to learn 'http', I should google 'http tutorials'?
[19:44:23] epochwolf: PickAndMix: I'll grab something.
[19:44:35] pickandmix: What do you mean?
[19:44:56] tercenya: has joined #RubyOnRails
[19:46:23] epochwolf: PickAndMix: http is a protocol, not a language.
[19:47:13] epochwolf: It's a message format that a web browser can understand.
[19:47:48] pickandmix: okay. Basically what I should do is play around with it.
[19:48:00] pickandmix: I ain't too familiar with it right now. But I'll look into it
[19:48:04] pickandmix: Thank you for your kind advices :)
[19:48:10] epochwolf: This is kind of lower level network stuff.
[19:48:55] epochwolf: There's at least 4 more layers before you start talking about electrical or fiber lines :)
[19:49:10] pickandmix: O.O I don't wanna go that deep.. T.T
[19:49:17] epochwolf: You don't need to.
[19:49:25] pickandmix: I just wanna build products for users.
[19:49:32] epochwolf: HTTP, DNS, and the basics of IP addresses is enough.
[19:49:35] pickandmix: for myself actually :P
[19:49:49] pickandmix: thank you epochwolf , I'll get back to studying :)
[19:50:13] rickmasta: has joined #RubyOnRails
[19:50:18] epochwolf: HTTP is the only protocol that you'd need to know the insides of. Everything else is just vague knowledge. :)
[19:50:32] pickandmix: epochwolf: noted.
[19:51:10] epochwolf: Yeah, it just helps to know what rails is built on. Once you're on the internet stuff breaks occasionally.
[19:51:33] Dimik: has joined #RubyOnRails
[19:53:58] Darmani: For some reason my line_items aren't showing up in my archived users history. Does anyone know why that might happen?
[19:54:07] Darmani: gist page - https://gist.github.com/mfifth/01f352a23ff4fef4424b38ef1fe968e1
[19:57:17] tercenya: has joined #RubyOnRails
[19:58:36] Darmani: If I look through the console the items that were ordered are clearly seen so I know they exist... I just don't know why they aren't showing up.
[20:00:13] MrPunkin: has joined #RubyOnRails
[20:00:17] yoongkang: has joined #RubyOnRails
[20:02:30] Rodya_: has joined #RubyOnRails
[20:05:19] doublemalt_: has joined #RubyOnRails
[20:05:49] dionysus69: app is strangely lagging, even unresponsive on route changes. no errors go into app log and I cant find anything wrong with nginx either. is anything wrong with digitalocean? :S
[20:06:11] SteenJobs: has joined #RubyOnRails
[20:06:24] banisterfiend: has joined #RubyOnRails
[20:06:32] mbreedlove: has joined #RubyOnRails
[20:09:16] rickmasta: has joined #RubyOnRails
[20:10:09] n90b0jjf: has joined #RubyOnRails
[20:11:12] JamesGames: has joined #RubyOnRails
[20:11:41] JamesGames: https://gist.github.com/anonymous/109d3d2c1c1cb155e95ccc77810f2260 Crazy trouble with a join table!! it's ridiculous hard
[20:13:41] solars: has joined #RubyOnRails
[20:14:58] rrawlins: has joined #RubyOnRails
[20:15:35] emachnic: has joined #RubyOnRails
[20:15:35] maxdoubt: has joined #RubyOnRails
[20:18:02] maxdoubt: has joined #RubyOnRails
[20:18:38] gremly: has joined #RubyOnRails
[20:20:18] mbreedlove: has joined #RubyOnRails
[20:24:43] roamingdog: has joined #RubyOnRails
[20:24:45] JakFrist: has joined #RubyOnRails
[20:27:35] maxdoubt: has joined #RubyOnRails
[20:28:30] quazimodo: has joined #RubyOnRails
[20:28:45] quazimod1: has joined #RubyOnRails
[20:31:45] amiuhle: has joined #RubyOnRails
[20:35:15] tjohnson: has joined #RubyOnRails
[20:35:36] roamingdog: has joined #RubyOnRails
[20:36:27] Leepoff: has joined #RubyOnRails
[20:37:50] roshanavand: has joined #RubyOnRails
[20:38:25] arup_r: has joined #RubyOnRails
[20:40:45] aspieguy: has joined #RubyOnRails
[20:41:17] aspieguy: How do I know what classes are available in a given .html.erb file?
[20:41:55] maxdoubt: has joined #RubyOnRails
[20:42:19] evansbee: has joined #RubyOnRails
[20:44:33] jhass: constants are global, classes are usually assigned to constants, so practically all of them are
[20:44:47] ur5us: has joined #RubyOnRails
[20:45:47] daveomcd: has joined #RubyOnRails
[20:46:24] aegis3121: has joined #RubyOnRails
[20:48:21] aspieguy: Well, I have a home page, and I need to access methods from other controllers in its view.
[20:49:03] tubbo: your view is being rendered within the instance of a given controller, so that might be hard
[20:49:11] tubbo: knowing this, why not make the method a helper method?
[20:50:04] SteenJobs: has joined #RubyOnRails
[20:50:22] aspieguy: Can I make partial views for the controllers, and then render those from my home page?
[20:50:56] rickmasta: has joined #RubyOnRails
[20:50:59] Radar: GOOD MORNING
[20:51:12] SteenJobs: morn’ radar
[20:51:28] yfeldblum: has joined #RubyOnRails
[20:52:07] SteenJobs: anyone have a tried and true Upstart script for God that they can share?
[20:53:38] maxdoubt: has joined #RubyOnRails
[20:54:47] padi: has joined #RubyOnRails
[20:57:55] jhass: aspieguy: views shouldn't know anything about a controller, they're certainly not bound to one
[20:58:00] travismathis: has joined #RubyOnRails
[20:58:09] jhass: they're just executed in the context of one, any one
[20:58:13] dvinciguerra_: has joined #RubyOnRails
[21:01:11] yoongkang: has joined #RubyOnRails
[21:03:19] blackmesa: has joined #RubyOnRails
[21:06:18] GodFather: has joined #RubyOnRails
[21:06:59] seventy: has joined #RubyOnRails
[21:08:26] Oliphaunte: has joined #RubyOnRails
[21:09:51] Oliphaunte: has joined #RubyOnRails
[21:10:00] banisterfiend: has joined #RubyOnRails
[21:10:11] ryker: has joined #RubyOnRails
[21:13:12] yfeldblum: has joined #RubyOnRails
[21:13:15] srinidhi: has joined #RubyOnRails
[21:13:32] jfelchner: has joined #RubyOnRails
[21:13:56] asianMike: has joined #RubyOnRails
[21:14:07] emachnic_: has joined #RubyOnRails
[21:15:34] Darmani: jhass: I finished my app today! Everything seems to be working. I'm just adding some RSpec tests and then it will be done :D
[21:19:23] kaww: has joined #RubyOnRails
[21:19:55] der-landgraf: has joined #RubyOnRails
[21:20:02] neanderslob: has joined #RubyOnRails
[21:20:03] neanderslob_: has joined #RubyOnRails
[21:21:26] xall_: has joined #RubyOnRails
[21:22:59] SteenJobs: hey all - can someone explain to me how to reconcile cap installing gems into my_app/shared/bundle, with rvm when the app itself is located in my_app/current/ ?
[21:23:17] yfeldblum: has joined #RubyOnRails
[21:23:43] fryguy: SteenJobs: you configure capistrano to symlink that to the appropriate place, using "link_dirs"
[21:24:56] SteenJobs: fryguy: ah ok. i picked all this code up when the dev who handled production quit, so while i have probs 90% of it down, a few things still elude me. i’m not hitting any errors, seems to work fine, but my guess is that’s because he didn’t build it properly and cap is not using rvm installed on the server
[21:25:01] eljimbo: has joined #RubyOnRails
[21:25:25] banisterfiend: has joined #RubyOnRails
[21:25:49] FCser: has joined #RubyOnRails
[21:26:27] SteenJobs: fryguy: the issue arose when i tried running a custom cap task that used “bundle exec” but bundle command wasn’t being recognized, presumably because the cap task, having cd’d into /current, wasn’t able to locate the gems installed in shared/bundle
[21:26:45] SteenJobs: fryguy: had rvm been configured properly to work with cap, then bundle exec should’ve been fine when in /current…does that make sense?
[21:28:55] apotry: has joined #RubyOnRails
[21:29:42] macsteps: has joined #RubyOnRails
[21:31:53] vjacob: has joined #RubyOnRails
[21:33:38] pawnbox: has joined #RubyOnRails
[21:34:30] neanderslob: has joined #RubyOnRails
[21:35:37] roshanavand: has joined #RubyOnRails
[21:36:08] GrizzlyZolam: has joined #RubyOnRails
[21:36:09] macsteps: has joined #RubyOnRails
[21:39:02] chipotle: has joined #RubyOnRails
[21:43:25] neanderslob: has joined #RubyOnRails
[21:43:35] neanderslob_: has joined #RubyOnRails
[21:44:32] cd-rum: has joined #RubyOnRails
[21:46:02] n90b0jjf: has joined #RubyOnRails
[21:46:07] vjacob: has joined #RubyOnRails
[21:46:22] abhinavmehta: has joined #RubyOnRails
[21:47:14] jenrzzz: has joined #RubyOnRails
[21:47:14] jenrzzz: has joined #RubyOnRails
[21:48:54] yfeldblum: has joined #RubyOnRails
[21:49:04] n90b0jjf_: has joined #RubyOnRails
[21:50:39] cd-rum_: has joined #RubyOnRails
[21:51:30] neanderslob: has joined #RubyOnRails
[21:54:06] rickmasta: has joined #RubyOnRails
[21:55:39] cZk: has joined #RubyOnRails
[21:58:24] yoongkang: has joined #RubyOnRails
[21:59:35] roshanavand: has joined #RubyOnRails
[21:59:53] adre: has joined #RubyOnRails
[22:02:08] Axsuul: has joined #RubyOnRails
[22:03:46] neanderslob: has joined #RubyOnRails
[22:06:39] macsteps: has joined #RubyOnRails
[22:07:50] AzaToth: has joined #RubyOnRails
[22:12:29] yfeldblum: has joined #RubyOnRails
[22:14:02] solars: has joined #RubyOnRails
[22:22:09] JamesGames: has joined #RubyOnRails
[22:24:42] petor: has joined #RubyOnRails
[22:25:30] weaksauce: has joined #RubyOnRails
[22:26:05] petor: has joined #RubyOnRails
[22:29:37] n90b0jjf_: has joined #RubyOnRails
[22:33:55] neanderslob_: has joined #RubyOnRails
[22:35:14] neanderslob: has joined #RubyOnRails
[22:40:23] danman: has joined #RubyOnRails
[22:40:55] petor: has joined #RubyOnRails
[22:45:35] jenrzzz: has joined #RubyOnRails
[22:46:54] AzaToth: has joined #RubyOnRails
[22:47:15] sdwrage: has joined #RubyOnRails
[22:51:06] hd1: has joined #RubyOnRails
[22:54:27] jiblet: has joined #RubyOnRails
[22:54:34] nibbo: has joined #RubyOnRails
[22:54:49] abhinavmehta: has joined #RubyOnRails
[22:56:51] n90b0jjf: has joined #RubyOnRails
[22:57:25] Rodya_: has joined #RubyOnRails
[22:58:48] n90b0jjf: What is a good resource for learning about mocking (esp. w/ RSpec/factoryGirl)
[22:58:59] neanderslob: has joined #RubyOnRails
[22:59:26] wethu: has joined #RubyOnRails
[23:01:13] padi: has joined #RubyOnRails
[23:01:31] neanderslob_: has joined #RubyOnRails
[23:02:24] AzaToth: has joined #RubyOnRails
[23:04:04] srinidhi1: has joined #RubyOnRails
[23:04:54] l4v2: has joined #RubyOnRails
[23:05:27] petor: has joined #RubyOnRails
[23:07:00] lechiffre10: has joined #RubyOnRails
[23:08:41] Oliphaunte: has joined #RubyOnRails
[23:09:11] neanderslob: has joined #RubyOnRails
[23:09:36] neanderslob_: has joined #RubyOnRails
[23:10:50] AzaToth: has joined #RubyOnRails
[23:10:55] neanderslob: has joined #RubyOnRails
[23:13:42] amiuhle: has joined #RubyOnRails
[23:15:03] pawnbox: has joined #RubyOnRails
[23:16:08] ProofTechnique: has joined #RubyOnRails
[23:16:38] asianMike: has left #RubyOnRails: ()
[23:17:44] Radar: hi lechiffre10
[23:17:53] jstransky: has joined #RubyOnRails
[23:18:59] Darmani: Radar: Oh hey! I finished my project. I'm just adding some RSpec tests and if you have some time could you take a look?
[23:19:14] Radar: Darmani: Sure, I could probably find some time somewhere.
[23:19:36] Darmani: Radar: Awesome! I'll get back to you ^.^
[23:23:13] Darmani: Radar: Oh quick question, if a user was to try and order a shirt that is already in his cart should I give him an error message?
[23:23:27] Radar: Darmani: It should increment the count of that item.
[23:23:49] Darmani: Radar: uggg. ok
[23:28:19] blackmesa: has joined #RubyOnRails
[23:30:17] AzaToth: has joined #RubyOnRails
[23:30:22] macsteps: has joined #RubyOnRails
[23:32:19] quazimodo: has joined #RubyOnRails
[23:32:23] quazimod1: has joined #RubyOnRails
[23:32:51] KnownSyntax_: has joined #RubyOnRails
[23:32:51] KnownSyntax_: has joined #RubyOnRails
[23:37:26] Leepoff: has joined #RubyOnRails
[23:37:35] roamingdog: has joined #RubyOnRails
[23:39:06] paradisaeidae_: has joined #RubyOnRails
[23:39:19] jstransky: has joined #RubyOnRails
[23:39:40] yfeldblum: has joined #RubyOnRails
[23:41:10] yfeldblum: has joined #RubyOnRails
[23:41:44] maxdoubt: has joined #RubyOnRails
[23:41:53] whathappens: has joined #RubyOnRails
[23:42:10] jstransky: has joined #RubyOnRails
[23:42:51] paradisaeidae: has joined #RubyOnRails
[23:44:29] jheathco: has joined #RubyOnRails
[23:44:56] asianMike: has joined #RubyOnRails
[23:45:27] douglascorrea: has joined #RubyOnRails
[23:48:51] kriptonium: has joined #RubyOnRails
[23:49:23] isberg: has joined #RubyOnRails
[23:50:29] dalbusch1t: has joined #RubyOnRails
[23:50:42] Jayson_Virissimo: has joined #RubyOnRails
[23:50:46] pawnbox: has joined #RubyOnRails
[23:52:09] jarred: has joined #RubyOnRails
[23:53:28] Rodya_: has joined #RubyOnRails
[23:57:52] yardenbar: has joined #RubyOnRails