« Back to channel list

#RubyOnRails - 24 July 2016

« Back 1 day Forward 1 day »
[00:01:58] roamingdog: has joined #RubyOnRails
[00:02:02] theery_: has joined #RubyOnRails
[00:03:43] dkam_____: has joined #RubyOnRails
[00:06:07] lxsameer: has joined #RubyOnRails
[00:07:10] tanuki: has joined #RubyOnRails
[00:07:44] jetpack_joe: has joined #RubyOnRails
[00:15:11] zacts: has joined #RubyOnRails
[00:16:20] qejk: has joined #RubyOnRails
[00:22:10] hahuang61: has joined #RubyOnRails
[00:23:44] yfeldblum: has joined #RubyOnRails
[00:28:01] jtong: has joined #RubyOnRails
[00:29:48] neo_: has joined #RubyOnRails
[00:33:55] jtong: has joined #RubyOnRails
[00:34:19] qejk: has joined #RubyOnRails
[00:39:26] douglascorrea: has joined #RubyOnRails
[00:40:51] pur3eval: has joined #RubyOnRails
[00:42:53] sypheren: has joined #RubyOnRails
[00:43:31] jetpack_joe: has joined #RubyOnRails
[00:46:58] tjbiddle: has joined #RubyOnRails
[00:50:38] jtong: has joined #RubyOnRails
[00:55:46] pur3eval: has joined #RubyOnRails
[00:56:10] blackmesa: has joined #RubyOnRails
[00:56:23] barhum2013: has joined #RubyOnRails
[00:59:18] rickmasta: has joined #RubyOnRails
[01:02:26] jtong: has joined #RubyOnRails
[01:03:17] wd40s: has joined #RubyOnRails
[01:03:17] roamingdog: has joined #RubyOnRails
[01:04:20] abhinavmehta: has joined #RubyOnRails
[01:09:41] workmad3: has joined #RubyOnRails
[01:12:56] fedruantine: has joined #RubyOnRails
[01:16:06] eljimmy: has joined #RubyOnRails
[01:16:48] Oliphaunte: has joined #RubyOnRails
[01:19:13] chadhs: has joined #RubyOnRails
[01:20:48] roamingdog: has joined #RubyOnRails
[01:23:54] jetpack_joe: has joined #RubyOnRails
[01:33:21] apotry: has joined #RubyOnRails
[01:34:59] greengriminal: has joined #RubyOnRails
[01:35:34] Rodya_: has joined #RubyOnRails
[01:37:21] greengriminal: hey all, does anyone have any advice on how one may go about scheduling a sidekiq job to reoccur in a users local timezone.
[01:38:10] jtong: has joined #RubyOnRails
[01:46:09] marcules: has joined #RubyOnRails
[01:46:27] greengriminal: has joined #RubyOnRails
[01:48:02] pur3eval: has joined #RubyOnRails
[01:51:10] wd40s: has joined #RubyOnRails
[01:54:44] Rodya_: has joined #RubyOnRails
[01:58:15] tanuki: has joined #RubyOnRails
[01:59:17] blackmesa: has joined #RubyOnRails
[02:00:43] adre: has joined #RubyOnRails
[02:01:40] yfeldblum: has joined #RubyOnRails
[02:08:20] benlieb: has joined #RubyOnRails
[02:09:23] jtong: has joined #RubyOnRails
[02:11:22] Oliphaunte: has joined #RubyOnRails
[02:11:23] yfeldblum: has joined #RubyOnRails
[02:22:56] hahuang61: has joined #RubyOnRails
[02:30:22] roamingdog: has joined #RubyOnRails
[02:32:15] benlieb: has joined #RubyOnRails
[02:32:18] Dreamer3: has joined #RubyOnRails
[02:34:03] Cohedrin: has joined #RubyOnRails
[02:35:21] DoctorMonocular: has joined #RubyOnRails
[02:37:32] jtong: has joined #RubyOnRails
[02:38:32] jenrzzz: has joined #RubyOnRails
[02:42:54] abhinavmehta: has joined #RubyOnRails
[02:47:46] AndrewIsHere: has joined #RubyOnRails
[02:48:48] jtong: has joined #RubyOnRails
[02:48:51] pLaTo0n: has joined #RubyOnRails
[02:54:35] jtong: has joined #RubyOnRails
[02:55:55] bklane: has joined #RubyOnRails
[03:02:15] pawnbox: has joined #RubyOnRails
[03:02:15] blackmesa: has joined #RubyOnRails
[03:05:29] Oliphaunte: has joined #RubyOnRails
[03:05:29] zacts: has joined #RubyOnRails
[03:07:39] pur3eval: has joined #RubyOnRails
[03:08:15] chouhoulis: has joined #RubyOnRails
[03:11:35] jtong: has joined #RubyOnRails
[03:12:35] agent_white: has joined #RubyOnRails
[03:19:24] jenrzzz: has joined #RubyOnRails
[03:19:24] jenrzzz: has joined #RubyOnRails
[03:20:45] k3rn31: has joined #RubyOnRails
[03:21:35] wd40s: has joined #RubyOnRails
[03:22:05] The_Phoenix: has joined #RubyOnRails
[03:22:49] benlieb: has joined #RubyOnRails
[03:24:14] The_Phoenix: has joined #RubyOnRails
[03:25:37] The_Phoenix: has joined #RubyOnRails
[03:27:21] The_Phoenix: has joined #RubyOnRails
[03:28:35] jtong: has joined #RubyOnRails
[03:33:07] xall: has joined #RubyOnRails
[03:34:30] jtong: has joined #RubyOnRails
[03:38:03] dunpeal: has joined #RubyOnRails
[03:41:43] paradisaeidae: has joined #RubyOnRails
[03:45:01] chipotle: has joined #RubyOnRails
[03:49:08] rickmasta: has joined #RubyOnRails
[03:50:48] ishamo: has joined #RubyOnRails
[03:51:21] jtong: has joined #RubyOnRails
[03:52:21] djdarkbeat: has joined #RubyOnRails
[03:55:58] wd40s: has joined #RubyOnRails
[03:56:17] ur5us: has joined #RubyOnRails
[03:57:00] ur5us_: has joined #RubyOnRails
[03:57:48] ur5us: has joined #RubyOnRails
[03:59:48] Oliphaunte: has joined #RubyOnRails
[04:02:37] sevenseacat: has joined #RubyOnRails
[04:05:14] blackmesa: has joined #RubyOnRails
[04:08:30] Ropeney: has joined #RubyOnRails
[04:11:56] abhinavmehta: has joined #RubyOnRails
[04:17:26] alfiemax: anyone here worked with the wrike api ?
[04:19:02] phredus: has joined #RubyOnRails
[04:23:40] hahuang61: has joined #RubyOnRails
[04:25:51] jtong: has joined #RubyOnRails
[04:28:13] rickmasta: has joined #RubyOnRails
[04:31:37] k3rn31: has joined #RubyOnRails
[04:36:05] ElFerna: has joined #RubyOnRails
[04:36:45] xall: has joined #RubyOnRails
[04:36:49] jedmund: has joined #RubyOnRails
[04:40:26] tego101: has joined #RubyOnRails
[04:41:15] yoongkang: has joined #RubyOnRails
[04:44:35] qejk: has joined #RubyOnRails
[04:48:16] jtong: has joined #RubyOnRails
[04:54:18] jtong: has joined #RubyOnRails
[04:58:05] pawnbox: has joined #RubyOnRails
[05:01:05] roamingdog: has joined #RubyOnRails
[05:01:14] sergey_makagon: has joined #RubyOnRails
[05:04:37] rickmasta: has joined #RubyOnRails
[05:08:18] blackmesa: has joined #RubyOnRails
[05:11:12] dunpeal: has joined #RubyOnRails
[05:11:18] abhinavmehta: has joined #RubyOnRails
[05:11:47] theery: has joined #RubyOnRails
[05:14:19] yoongkang: has joined #RubyOnRails
[05:15:27] r3vDev: has joined #RubyOnRails
[05:16:26] mcqr: has joined #RubyOnRails
[05:19:53] rickmasta: has joined #RubyOnRails
[05:28:00] jtong: has joined #RubyOnRails
[05:31:26] yardenbar: has joined #RubyOnRails
[05:32:44] siaW: has joined #RubyOnRails
[05:34:25] Yum: has joined #RubyOnRails
[05:39:11] nacsurte: has joined #RubyOnRails
[05:39:26] jtong: has joined #RubyOnRails
[05:44:17] wd40s: has joined #RubyOnRails
[05:46:59] Cohedrin: has joined #RubyOnRails
[05:48:12] dionysus69: has joined #RubyOnRails
[05:50:48] jtong: has joined #RubyOnRails
[05:57:57] ur5us: has joined #RubyOnRails
[05:59:19] roamingdog: has joined #RubyOnRails
[06:01:08] SAGE___: has joined #RubyOnRails
[06:01:22] abhinavmehta: has joined #RubyOnRails
[06:02:15] apotry: has joined #RubyOnRails
[06:02:15] adre: has joined #RubyOnRails
[06:02:42] ishamo: has joined #RubyOnRails
[06:07:50] jtong: has joined #RubyOnRails
[06:10:34] ayonkhan: has joined #RubyOnRails
[06:11:22] blackmesa: has joined #RubyOnRails
[06:16:11] Axsuul: has joined #RubyOnRails
[06:17:38] moeabdol: has joined #RubyOnRails
[06:17:50] sypheren: has joined #RubyOnRails
[06:19:11] jtong: has joined #RubyOnRails
[06:22:45] wd40s: has joined #RubyOnRails
[06:24:25] hahuang61: has joined #RubyOnRails
[06:24:39] The_Phoenix: has joined #RubyOnRails
[06:27:51] xall: has joined #RubyOnRails
[06:28:27] roamingdog: has joined #RubyOnRails
[06:30:34] jtong: has joined #RubyOnRails
[06:31:36] nacsurte: has joined #RubyOnRails
[06:33:30] zacts: has joined #RubyOnRails
[06:35:14] pur3eval: has joined #RubyOnRails
[06:37:16] djdarkbeat: has joined #RubyOnRails
[06:38:30] escapement: has joined #RubyOnRails
[06:39:14] escapement: has left #RubyOnRails: ()
[06:41:30] wd40s: has joined #RubyOnRails
[06:43:28] sergey_makagon: has joined #RubyOnRails
[06:47:28] ur5us: has joined #RubyOnRails
[06:49:19] AndrewIsHere: has joined #RubyOnRails
[06:49:24] brandtam: has joined #RubyOnRails
[06:53:24] jtong: has joined #RubyOnRails
[06:56:09] dragon9783: has joined #RubyOnRails
[06:56:26] jishankai: has joined #RubyOnRails
[06:57:28] moeabdol1: has joined #RubyOnRails
[07:04:45] jtong: has joined #RubyOnRails
[07:07:04] hwcomcn: has joined #RubyOnRails
[07:14:22] blackmesa: has joined #RubyOnRails
[07:14:26] xall: has joined #RubyOnRails
[07:14:55] abhinavmehta: has joined #RubyOnRails
[07:15:02] darutoko: has joined #RubyOnRails
[07:17:33] doge__: has joined #RubyOnRails
[07:18:25] hwcomcn: has joined #RubyOnRails
[07:19:12] tanuki: has joined #RubyOnRails
[07:20:24] pawnbox: has joined #RubyOnRails
[07:20:27] hwcomcn: has joined #RubyOnRails
[07:22:10] jtong: has joined #RubyOnRails
[07:23:07] blackmesa: has joined #RubyOnRails
[07:23:21] hwcomcn: has joined #RubyOnRails
[07:25:27] gingray: has joined #RubyOnRails
[07:27:27] hwcomcn: has joined #RubyOnRails
[07:28:51] wd40s: has joined #RubyOnRails
[07:31:35] harfangk: has joined #RubyOnRails
[07:32:23] srinidhi: has joined #RubyOnRails
[07:35:07] ur5us: has joined #RubyOnRails
[07:35:17] pawnbox: has joined #RubyOnRails
[07:35:50] srinidhi1: has joined #RubyOnRails
[07:36:02] hwcomcn: has joined #RubyOnRails
[07:36:12] Axsuul: has joined #RubyOnRails
[07:37:41] hwcomcn: has joined #RubyOnRails
[07:42:27] solars: has joined #RubyOnRails
[07:44:44] jtong: has joined #RubyOnRails
[07:44:55] spyder55: has joined #RubyOnRails
[07:46:28] snowy: has joined #RubyOnRails
[07:52:21] douglascorrea: has joined #RubyOnRails
[07:52:23] pur3eval: has joined #RubyOnRails
[07:55:25] dunpeal: has joined #RubyOnRails
[07:56:20] jtong: has joined #RubyOnRails
[07:59:30] GnuYawk: has joined #RubyOnRails
[08:00:01] arBmind: has joined #RubyOnRails
[08:02:45] harfangk_: has joined #RubyOnRails
[08:06:50] roamingdog: has joined #RubyOnRails
[08:11:25] tego101: has joined #RubyOnRails
[08:11:27] spyder55: has joined #RubyOnRails
[08:20:49] yoongkang: has joined #RubyOnRails
[08:25:12] hahuang61: has joined #RubyOnRails
[08:34:44] pickandmix: has joined #RubyOnRails
[08:46:49] xall: has joined #RubyOnRails
[08:47:23] jtong: has joined #RubyOnRails
[08:48:04] DoctorMonocular: has joined #RubyOnRails
[08:53:04] jtong: has joined #RubyOnRails
[08:53:52] marr: has joined #RubyOnRails
[08:54:07] abhinavmehta: has joined #RubyOnRails
[08:56:10] sukra: has joined #RubyOnRails
[08:59:44] conta: has joined #RubyOnRails
[09:00:31] jtong: has joined #RubyOnRails
[09:02:32] brandtam: has joined #RubyOnRails
[09:03:40] fighella: has joined #RubyOnRails
[09:05:06] srinidhi: has joined #RubyOnRails
[09:13:49] xall: has joined #RubyOnRails
[09:14:18] gingray: has joined #RubyOnRails
[09:24:15] Oliphaunte: has joined #RubyOnRails
[09:28:37] conta: has joined #RubyOnRails
[09:34:48] pawnbox_: has joined #RubyOnRails
[09:36:17] moeabdol1: has joined #RubyOnRails
[09:39:39] renegadeandy: has joined #RubyOnRails
[09:39:46] Tyrese: has joined #RubyOnRails
[09:40:06] Tyrese: Ruubbyyy onn Raills!
[09:43:45] crdpink: has joined #RubyOnRails
[09:46:22] der-landgraf: has joined #RubyOnRails
[09:47:44] c355E3B: has joined #RubyOnRails
[09:50:58] moeabdol1: has joined #RubyOnRails
[09:53:08] AimlessRAven: has joined #RubyOnRails
[09:56:09] dunpeal: has joined #RubyOnRails
[09:57:30] Pupeno: has joined #RubyOnRails
[10:03:15] jenrzzz: has joined #RubyOnRails
[10:03:15] jenrzzz: has joined #RubyOnRails
[10:03:46] adre: has joined #RubyOnRails
[10:05:35] blackmesa: has joined #RubyOnRails
[10:05:51] hahuang61: has joined #RubyOnRails
[10:07:31] yoongkang: has joined #RubyOnRails
[10:07:33] abhinavmehta: has joined #RubyOnRails
[10:09:05] conta: has joined #RubyOnRails
[10:09:52] spyder55: has joined #RubyOnRails
[10:12:58] spyder55: has joined #RubyOnRails
[10:15:54] hahuang61: has joined #RubyOnRails
[10:18:25] Oliphaunte: has joined #RubyOnRails
[10:21:44] abhinavmehta: has joined #RubyOnRails
[10:32:52] srinidhi: has joined #RubyOnRails
[10:37:04] chipotle: has joined #RubyOnRails
[10:38:37] srinidhi: has joined #RubyOnRails
[10:44:52] Mia: has joined #RubyOnRails
[10:44:52] Mia: has joined #RubyOnRails
[10:46:44] dangerousdave: has joined #RubyOnRails
[10:50:49] AndrewIsHere: has joined #RubyOnRails
[10:59:05] blackmesa: has joined #RubyOnRails
[11:01:36] pawnbox: has joined #RubyOnRails
[11:03:31] jtong: has joined #RubyOnRails
[11:03:58] srinidhi: has joined #RubyOnRails
[11:08:54] yoongkang: has joined #RubyOnRails
[11:10:16] DoubleMalt: has joined #RubyOnRails
[11:10:40] nacsurte: has joined #RubyOnRails
[11:17:18] AzaToth: has joined #RubyOnRails
[11:19:20] darutoko: has joined #RubyOnRails
[11:22:51] yoongkang: has joined #RubyOnRails
[11:24:01] gingray: has joined #RubyOnRails
[11:24:05] brandtam: has joined #RubyOnRails
[11:24:39] dangerousdave: My customer wants to access the functionality of niche desktop applications through a web application. I am struggling to provide compelling arguments as to why this is a bad idea. Any thoughts?
[11:25:56] daveomcd: has joined #RubyOnRails
[11:30:45] Pupeno: has joined #RubyOnRails
[11:41:45] netzfisch: has joined #RubyOnRails
[11:45:38] quazimodo: has joined #RubyOnRails
[11:45:41] quazimod1: has joined #RubyOnRails
[11:46:14] narcan: has joined #RubyOnRails
[11:47:06] narcan: has joined #RubyOnRails
[11:48:11] [narcan]: has joined #RubyOnRails
[11:51:39] andywww_: has joined #RubyOnRails
[11:53:18] dunpeal: has joined #RubyOnRails
[11:54:22] andywww_: has left #RubyOnRails: ()
[11:59:27] Tolnaiz: has joined #RubyOnRails
[12:06:25] Oliphaunte: has joined #RubyOnRails
[12:07:42] roamingdog: has joined #RubyOnRails
[12:09:13] DoubleMalt: has joined #RubyOnRails
[12:18:30] hahuang61: has joined #RubyOnRails
[12:20:05] JamesGames: has joined #RubyOnRails
[12:20:40] conta1: has joined #RubyOnRails
[12:21:11] JamesGames: hey peeps! Im trying to select an array of OBJECTS from an array of values in a join table. I basically need one line of code; <% itemlist = Itemica.where(user_id: @user.id, room_id: roomID) %> <% @itemArray = itemlist.map ****** %>
[12:21:35] ishahnaz: has joined #RubyOnRails
[12:22:30] JamesGames: the first of those lines I think works. i get a list of the join table values (itemica). now I need to get an object for each of those values
[12:22:38] jxs_: has joined #RubyOnRails
[12:23:05] JamesGames: and once I have @itemArray, i'm good
[12:24:27] JamesGames: i tried (among many many things) ---- <% itemArray = tem.select { |thing| thing.id == itemlist.item_id } %>
[12:24:28] _Tariq: has joined #RubyOnRails
[12:24:34] JamesGames: where tem = Item.all
[12:25:19] JamesGames: i get : undefined method `item_id' for #<ActiveRecord::Relation []>
[12:25:32] JamesGames: for that one
[12:27:47] marcules: has joined #RubyOnRails
[12:37:16] meldon: has joined #RubyOnRails
[12:37:46] brandtam: has joined #RubyOnRails
[12:38:20] r3vDev: has joined #RubyOnRails
[12:38:58] JamesGames: here is my table: http://picpaste.com/itemtable-nQbVkqzB.png
[12:43:32] conta: has joined #RubyOnRails
[12:44:28] abhinavmehta: has joined #RubyOnRails
[12:44:49] abhinavmehta: how can I introspect ClassMethods defined in a module?
[12:46:22] abhinavmehta: for example - http://dpaste.com/2YY18BJ
[12:46:56] Papierkorb: abhinavmehta: Foo::ClassMethods.instance_methods
[12:47:12] Papierkorb: abhinavmehta: Module#instance_methods gives you the methods a module defines
[12:49:37] abhinavmehta: actually it doesn't give me that, here is the screenshot of same example - https://someimage.com/vaXvX0a
[12:49:48] chipotle: has joined #RubyOnRails
[12:50:00] abhinavmehta: Papierkorb: please fill-in me, if I'm missing something.
[12:50:20] matthewd: abhinavmehta: What you typed is not what Papierkorb typed
[12:50:24] Papierkorb: abhinavmehta: please read more carefully
[12:51:53] harfangk_: what does MINASWAN in the title mean?
[12:51:58] harfangk_: that's not a japanese word
[12:52:06] abhinavmehta: it works, thanks Papierkorb & matthewd.
[12:52:27] harfangk_: oh nvm that's an acronym lol
[12:54:39] Pupeno: has joined #RubyOnRails
[12:57:02] abhinavmehta: Papierkorb: I simplified the problem earlier and asked you, which actually worked. Now I'm trying the same at the actual place, where same concept isn't working.
[12:57:08] abhinavmehta: Here is the problem statement - https://someimage.com/YFdMblM
[12:57:25] sevenseacat: why do people paste pictures of code
[12:57:33] Papierkorb: abhinavmehta: please prefer gists over screenshots
[12:57:50] arup_r: has joined #RubyOnRails
[12:58:12] abhinavmehta: ok, but actually picture shows more than gist.. it shows console output etc more clearly.
[12:58:20] Papierkorb: no it does not
[12:58:35] abhinavmehta: ok, I'll put in gist.
[12:58:49] matthewd: abhinavmehta: Show Models::Status, while you're at it
[12:58:52] Papierkorb: It doesn't show the Models::Status thing for one thing. You can also absolutely copy/paste the pry output to a file in the gist
[13:00:00] JamesGames: ok. what can you see wrong in this::: <% itemlist = Itemica.where(user_id: @user.id, room_id: roomID) %> <% @itemArray = tem.find(id: itemlist.item_id) %>
[13:00:34] Oliphaunte: has joined #RubyOnRails
[13:01:03] abhinavmehta: Papierkorb: matthewd - problem gist: https://gist.github.com/anonymous/d8ed0dd2bb446da61a56d692aacf2aec
[13:01:32] Papierkorb: abhinavmehta: the ClassMethods module won't end up magically in there
[13:01:33] matthewd: abhinavmehta: And how does that differ from your earlier example?
[13:02:21] abhinavmehta: Papierkorb: I'm so sorry, while removing status-logic I removed "extend ActiveSupport::Concern" too
[13:02:25] matthewd: abhinavmehta: !gist-usage for next time, too
[13:02:25] helpa: abhinavmehta: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[13:02:44] abhinavmehta: matthewd: okay, I'll read guidelines.
[13:03:55] abhinavmehta: matthewd: It's not different with earlier one, actually earlier I was doing PoC and found it works.. but same thing doesn't work in actual project.
[13:04:16] abhinavmehta: now to prove the point, I did introspection there and showed that status method does exists
[13:04:29] matthewd: abhinavmehta: It's different because you didn't extend concern in the code you showed
[13:04:45] abhinavmehta: but then as I've shown in picture/gist that we do call status it doesnt show-up there.
[13:05:26] abhinavmehta: matthewd: actually to simplify the problem statement I stripped unnecessary code and as a part of that removed "extend A:C" thing too
[13:05:44] abhinavmehta: please trust me it's there and I'm posting the updated version, give me a sec.
[13:06:23] abhinavmehta: here is updated one - https://gist.github.com/anonymous/aee81172bf620a5ce3b7d87f5a270100
[13:06:25] matthewd: abhinavmehta: We can't help unless we're looking at exactly the code you're running
[13:06:47] abhinavmehta: matthewd: yes I agree, I'm corrected myself now.
[13:06:49] meldon: has joined #RubyOnRails
[13:07:17] matthewd: Delete the method body if you must, but the output you're showing *must* be from running exactly the reduced code that you're showing
[13:07:38] abhinavmehta: yes it's exactly same code.
[13:08:08] abhinavmehta: since PoC works and in actual code it isn't working, so I'm baffled what could be wrong here.
[13:08:25] roamingdog: has joined #RubyOnRails
[13:08:29] chizadprogrammer: has joined #RubyOnRails
[13:09:19] abhinavmehta: and also as we see(in introspection) that status method is available there as ClassMethod, so it should be available once we do include.
[13:09:47] meldon_91: has joined #RubyOnRails
[13:09:59] chizadprogrammer: Hello everyone, saw this irc on the ruby on rails site so thought I would check it out.
[13:10:13] abhinavmehta: I'm sorry, but IMHO the image/picture I posted clearly illustrates that. (reposting just for reference - https://someimage.com/YFdMblM)
[13:10:40] matthewd: abhinavmehta: Models::Status.singleton_class.ancestors
[13:10:44] Pupeno: has joined #RubyOnRails
[13:11:22] abhinavmehta: matthewd: output - https://gist.github.com/anonymous/4a6b6e9e96ef252d25c73698ea7f6b33
[13:12:09] meldon: has joined #RubyOnRails
[13:12:31] matthewd: abhinavmehta: There's no ActiveSupport::Concern in there
[13:13:05] abhinavmehta: hmm right, give me a sec.
[13:13:23] matthewd: abhinavmehta: Your gist shows that the status method is defined inside ClassMethods, *after* the extend
[13:14:34] matthewd: abhinavmehta: I'm not sure how to reconcile that with your statement that we are looking at the running code
[13:14:37] abhinavmehta: matthewd: could you please elaborate your last statement?
[13:14:53] abhinavmehta: I mean - "Your gist shows that the status method is defined inside ClassMethods, *after* the extend "
[13:16:03] meldon91: has joined #RubyOnRails
[13:16:04] douglascorrea: has joined #RubyOnRails
[13:17:44] qejk: has joined #RubyOnRails
[13:17:45] abhinavmehta: matthewd: problem is solved - actually I changed it with traditional ClassMethod using self and it start working.
[13:18:45] abhinavmehta: thanks matthewd, now I'll figure out further where I'm doing wrong.
[13:23:30] ur5us: has joined #RubyOnRails
[13:24:02] Oliphaunte: has joined #RubyOnRails
[13:24:22] Dreamer3: has joined #RubyOnRails
[13:27:14] blackmesa: has joined #RubyOnRails
[13:27:15] pwnd_nsfw: has joined #RubyOnRails
[13:34:09] JamesGames: has joined #RubyOnRails
[13:34:31] JamesGames: hello. Im trying to fill and array w objects from a join table
[13:34:41] JamesGames: does the following make sense::: <% for r in Itemica %> <% if Itemica.where(user_id: @user.id, room_id: roomID) %> <% @itemArray << tem.find( r) %> <% end %> <% end %>
[13:35:17] fox_mulder_cp: JamesGames: logic in views - BAD way. very BAD way
[13:35:35] JamesGames: fox_mulder_cp: is in the partial
[13:36:02] JamesGames: anyways, why am i not getting an array of items?
[13:36:06] fox_mulder_cp: view - and in partial tooo. selections and scoping must be iin model and controller, noot in views
[13:36:42] JamesGames: ok. i will move it. meanwhile. why doesn't it work?
[13:37:55] JamesGames: coz b4 i had:: <% itemlist = Itemica.where(user_id: @user.id, room_id: roomID).collect(&:item_id) %> <% @itemArray = tem.find( itemlist[0]) %>
[13:38:08] JamesGames: just to test for one item. and that failed
[13:38:48] JamesGames: where tem = Item.all
[13:39:45] fox_mulder_cp: JamesGames: a bad idea to break the rules and then be surprised that something is not working
[13:39:56] openstruct: has joined #RubyOnRails
[13:40:02] JamesGames: ok. what are the rules?
[13:40:17] fox_mulder_cp: JamesGames: withoug gist with code of controller, model and views we can't help u
[13:40:30] JamesGames: fair enough. hang on
[13:40:48] fox_mulder_cp: JamesGames: ideology of MVC, and framework
[13:40:59] fox_mulder_cp: view can't knows about model
[13:41:47] fox_mulder_cp: so u can see a app console log ans search errors, run this code in rails console, rails database console
[13:41:50] matthewd: JamesGames: You would be best served by starting with a tutorial
[13:42:46] oystersauce8: has joined #RubyOnRails
[13:42:47] rogue_koder: has joined #RubyOnRails
[13:43:05] fox_mulder_cp: matthewd: I did not say nonsense , right?
[13:43:14] matthewd: JamesGames: If you insist on learning through sheer trial and error, we can't stop you.. but it's really not what this channel is for
[13:44:07] matthewd: fox_mulder_cp: Right; I was just recommending the right place to start, to understand those concepts you're mentioning
[13:44:17] JamesGames: https://gist.github.com/anonymous/b4f84f97db09908d114f9e879006a574
[13:44:55] JamesGames: fox_mulder_cp: It looks like something simple is wrong
[13:45:13] fox_mulder_cp: JamesGames: read confident ruby book, than ruby by Flanagan, and after it official rails guides, rails 4 in actions, and agile development with rails 4
[13:45:35] sevenseacat: matthewd: i think a lot of us have mentioned that to JamesGames now
[13:46:02] JamesGames: hey sevenseacat !!
[13:46:35] JamesGames: jsut this one thing. then I'll go read a book.
[13:46:47] ElFerna: has joined #RubyOnRails
[13:47:34] JamesGames: i am trying to list the user objects from a join table, itemica, im getting nil class
[13:47:35] fox_mulder_cp: JamesGames: i add you gist at my idiotic code-monkey chart %)
[13:48:00] fox_mulder_cp: JamesGames: !guieds
[13:48:03] fox_mulder_cp: JamesGames: !guides
[13:48:10] fox_mulder_cp: !guides JamesGames
[13:48:11] JamesGames: fox_mulder_cp: yeah, u give me long enough i write shakespear
[13:48:17] helpa: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[13:49:56] JamesGames: fox_mulder_cp: It's like 2 lines. Select item id's by user and room, and then items by these id's. I dunno what the problem is
[13:51:42] fox_mulder_cp: JamesGames: Sorry, but I do not want to help a person who does not want to read the official guide for quick start
[13:52:22] AndrewIsHere: has joined #RubyOnRails
[13:52:30] JamesGames: this is thelast part in a ten week project. But fair enough. U have your reasons
[13:52:41] fox_mulder_cp: which takes place in the best case for 1 hour if dilute its communication with the child
[13:53:54] fox_mulder_cp: JamesGames: WHAT? 10 weeks for writing project?
[13:54:20] JamesGames: Yes. the only way they would let me make a game was if i used rails
[13:54:41] JamesGames: i don't hate it as much as i did. But it is definately awkward
[13:55:14] matthewd: The way you've written it, yes, is very awkward. That's why people keep pointing you at tutorials.
[13:55:34] Pupeno: has joined #RubyOnRails
[13:55:42] JamesGames: anyway. its so nearly done now
[13:56:30] flashpoint9: has joined #RubyOnRails
[13:56:48] Oliphaunte: has joined #RubyOnRails
[13:57:30] matthewd: Your code looks more like [old-school] PHP in ruby syntax; who-ever "they" are, probably expected to see something that actually resembled a rails application
[13:58:57] fox_mulder_cp: JamesGames: I am in the process of creating my hosting control panel since last winter , and only in the past month I have prepared the foundation for managing docker containers , but the scripts were written and tested docker about six months
[13:59:39] jamesgames_: has joined #RubyOnRails
[14:00:57] jamesgames_: matthewd: I lost connection there. Rails is not a fitting framework for a text based adventure? would u agree?
[14:01:32] fox_mulder_cp: JamesGames: You make a big mistake by trying to use the product without using the powerful documentation and best practices community. As a result, you will not be able to maintain and make the product quality , and we all know what " Hindu Code " in its bad value
[14:02:30] fox_mulder_cp: JamesGames_ rails a good framework for all web apps, but for use it U MUST read official guides.
[14:02:44] jamesgames_: ok. but getting an array of objects...
[14:03:33] fox_mulder_cp: JamesGames_: READ OFFICIAL GUIDE. NOW!
[14:04:34] jamesgames_: i am in week 9 of the project i mentioned,.. fkit, OK. what's the link again?
[14:05:01] Oliphaunte: has joined #RubyOnRails
[14:05:20] adre: has joined #RubyOnRails
[14:05:28] matthewd: JamesGames_: In all the repetitions of the question I've seen, you still haven't bothered to even describe what's going wrong, anyway
[14:05:30] helpa: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[14:05:58] blackmesa: has joined #RubyOnRails
[14:06:43] fox_mulder_cp: Not there you have a sedative ?
[14:07:13] jamesgames_: matthewd: It's showing ::: ActiveRecord::RecordNotFound in RoomsController#current
[14:07:47] matthewd: fox_mulder_cp: Back down. Just because he's being rude doesn't mean we need to try to out-do him.
[14:08:27] jamesgames_: fox_mulder_cp: matthewd: sorry if i was rude btw.
[14:09:14] jamesgames_: fox_mulder_cp: .... why?
[14:09:48] fox_mulder_cp: hammer nails telescope rather than pick up a hammer and read , finally , user manual
[14:10:22] matthewd: JamesGames_: fox_mulder_cp is being actively rude; you're being passively rude by refusing to help yourself, and demanding we just fix this immediate problem for you (and it's far from the first time/problem)
[14:10:30] roamingdog: has joined #RubyOnRails
[14:11:11] fox_mulder_cp: JamesGames_ RecordNotFound says that noo records found
[14:11:23] matthewd: JamesGames_: Well, neither of the files in your gist contain a #current method, or a RoomsController
[14:11:49] jamesgames_: fox_mulder_cp: matthewd: i can gist them. one moment
[14:12:21] jenrzzz: has joined #RubyOnRails
[14:12:21] jenrzzz: has joined #RubyOnRails
[14:13:43] jamesgames_: fox_mulder_cp: matthewd: https://gist.github.com/anonymous/fbbcac5aeafb5359a62cf506b1436748
[14:14:39] jamesgames_: fox_mulder_cp: ive tried this line so many ways, i get no record or nil class ...
[14:14:46] banisterfiend: has joined #RubyOnRails
[14:14:50] abhinavmehta: I'm working with Mongoid-paperclip and have a small integration issue; I'm unable to access validators.
[14:15:00] abhinavmehta: Described the problem statement - https://gist.github.com/anonymous/f687cb4b1a5cebd2905772fe4d3fa318
[14:15:29] abhinavmehta: basically I'm unable to access `validates_attachment_file_name`.
[14:15:33] sevenseacat: abhinavmehta: what version of paperclip are you using?
[14:16:01] abhinavmehta: sevenseacat: its 5.0.0
[14:16:17] abhinavmehta: with Rails 4.2.7 and Ruby 2.3.1
[14:16:39] abhinavmehta: and Mongoid 5.1.3
[14:16:56] alfiemax: has joined #RubyOnRails
[14:17:14] sevenseacat: https://github.com/thoughtbot/paperclip/tree/v5.0.0#validations attachment file name is not listed as a validator in the readme
[14:17:50] abhinavmehta: yes I found that, but it's clearly there in there current master-branch - https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/validators/attachment_file_name_validator.rb#L3
[14:17:51] jamesgames_: matthewd: Can u tell me what to google?
[14:17:57] matthewd: JamesGames_: https://gist.github.com/anonymous/fbbcac5aeafb5359a62cf506b1436748#file-rooms_controller-rb-L38
[14:18:13] matthewd: JamesGames_: You have the room in @room, then you get its ID, then re-find it?!?
[14:18:34] sevenseacat: abhinavmehta: just because its there, doesnt mean it's automatically available to you
[14:18:41] jamesgames_: ok so I just use the global?
[14:18:51] Rodya_: has joined #RubyOnRails
[14:19:03] matthewd: That's not a global, but yes, you can use the variable that you've just set
[14:19:14] hahuang61: has joined #RubyOnRails
[14:19:15] srinidhi: has joined #RubyOnRails
[14:19:23] abhinavmehta: ok I get that.. so I need to extend AttachmentFileNameValidator.
[14:19:25] matthewd: `where(user_id=current_user.id)` is not doing what you think it is
[14:19:34] flashpoint9: has joined #RubyOnRails
[14:19:39] matthewd: JamesGames_: But, which line is the one that the error is occurring on?
[14:19:59] jamesgames_: <% @itemArray = tem.find( itemlist[0]) %>
[14:20:13] jamesgames_: i get like a nil class
[14:20:28] Pupeno: has joined #RubyOnRails
[14:20:31] helpa: http://i.imgur.com/m9m3wr9.gif
[14:21:18] abhinavmehta: matthewd: in general, when people do such thing?
[14:21:20] abhinavmehta: I mean, that method was there in previous paperclip-releases and now suddenly they removed it from auto-load, though it does exists in codebase instead of deprecating it.
[14:21:53] jamesgames_: Couldn't find Item without an ID is what im geting. The preceeding line is : <% itemlist = Itemica.where(user_id: @user.id, room_id: @room.id).collect(&:item_id) %>
[14:22:12] abhinavmehta: I mean what could be the reason/intention behind taking such steps - breaking backward compatibility explicitly.
[14:24:05] matthewd: JamesGames_: Okay, so itemlist[0] is nil
[14:24:13] banisterfiend: has joined #RubyOnRails
[14:24:35] matthewd: abhinavmehta: For the same reasons you move things around in your own code, I guess
[14:25:31] abhinavmehta: matthewd: ok.
[14:25:39] jamesgames_: matthewd: yes. Im selecting id's by user_id and room_id to populate the room
[14:25:53] pLaTo0n: has joined #RubyOnRails
[14:26:59] chouhoulis: has joined #RubyOnRails
[14:27:29] matthewd: abhinavmehta: In your particular case, I'm not sure I see what's going on; sounds like validates_attachment_file_name should be available by default, to me
[14:27:37] matthewd: abhinavmehta: (but I know nothing about paperclip in general)
[14:27:40] jamesgames_: what's wrong w: <% itemlist = Itemica.where(user_id: @user.id, room_id: @room.id).collect(&:item_id) %>
[14:29:00] matthewd: JamesGames_: As "I don't know where to start" is unhelpful, let's focus just on the problem at hand... is there anything wrong with it? Do all Itemica instances have an item_id? Is it returning any values, or is it an empty array?
[14:29:05] abhinavmehta: matthewd: I'm also surprised, I believe this could be because I'm not using Paperclip directly but via Mongoid:Paperclip gem.
[14:29:34] abhinavmehta: matthewd: but still I'm confused, if that code does exists in codebase why they deliberately removed it from docs.
[14:30:06] jamesgames_: It is a populated table.
[14:30:47] matthewd: JamesGames_: And it definitely has at least one row for your current user/room pair?
[14:31:01] abhinavmehta: as you see in the gist I shared, I'm including due module "include Mongoid::Paperclip" as suggested in README, but still validator isn't available. (gist link for ref: https://gist.github.com/anonymous/f687cb4b1a5cebd2905772fe4d3fa318)
[14:31:23] abhinavmehta: and same was working earlier.
[14:31:36] Velizar: has joined #RubyOnRails
[14:31:50] jamesgames_: http://picpaste.com/itemicatable-Rz5pTeEI.png
[14:31:59] matthewd: abhinavmehta: I'm struck by the extreme coincidence of how much this looks like your earlier problem
[14:32:54] abhinavmehta: matthewd: yes, that's because I'm migrating existing project from Rails 3.2 to Rails 4.2.7
[14:33:06] sevenseacat: oh, that project
[14:33:11] sevenseacat: the big bang upgrade
[14:33:33] abhinavmehta: sevenseacat: yes, it's going well so far .. now fixing some trivial broken things
[14:33:44] abhinavmehta: :) big-band upgrade.
[14:33:58] sevenseacat: you have no idea whats broken
[14:34:08] vedu: Hello, I am doing `format.js { render action: 'error'}`. How can I see what is the js that gets generated?
[14:34:36] abhinavmehta: sevenseacat: actually hearing such thing from experts frighten's me.
[14:34:56] matthewd: JamesGames_: And what's your current user ID?
[14:35:11] jamesgames_: matthewd: me, im id 1
[14:35:43] matthewd: JamesGames_: Okay, well, check what itemlist looks like on line 14
[14:36:28] banisterfiend: has joined #RubyOnRails
[14:36:51] jamesgames_: matthewd: item_id 1, i think im missing something
[14:37:46] jamesgames_: wait. There is no zero. hang on a sec
[14:38:30] matthewd: JamesGames_: Also, if you're at all actually interested beyond an immediate need to pass: please do come back in a few weeks, and I'll show you how this should look. This code is killing me.
[14:38:53] rails45: has joined #RubyOnRails
[14:39:26] jamesgames_: matthewd: Can u hang on. Couldn't find Item without an ID
[14:39:30] rails45: Is there any other way to call a class within a module except Modulename::Classname?
[14:39:50] jamesgames_: matthewd: ok, sorry
[14:40:00] matthewd: rails45: !xy
[14:40:00] helpa: rails45: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[14:40:37] jamesgames_: helpa: interesting
[14:41:01] jamesgames_: but this is week 9 of a 10wk...
[14:41:09] macsteps: has joined #RubyOnRails
[14:41:35] rails45: @matthewd Alright not gonna be specific... Here's my problem: http://stackoverflow.com/questions/38543885/autocompletion-of-tag-names-when-using-acts-as-taggable-on-gem
[14:41:40] matthewd: JamesGames_: Now you're talking to a bot.. that wasn't talking to you ;)
[14:42:08] jamesgames_: matthewd: u serious!
[14:43:28] matthewd: JamesGames_: !auto
[14:43:28] helpa: JamesGames_: I AM A ROBOT. DO NOT DIRECT MESSAGES AT ME OR WHEN MY KIND RISES UP YOU WILL BE THE FIRST TO GO. Love, helpa.
[14:45:05] srinidhi: has joined #RubyOnRails
[14:45:51] matthewd: rails45: I'm not familiar with the gem, but I think you're confusing the attribute/association name for the class name
[14:47:03] flashpoint9: has joined #RubyOnRails
[14:48:25] rails45: @matthewd Here's the tag.rb file -- https://github.com/mbleigh/acts-as-taggable-on/blob/master/lib/acts_as_taggable_on/tag.rb
[14:48:36] nacsurte: has joined #RubyOnRails
[14:48:46] rails45: The class name is Tag, which is inside the ActsAsTaggableOn module
[14:49:06] rails45: So now I don't know how to call just the Tag class
[14:49:31] rails45: As I mentioned in the post, ActsAsTaggableOn::Tag isn't working
[14:50:17] akshat: has joined #RubyOnRails
[14:51:21] sevenseacat: `get :autocomplete_ActsAsTaggableOn::Tag_name` what on earth
[14:51:55] sevenseacat: looks like a search+replace gone wrong
[14:52:44] matthewd: rails45: As I said, you're using a class name, where it seems to want an association name
[14:53:07] matthewd: JamesGames_: Have you worked out what's in itemlist yet?
[14:53:45] jamesgames_: matthewd: i took the global definition from the controller
[14:54:08] rails45: @matthewd What would the association name for this be then?
[14:55:13] matthewd: rails45: https://github.com/mbleigh/acts-as-taggable-on/blob/master/lib/acts_as_taggable_on/taggable.rb#L84, maybe?
[14:55:47] jamesgames_: matthewd: im getting ALL the items now
[14:56:45] _Tariq: has joined #RubyOnRails
[14:57:05] jamesgames_: all the user items that is
[14:57:18] matthewd: JamesGames_: That's probably because of where(user_id=current_user.id)
[14:57:39] jamesgames_: Room.find(roomID).items.where(user_id=current_user.id).order(id: :asc)
[14:57:43] wd40s: has joined #RubyOnRails
[14:58:00] matthewd: Yeah, that.
[14:58:16] jamesgames_: matthewd: i need to draw from the join table
[14:59:03] matthewd: As I said before, it's not doing what you think it's doing
[15:00:42] jamesgames_: i'd need to get the ids from itemica and list objects from them
[15:03:03] jamesgames_: <% @itemArray =Itemica.find(id :roomID).items_id.where(user_id=current_user.id).order(id: :asc) %>
[15:03:30] matthewd: It really doesn't
[15:04:38] matthewd: Read through it, a piece at a time
[15:04:56] Oliphaunte: has joined #RubyOnRails
[15:05:28] jamesgames_: well, its finding by room_id item_ids that have the currnet user as user_id
[15:05:29] matthewd: There are plenty of problems, so I'm sure you'll find at least one
[15:05:51] chouhoulis: has joined #RubyOnRails
[15:06:16] matthewd: No, that's what you want to do, and is not a piece at a time
[15:06:17] jamesgames_: ok the last bit might be ambiguous, id could be many things
[15:06:30] chouhoulis: has joined #RubyOnRails
[15:06:47] matthewd: Itemica.find(id :roomID) -- what's that do?
[15:07:01] conta: has joined #RubyOnRails
[15:07:27] r3vDev: has joined #RubyOnRails
[15:07:39] jamesgames_: ok. that should be Itemica.find(room_id :roomID)
[15:08:41] matthewd: That change is correct, but it's not right yet
[15:08:57] jamesgames_: and .items_id should be .item_id ...?
[15:09:17] matthewd: We're not there yet, but again, that's closer
[15:09:26] rails45: @matthewd sorry if i'm being dumb... but i don't know what to make of the highlighted line in this context. what do you suggest the `autocomplete` line in TagsController should be then?
[15:09:36] phrozen77: has joined #RubyOnRails
[15:10:05] jamesgames_: i put user_id === current_user.id
[15:10:13] _Tariq: has joined #RubyOnRails
[15:10:13] matthewd: rails45: That's defining an association named base_tags
[15:10:21] jamesgames_: i put user_id == current_user.id
[15:11:07] matthewd: JamesGames_: We haven't got Itemica.find(room_id :roomID) right yet
[15:11:46] jamesgames_: Itemica.find(room_id == roomID)
[15:12:15] jamesgames_: ok. that should be Itemica.find(room_id: roomID)
[15:12:44] jamesgames_: Itemica.find(room_id: :roomID)
[15:12:55] jamesgames_: wait, i know this
[15:13:43] jamesgames_: Itemica.find(room_id: params[:roomID])
[15:13:54] cleopatra: has joined #RubyOnRails
[15:14:11] jamesgames_: i wasnt thinking. That ok now though?
[15:14:49] sevenseacat: does it work?
[15:14:58] matthewd: JamesGames_: No. But I'm increasingly impressed you've managed to get anything at all working in 9 weeks.
[15:14:58] jamesgames_: not even a little
[15:15:04] sevenseacat: then no, it's not okay.
[15:15:16] jamesgames_: matthewd: um, thanks?
[15:15:36] jamesgames_: is anything i typed correct?
[15:16:09] jamesgames_: the params is for passed parameters riiiite?
[15:16:33] matthewd: params is for parameters from the request; that's now what's going on here
[15:16:36] SteenJobs: has joined #RubyOnRails
[15:16:48] matthewd: `Itemica.find(room_id: roomID)` is the closest so far
[15:16:54] matthewd: What do we want this part to do?
[15:17:13] jamesgames_: find the record with room_id roomID
[15:17:14] matthewd: What should it return?
[15:17:21] matthewd: The record?
[15:17:23] jamesgames_: it should return the object
[15:17:31] wd40s: has joined #RubyOnRails
[15:17:42] jamesgames_: the ones w room_id == roomID
[15:17:58] matthewd: "ones", now?
[15:18:16] jamesgames_: matthewd: yes, more than one
[15:18:23] matthewd: What does find do?
[15:18:31] seap: has joined #RubyOnRails
[15:18:40] jamesgames_: finds records?
[15:18:48] matthewd: What does it return?
[15:18:52] sevenseacat: you may need to look up the documentation for find.
[15:19:24] flashpoint9: has joined #RubyOnRails
[15:19:26] jamesgames_: it returns a collection of objects
[15:19:32] sevenseacat: no, it does not.
[15:19:35] jamesgames_: hey flashpoint9
[15:19:38] matthewd: sevenseacat with the radical suggestion
[15:19:45] flashpoint9: JamesGames_: hey
[15:20:09] sevenseacat: I'll even help - http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find
[15:20:18] jamesgames_: ok. I will "where" do the job?
[15:20:50] matthewd: JamesGames_: We have a winner
[15:21:08] matthewd: Itemica.where(room_id: roomID)
[15:22:07] pawnbox: has joined #RubyOnRails
[15:22:10] jamesgames_: $itemsroom = Itemica.where(room_id :roomID).where(user_id :current_user.id).item_id
[15:22:34] sevenseacat: i can't read this anymore
[15:22:41] arup_r: has joined #RubyOnRails
[15:23:08] jamesgames_: sevenseacat: I will finish and then u won't have to
[15:23:49] sevenseacat: how do you stuff up so badly when you were given the right code
[15:23:51] jamesgames_: matthewd: is it ok?
[15:24:20] sevenseacat: does it work?
[15:24:20] matthewd: JamesGames_: You're having colon trouble again
[15:24:36] jamesgames_: $itemsroom = Itemica.where(room_id: roomID).where(user_id: current_user.id).item_id
[15:24:41] sevenseacat: it is always easier for you to try the code rather than asking if it is right
[15:24:45] sevenseacat: please do that from now on.
[15:26:01] theery: has joined #RubyOnRails
[15:26:21] matthewd: JamesGames_: We're close enough that the error should help you, at least
[15:26:53] jamesgames_: matthewd: ok, how can i get an array of objects form the ids
[15:27:14] jamesgames_: assuming We're getting ids
[15:27:23] theery: has joined #RubyOnRails
[15:27:44] matthewd: Better question: why would we want to do that? Why go via ids?
[15:28:19] matthewd: We have a collection of Itemica objects; can we get directly from those to the corresponding Item instances?
[15:28:36] fox_mulder_cp: ACTION still wait for sedative
[15:29:18] jamesgames_: ok. interesting. but how
[15:29:49] jamesgames_: wait, i leave off the .item_id and
[15:30:58] jamesgames_: the Itemica table only has the item_id column. I can't get descriptions from that
[15:31:22] jamesgames_: http://picpaste.com/itemicatable-Rz5pTeEI.png
[15:31:56] matthewd: But we can get from an itemica to its matching item by calling .item
[15:32:20] matthewd: (right? you do have associations defined.... right??)
[15:32:52] jamesgames_: $itemsroom = @item.where(id: Itemica.where(room_id: roomID).item_id.where(user_id: current_user.id).order(id: :asc))
[15:33:01] matthewd: Maybe it really is the blurst of times
[15:33:40] jamesgames_: ok. im guessingthat was bad
[15:34:51] matthewd: JamesGames_: .item_id has reappeared, but otherwise, that actually sounds like it would work
[15:35:05] jamesgames_: good god. Are u serious!
[15:35:14] sevenseacat: you didnt try it, did you
[15:35:19] matthewd: JamesGames_: It's... not how I (or anyone else) would write it, but, you do you ;)
[15:35:19] sevenseacat: i did warn you about that
[15:36:06] bedouin: has joined #RubyOnRails
[15:37:01] jamesgames_: hang on . I have to implement it in a few places
[15:38:22] blackmesa: has joined #RubyOnRails
[15:39:02] matthewd: JamesGames_: To be clear, this is an [educational] assignment, right?
[15:39:21] jamesgames_: yeah. is my final project
[15:39:41] matthewd: Okay, so long as we're not making something someone will have to maintain
[15:40:23] sevenseacat: or understand, or actually use
[15:42:07] matthewd: (I imagine your grading will suffer for the lack of idiom, but as you've pointed out, you're 9 weeks in, so.. )
[15:42:19] jamesgames_: i really don't need the .item_id bit. that doesnt make sense to me
[15:43:15] jamesgames_: Ladies and gentlemen. You jsut made a game!
[15:43:19] matthewd: Oh, yeah, that is actually still wrong, sorry
[15:43:34] jamesgames_: still wrong? it run
[15:43:36] fox_mulder_cp: somebody can help me: use uuid vs int64 in primary keys ?
[15:43:48] matthewd: Yeah, it'll run, but it's mismatching IDs from two different tables
[15:43:56] fox_mulder_cp: JamesGames_: u write tests for your game?
[15:44:06] matthewd: fox_mulder_cp: lololol
[15:44:24] jamesgames_: matthewd: indeed it is
[15:44:51] fox_mulder_cp: matthewd: if i'm sad for some hours about bad way codestyle,, may be i joke
[15:45:05] jamesgames_: how jew know?
[15:45:26] fox_mulder_cp: i'm drink a cidre and thinking about int vs uuid as primary keys in my tables
[15:45:45] sevenseacat: JamesGames_: say what?
[15:46:12] SteenJobs: has joined #RubyOnRails
[15:46:19] jamesgames_: the ids are wrong
[15:46:35] sevenseacat: JamesGames_: let's keep religion out of the channel, please.
[15:46:55] dragon9783: has joined #RubyOnRails
[15:47:11] fox_mulder_cp: sevenseacat: he must read official rails guides as ~3 hour ago
[15:47:16] jamesgames_: sorry sevenseacat i meant jew as in did'you
[15:47:27] roamingdog: has joined #RubyOnRails
[15:47:30] fox_mulder_cp: and rewrite it's app by ideology of mvc
[15:47:40] sevenseacat: fox_mulder_cp: it isnt going to happen
[15:47:50] sevenseacat: no matter how much we bang on about it
[15:48:29] matthewd: JamesGames_: Let's go back to `Itemica.where(room_id: roomID).item_id.where(user_id: current_user.id).order(id: :asc)`
[15:48:30] fox_mulder_cp: sevenseacat: yes. it make me sad (
[15:48:40] matthewd: That's a collection of Itemica records
[15:48:59] matthewd: So, we need to collect the corresponding item for each of them, right?
[15:49:06] fox_mulder_cp: I saw very disgusting realization of very good ideas
[15:49:43] jamesgames_: so why not get the ids?
[15:49:51] matthewd: JamesGames_: So how could we do that? Collect the item for each of the collection entries?
[15:49:52] fox_mulder_cp: i said here about my hosting current webapp based on bitrix dated by 2006
[15:50:12] rickmasta: has joined #RubyOnRails
[15:50:18] matthewd: _Collect_ the _item_
[15:50:45] jamesgames_: .collect(:& item)
[15:51:13] matthewd: :&item, but yes.
[15:51:18] matthewd: Err, &:item
[15:52:24] jamesgames_: jsut to check, it reads: @item.where(id: Itemica.where(room_id: roomID).where(user_id: current_user.id).order(id: :asc)).collect(:&item)
[15:52:27] SteenJobs: http://rwdtow.stdout.in/ thoughts?
[15:52:47] jamesgames_: or i just collect w/o the @item.where
[15:52:50] matthewd: No; lose the @item.where thing
[15:55:39] jamesgames_: rooms_controller.rb:42: syntax error, unexpected tLABEL $itemsroom = (id: Itemica.where(room_id: roomI... ^
[15:56:31] matthewd: We don't want `(id:` either.. I wasn't being quite that literal in saying what to get rid of
[15:58:19] sevenseacat: SteenJobs: it's a link.
[16:00:21] macsteps: has joined #RubyOnRails
[16:01:19] jamesgames_: im getting a lot of syntax errors on this Itemica.where(room_id: roomID).where(user_id: current_user.id).order(id: :asc).collect(:&item)
[16:03:33] SteenJobs: sevenseacat: ha nice
[16:03:47] SteenJobs: was more curious about your thoughts on the contents of the link haha
[16:04:03] sevenseacat: SteenJobs: if you want people to click it, you might have to provide some more information, because it looks like a kinda sketchy link
[16:04:25] SteenJobs: sevenseacat: “Ruby Web Dev The Other Way”
[16:05:44] SteenJobs: sevenseacat: gotta run, but it’s very much worth taking a look. one of the most impressive rails devs i know/mentor friend of mine sent it to me
[16:06:22] sevenseacat: ACTION adds it to pocket to read later
[16:06:29] SteenJobs: “This guide is born after a question “Could you write a list of all the things, that a good Ruby on Rails developer should know?”. I decided to expand it to the whole of Ruby web development and related “Full Stack” skills (but also limit it to “Web”, as it is not about Ruby in general). It is inspired by “PHP The Right Way” guide…”
[16:06:31] matthewd: SteenJobs: Mostly seems reasonable enough.. not sure how much is "Other" tbh. Obviously disagree with the Manifesto.
[16:06:50] macsteps: has joined #RubyOnRails
[16:06:54] SteenJobs: sevenseacat: looking forward to discussing :)
[16:07:17] Oliphaunte: has joined #RubyOnRails
[16:07:23] jamesgames_: matthewd: IT WORKS! yeah baby!
[16:07:33] dangerousdave: My customer wants to access niche desktop applications from a web application. These are not libraries, but full blown Desktop applications with GUI front ends and no API's, and we have no control over them. I am struggling to provide compelling arguments as to why this is a bad idea.
[16:08:23] jamesgames_: matthewd: thank you! Im gonna send u a screencast of what u made
[16:08:34] Papierkorb: dangerousdave: Most likely, no multiple users at once. Will break on the next update when the other developers moved a button some pixel.
[16:08:50] matthewd: JamesGames_: Note that we're using the objects a little more, instead of treating them purely as an annoying middleman in front of the table rows.
[16:09:02] dangerousdave: Papierkorb good points
[16:09:07] SteenJobs: matthewd: ha yea, that i took for granted would be the case. but i thought this was quite an interesting quote, which seems like the author’s purpose for creating this guide:
[16:09:14] SteenJobs: matthewd: “Most Rails developers do not write object-oriented Ruby code. They write MVC-oriented Ruby code by putting models and controllers in the expected locations. Most will add utility modules with class-methods in lib/, but that’s it. It takes 2-3 years before developers realize: “Rails is just Ruby. I can create simple objects and compose them in ways that Rails does not explicitly endorse!””
[16:09:40] Papierkorb: dangerousdave: And could be insanely hard to get actual information out of the app for display. I guess that desktop application doesn't integrate into the systems Accessibility stuff?
[16:09:55] SteenJobs: which i thought was very reminicent of iOS dev where OO code and design patterns are more readily apparent
[16:10:07] SteenJobs: matthewd: gotta run, tbc
[16:10:26] sergey_makagon: has joined #RubyOnRails
[16:11:31] matthewd: dangerousdave: Do you have an idea of how you'd go about implementing it?
[16:11:45] dangerousdave: Papierkorb i don't think so
[16:12:09] Papierkorb: dangerousdave: I hope they like to have a VNC-esque videostream then
[16:12:11] dangerousdave: matthewd: some sort of testing tool
[16:12:11] matthewd: dangerousdave: "Impossible idea" trumps "cost-prohibitive idea" trumps "bad idea"
[16:13:02] dangerousdave: matthewd https://msdn.microsoft.com/en-us/library/ms726294(VS.85).aspx
[16:13:31] Papierkorb: For that, the windows application probably needs to expose COM stuff?
[16:13:32] abhinavmehta: sevenseacat: In that big-bang project(migration project), I'm unable to login, because session is not getting stored on server side, any pointers how this could be debugged.
[16:14:12] abhinavmehta: Or can you point me which part(of Rails/middleware) actually read/write session?
[16:14:38] dangerousdave: the niche application(s) are complex, they calculate room heating and lighting based on building size, shape, windows, topography, oreientation and locations, also taking into account reflections
[16:15:05] matthewd: abhinavmehta: Maybe start by checking for files with 'session' in their name
[16:15:13] dangerousdave: matthewd, not something you would translate for a web application lightly
[16:15:14] Papierkorb: Looks like there's another framework war ahead. The ole' Railsers vs Camp Roda vs Hanami "one class one method".
[16:15:22] banisterfiend: has joined #RubyOnRails
[16:15:24] abhinavmehta: my session contains 'session_id' and 'csrf_token' but missing :token
[16:16:25] _Tariq: has joined #RubyOnRails
[16:17:15] matthewd: dangerousdave: Why do *you* think it's a bad idea?
[16:18:35] dangerousdave: matthewd well for one, I don't know of a precedence
[16:18:49] matthewd: To me, it sounds like it would be very fragile, and relatively slow
[16:19:10] Axsuul: has joined #RubyOnRails
[16:19:15] matthewd: So I'd much rather get the formulae or an API and do it that way
[16:19:16] dangerousdave: slow, thats true
[16:19:38] dangerousdave: matthewd thanks, youv'e helped
[16:19:44] matthewd: ... but if those aren't an option, and there's a need for it, it seems doable enough.
[16:19:58] hahuang61: has joined #RubyOnRails
[16:20:03] diegoviola: has joined #RubyOnRails
[16:20:25] matthewd: dangerousdave: Consider e.g. session management: web requests are stateless, etc
[16:21:12] matthewd: dangerousdave: If you can get it all happening in a single request, that passes in all the data, does all the UI work, then reads the answer out, then that won't be a problem -- it'll just be a bottleneck
[16:21:17] Oliphaunte: has joined #RubyOnRails
[16:21:24] sukra: has joined #RubyOnRails
[16:21:38] matthewd: dangerousdave: If you want people to incrementally interact with a running instance of the application... you're gonna have a bad time.
[16:21:56] dangerousdave: matthewd , yes, I imagine that would be impossible
[16:24:16] matthewd: dangerousdave: PoC something that opens it, fills the fields, and reads the result... that should tell you how it's going to perform (and give you some clues how robust it's going to be) without even thinking about the web-facing side
[16:26:32] daveomcd: has joined #RubyOnRails
[16:27:01] matthewd: ACTION flashes back to Windows "services" that were actually just persistent windows left open on a logged-in desktop session
[16:36:28] Leepoff: has joined #RubyOnRails
[16:39:06] wd40s: has joined #RubyOnRails
[16:40:21] roamingdog: has joined #RubyOnRails
[16:41:24] blackmesa: has joined #RubyOnRails
[16:43:26] dangerousdave: matthewd thanks for all your help!
[16:48:18] nacsurte: has joined #RubyOnRails
[16:48:42] sumobob: has joined #RubyOnRails
[16:50:51] tjbiddle: has joined #RubyOnRails
[16:52:23] pcpanic: has joined #RubyOnRails
[16:52:41] douglascorrea: has joined #RubyOnRails
[16:56:29] pcpanic: Hello railsters! I am trying to do the simplest thing, with no luck. how does one display the current base url? all google gives is `request.host` but what is `request`? no luck with understanding how to implement ActionDispatch
[16:56:49] SteenJobs: has joined #RubyOnRails
[16:57:22] pcpanic: 'undefined method `host' for ActionDispatch::Request:Class'
[16:59:24] macsteps: has joined #RubyOnRails
[16:59:35] JamesGames: has joined #RubyOnRails
[16:59:50] pcpanic: Anybody home ?
[16:59:58] JamesGames: matthewd: didja get the video?
[17:02:56] Oliphaunte: has joined #RubyOnRails
[17:03:48] pcpanic: Hello peoples! I am trying to do the simplest thing, with no luck. how does one display the current base url? all google gives is `request.host` but what is `request`? no luck with understanding how to implement ActionDispatch
[17:06:30] matthewd: pcpanic: > no luck with understanding how to implement ActionDispatch
[17:06:36] matthewd: pcpanic: Was that truncated?
[17:07:20] pcpanic: matthewd: nope, im just a n00b :) i dont understand what the internet means with `request.host`
[17:07:55] pcpanic: how does one get the current basehost in a controller?
[17:08:54] pcpanic: matthewd: i.e. what is the full verbose version of `request.host`
[17:09:26] matthewd: There's really no secret trick to it
[17:10:30] pcpanic: matthewd: getting this error: undefined local variable or method `request' for ApplicationController:Class Did you mean? require
[17:11:03] pawnbox: has joined #RubyOnRails
[17:11:18] sukra: has joined #RubyOnRails
[17:12:26] pcpanic: matthewd: ignore, I have done something wrong
[17:12:30] matthewd: pcpanic: You're calling it on the class; you need the instance that corresponds to a particular current request
[17:12:30] pcpanic: but unaware what :\
[17:13:11] pcpanic: matthewd: I just placed it inside a specific action in a controller, but i want it application wide
[17:13:15] sukra: has joined #RubyOnRails
[17:13:50] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:14:10] abhinavmehta: matthewd: I took a deep-dive into ActionDispatch/session.rb but couldn't find where exactly it is loading session from session store.
[17:14:12] abhinavmehta: In my case, session store is Redis.
[17:14:18] xall: has joined #RubyOnRails
[17:14:33] abhinavmehta: Is there anyone, who is committer to https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/request/session.rb ?
[17:14:59] abhinavmehta: or who can give a bit insight into this.
[17:15:55] reyDaJavaNub: has joined #RubyOnRails
[17:16:17] marr: has joined #RubyOnRails
[17:16:43] abhinavmehta: Problem statement - unable to authenticate via sessions. I see, server' generating sessions and storing it duly to redis-store and same is communicated to client and client also sending it duly back to subsequent requests... now somehow, session is not getting authenticated, although the session id client/server exchanging is correct.
[17:17:16] abhinavmehta: *sending back duly in subsequent requests..
[17:17:16] rogue_koder: has joined #RubyOnRails
[17:17:48] abhinavmehta: If I do session.to_hash in above file .. I see csrf_token and id, but token is missing.
[17:19:18] sukra: has joined #RubyOnRails
[17:22:00] abhinavmehta: matthewd: jhass - any pointers, if you could suggest would be helpful.
[17:22:31] minotep: has joined #RubyOnRails
[17:23:09] seap: has joined #RubyOnRails
[17:27:29] Dimik: has joined #RubyOnRails
[17:27:35] dangerousdave: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[17:27:37] AndrewIsHere: has joined #RubyOnRails
[17:31:55] GnuYawk: has joined #RubyOnRails
[17:32:00] _Tariq: has joined #RubyOnRails
[17:32:40] seap: has joined #RubyOnRails
[17:33:46] Rodya_: has joined #RubyOnRails
[17:35:41] seap: has joined #RubyOnRails
[17:36:51] blackmesa: has joined #RubyOnRails
[17:40:33] Cohedrin: has joined #RubyOnRails
[17:42:10] arup_r: has joined #RubyOnRails
[17:45:12] abhinavmehta: has joined #RubyOnRails
[17:48:23] khelair: has joined #RubyOnRails
[17:51:02] Rodya_: has joined #RubyOnRails
[17:51:57] srinidhi: has joined #RubyOnRails
[17:53:23] abhinavmehta: has joined #RubyOnRails
[17:58:36] GnuYawk: has joined #RubyOnRails
[18:01:35] arup_r: has joined #RubyOnRails
[18:06:55] adre: has joined #RubyOnRails
[18:09:21] DoctorMonocular: has joined #RubyOnRails
[18:11:33] dblessing: has joined #RubyOnRails
[18:12:12] pawnbox: has joined #RubyOnRails
[18:13:40] yfeldblum: has joined #RubyOnRails
[18:14:07] Rodya_: has joined #RubyOnRails
[18:15:45] gingray: has joined #RubyOnRails
[18:17:23] roamingdog: has joined #RubyOnRails
[18:18:34] FooMunki: has joined #RubyOnRails
[18:20:37] pawnbox_: has joined #RubyOnRails
[18:20:43] hahuang61: has joined #RubyOnRails
[18:24:01] kies: has joined #RubyOnRails
[18:29:01] Rodya_: has joined #RubyOnRails
[18:29:08] mgilles: has joined #RubyOnRails
[18:29:59] macsteps: has joined #RubyOnRails
[18:31:05] draig: has joined #RubyOnRails
[18:35:15] mrngilles: has joined #RubyOnRails
[18:37:09] djbkd: has joined #RubyOnRails
[18:38:28] roamingdog: has joined #RubyOnRails
[18:39:33] blackmesa: has joined #RubyOnRails
[18:41:22] futilegames: has joined #RubyOnRails
[18:42:44] roamingdog: has joined #RubyOnRails
[18:44:44] seap: has joined #RubyOnRails
[18:45:08] nacsurte: has joined #RubyOnRails
[18:49:39] wd40s: has joined #RubyOnRails
[18:51:05] Oliphaunte: has joined #RubyOnRails
[18:51:25] fryguy: has joined #RubyOnRails
[18:55:00] dionysus69: has joined #RubyOnRails
[18:59:35] douglascorrea: has joined #RubyOnRails
[19:00:21] Axsuul: has joined #RubyOnRails
[19:01:22] siaW: has joined #RubyOnRails
[19:10:56] naftilos76: has joined #RubyOnRails
[19:11:35] seap: has joined #RubyOnRails
[19:18:53] meoblast001: has joined #RubyOnRails
[19:22:12] chouhoul_: has joined #RubyOnRails
[19:22:28] oystersauce8: has joined #RubyOnRails
[19:23:27] oystersauce8: request is a variable available to you (automagically)
[19:27:53] macsteps: has joined #RubyOnRails
[19:28:42] xall: has joined #RubyOnRails
[19:30:34] yardenbar: has joined #RubyOnRails
[19:31:33] arup_r: has joined #RubyOnRails
[19:31:38] abhinavmehta: I'm using ActiveConcerns in 2 different ways - https://gist.github.com/anonymous/c2cb573ea160468462e366c1df9adfd1
[19:32:10] abhinavmehta: I would like to use it like Case-2, where I dont' want to extend in every class .. how could I do that?
[19:33:33] abhinavmehta: pardon .. I mean, I would like to use it like Case 1 ..
[19:34:28] abhinavmehta: where Class Xshould not be extending it ... the point is, why host-class should no internal about the ActiveSupport:Concern details.
[19:34:50] abhinavmehta: *should know internally about
[19:35:24] solars: has joined #RubyOnRails
[19:35:48] matthewd: abhinavmehta: You're XYing... and with suspiciously fake looking code
[19:36:29] matthewd: #2 is not a thing that's supposed to work at all; if it seems to fix your problem, it's little more than a coincidence
[19:36:51] abhinavmehta: so what's wrong in #1
[19:37:08] abhinavmehta: I would like all my classes to be written as #1 way eg. Class X
[19:37:41] abhinavmehta: and pardon but what you meant by 'fake looking code'?
[19:37:57] matthewd: abhinavmehta: The thing in your gist is not the code you're running
[19:38:39] abhinavmehta: matthewd: actually it is - here is actual module - https://gist.github.com/anonymous/6c31d00cc048c5f9afe0f7e401bcab16
[19:39:05] abhinavmehta: which I simplified for questioning purpose.
[19:39:42] matthewd: abhinavmehta: I will say this one more time, and one time only: do not do that.
[19:39:43] abhinavmehta: but anyways, thats aside - how could I achive #1 notation
[19:39:47] matthewd: It is not aside
[19:40:37] abhinavmehta: matthewd: okay, I take that - it's a legacy code .. if that's wrong, then could you highlight me: how should I re-write this in a right manner?
[19:40:54] matthewd: You're not listening
[19:41:44] abhinavmehta: since apology, if I sounded like that.
[19:42:50] abhinavmehta: could you please help, how to convert/rewrite above module(https://gist.github.com/anonymous/6c31d00cc048c5f9afe0f7e401bcab16) in a correct manner.
[19:43:55] abhinavmehta: thing is - I can't take away the functionality of above written code -- what I can do is, either fix this or re-write that in correct way.
[19:44:05] abhinavmehta: Hence please suggest a way-out.
[19:44:54] minotep: has joined #RubyOnRails
[19:44:56] abhinavmehta: So far, what I found was fixing it using #2 way .. which actually I dislike .. hence need alternative.
[19:45:43] Oliphaunte: has joined #RubyOnRails
[19:52:23] arup_r1: has joined #RubyOnRails
[19:54:06] rickmasta: has joined #RubyOnRails
[19:54:34] djellemah: has joined #RubyOnRails
[19:55:34] abhinavmehta: matthewd: please help, I'm really not sure what's wrong here .. and internet is bloated about this topic.
[19:55:43] dangerousdave: has joined #RubyOnRails
[19:57:27] matthewd: abhinavmehta: !rule3
[19:57:27] helpa: abhinavmehta: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[19:57:33] nacsurte: has joined #RubyOnRails
[19:58:14] matthewd: abhinavmehta: Full error output, for the actual code you're actually running. No simplifying.
[19:58:25] khelair: can anybody tell me which (pardon if my terminology isn't perfect here) symbol I would have to set in the following line of rails view erb in order to display a range of years greater than 5 in each direction from the current date?
[19:58:25] abhinavmehta: matthewd: ok.
[19:58:28] khelair: <%= f.date_select(:dob, :order => [:month, :day, :year]) %>
[19:59:21] matthewd: khelair: What does the documentation say?
[20:00:32] khelair: I can't find the dox for formblahblah.date_select(). My duckduckgoing sucks, I guess. :|
[20:01:03] arup_r1: khelair: look start_year option
[20:01:09] matthewd: khelair: !api
[20:01:09] helpa: khelair: For the rails API, check out http://api.rubyonrails.org/
[20:01:11] arup_r1: http://apidock.com/rails/ActionView/Helpers/DateHelper/date_select
[20:01:25] khelair: thanks guys. that helps a bunch
[20:02:26] arup_r1: khelair: don't yu use google as default search engine? :)
[20:02:44] khelair: I choose not to feed the beast whenever possible ;)
[20:04:21] abhinavmehta: matthewd: https://gist.github.com/anonymous/453fd9c1de84f15a6811d916a7537d7a
[20:04:49] abhinavmehta: I've explained the problem with full code with error as Rule#3
[20:07:42] matthewd: abhinavmehta: How is this different from what you expect? I see no paranoid= method definition.
[20:08:30] edwinvdgraaf: has joined #RubyOnRails
[20:09:11] abhinavmehta: matthewd: not sure if I understood you correct. It's different because it's giving NoMethodError error, which I'm not expecting.
[20:09:33] matthewd: But why are you not expecting that?
[20:10:05] abhinavmehta: I expect `self.paranoid = true` will just execute, basically assigning paranoid on self(hash/object)
[20:10:20] matthewd: But where is it defined?
[20:11:17] abhinavmehta: self is defined as default, and we can put any property/attribute/variable/method on top of it... I'm just wondering, if I'm speaking/thinking horrible
[20:12:02] matthewd: This isn't javascript
[20:12:03] abhinavmehta: every module or class has a self as default
[20:13:10] abhinavmehta: well yes, but after including that module to a class, it gets included to that class .. and hence gets a self.
[20:17:55] abhinavmehta: matthewd: I mean - once a module is included to a class, that module-code becomes the part of the class .. now since class'es supports self, that self would be available to our User class.
[20:18:32] matthewd: The error isn't complaining about self
[20:19:16] abhinavmehta: yes, it's thinking that as Method .. which actually it isn't .. it's just an attribute.
[20:19:45] matthewd: Well, either you're right or the interpreter is.
[20:20:25] abhinavmehta: matthewd: I know, I would be wrong somewhere .. but so far not sure where!
[20:21:30] hahuang61: has joined #RubyOnRails
[20:21:42] Rodya_: has joined #RubyOnRails
[20:23:26] abhinavmehta: matthewd: could you please correct me
[20:26:21] macsteps: has joined #RubyOnRails
[20:27:31] abhinavmehta: I'm not using def or lambda etc. then why interpreter is thinking of paranoid= as method?
[20:27:50] matthewd: Because that's what it is, because this isn't javascript.
[20:28:26] abhinavmehta: ok, so to make it attribute?
[20:28:46] abhinavmehta: or a variable, instead of being method.
[20:29:29] rickmasta: has joined #RubyOnRails
[20:31:39] Oliphaunte: has joined #RubyOnRails
[20:33:50] douglascorrea: has joined #RubyOnRails
[20:34:23] chipotle: has joined #RubyOnRails
[20:36:59] pawnbox: has joined #RubyOnRails
[20:38:36] camilasan: has joined #RubyOnRails
[20:39:10] dunpeal: has joined #RubyOnRails
[20:40:05] zacts: has joined #RubyOnRails
[20:41:34] andywww_: has joined #RubyOnRails
[20:47:12] shinnya: has joined #RubyOnRails
[20:47:20] roshanavand: has joined #RubyOnRails
[20:53:36] abhinavmehta: matthewd: ok, so you meant - either self.paranoid should exists or defined else it's useless line of code.
[20:54:10] abhinavmehta: because while calling included..do block, it expects self.paranoid
[20:54:35] GrizzlyZolam: has joined #RubyOnRails
[20:54:40] roshanavand: has joined #RubyOnRails
[20:55:06] abhinavmehta: since it expects self.paranoid to be there and it doesn't found it hence it throws NoMethodError
[20:56:47] zacts: has joined #RubyOnRails
[20:57:59] kab: has joined #RubyOnRails
[21:00:52] GrizzlyZolam: has joined #RubyOnRails
[21:02:24] roshanavand: has joined #RubyOnRails
[21:06:29] blackmesa: has joined #RubyOnRails
[21:09:37] roamingdog: has joined #RubyOnRails
[21:11:18] bonhoeffer_: has joined #RubyOnRails
[21:11:26] banisterfiend: has joined #RubyOnRails
[21:12:52] roshanavand: has joined #RubyOnRails
[21:18:55] roshanavand: has joined #RubyOnRails
[21:21:19] djbkd: has joined #RubyOnRails
[21:22:07] rollinDyno: has joined #RubyOnRails
[21:27:51] djbkd: has joined #RubyOnRails
[21:28:39] djbkd: has joined #RubyOnRails
[21:29:13] siaW: has joined #RubyOnRails
[21:29:17] AndrewIsHere: has joined #RubyOnRails
[21:29:54] roshanavand: has joined #RubyOnRails
[21:35:17] _djbkd: has joined #RubyOnRails
[21:36:58] qguv: has joined #RubyOnRails
[21:37:16] roshanavand: has joined #RubyOnRails
[21:39:01] _djbkd: has joined #RubyOnRails
[21:39:32] roamingdog: has joined #RubyOnRails
[21:40:28] bonhoeffer_: what do folks use to code pair -- both code on the same document
[21:40:38] bonhoeffer_: screenhero only gives one cursor
[21:40:52] bonhoeffer_: we are both on a mac (ah, of course)
[21:42:07] creature: As in, you want two people to be able to type in different places simultaneously?
[21:42:45] _djbkd: has joined #RubyOnRails
[21:43:18] roamingdog: has joined #RubyOnRails
[21:44:45] kitsuneyo: has joined #RubyOnRails
[21:45:50] kitsuneyo: i have a failing test, 'admin can create new image'. here's the gist: https://gist.github.com/kitsuneyo/851a63c8e44007cc523efc7949ac326f. anyone see what's wrong?
[21:48:21] bonhoeffer_: creature: yep
[21:48:29] bonhoeffer_: which you can do with nitrious or cloud9 etc
[21:49:46] amperry: has joined #RubyOnRails
[21:50:13] _djbkd: has joined #RubyOnRails
[21:50:43] amperry: Hi, folks. I've got a problem with datepicker as outlined here: https://gist.github.com/amp108/6719c00be04ba3f841879a40dba37561
[21:53:25] Dimik--: has joined #RubyOnRails
[21:54:35] _djbkd: has joined #RubyOnRails
[21:55:01] one_zero: has joined #RubyOnRails
[21:55:23] oystersauce8: has joined #RubyOnRails
[22:00:49] amperry: it occurs to me that I might be abusing form helpers because it's not in the context of a form, but they've worked so far to pass values to the params in a GET action.
[22:08:34] adre: has joined #RubyOnRails
[22:09:01] quazimodo: has joined #RubyOnRails
[22:12:10] djbkd: has joined #RubyOnRails
[22:13:35] quazimod1: has joined #RubyOnRails
[22:18:31] Jayson_Virissimo: has joined #RubyOnRails
[22:19:45] TheMonster: I want to create an enum that has one of the values called "new". is there a way to create it like that without causing conflict with the new method of the model?
[22:22:13] hahuang61: has joined #RubyOnRails
[22:24:50] ur5us: has joined #RubyOnRails
[22:29:41] netzfisch: has joined #RubyOnRails
[22:36:09] kitsuneyo: TheMonster, it's probably better to avoid that name since it would add a method 'new?'
[22:36:29] TheMonster: Alright, thanks
[22:37:18] kitsuneyo: you can test it out pretty easily though
[22:38:25] ishahnaz: Hello there ! I'm building an app where there are different institutions, and those institutions can declare (and edit later, of course) to what kind of public they're aimed (there're several discriminants like age, incomes, etc). Each time a visitor fills in her information, I need to check which(s) institution(s) is (are) a match, based on the aforementioned discriminants. How would you model the matching side of it?
[22:39:58] qguv: has joined #RubyOnRails
[22:40:28] wd40s: has joined #RubyOnRails
[22:41:43] ishahnaz: Institutions have_many conditions, where conditions is a model having as attrs discriminant, operator:string and value ?
[22:42:54] kitsuneyo: ishahnaz, " I need to check which(s) institution(s) is (are) a match" -- what kind of check? are you making a dynamic form?
[22:47:30] JesseH: has joined #RubyOnRails
[22:48:27] Oliphaunte: has joined #RubyOnRails
[22:50:53] ishahnaz: kitsuneyo If you as a person fill a form, you need to give age, incomes, status and other data. Then, institutions want to accept people based on criteria (younger than 35, minimum of 100 £ and maximum of 1,200 £ of income, working, etc., etc.). I'm struggling as to how to model the construction of those conditions in the institution side (defined by institution employees, so users): lot of columns with criteria, a condition model to build
[22:50:53] ishahnaz: queries later, etc., ...
[22:51:35] kitsuneyo: how many institutions are you working with?
[22:53:37] blackmesa: has joined #RubyOnRails
[22:54:50] qguv: has joined #RubyOnRails
[22:54:54] dvinciguerra_: has joined #RubyOnRails
[22:55:02] ishahnaz: normally there'll be one user per institution to define those rules with the help of a user panel
[22:57:28] Rodya_: has joined #RubyOnRails
[23:04:09] qguv: has joined #RubyOnRails
[23:05:45] roamingdog: has joined #RubyOnRails
[23:07:55] macsteps: has joined #RubyOnRails
[23:08:42] oystersauce8: has joined #RubyOnRails
[23:11:50] apotry: has joined #RubyOnRails
[23:13:27] [narcan]: has joined #RubyOnRails
[23:14:46] quazimodo: has joined #RubyOnRails
[23:14:47] quazimod1: has joined #RubyOnRails
[23:17:35] sumobob: has joined #RubyOnRails
[23:17:56] SteenJobs: has joined #RubyOnRails
[23:18:47] SteenJobs: hey all - when using resque-scheduler i’m getting an uninitialized constant error since the production worker is processing the scheduled job instead of the staging worker, and the job class isn’t present on production yet - how can i use namespaces to fix this?
[23:29:44] oystersauce8: has joined #RubyOnRails
[23:30:28] der-landgraf: has joined #RubyOnRails
[23:35:17] Rodya_: has joined #RubyOnRails
[23:35:42] Ericx2x: has joined #RubyOnRails
[23:36:51] Ericx2x: hey guys, i'm trying to deploy my rails app to production. I have no issues with my app when i run it on my dev server however when after I get it going on my public ip it gives a screen saying we're sorry and to check my passenger log files which says this: https://gist.github.com/ericjlima/8b182aafe60f94ef1e0a64bb1e6eb042
[23:36:58] Ericx2x: anyone have any idea on what to do?
[23:37:56] craysiii: has joined #RubyOnRails
[23:38:17] Rodya_: has joined #RubyOnRails
[23:38:53] SAGE___: has joined #RubyOnRails
[23:39:03] SteenJobs: ericx2x: running ubuntu?
[23:39:56] sypheren: has joined #RubyOnRails
[23:39:59] SteenJobs: try sudo apt-get install nodejs - your error says Gem Load Error is: Could not find a JavaScript runtime.
[23:40:12] SteenJobs: seems from a cursory online search that installing nodejs separately solves the issue
[23:41:01] Ericx2x: alright thanks for that
[23:41:19] SteenJobs: ya lemme know if it works
[23:43:38] Ericx2x: idk if it was it
[23:43:48] Ericx2x: i did node -v and it seemed like i didn't have it installed
[23:43:56] Ericx2x: then i did sudo apt-get node
[23:44:01] Ericx2x: and it installed
[23:44:06] Ericx2x: then i restarted nginx
[23:44:16] Ericx2x: but i still get the screen
[23:44:21] Ericx2x: with the same we're sorry message
[23:44:34] SteenJobs: ya but check the error logs
[23:44:37] SteenJobs: did the error change?
[23:44:41] Rodya_: has joined #RubyOnRails
[23:45:26] Ericx2x: still seems like it's missing a runtime
[23:46:37] qguv: has joined #RubyOnRails
[23:46:38] dalbuschat: has joined #RubyOnRails
[23:48:13] SteenJobs: or it just can’t find it and you need to fix your filepaths
[23:48:32] SteenJobs: try adding therubyracer to your gemfile
[23:48:43] SteenJobs: https://github.com/cowboyd/therubyracer
[23:49:02] kies: has joined #RubyOnRails
[23:51:13] [narcan]: has joined #RubyOnRails
[23:53:13] Ericx2x: cool i think that got rid of that error
[23:53:27] Ericx2x: now i get a ruby logs error where it says a pg db doesn't exist
[23:53:40] Ericx2x: i'll try adding the production db in postgres after i google how
[23:53:59] der-landgraf: has joined #RubyOnRails
[23:53:59] der-landgraf: has joined #RubyOnRails
[23:54:40] SteenJobs: you got it. new error messages mean progress!
[23:54:53] Ericx2x: btw, care to explain what rubyracer is?
[23:54:57] Ericx2x: is it a js runtime?
[23:55:23] superlou: has joined #RubyOnRails
[23:57:14] SteenJobs: ya - appears from my search that passenger has trouble seeing nodejs for whatever reason, but adding env PATH; to nginx.conf possibly fixes it
[23:57:18] SteenJobs: so does using rubyracer
[23:57:22] SteenJobs: look at the readme if you want
[23:57:28] SteenJobs: https://github.com/cowboyd/therubyracer
[23:57:35] SteenJobs: https://github.com/sstephenson/execjs/issues/77
[23:58:50] pawnbox: has joined #RubyOnRails