« Back to channel list

#RubyOnRails - 22 November 2015

« Back 1 day Forward 1 day »
[00:05:55] trosborn: has joined #RubyOnRails
[00:08:36] Pazician: has joined #RubyOnRails
[00:10:31] medright: has joined #RubyOnRails
[00:11:39] yoongkang: has joined #RubyOnRails
[00:16:30] MEATCHICKEN: What does rails do to make cookies secure? I've noticed a ton of other frameworks dont use a secret_key_base
[00:16:42] MEATCHICKEN: isn't that required to deflect tampering?
[00:17:19] htmldrum: has joined #RubyOnRails
[00:17:33] FailBit: rails uses a secret_key_base, yes
[00:17:47] FailBit: that is its primary defense; if the key is leaked, people can mess with the cookie
[00:18:33] EminenceHC: has joined #RubyOnRails
[00:20:54] MEATCHICKEN: FailBit, Is that the best way to secure a cookie?
[00:21:23] Axsuul: has joined #RubyOnRails
[00:21:37] annlewis: has joined #RubyOnRails
[00:22:09] FailBit: it's a fast and quite safe way to secure a cookie
[00:26:06] rubyonrailed: has joined #RubyOnRails
[00:27:38] owenjones: has joined #RubyOnRails
[00:29:38] pawnbox: has joined #RubyOnRails
[00:30:44] FailBit: this has to be an awesome euphemism
[00:30:46] FailBit: <Peihaner> If I'm in the UK uploading cheese pizza to a server in Iceland, the Icelandic authorities aren't going to care, but the UK ones still would.
[00:35:14] shibabu: has joined #RubyOnRails
[00:37:40] Scripore: has joined #RubyOnRails
[00:41:56] l4v2: has joined #RubyOnRails
[00:44:00] indorails: has joined #RubyOnRails
[00:46:35] rgrmatt: has joined #RubyOnRails
[00:46:48] fschuindt: has joined #RubyOnRails
[00:48:48] fschuindt: How can I set a value to a module's instance variable when testing it with RSpec? Like: https://gist.github.com/fschuindt/1b878e813fb94fcd5d8f Both examples are failing because @report is nil. Any tip?
[00:49:20] renews: has joined #RubyOnRails
[00:50:29] patrick3: has joined #RubyOnRails
[00:50:55] fedexo: has joined #RubyOnRails
[00:52:20] Radar: fschuindt: Pass the object to the helper methods rather than relying on instance variables.
[00:53:35] nickenchuggets: has joined #RubyOnRails
[00:53:37] fschuindt: Radar: cool tip, tty
[00:53:49] EminenceHC: has joined #RubyOnRails
[00:55:54] NBarnes: has joined #RubyOnRails
[00:56:11] owenjones: has joined #RubyOnRails
[01:00:09] indorails: how can i add record to other relationship tables when i create new record in one table ? i have nested form view
[01:00:36] rgtk: has joined #RubyOnRails
[01:01:22] Axsuul: has joined #RubyOnRails
[01:02:26] rgtk: has joined #RubyOnRails
[01:03:41] medright: has joined #RubyOnRails
[01:04:43] rgtk: has joined #RubyOnRails
[01:04:51] Radar: indorails: what have you tried?
[01:06:16] rgtk: has joined #RubyOnRails
[01:08:27] rgtk: has joined #RubyOnRails
[01:09:59] baweaver: has joined #RubyOnRails
[01:10:24] rgtk: has joined #RubyOnRails
[01:12:15] rgtk: has joined #RubyOnRails
[01:12:30] Axsuul: has joined #RubyOnRails
[01:13:15] ewnd9: has joined #RubyOnRails
[01:13:34] indorails: radar : i tried find_or_initialize_by
[01:13:44] Radar: indorails: Show us your nested form view
[01:13:47] Radar: indorails: !gist
[01:13:47] helpa: indorails: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[01:13:50] rgtk: has joined #RubyOnRails
[01:15:46] rgtk: has joined #RubyOnRails
[01:17:36] rgtk: has joined #RubyOnRails
[01:19:33] rgtk: has joined #RubyOnRails
[01:19:53] doodlehaus: has joined #RubyOnRails
[01:21:25] rgtk: has joined #RubyOnRails
[01:22:19] alex88: has joined #RubyOnRails
[01:22:44] Denarii: has joined #RubyOnRails
[01:22:44] annlewis: has joined #RubyOnRails
[01:23:22] rgtk: has joined #RubyOnRails
[01:25:36] rgtk: has joined #RubyOnRails
[01:27:07] rgtk: has joined #RubyOnRails
[01:28:28] lemur: has joined #RubyOnRails
[01:29:00] rgtk: has joined #RubyOnRails
[01:29:53] build22: has joined #RubyOnRails
[01:30:56] rgtk: has joined #RubyOnRails
[01:32:50] rgtk_: has joined #RubyOnRails
[01:34:18] baweaver: has joined #RubyOnRails
[01:34:42] rgtk: has joined #RubyOnRails
[01:36:36] rgtk_: has joined #RubyOnRails
[01:38:51] rgtk: has joined #RubyOnRails
[01:40:23] rgtk: has joined #RubyOnRails
[01:40:32] juddey: has joined #RubyOnRails
[01:42:16] rgtk: has joined #RubyOnRails
[01:42:33] dideler: has joined #RubyOnRails
[01:44:13] Spami: has joined #RubyOnRails
[01:44:14] rgtk_: has joined #RubyOnRails
[01:44:22] rgrmatt: has joined #RubyOnRails
[01:46:29] rgtk: has joined #RubyOnRails
[01:47:31] indorails: https://goo.gl/EEPLqu
[01:50:03] rgtk: has joined #RubyOnRails
[01:52:02] nya: has joined #RubyOnRails
[01:52:06] rgtk: has joined #RubyOnRails
[01:53:26] superlou: has joined #RubyOnRails
[01:53:58] shibabu: has joined #RubyOnRails
[01:54:03] rgtk: has joined #RubyOnRails
[01:54:17] annlewis: has joined #RubyOnRails
[01:55:14] wldcordeiro: has joined #RubyOnRails
[01:55:36] rgtk: has joined #RubyOnRails
[01:56:16] htmldrum: has joined #RubyOnRails
[01:56:33] pyemkey: has joined #RubyOnRails
[01:57:29] rgtk: has joined #RubyOnRails
[01:59:43] rgtk: has joined #RubyOnRails
[02:00:16] Axsuul: has joined #RubyOnRails
[02:01:13] rgtk: has joined #RubyOnRails
[02:03:10] rgtk: has joined #RubyOnRails
[02:03:13] alphaatom: has joined #RubyOnRails
[02:03:18] fschuindt: I defined the app to autoload /lib folder. Created a lib/numeric.rb file with a 'class Numeric' definition (adding some methods to the Numeric class) but they aren't being loaded, returns undefined method. (Other classes as my lib/ftp_client.rb is working proper)
[02:04:02] fschuindt: Can't I ovveride classes in this way?
[02:05:23] EminenceHC: has joined #RubyOnRails
[02:05:23] rgtk: has joined #RubyOnRails
[02:07:18] rgtk: has joined #RubyOnRails
[02:08:03] urbann: has joined #RubyOnRails
[02:08:58] rhizome: i think it depends on how you write your class
[02:09:10] rgtk: has joined #RubyOnRails
[02:10:30] fschuindt: I just used require 'numeric' and it worked, lol
[02:10:43] rgtk: has joined #RubyOnRails
[02:11:16] segy_: has joined #RubyOnRails
[02:11:36] darrencauthon: has joined #RubyOnRails
[02:12:42] rgtk: has joined #RubyOnRails
[02:13:46] segy-: has joined #RubyOnRails
[02:13:47] ur5us: has joined #RubyOnRails
[02:14:07] baweaver: has joined #RubyOnRails
[02:14:36] rgtk: has joined #RubyOnRails
[02:16:27] rgtk: has joined #RubyOnRails
[02:18:00] rgrmatt: has joined #RubyOnRails
[02:18:34] rgtk: has joined #RubyOnRails
[02:20:20] rgtk: has joined #RubyOnRails
[02:20:38] doodlehaus: has joined #RubyOnRails
[02:22:32] rgtk: has joined #RubyOnRails
[02:23:08] skiz: has joined #RubyOnRails
[02:24:25] rgtk: has joined #RubyOnRails
[02:26:19] rgtk: has joined #RubyOnRails
[02:27:38] one_zero: has joined #RubyOnRails
[02:28:05] rgtk: has joined #RubyOnRails
[02:30:02] rgtk: has joined #RubyOnRails
[02:30:37] tinderusr: has joined #RubyOnRails
[02:30:45] build22: has joined #RubyOnRails
[02:32:06] rgtk: has joined #RubyOnRails
[02:33:51] rgtk: has joined #RubyOnRails
[02:35:12] rosh: has joined #RubyOnRails
[02:35:53] rgtk: has joined #RubyOnRails
[02:37:48] rgtk: has joined #RubyOnRails
[02:37:57] phon: has joined #RubyOnRails
[02:38:39] koprom: has joined #RubyOnRails
[02:39:41] rgtk: has joined #RubyOnRails
[02:41:23] rgtk: has joined #RubyOnRails
[02:41:56] rjn2: has joined #RubyOnRails
[02:43:27] rgtk: has joined #RubyOnRails
[02:45:21] rgtk: has joined #RubyOnRails
[02:47:17] rgtk: has joined #RubyOnRails
[02:48:22] alphaatom: has joined #RubyOnRails
[02:49:01] rgtk: has joined #RubyOnRails
[02:50:53] rgtk: has joined #RubyOnRails
[02:52:50] rgtk: has joined #RubyOnRails
[02:52:52] MEATCHICKEN: has joined #RubyOnRails
[02:53:33] sarink: has joined #RubyOnRails
[02:54:56] rgtk: has joined #RubyOnRails
[02:56:25] exadeci: has joined #RubyOnRails
[02:56:36] rgtk: has joined #RubyOnRails
[02:58:41] rgtk: has joined #RubyOnRails
[03:00:23] rgtk: has joined #RubyOnRails
[03:01:27] rubyonrailed: has joined #RubyOnRails
[03:02:30] rgtk: has joined #RubyOnRails
[03:03:13] annlewis: has joined #RubyOnRails
[03:03:15] m0nge: has joined #RubyOnRails
[03:04:10] rgtk: has joined #RubyOnRails
[03:06:04] rgtk: has joined #RubyOnRails
[03:07:11] jessemcgilallen: has joined #RubyOnRails
[03:08:08] rgtk: has joined #RubyOnRails
[03:09:50] rgtk_: has joined #RubyOnRails
[03:11:46] rgtk: has joined #RubyOnRails
[03:12:39] darrencauthon: has joined #RubyOnRails
[03:13:14] SteenJobs: has joined #RubyOnRails
[03:13:51] rgtk: has joined #RubyOnRails
[03:15:34] rgtk: has joined #RubyOnRails
[03:17:34] rgtk: has joined #RubyOnRails
[03:19:30] rgtk: has joined #RubyOnRails
[03:20:49] pawnbox: has joined #RubyOnRails
[03:21:24] rgtk: has joined #RubyOnRails
[03:23:18] rgtk: has joined #RubyOnRails
[03:24:59] rgtk: has joined #RubyOnRails
[03:25:00] pwnd_nsfw: has joined #RubyOnRails
[03:25:23] Oog: has joined #RubyOnRails
[03:26:53] rgtk: has joined #RubyOnRails
[03:27:12] Oog: has joined #RubyOnRails
[03:27:22] Oog: I have a User model with a sponsor_id that is a foreign key to User.id. is there a way to setup a has_many :sponsored_users that does User.where(:sponsored_id => self.id) ?
[03:28:57] rgtk: has joined #RubyOnRails
[03:29:21] fryguy: Oog: you might want to review "Options" here http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html
[03:29:46] fryguy: Oog: notably "class_name", "foreign_key" and "foreign_type"
[03:30:31] rgtk: has joined #RubyOnRails
[03:33:05] alex88: has joined #RubyOnRails
[03:33:21] build22: has joined #RubyOnRails
[03:35:08] ja: has joined #RubyOnRails
[03:35:28] RandyT_: has joined #RubyOnRails
[03:35:42] helpa: has joined #RubyOnRails
[03:36:00] shibabu: has joined #RubyOnRails
[03:36:54] codelahoma_: has joined #RubyOnRails
[03:37:23] nyaa: has joined #RubyOnRails
[03:37:45] AntiSpamMeta_: has joined #RubyOnRails
[03:38:17] Eminence_: has joined #RubyOnRails
[03:38:21] proboszcz: has joined #RubyOnRails
[03:38:31] ascarter: has joined #RubyOnRails
[03:39:29] koprom_: has joined #RubyOnRails
[03:39:33] kramsee_: has joined #RubyOnRails
[03:39:34] greenride1: has joined #RubyOnRails
[03:39:34] yaewa: has joined #RubyOnRails
[03:39:37] Aeyrix_: has joined #RubyOnRails
[03:39:37] Grag_Harker: has joined #RubyOnRails
[03:40:00] gz0: has joined #RubyOnRails
[03:40:07] diprotic: has joined #RubyOnRails
[03:40:08] diprotic: has joined #RubyOnRails
[03:40:29] The_Kingdutch: has joined #RubyOnRails
[03:40:34] StaticVo1d: has joined #RubyOnRails
[03:40:36] joeytwiddle_: has joined #RubyOnRails
[03:40:55] yoongkang: has joined #RubyOnRails
[03:41:01] akshat_: has joined #RubyOnRails
[03:41:07] kaspergrubbe: has joined #RubyOnRails
[03:41:33] Pro|: has joined #RubyOnRails
[03:41:52] Ratler_: has joined #RubyOnRails
[03:41:54] raenk_: has joined #RubyOnRails
[03:41:58] aeffle: has joined #RubyOnRails
[03:42:08] golgaroth_: has joined #RubyOnRails
[03:43:14] noodle: has joined #RubyOnRails
[03:43:49] targaf_: has joined #RubyOnRails
[03:43:51] RedDwarf: has joined #RubyOnRails
[03:43:56] Olipro_: has joined #RubyOnRails
[03:44:08] arathald_: has joined #RubyOnRails
[03:44:13] martinbjeldbak: has joined #RubyOnRails
[03:44:21] zz_denym_: has joined #RubyOnRails
[03:44:39] zrl_: has joined #RubyOnRails
[03:45:00] kanzure_: has joined #RubyOnRails
[03:45:09] DarkBushido_: has joined #RubyOnRails
[03:45:17] segy: has joined #RubyOnRails
[03:45:29] nullwarp_: has joined #RubyOnRails
[03:45:34] svkurowski: has joined #RubyOnRails
[03:46:10] cschneid: has joined #RubyOnRails
[03:46:45] gambl0re: has joined #RubyOnRails
[03:46:50] LiamW: has joined #RubyOnRails
[03:47:20] armyriad: has joined #RubyOnRails
[03:47:52] AntiSpamMeta: has joined #RubyOnRails
[03:49:17] aguynamedben: has joined #RubyOnRails
[03:49:38] tatertot: has joined #RubyOnRails
[03:49:59] michael_mbp: has joined #RubyOnRails
[03:50:16] ascarter_: has joined #RubyOnRails
[03:51:05] Guest50: has joined #RubyOnRails
[03:51:28] Hates_: has joined #RubyOnRails
[03:51:35] jessemcgilallen: has joined #RubyOnRails
[03:51:49] arooni: has joined #RubyOnRails
[03:51:50] teaearlgraycold: has joined #RubyOnRails
[03:52:06] Phoop: has joined #RubyOnRails
[03:52:14] joeytwiddle: has joined #RubyOnRails
[03:52:44] mozzarella: has joined #RubyOnRails
[03:52:48] Encapsulation: has joined #RubyOnRails
[03:52:55] oddalot: has joined #RubyOnRails
[03:52:57] Davey: has joined #RubyOnRails
[03:52:57] Davey: has joined #RubyOnRails
[03:53:05] gremly: has joined #RubyOnRails
[03:53:38] phon: has joined #RubyOnRails
[03:54:21] bbrowning: has joined #RubyOnRails
[03:54:27] erich__: has joined #RubyOnRails
[03:54:34] mostlybadfly: has joined #RubyOnRails
[03:54:41] Guest50: has joined #RubyOnRails
[03:55:03] speakingcode: has joined #RubyOnRails
[03:55:10] Mession: has joined #RubyOnRails
[03:55:17] funnel: has joined #RubyOnRails
[03:55:39] avelldiroll: has joined #RubyOnRails
[03:56:04] creature_: has joined #RubyOnRails
[03:56:04] Axy: has joined #RubyOnRails
[03:56:04] NBarnes: has joined #RubyOnRails
[03:56:04] qejk: has joined #RubyOnRails
[03:56:04] kadoppe: has joined #RubyOnRails
[03:56:04] dtordable: has joined #RubyOnRails
[03:56:04] agit0: has joined #RubyOnRails
[03:56:04] tercenya: has joined #RubyOnRails
[03:56:04] hackeron: has joined #RubyOnRails
[03:56:04] slava_: has joined #RubyOnRails
[03:56:04] chouhoulis: has joined #RubyOnRails
[03:56:04] build22_: has joined #RubyOnRails
[03:56:04] jto: has joined #RubyOnRails
[03:56:04] maxx88: has joined #RubyOnRails
[03:56:04] shamanime: has joined #RubyOnRails
[03:56:04] ankhers: has joined #RubyOnRails
[03:56:04] Prira: has joined #RubyOnRails
[03:56:04] andatche: has joined #RubyOnRails
[03:56:04] tubbo: has joined #RubyOnRails
[03:56:04] hfp_work: has joined #RubyOnRails
[03:56:04] dmarr: has joined #RubyOnRails
[03:56:04] arcanez: has joined #RubyOnRails
[03:56:04] darrik: has joined #RubyOnRails
[03:56:04] JoshL: has joined #RubyOnRails
[03:56:04] queequeg1: has joined #RubyOnRails
[03:56:04] crankharder: has joined #RubyOnRails
[03:56:04] aep: has joined #RubyOnRails
[03:56:05] levifig: has joined #RubyOnRails
[03:56:05] jcm__: has joined #RubyOnRails
[03:56:05] StevePotayTeo: has joined #RubyOnRails
[03:56:05] eml: has joined #RubyOnRails
[03:56:05] nickjj: has joined #RubyOnRails
[03:56:05] leex: has joined #RubyOnRails
[03:56:05] abracadaniel: has joined #RubyOnRails
[03:56:05] cajone: has joined #RubyOnRails
[03:56:05] Kilo`byte: has joined #RubyOnRails
[03:56:05] ejnahc_: has joined #RubyOnRails
[03:56:05] teegee543: has joined #RubyOnRails
[03:56:05] JonasOSDever: has joined #RubyOnRails
[03:56:05] nibbo: has joined #RubyOnRails
[03:56:05] Voxxit: has joined #RubyOnRails
[03:56:05] nfsnobody: has joined #RubyOnRails
[03:56:05] closer: has joined #RubyOnRails
[03:56:14] draken: has joined #RubyOnRails
[03:56:14] suffice: has joined #RubyOnRails
[03:56:14] flori_: has joined #RubyOnRails
[03:56:14] thorgi_: has joined #RubyOnRails
[03:56:14] jbrinkmu1ic: has joined #RubyOnRails
[03:56:15] nygrenh: has joined #RubyOnRails
[03:56:15] wldcordeiro: has joined #RubyOnRails
[03:56:15] medright: has joined #RubyOnRails
[03:56:15] IrishGringo: has joined #RubyOnRails
[03:56:15] njero: has joined #RubyOnRails
[03:56:15] jkwood: has joined #RubyOnRails
[03:56:15] dkphenom: has joined #RubyOnRails
[03:56:15] sunya7a: has joined #RubyOnRails
[03:56:15] atomical: has joined #RubyOnRails
[03:56:15] axl_: has joined #RubyOnRails
[03:56:15] braincrash: has joined #RubyOnRails
[03:56:15] Rikle_S_: has joined #RubyOnRails
[03:56:15] p8m: has joined #RubyOnRails
[03:56:15] cgfbee: has joined #RubyOnRails
[03:56:15] AlHafoudh: has joined #RubyOnRails
[03:56:15] ereslibre: has joined #RubyOnRails
[03:56:15] deavid: has joined #RubyOnRails
[03:56:15] sekrit: has joined #RubyOnRails
[03:56:15] Guest79906: has joined #RubyOnRails
[03:56:15] cored: has joined #RubyOnRails
[03:56:15] RTG`: has joined #RubyOnRails
[03:56:15] K0nserv-_: has joined #RubyOnRails
[03:56:15] AnoHito_: has joined #RubyOnRails
[03:56:15] swhitt: has joined #RubyOnRails
[03:56:15] csmb_: has joined #RubyOnRails
[03:56:15] jpterry_: has joined #RubyOnRails
[03:56:15] _joelsmith: has joined #RubyOnRails
[03:56:15] \13k_: has joined #RubyOnRails
[03:56:15] lord4163: has joined #RubyOnRails
[03:56:15] waltz: has joined #RubyOnRails
[03:56:15] izzol: has joined #RubyOnRails
[03:56:15] webdestroya: has joined #RubyOnRails
[03:56:15] gavit: has joined #RubyOnRails
[03:56:16] Sigma00: has joined #RubyOnRails
[03:56:16] brainslug: has joined #RubyOnRails
[03:56:16] jayne: has joined #RubyOnRails
[03:56:19] pwnd_nsfw: has joined #RubyOnRails
[03:56:53] dikaio: has joined #RubyOnRails
[03:57:29] AntiSpamMeta: has joined #RubyOnRails
[03:57:47] Depili: has joined #RubyOnRails
[03:57:54] braincrash: has joined #RubyOnRails
[03:58:03] VeryBewitching: has joined #RubyOnRails
[03:58:07] ^Denis: has joined #RubyOnRails
[03:58:15] CustosLimen: has joined #RubyOnRails
[03:58:20] tekk: has joined #RubyOnRails
[03:58:27] samuelkadolph: has joined #RubyOnRails
[03:58:41] pyemkey: has joined #RubyOnRails
[03:58:59] joaomdmoura_: has joined #RubyOnRails
[04:00:07] skullcrasher: has joined #RubyOnRails
[04:00:08] pawnbox: has joined #RubyOnRails
[04:00:15] TheMoonMaster: has joined #RubyOnRails
[04:00:34] Tref: has joined #RubyOnRails
[04:01:47] pavelz: has joined #RubyOnRails
[04:03:34] lxkm: has joined #RubyOnRails
[04:03:55] stevenleeg: has joined #RubyOnRails
[04:04:00] annlewis: has joined #RubyOnRails
[04:04:01] chancancode_: has joined #RubyOnRails
[04:05:12] htmldrum: has joined #RubyOnRails
[04:05:46] ewnd9: has joined #RubyOnRails
[04:05:49] EminenceHC: has joined #RubyOnRails
[04:06:04] pulgalip1: has joined #RubyOnRails
[04:06:12] kiez0rd: has joined #RubyOnRails
[04:06:30] greenride: has joined #RubyOnRails
[04:07:52] spijet_: has joined #RubyOnRails
[04:09:22] cgfbee: has joined #RubyOnRails
[04:10:48] braincrash: has joined #RubyOnRails
[04:13:46] darrencauthon: has joined #RubyOnRails
[04:15:23] fschuindt: Codeclimate is asking me to test those two initializers: https://gist.github.com/fschuindt/f468848b13b60340a152 I'm kinda confused on how to test it.
[04:21:28] doodlehaus: has joined #RubyOnRails
[04:22:24] jacksparrow007: has joined #RubyOnRails
[04:25:57] sye: has joined #RubyOnRails
[04:27:03] baweaver: has joined #RubyOnRails
[04:29:50] iateadonut: has joined #RubyOnRails
[04:31:27] tjbiddle: has joined #RubyOnRails
[04:31:32] alex88: has joined #RubyOnRails
[04:33:15] s2013: has joined #RubyOnRails
[04:34:11] build22: has joined #RubyOnRails
[04:35:39] Tempesta: has joined #RubyOnRails
[04:38:16] triptec: has joined #RubyOnRails
[04:38:18] sye: has joined #RubyOnRails
[04:41:24] Tref: has joined #RubyOnRails
[04:42:53] sye: has joined #RubyOnRails
[04:47:14] kp666: has joined #RubyOnRails
[04:49:19] Rodya_: has joined #RubyOnRails
[04:51:13] twilling: has joined #RubyOnRails
[04:56:13] willardg: has joined #RubyOnRails
[04:56:46] stannard: has joined #RubyOnRails
[04:57:04] willardg: http://pastie.org/10573273
[04:57:06] null__: has joined #RubyOnRails
[04:57:06] null__: has joined #RubyOnRails
[04:57:23] willardg: I'm not sure why my before_action isn't working.
[04:57:55] willardg: The error that I get is posted at the bottom of the pastie below the simple controller that I ahve.
[04:58:38] cookiez: has joined #RubyOnRails
[04:58:55] willardg: I'm just trying to set a variable. and I can't get it to set when I put it in the controller, but I've done the same thing straight into the console and it works just fine there.
[05:01:51] Glyphik: has joined #RubyOnRails
[05:01:52] willardg: Is anyone one right now?
[05:02:14] willardg: typo. Is anyone on right now?
[05:03:13] twilling: oh i see your question now.
[05:03:28] VeryBewitching: willardg: current_user should be a method, you should set @user in set_user
[05:03:39] VeryBewitching: And then def current_user; @user; end
[05:04:25] twilling: VeryBewitching: interesting, why not just use and access the instance variable current_user instead of using the method?
[05:04:45] annlewis: has joined #RubyOnRails
[05:04:46] njero: VeryBewitching: no scope outside for current_user variable
[05:05:05] VeryBewitching: current_user isn't an instance variable.
[05:05:43] willardg: I'm looking into ways to let people use the app without having to sign up for it first. I was thinking that if current user wasn't set that I could then set it manually using like ||= but I can't even get it right now with just =
[05:06:03] twilling: VeryBewitching: oh i see.
[05:06:08] VeryBewitching: willardg: It looks like you're using Devise
[05:06:18] twilling: Yeah I neglected the Devise bit :)
[05:06:39] willardg: Yes. and devise makes current_user. So with devise that's not a variable?
[05:06:52] twilling: willardg: have you seen https://github.com/plataformatec/devise/wiki/How-To:-Create-a-guest-user
[05:07:05] willardg: I have not seen that!!
[05:07:34] willardg: You guys always have something I didn't think to google!
[05:09:15] medright: has joined #RubyOnRails
[05:09:28] moei: has joined #RubyOnRails
[05:10:05] VeryBewitching: willardg: What you *want* is authorization to be performed; if a user isn't logged in, there are certain permissions an unauthenticated user might have.
[05:12:14] VeryBewitching: willardg: I suggest looking at https://github.com/elabs/pundit or https://github.com/CanCanCommunity/cancancan
[05:12:15] rakm: has joined #RubyOnRails
[05:12:23] annlewis: has joined #RubyOnRails
[05:12:42] K_r3aPeR: has joined #RubyOnRails
[05:12:42] VeryBewitching: Finding more coffee, bbiab.
[05:13:02] shibabu: has joined #RubyOnRails
[05:13:11] willardg: What I'm going for is that a lot of people will get to the website and just not sign up because they don't see what it really does yet. I'm thinking if they could get there and snoop around then sign up if they decide they like it, it might go better. Just have a bad bounce rate on the landing page right now. 90% of people don't even go to the about page or anything.
[05:14:34] darrencauthon: has joined #RubyOnRails
[05:16:36] tjbiddle: has joined #RubyOnRails
[05:17:49] yfeldblum: has joined #RubyOnRails
[05:22:27] trosborn: has joined #RubyOnRails
[05:22:33] tjbiddle: has joined #RubyOnRails
[05:23:52] sevenseacat: has joined #RubyOnRails
[05:25:15] tjbiddle_: has joined #RubyOnRails
[05:28:10] baweaver: has joined #RubyOnRails
[05:29:06] rjn2: has joined #RubyOnRails
[05:34:59] build22: has joined #RubyOnRails
[05:37:37] blackhuey: has joined #RubyOnRails
[05:38:15] alex88: has joined #RubyOnRails
[05:42:09] trosborn: has joined #RubyOnRails
[05:42:52] willardg: Thanks VeryBewitching. Been thinking about what you've said and I see now how I can use that better.
[05:43:16] willardg: I'm not as much concerned about what they can and can't do as much as I need the user to already have a zip code
[05:44:38] VeryBewitching: willardg: You might benefit from geo-ip information too, from the client IP you can get a rough idea as to where someone is.
[05:45:24] VeryBewitching: Until you have a confirmed ZIP. Most sites just ask for it up front.
[05:46:16] willardg: VeryBewitching Permission to Private Message you?
[05:51:27] yoongkang: has joined #RubyOnRails
[06:00:22] pyemkey: has joined #RubyOnRails
[06:00:35] s2013: has joined #RubyOnRails
[06:01:08] lxsameer: has joined #RubyOnRails
[06:01:08] lxsameer: has joined #RubyOnRails
[06:01:40] medright: has joined #RubyOnRails
[06:03:29] pawnbox: has joined #RubyOnRails
[06:10:51] Pazician: has joined #RubyOnRails
[06:14:43] EminenceHC: has joined #RubyOnRails
[06:14:59] bratsche: has joined #RubyOnRails
[06:15:19] darrencauthon: has joined #RubyOnRails
[06:22:11] doodlehaus: has joined #RubyOnRails
[06:26:47] yoongkang: has joined #RubyOnRails
[06:28:52] baweaver: has joined #RubyOnRails
[06:31:30] pawnbox: has joined #RubyOnRails
[06:35:42] build22: has joined #RubyOnRails
[06:38:57] lessless: has joined #RubyOnRails
[06:39:33] dionysus69: has joined #RubyOnRails
[06:39:50] lessless: Hello, folks. I'm trying to get all teams that scored more than 20 points in the current match: match.game_scores.having('SUM(score) = ?', 20).group('team_id')
[06:40:11] lessless: *exactly 20 points but query seams to fail
[06:40:35] tenderlo_: has joined #RubyOnRails
[06:45:20] IFrank00: has joined #RubyOnRails
[06:48:01] IFrank00: has left #RubyOnRails: ()
[06:48:09] IFrank00: has joined #RubyOnRails
[06:48:20] baweaver: has joined #RubyOnRails
[06:50:05] dionysus69: has joined #RubyOnRails
[06:52:33] arup_r: has joined #RubyOnRails
[06:54:20] IFrank00: im trying to create a Tabulation/scoring system https://gist.github.com/Frank004/aaf843f2aa823150fd89 Im building theEvaluation with a EvaluationBuilder Model with Criterion Model , I got this part down. Now that I have the evaluation build. How can I create a Evaluation form the EvaluationBinder Record and display in my form the Criterion name and the field to enter the value
[06:54:55] rhizome: lost me at the end there
[06:56:01] workmaster2n: has joined #RubyOnRails
[06:57:10] IFrank00: I got 3 models One for design the Evaluation with another model call Criterion that have a name and point. And the Evalution model that is the one that get fill by the judges
[06:57:45] IFrank00: I got the Builder with the criterions ready
[06:59:31] IFrank00: now im trying to create a evaluation new on the form Im trying to build the criterion form the builder
[07:02:38] IFrank00: Builder.criterions pass this when creating a evaluation similar to a survey where you have the Survey , the question and answers
[07:06:29] IFrank00: So im doing to parts one is building the evaluation and another its creating evaluation to be answer
[07:09:44] nertzy: has joined #RubyOnRails
[07:10:44] yardenbar: has joined #RubyOnRails
[07:11:08] Cohedrin: IFrank00, What is the evaluation builder for?
[07:11:10] Cohedrin: what does that do?
[07:12:31] Cohedrin: Can you break down what you want each model to do? You design is a bit confusing (at least to me)
[07:12:55] IFrank00: cohedrin, yes min
[07:16:04] darrencauthon: has joined #RubyOnRails
[07:18:22] Pazician: has joined #RubyOnRails
[07:19:11] neanderslob: has joined #RubyOnRails
[07:19:46] IFrank00: Criterion model has name and point
[07:20:34] annlewis: has joined #RubyOnRails
[07:21:05] Paradox: has joined #RubyOnRails
[07:21:27] IFrank00: the builder create a template of the criterion and other stuff
[07:23:02] IFrank00: and the Evaluation is a transaction has this one get the dynamic values form the judges
[07:23:18] IFrank00: If with put this in to paper
[07:23:20] Scripore: has joined #RubyOnRails
[07:24:32] IFrank00: the Builder is the paper(document) the criterion are the text and fields in the paper and the Evaluation are the copies made from the Builder for each judge
[07:25:18] yottanami: has joined #RubyOnRails
[07:26:19] yottanami: I am using door keeper in my API, it have a scaffold named application that is available to all users, what is the best way to limit this for just registered users?
[07:26:47] IFrank00: Cohedrin, ?
[07:27:04] Cohedrin: You don't need models for each of those
[07:27:15] Cohedrin: Saving each of those to the database doesn't make a whole lot of sense
[07:27:32] Cohedrin: the only thing you want to actually keep, long term is the evaluation, from the sounds of it
[07:27:48] Cohedrin: is that correct?
[07:28:21] A124: has joined #RubyOnRails
[07:28:57] IFrank00: Cohedrin, this part of what im using for guide https://github.com/runtimerevolution/survey
[07:29:41] Cohedrin: So you need to display the builder (paper) to the user. They fill out the fields then send the information they've entered to you.
[07:29:53] Cohedrin: After that, you persist what they sent you in the evalutation object
[07:30:09] Cohedrin: so the other two models you have, you don't need
[07:30:14] Cohedrin: you should probably remove them
[07:30:38] IFrank00: the problem is that the criterion are dynamic
[07:30:52] IFrank00: they are not static fields
[07:31:10] Cohedrin: can you give me an example of two cirterions?
[07:31:15] Cohedrin: in json or a hash?
[07:31:28] sevenseacat: has joined #RubyOnRails
[07:31:29] Cohedrin: like what the full object would look like, ideally, in the database
[07:36:03] pyemkey: has joined #RubyOnRails
[07:36:20] The_Phoenix: has joined #RubyOnRails
[07:36:30] build22: has joined #RubyOnRails
[07:38:08] IFrank00: https://gist.github.com/Frank004/aaf843f2aa823150fd89
[07:38:37] benhuda: has joined #RubyOnRails
[07:39:13] IFrank00: http://railscasts.com/episodes/403-dynamic-forms?autoplay=true
[07:39:27] Cohedrin: So is the user defining the fields, or are you
[07:39:47] IFrank00: that way I need it that 2 table
[07:39:56] shibabu: has joined #RubyOnRails
[07:40:23] Cohedrin: but there is only 1 field in the evaluation?
[07:41:19] Cohedrin: seems like you have two options
[07:42:06] Cohedrin: 1) make a field called criterion_name, and another called cirterion_value (or something similar)
[07:42:33] Cohedrin: 2) use postgres + a json field to serialize this http://edgeguides.rubyonrails.org/active_record_postgresql.html#json
[07:42:49] Cohedrin: there are of course other options, but these are the simplest options
[07:43:33] IFrank00: that way I have the data in the builder so it be display on my Evaluation form
[07:44:33] Cohedrin: Then just do Evaluation.critera_name
[07:44:41] Cohedrin: or, using the json option
[07:45:02] Cohedrin: evaluation.json_field_name['critera_name']
[07:45:09] Cohedrin: either way you have the name
[07:45:14] Cohedrin: and don't make 3 models for each object
[07:47:08] zpe_: has joined #RubyOnRails
[07:49:38] IFrank00: Cohedrin, the only part that im a little lack knowledge is on the form. I just have to do a fields for :builder do |v| fields for @builder
[07:50:09] IFrank00: *or a fields for @builder
[07:50:40] diegoviola: has joined #RubyOnRails
[07:51:37] makenoise: has joined #RubyOnRails
[07:51:38] arup_r: has joined #RubyOnRails
[07:51:39] Cohedrin: you mean on the frontend?
[07:51:46] Cohedrin: displaying the forms to the user?
[07:52:54] pyemkey: has joined #RubyOnRails
[07:53:52] lessless: why the hell this is failing game_scores.select(:team_id).having('SUM(score) = ?', match_winning_score).group(:team_id) ?
[07:54:08] lessless: ERROR: column "game_scores.id" must appear in the GROUP BY clause or be used in an aggregate function
[07:54:48] Cohedrin: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_for
[07:54:57] Cohedrin: that might help IFrank00
[07:55:42] IFrank00: thank you for your time
[07:55:42] darutoko: has joined #RubyOnRails
[07:56:07] trosborn: has joined #RubyOnRails
[07:57:24] Cohedrin: lessless, I think you're using having for something you don't want
[07:57:42] Cohedrin: http://guides.rubyonrails.org/active_record_querying.html#having
[07:58:50] Cohedrin: What exctally are you trying to do with that queuery?
[08:00:23] lessless: there is a game_scores table, which holds results of the games for the teams. I want find team that scored 20 points, for example
[08:00:33] doodlehaus: has joined #RubyOnRails
[08:00:44] lessless: that is inside match model, that has many game scores
[08:01:38] lessless: when I do it in the console everything is ok
[08:01:45] lessless: #<ActiveRecord::AssociationRelation [#<GameScore id: nil, team_id: 1>]>
[08:02:00] lessless: but when it's executed inside test suite there is an error
[08:02:36] nso95: has joined #RubyOnRails
[08:03:37] Cohedrin: could be that the test migrations haven't run properly
[08:03:46] Cohedrin: have you tried creating test db?
[08:04:12] rhizome: can you tell us what the error message is?
[08:04:16] Gustavo: has joined #RubyOnRails
[08:04:24] Cohedrin: <lessless> ERROR: column "game_scores.id" must appear in the GROUP BY clause or be used in an aggregate function
[08:04:42] lessless: so full query probably would looks like GameScore.where(match: self).select('team_id, sum(score) as match_score').group(:team_id).having('sum(score) = ?', 20)
[08:04:47] rhizome: that's from the test?
[08:05:38] lessless: nope, from console
[08:06:07] AnhMV: has joined #RubyOnRails
[08:06:10] AzaToth: has joined #RubyOnRails
[08:06:23] arBmind: has joined #RubyOnRails
[08:09:52] dionysus69: has joined #RubyOnRails
[08:10:05] build22: has joined #RubyOnRails
[08:10:21] lessless: totally AR fail - SELECT team_id FROM "game_scores" WHERE "game_scores"."match_id" = 1 GROUP BY "game_scores"."team_id" HAVING sum(score) > 20 LIMIT 1;
[08:12:06] Cohedrin: your code and your queuery
[08:12:15] Cohedrin: are two different things
[08:12:32] Cohedrin: if you run that queury in console in dev mode
[08:12:55] Cohedrin: it will show you the query its running, your code isn't running that query
[08:14:49] raunicolae: has joined #RubyOnRails
[08:15:12] raunicolae: has left #RubyOnRails: ()
[08:17:08] Cohedrin: though, side note, if you're ok with loading all those items into memory you get a bunch of nifty ruby methods that will make your life a lot easier performing transformations on that data ;)
[08:17:10] darrencauthon: has joined #RubyOnRails
[08:17:17] njero: has joined #RubyOnRails
[08:17:50] teclator: has joined #RubyOnRails
[08:21:20] annlewis: has joined #RubyOnRails
[08:23:29] trosborn: has joined #RubyOnRails
[08:29:34] zpe_: has joined #RubyOnRails
[08:30:30] User458764: has joined #RubyOnRails
[08:32:41] nickenchuggets: has joined #RubyOnRails
[08:32:42] nickenchuggets: has joined #RubyOnRails
[08:32:58] Spami: has joined #RubyOnRails
[08:33:18] diegoviola: has joined #RubyOnRails
[08:35:02] IFrank00: Cohedrin, got it working thank you
[08:35:47] IFrank00: Im did app for a Comicon tomorrow and this was the last part :)
[08:35:58] tildes: has joined #RubyOnRails
[08:36:16] IFrank00: may the force be with you lol
[08:36:29] nonmadden: has joined #RubyOnRails
[08:37:13] build22_: has joined #RubyOnRails
[08:47:07] moeabdol: has joined #RubyOnRails
[08:56:06] trosborn: has joined #RubyOnRails
[08:56:46] Cohedrin: great, glad you got it done IFrank00 :D
[08:57:27] yottanami1: has joined #RubyOnRails
[08:59:46] Cervajz: has joined #RubyOnRails
[09:01:35] Cervajz_: has joined #RubyOnRails
[09:05:58] tildes: has joined #RubyOnRails
[09:11:55] greenride: has left #RubyOnRails: ()
[09:17:53] xlegoman: has joined #RubyOnRails
[09:18:10] darrencauthon: has joined #RubyOnRails
[09:19:59] rjn2: has joined #RubyOnRails
[09:22:06] annlewis: has joined #RubyOnRails
[09:23:59] tildes: pontiki: hi
[09:30:09] shibabu: has joined #RubyOnRails
[09:37:55] build22_: has joined #RubyOnRails
[09:39:11] yottanami1: has joined #RubyOnRails
[09:39:51] alex88: has joined #RubyOnRails
[09:48:08] stannard: has joined #RubyOnRails
[09:48:13] ewnd9: has joined #RubyOnRails
[09:50:20] gaussblurinc1: has joined #RubyOnRails
[09:52:04] Tref: has joined #RubyOnRails
[09:57:54] marr: has joined #RubyOnRails
[09:58:43] dionysus69: has joined #RubyOnRails
[09:59:41] Guest77804: has joined #RubyOnRails
[10:00:36] ziyadb: has joined #RubyOnRails
[10:01:00] ziyadb: I'm trying to apply an .otf font-face, but it simply isn't working.
[10:01:19] ziyadb: Added it to assets/ and assets/font
[10:01:22] doodlehaus: has joined #RubyOnRails
[10:01:23] ziyadb: plus this css markup:
[10:01:43] ziyadb: @font-face { font-family: Avenir; src: font-url(/assets/AvenirLTStd-Light.otf) format("truetype");}
[10:02:42] ss_much: has joined #RubyOnRails
[10:03:04] pontiki: ziyadb: what isn't working about it?
[10:03:09] helpa: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[10:03:24] ziyadb: The font is not rendering client-side.
[10:03:42] ziyadb: Glad to see that you guys are alive and well though, pontiki, sevenseacat.
[10:03:43] pontiki: have you looked at the code on the client side ?
[10:03:53] sevenseacat: you havent set the font anywhere that you've shown us
[10:04:04] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[10:04:25] ziyadb: pushing, URL coming up in a sec.
[10:04:44] ziyadb: It's already applied to the elements as per the stylesheets I'd previously defined.
[10:05:02] sevenseacat: we're not mindreaders, we cant see those.
[10:05:24] ziyadb: http://deskleap.herokuapp.com/
[10:05:35] sevenseacat: regardless, your URL declaration is wrong - font-url will take the filename of a font
[10:05:47] User458764: has joined #RubyOnRails
[10:06:21] ziyadb: https://www.irccloud.com/pastebin/H0HTG9tC/font%20declarations
[10:06:27] ziyadb: I've added all those declarations.
[10:06:35] ziyadb: "just in case"
[10:06:52] ziyadb: But setting the font to Avenir on any of the elements doesn't work.
[10:06:58] Tref: has joined #RubyOnRails
[10:07:07] ziyadb: If it isn't a system font, that is.
[10:07:23] sevenseacat: right, none of those are right
[10:08:05] njero: has joined #RubyOnRails
[10:08:12] sevenseacat: font-url('AvenirLTStd-Light.otf') assuming thats the correct filename, it's in /app/assets/fonts, and you restarted your server after creating the fonts folder
[10:08:23] sevenseacat: or /vendor/assets/fonts would probably be better
[10:08:41] ziyadb: Alright, let's see.
[10:08:45] sevenseacat: I also don't think otf is a truetype font
[10:08:52] sevenseacat: ttf is a truetype font, no?
[10:09:05] pontiki: OpenTypeFace
[10:09:07] ziyadb: Right, otf is "open type"
[10:09:13] sevenseacat: thats what i thought
[10:10:47] IFrank00: has joined #RubyOnRails
[10:11:53] ziyadb: Still no go, I think it has to be either a truetype font (.ttf) or an embedded opentype font (.eot).
[10:12:23] sevenseacat: depends what browser you're using.
[10:12:49] sevenseacat: IIRC different browsers supported different font types, and you'll need all of them to support all browsers.
[10:13:19] pontiki: did you buy that font?
[10:13:40] pontiki: there are some free google fonts that are awfully close to avenir
[10:14:11] ziyadb: pontiki: I've had a look, and design-wise, it's all about Avenir.
[10:14:30] sevenseacat: if you bought it, you should get the full set of different formats
[10:14:37] Pazician: has joined #RubyOnRails
[10:14:45] ziyadb: sevenseacat: yeah, will add eot, woff, ttf, and svg.
[10:17:06] naftilos76: has joined #RubyOnRails
[10:17:39] draken: could include the webfont version, i do that so everyone sees the same font no matter what
[10:18:10] ziyadb: draken: which format specifically is the "webfont version"?
[10:18:41] draken: i think all
[10:18:41] draken: http://fontcdn.org/
[10:18:44] draken: i use that
[10:18:46] darrencauthon: has joined #RubyOnRails
[10:18:51] yfeldblum: has joined #RubyOnRails
[10:19:11] draken: <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> - like that loads Open Sans font
[10:19:19] draken: for all visiting site
[10:19:46] draken: format('woff2');
[10:19:56] ziyadb: Yeah, that's convenient.
[10:19:57] draken: seems from the css generated by that api
[10:20:15] ziyadb: I'm trying to serve the fonts myself though.
[10:20:32] draken: should be a way i guess
[10:20:51] pontiki: i doubt that it has avenir, since it's not a free font
[10:20:55] draken: i dont mind using google cdns for fonts though, very rare google gives a prob and u dont get the font
[10:21:02] draken: ya that is also the prob
[10:21:20] draken: i normally go to that site and look for a font before using one, so i know its free and all devices can get it loaded in legit
[10:21:59] draken: dev on a MAC and it makes rails default to some font windows doesnt have, so annoying lol
[10:22:54] annlewis: has joined #RubyOnRails
[10:25:23] yoongkang: has joined #RubyOnRails
[10:25:46] ziyadb: sevenseacat: I've added the fonts to assets/fonts, and the following declarations:
[10:25:51] ziyadb: https://www.irccloud.com/pastebin/c3Qv19g3/
[10:26:02] ziyadb: And it still isn't working on http://deskleap.herokuapp.com
[10:26:03] stamina: has joined #RubyOnRails
[10:26:12] ziyadb: restarted and all.
[10:26:20] alias-ls-to-rm: has joined #RubyOnRails
[10:26:25] pontiki: okay, stupid question: have to refreshed cache?
[10:26:26] sevenseacat: well you have a typo in one of them - avenir-roman..woff
[10:26:42] sevenseacat: and why arent you testing this locally before you deploy?
[10:26:52] sevenseacat: makes the feedback loop much shorter
[10:27:14] arup_r: I have t.string :name in my some of the migration for some models. and it creates as per db default length constraint. say it is 255. Now when those fields have more than 255 chars, DB will not let create you the record and throws error. One way to solve this using validation `length` option, but then every string field will need to have the validation attached and ActiveRecord will handle it and shows error message. what is the other way to handle su
[10:27:14] arup_r: ch issues
[10:27:19] ziyadb: Because I have 'Avenir' as a system font on my dev machine.
[10:27:43] ziyadb: So i'm deploying and testing on a windows machine.
[10:28:39] ziyadb: pontiki: I do a hard reload every time on the browser + incognito mode.
[10:28:55] pontiki: yeah, like i said, stupid question :)
[10:29:22] ziyadb: This is rather frustrating. Literally spending more time troubleshooting this than anything else.
[10:29:38] malcolmva: has joined #RubyOnRails
[10:29:49] sevenseacat: fixed the typo yet?
[10:30:06] ziyadb: sevenseacat: yeah.
[10:30:16] ziyadb: turns out it was inconsequential.
[10:30:44] sevenseacat: the version of the CSS on that site is not what you've showed us.
[10:31:06] sevenseacat: it has the broken first version (that also hasn't been put through the asset pipeline because it still has font-url in it)
[10:31:37] ziyadb: sevenseacat: you're right, just looked.
[10:32:19] ziyadb: which is weird, since I didn't precompile prior to deploying.
[10:32:23] sevenseacat: though that might also be because its arguments are wrong
[10:32:25] Tref: has joined #RubyOnRails
[10:32:41] sevenseacat: but either so, you havent deployed updated code
[10:33:05] sevenseacat: you also need to define the @font-face before you use it
[10:33:09] sevenseacat: not halfway down the file
[10:33:30] ziyadb: sevenseacat: yeah, the declaration is the first thing
[10:33:32] ziyadb: on the css file.
[10:33:34] sevenseacat: which we could have pointed out if you'd shown us the code when we originally asked
[10:33:41] sevenseacat: not in the compiled css.
[10:33:46] ziyadb: Not in the compiled css, right.
[10:34:16] ziyadb: So I'll move it to applications.scss (font-face declaration) and update the compiled css.
[10:34:31] sevenseacat: start by following all of the tips we've given
[10:35:01] ziyadb: alright sir
[10:35:03] ziyadb: Thank you.
[10:35:51] yottanami1: has joined #RubyOnRails
[10:37:23] Gustavo: has joined #RubyOnRails
[10:37:35] arup_r: did you read me ? seems one session is ended.. "p
[10:38:19] sevenseacat: arup_r: if you want to validate it, write validations.
[10:38:29] sevenseacat: if you don't, then don't.
[10:38:48] build22_: has joined #RubyOnRails
[10:39:28] cac: has joined #RubyOnRails
[10:39:33] arup_r: all over the places `length` validations.. ? will it be a good idea to stop user inputting more then desired chars from UI ?
[10:40:27] sevenseacat: might be, but that doesn't solve the problem.
[10:40:32] slick: has joined #RubyOnRails
[10:41:21] arup_r: yes, we don't trust browser.. :/
[10:45:41] xlegoman: has joined #RubyOnRails
[10:48:12] dionysus69: has joined #RubyOnRails
[10:48:45] drale2k: has joined #RubyOnRails
[10:49:02] build22_: has joined #RubyOnRails
[10:49:14] Jkup: has joined #RubyOnRails
[10:55:26] cac: has joined #RubyOnRails
[10:55:37] kies: has joined #RubyOnRails
[10:56:17] yoongkang: has joined #RubyOnRails
[11:00:18] trosborn: has joined #RubyOnRails
[11:01:40] Pazician: has joined #RubyOnRails
[11:02:13] rjn2: has joined #RubyOnRails
[11:06:56] pulgalip1: has joined #RubyOnRails
[11:06:57] build22__: has joined #RubyOnRails
[11:15:36] Tref: has joined #RubyOnRails
[11:17:48] Helheim: has joined #RubyOnRails
[11:17:48] gthank: has joined #RubyOnRails
[11:18:43] benhuda: has joined #RubyOnRails
[11:18:49] gthank: has joined #RubyOnRails
[11:19:11] bodie_: has joined #RubyOnRails
[11:19:32] darrencauthon: has joined #RubyOnRails
[11:19:44] Scripore: has joined #RubyOnRails
[11:21:06] nso95__: has joined #RubyOnRails
[11:23:39] annlewis: has joined #RubyOnRails
[11:28:02] Hates_: arup_r: what's wrong with having validations on all the fields that need validation?
[11:28:46] Hates_: arup_r: you can of course skip them and then just tell the user "There was a problem saving your record." but that's not a nice user experience
[11:29:01] lipoqil: has joined #RubyOnRails
[11:30:02] arup_r: Nothing wrong.. looking for a central code which might handle this.. skip means what you meant ?
[11:30:59] diegoviola: has joined #RubyOnRails
[11:31:34] arup_r: I have lot of string field all over the models, and attaching validations to all them seems not good to me. That is why I asked, if a better way exist.
[11:31:47] trosborn: has joined #RubyOnRails
[11:31:51] arup_r: may be catch db native error and do some thing.
[11:31:59] Hates_: arup_r: you use save! and then just re-render the page in a rescue block
[11:33:22] arup_r: sweet idea and the error message using flash method ?
[11:33:38] arup_r: for displaying ... I meant
[11:33:38] ruid: has joined #RubyOnRails
[11:34:01] Hates_: arup_r: it's the easiest way, but it's not a great experience for the end user
[11:34:07] Hates_: arup_r: as they won't know where the problem is
[11:34:44] arup_r: yes, in the rescue block, I can add like error.add(name: "...string..")
[11:34:53] annlewis: has joined #RubyOnRails
[11:35:10] Hates_: arup_r: and you think that's better than setting proper validations on your model?
[11:35:42] arup_r: umm, let me compare my mind..
[11:35:57] Hates_: arup_r: what if then tomorrow you want to stop people using symbols in their name input?
[11:36:27] User458764: has joined #RubyOnRails
[11:37:06] arup_r: got your point.. AR validations are more sweet..
[11:37:11] Hates_: arup_r: of if you have to controllers that handle saving your model, you'll need to set your error in both controllers
[11:37:29] arup_r: yes ... yes
[11:38:38] rgtk: has joined #RubyOnRails
[11:39:55] nso95__: has joined #RubyOnRails
[11:42:46] Pazician: has joined #RubyOnRails
[11:44:54] zpe_: has joined #RubyOnRails
[11:45:28] tater: has joined #RubyOnRails
[11:46:09] tater: has joined #RubyOnRails
[11:46:10] tater: has joined #RubyOnRails
[11:47:54] tater: has joined #RubyOnRails
[11:48:53] AntiSpamMeta: has joined #RubyOnRails
[11:49:15] cschneid: has joined #RubyOnRails
[11:49:36] tater: has joined #RubyOnRails
[11:50:56] dlitz: has joined #RubyOnRails
[11:50:58] tater: has joined #RubyOnRails
[11:52:00] pronk: has joined #RubyOnRails
[11:59:08] nso95__: has left #RubyOnRails: ()
[12:01:11] ruid: has joined #RubyOnRails
[12:01:13] nso95-: has joined #RubyOnRails
[12:02:05] doodlehaus: has joined #RubyOnRails
[12:02:38] rgtk: has joined #RubyOnRails
[12:08:16] annlewis: has joined #RubyOnRails
[12:10:57] shibabu: has joined #RubyOnRails
[12:11:15] tildes: what would be a conventional way to run seeds.rb?
[12:11:39] tildes: a rake task? a migration?
[12:11:49] ja: rake db:seed
[12:13:41] tildes: ja: great, thanks.
[12:15:04] xlegoman: has joined #RubyOnRails
[12:15:23] tildes: where's the equivalent of http://jacopretorius.net/2014/02/all-rails-db-rake-tasks-and-what-they-do.html on rails apidock? maybe I'm not searching right
[12:16:12] ja: no problem, tildes
[12:16:23] Gustavo: has joined #RubyOnRails
[12:16:28] IFrank00: has joined #RubyOnRails
[12:16:34] build22: has joined #RubyOnRails
[12:16:49] tildes: ja: I'm glad I asked instead of writing a migration :D
[12:16:52] ja: tildes: good question. I don't think I've ever seen a list of rake tasks in the official docs
[12:17:25] ja: haha, oh :D
[12:17:41] ja: asking is always good and this channel is usally really great for answers, I think
[12:17:55] ja: tildes: you can do `rake -T` to list all rake tasks (in case you didn't know)
[12:18:17] ja: (and e.g. `rake -T db` to only see the ones starting with ???db???)
[12:20:09] shapeshifter: Just to be sure: if I do something like @product.images.drop(1).each, this does not remove anything from images, right? drop(1) will return a new array?
[12:20:16] darrencauthon: has joined #RubyOnRails
[12:20:43] annlewis_: has joined #RubyOnRails
[12:21:52] tildes: ja: that's good to know. plenty of tasks I hadn't heard about
[12:22:19] bmalum: has joined #RubyOnRails
[12:22:33] shapeshifter: nvm the answer is yes
[12:31:38] moeabdol: has joined #RubyOnRails
[12:31:51] rgrmatt: has joined #RubyOnRails
[12:31:55] tildes: maybe the idea with rake is that as it is command line tool, developers can use rake --help and that's all the documentation that is needed? looking at apidock I can't find anything on how to use the rake command line tool
[12:34:30] gremax: has joined #RubyOnRails
[12:37:02] Papierkorb: tildes: what are you looking for?
[12:37:12] Papierkorb: and what's wrong with --help?
[12:38:35] pulgalip1: has joined #RubyOnRails
[12:39:39] rjn2_: has joined #RubyOnRails
[12:40:04] allcentury: has joined #RubyOnRails
[12:40:09] Hates_: tildes: thats all the documentation you need really.
[12:40:52] Trynemjoel: has joined #RubyOnRails
[12:41:38] Papierkorb: Depends on what you're trying to find. Asking ApiDoc for documentation on how to use a CLI tool won't be much useful. you could ask ApiDoc for .. APIs, but that's not a CLI
[12:42:17] IFrank00: has joined #RubyOnRails
[12:44:54] tknz: has joined #RubyOnRails
[12:46:45] lipoqil: On satturday I am going to Rome for almost two weeks. Is there something dev-interesting by that time in Rome or around?
[12:50:41] alphaatom: has joined #RubyOnRails
[12:50:42] diegoviola: has left #RubyOnRails: ("WeeChat 1.3")
[12:50:46] annlewis: has joined #RubyOnRails
[12:50:54] zpe_: has joined #RubyOnRails
[13:01:11] Mia: has joined #RubyOnRails
[13:01:11] Mia: has joined #RubyOnRails
[13:04:40] darrencauthon: has joined #RubyOnRails
[13:05:31] atomical: has joined #RubyOnRails
[13:07:16] MaxPlank: has joined #RubyOnRails
[13:07:42] wildlander: has joined #RubyOnRails
[13:10:22] agit0: has joined #RubyOnRails
[13:14:48] tildes: has joined #RubyOnRails
[13:19:52] MaxPlank: Do I need a CMS on top of Rails? I am building a site to discuss user posted media (images, videos, text). Or is Rails enough?
[13:23:25] srinidhi: has joined #RubyOnRails
[13:23:29] rgrmatt: has joined #RubyOnRails
[13:27:03] dionysus69: has joined #RubyOnRails
[13:27:25] Hates_: MaxPlank: Depends on all of your requirements and if you are comfortable building from scratch or modifiying an existing platform
[13:28:20] rgrmatt: has joined #RubyOnRails
[13:29:04] dkphenom: has joined #RubyOnRails
[13:32:21] baweaver: has joined #RubyOnRails
[13:35:13] bmalum: has joined #RubyOnRails
[13:35:14] MaxPlank: Thanks Hates_
[13:35:42] Pazician: has joined #RubyOnRails
[13:36:21] rgrmatt: has joined #RubyOnRails
[13:39:16] tildes: Papierkorb: I guess I just wanted to find even a mention of rake CLI on some official documentation, was probably looking in the wrong place
[13:43:12] Gustavo: has joined #RubyOnRails
[13:43:41] arup_r: Hey hey ja
[13:44:26] FailBit: In the beginning God created ERB. And ERB was waste and void; and darkness was upon the face of the deep: and the Spirit of God moved upon the face of the templates. And God said, Let there be Ruby: and there was Temple.
[13:44:28] FailBit: ~~ Genesis 1:1-3, The Template Engine Bible
[13:47:22] xlegoman: has joined #RubyOnRails
[13:48:06] atomical: has joined #RubyOnRails
[13:48:31] blackmesa: has joined #RubyOnRails
[13:51:31] IrishGringo: has joined #RubyOnRails
[13:52:44] CodingWolf: has joined #RubyOnRails
[13:54:14] User458764: has joined #RubyOnRails
[13:54:57] Trynemjoel: has joined #RubyOnRails
[13:56:57] pulgalip1: has joined #RubyOnRails
[13:58:11] Scripore: has joined #RubyOnRails
[14:02:52] doodlehaus: has joined #RubyOnRails
[14:02:57] annlewis: has joined #RubyOnRails
[14:05:56] alex88: has joined #RubyOnRails
[14:06:02] s2013: has joined #RubyOnRails
[14:11:19] shibabu: has joined #RubyOnRails
[14:11:28] Trynemjoel: has joined #RubyOnRails
[14:12:19] annlewis_: has joined #RubyOnRails
[14:14:30] zpe_: has joined #RubyOnRails
[14:16:00] shapeshifter: I have a problem overriding a coffee script file of an extension to spree. The original file is vendor/bundle/ruby/2.2.0/bundler/gems/spree_product_zoom-d0ae27ccf194/app/assets/javascripts/spree/product_zoom/zoom.js.coffee.erb, so I've placed my override in vendor/assets/javascripts/spree/product_zoom/zoom.js.coffee.erb . It works in dev, but not on staging (where config.assets.compile = false).
[14:16:06] shapeshifter: I *did* precompile the assets on staging.
[14:16:24] shapeshifter: How can I possibly debug this?
[14:17:12] Tref: has joined #RubyOnRails
[14:17:56] pulgalipe: has joined #RubyOnRails
[14:19:09] Pumukel: has joined #RubyOnRails
[14:21:37] ja: Hi arup_r
[14:21:40] Hates_: Shapeshifter: does it still work if you precompile your assets locally?
[14:22:06] indorails: where's the best reading content for understand keyboard shortcut to controlling our rails application ?
[14:22:44] Hates_: indorails: keyboard shortcuts? what do you mean?
[14:25:41] Hates_: Shapeshifter: I'd try putting it in app/assets instead of vendor/assets.
[14:25:43] shapeshifter: Hates_: yes, but I'm a bit confused... I did RAILS_ENV=development bundle exec rake assets:precompile and this is the output http://pastie.org/private/czzakx6miollvknlbegla So I'm not sure if it's including my override...
[14:26:11] shapeshifter: Hates_: I already tried that, same situation, and I've heard that they really belong in vendor/assets several times
[14:26:19] Hates_: Shapeshifter: look at the compiled assets in your public directory and see if your custom code is in there
[14:27:12] Hates_: Shapeshifter: yeah, vendor assets is the right place, but they also got moved around between 2.2 and 2.3/2.4
[14:27:25] Hates_: Shapeshifter: 2.2 didn't use vendor/assets AFAIK, while 2.4 does
[14:27:53] nertzy: has joined #RubyOnRails
[14:30:41] shapeshifter: Hates_: I don't think it's anywhere in the compiled assets...
[14:31:09] kp666: has joined #RubyOnRails
[14:31:43] ibouvousaime: has joined #RubyOnRails
[14:32:20] shapeshifter: Hates_: vendor/assets/javascripts/spree/frontend/all.js contains //= require spree/product_zoom among other things, shouldn't that be pretty clear?
[14:33:30] Hates_: Shapeshifter: yeah, it sounds like you've done everything correctly, especially if it's working locally
[14:33:40] renews: has joined #RubyOnRails
[14:34:04] shapeshifter: Hates_: well the override is working correctly, but it's not in the precompiled assets, even locally.
[14:34:58] shapeshifter: Is it possible to have sprockets debug log things it includes?
[14:35:37] Hates_: Shapeshifter: you could pass the verbose flag to assets:precompile and see if that helps
[14:36:12] Hates_: Shapeshifter: I can only guess that Rails is favouring the app/assets file over vendor/assets and picking only that when confronted with having to include the same named file
[14:37:28] Hates_: Shapeshifter: sorry, I can't help more than that -_-
[14:37:50] shapeshifter: Hates_: I have some css overrides in vendor/assets/stylesheets/spree/frontend/overrides.css that work just fine. Thanks anyway!
[14:39:02] livecano: has joined #RubyOnRails
[14:39:20] defsdoor: has joined #RubyOnRails
[14:39:25] Gustavo: has joined #RubyOnRails
[14:43:51] pulgalip1: has joined #RubyOnRails
[14:44:53] s2013: morning.. by any chance any of you ever get errors of missing template but the template is there and the error happens randomly on random pages?
[14:45:23] s2013: i was checking airbrake and i got couple of Production ActionView::MissingTemplate: Missing template errors.. except the templates are there and they load fine
[14:46:25] Trynemjoel: has joined #RubyOnRails
[14:46:25] blackmesa: has joined #RubyOnRails
[14:46:52] sevenseacat: the error isnt random
[14:47:02] sevenseacat: likely the request format is wrong, or something like that
[14:47:03] Hates_: s2013: have you checked the file type requested?
[14:50:20] s2013: Hates_ yeah the request format was text/html which is correct
[14:50:28] s2013: trying to see something else i can find
[14:53:17] ibouvousaime: has joined #RubyOnRails
[14:54:56] meoblast001: has joined #RubyOnRails
[14:55:00] loechel: has joined #RubyOnRails
[15:01:15] meoblast001: has joined #RubyOnRails
[15:04:34] surrealanalysis: has joined #RubyOnRails
[15:05:31] futilegames: has joined #RubyOnRails
[15:07:02] Pazician: has joined #RubyOnRails
[15:07:14] adavia_: has joined #RubyOnRails
[15:08:16] ubit1: has joined #RubyOnRails
[15:09:20] Tref: has joined #RubyOnRails
[15:10:13] futilegames: has joined #RubyOnRails
[15:13:17] shibabu: has joined #RubyOnRails
[15:13:48] IrishGringo: has joined #RubyOnRails
[15:15:25] ubit1: has left #RubyOnRails: ()
[15:15:49] xlegoman: has joined #RubyOnRails
[15:15:55] dionysus69: has joined #RubyOnRails
[15:16:50] l4v2: has joined #RubyOnRails
[15:22:13] annlewis: has joined #RubyOnRails
[15:22:44] medright: has joined #RubyOnRails
[15:25:49] blackmesa: has joined #RubyOnRails
[15:26:57] moeabdol: has joined #RubyOnRails
[15:27:19] chipotle: has joined #RubyOnRails
[15:28:24] rgtk: has joined #RubyOnRails
[15:28:25] darrencauthon: has joined #RubyOnRails
[15:28:59] Scripore: has joined #RubyOnRails
[15:29:24] bersimoes: has joined #RubyOnRails
[15:30:13] chipotle: has joined #RubyOnRails
[15:30:35] sevenseacat: the request format, not the request mime type
[15:31:09] Pazician_: has joined #RubyOnRails
[15:31:39] sevenseacat: but you've been here long enough to know how to get help, so
[15:32:06] naftilos76: has joined #RubyOnRails
[15:34:10] baweaver: has joined #RubyOnRails
[15:36:47] build22_: has joined #RubyOnRails
[15:37:48] cornerma1: has joined #RubyOnRails
[15:41:33] kuhfk: has joined #RubyOnRails
[15:41:40] hive-mind: has joined #RubyOnRails
[15:42:35] PlasmaStar: has joined #RubyOnRails
[15:48:09] Megamos: has joined #RubyOnRails
[15:50:57] rjn2: has joined #RubyOnRails
[15:52:07] htmldrum: has joined #RubyOnRails
[15:56:34] stef1a: has joined #RubyOnRails
[15:57:25] stef1a: x-posted with heroku: http://pastebin.com/xFQTKCPb -- help?
[16:00:42] Yomero2: has joined #RubyOnRails
[16:01:02] iateadonut: has joined #RubyOnRails
[16:02:39] atmosx: has joined #RubyOnRails
[16:05:53] zpe: has joined #RubyOnRails
[16:07:14] Palsson: has joined #RubyOnRails
[16:07:52] User458764: has joined #RubyOnRails
[16:08:22] indorails: hates_ : maybe ctrl+s trigerring a form dialog to show up
[16:10:53] allcentury: has joined #RubyOnRails
[16:12:37] nonmadden: has joined #RubyOnRails
[16:14:12] rgtk: has joined #RubyOnRails
[16:15:27] s2013: has joined #RubyOnRails
[16:18:03] Hates_: indorails: won't that be from your browser/editor?
[16:22:59] annlewis: has joined #RubyOnRails
[16:25:32] annlewis: has joined #RubyOnRails
[16:29:13] darrencauthon: has joined #RubyOnRails
[16:31:45] Megamosaren: has joined #RubyOnRails
[16:32:16] kies: has joined #RubyOnRails
[16:32:19] rickmasta: has joined #RubyOnRails
[16:32:40] Jasaka: has joined #RubyOnRails
[16:33:55] owenjones: has joined #RubyOnRails
[16:34:38] jhn: has joined #RubyOnRails
[16:35:01] baweaver: has joined #RubyOnRails
[16:39:03] Megamos: has joined #RubyOnRails
[16:47:01] Ratler: has joined #RubyOnRails
[16:47:45] xlegoman: has joined #RubyOnRails
[16:47:56] Gustavo: has joined #RubyOnRails
[16:51:39] arup_r: boring life.. :/
[16:51:40] workmaster2n: has joined #RubyOnRails
[16:52:24] lacrymology: has joined #RubyOnRails
[16:53:43] s2013: has joined #RubyOnRails
[16:54:39] jhn: has joined #RubyOnRails
[16:56:09] sankaber: has joined #RubyOnRails
[17:00:02] Hates_: arup_r: what's boring?
[17:00:08] reber: has joined #RubyOnRails
[17:00:23] arup_r: work.. not good
[17:01:43] moeabdol: has joined #RubyOnRails
[17:02:00] yardenbar: has joined #RubyOnRails
[17:02:00] maxz: has joined #RubyOnRails
[17:02:16] arup_r: need to upgrade the gems, and have to test the application manually if anything is broken or not.. no spec. and I am a new joinee .. Now you think my situation.
[17:02:33] sankaber: has joined #RubyOnRails
[17:04:13] arup_r: no moode to go work tomorrow.. :/
[17:04:32] arup_r: no QA team also..
[17:04:48] beauby: has joined #RubyOnRails
[17:06:32] nickenchuggets: has joined #RubyOnRails
[17:06:32] nickenchuggets: has joined #RubyOnRails
[17:07:43] nowhereFast: has joined #RubyOnRails
[17:09:16] nowhereFast: I've been trying out faye-websockets set up as middleware which works, so I created a service that handles the work of what comes through
[17:09:54] nowhereFast: my problem is I'm not quite sure how to best connect this up with ActiveController
[17:10:11] nowhereFast: lets say I have a controller that I'd like this service to be able to interface with
[17:10:22] nowhereFast: how would I go about doing that?
[17:14:47] Cervajz: has joined #RubyOnRails
[17:16:07] shibabu: has joined #RubyOnRails
[17:17:19] nowhereFast: has left #RubyOnRails: ()
[17:20:22] tenderlove: has joined #RubyOnRails
[17:22:33] m3_del: has joined #RubyOnRails
[17:23:05] xlegoman: has joined #RubyOnRails
[17:23:26] hightower4: has joined #RubyOnRails
[17:25:03] darrencauthon: has joined #RubyOnRails
[17:26:19] annlewis: has joined #RubyOnRails
[17:34:20] owenjones: has joined #RubyOnRails
[17:35:32] fedexo: has joined #RubyOnRails
[17:37:02] baweaver: has joined #RubyOnRails
[17:38:35] dionysus69: has joined #RubyOnRails
[17:42:05] arup_r: I am making an Ajax call, which in turn opens up a bootstrap modal window, but I have a JS which I want to be fired once the form shwon fully. This later JS is not executing.. https://gist.github.com/aruprakshit/586fbebd3fd4b2c4c768 What could be wrong though ?
[17:43:41] dionysus69: is it legitimate to ask zurb foundation question here?
[17:47:33] norc: has joined #RubyOnRails
[17:49:05] corioliss: has joined #RubyOnRails
[17:49:41] atomical: has joined #RubyOnRails
[17:50:13] rgtk_: has joined #RubyOnRails
[17:52:13] Hates_: dionysus69: not really, but you can ask and maybe someone can help
[17:52:38] m3_del: has joined #RubyOnRails
[17:53:01] blackmesa: has joined #RubyOnRails
[17:53:36] Hates_: arup_r: could be lots of things
[17:53:37] draken: has joined #RubyOnRails
[17:53:55] arup_r: yeah, like ? some hints..
[17:54:03] Hates_: arup_r: well what have you tried so far?
[17:54:35] arup_r: Here is the doc, http://www.w3schools.com/bootstrap/bootstrap_ref_js_modal.asp and that events I am using
[17:54:46] Hates_: arup_r: is this a rails question?
[17:54:50] arup_r: really no clue,..
[17:55:16] arup_r: ofcourse it is rails. Why Rails people don't write JS ?
[17:55:22] chipotle: has joined #RubyOnRails
[17:55:25] Hates_: arup_r: plent of rails apps with no JS
[17:55:42] Hates_: arup_r: so no, it's not rails tbh
[17:55:56] Hates_: arup_r: read the bootstrap docs, specifically about the event you are using: http://getbootstrap.com/javascript/#modals-events
[17:56:00] Megamos: has joined #RubyOnRails
[17:56:06] arup_r: .. may be as per your opinion..
[17:56:21] Hates_: arup_r: no, not my opinion, I work on plenty of rails apps with no js
[17:56:38] arup_r: that doesn't mean what you mean.
[17:57:08] Hates_: *rolls eyes*
[17:58:05] Hates_: arup_r: anyways, I've pointed you in the direction you should try
[17:58:13] arup_r: don't rails hips with MVC and if you cut `v`.. that doesn't meant what you mean.
[17:58:23] arup_r: yeah, the doc I was not complete I see now
[17:58:37] arup_r: official doc is correct and give me some hints
[17:58:48] Hates_: arup_r: views don't have to be html
[17:59:07] arup_r: true.. still Rails people know enough JS
[17:59:27] arup_r: anything you are going to run in browser needs JS.. no escape
[18:00:51] Hates_: maybe as per your opinion
[18:01:01] arup_r: loaded.bs.modal event is what I need .. let me try
[18:02:15] arup_r: Hates_: lest help each other.. or may be playing question .. answers... don't need to restrict someone to ask here and there.. be cool.. and welcome people and share your knowledge.. or if no idea.. just look and keep quiet..
[18:02:26] helpa: TROLL DETECTED!
[18:02:48] arup_r: I am already embarrassed for very personal thing.. so please be clam..
[18:04:01] allcentury: has joined #RubyOnRails
[18:04:23] doodlehaus: has joined #RubyOnRails
[18:06:39] rgtk: has joined #RubyOnRails
[18:07:25] someish: has joined #RubyOnRails
[18:08:28] cubny: has joined #RubyOnRails
[18:08:54] renews: has joined #RubyOnRails
[18:12:28] fschuindt: has joined #RubyOnRails
[18:12:57] Cache_Money: has joined #RubyOnRails
[18:14:58] kies: has joined #RubyOnRails
[18:15:51] njero: has joined #RubyOnRails
[18:16:32] alfie_max15: has joined #RubyOnRails
[18:16:35] alfie_max15: has left #RubyOnRails: ()
[18:17:19] fschuindt: Any tip on how to test ActiveJob with RSpec? I'm pretty confused with this... Any help? https://gist.github.com/fschuindt/50e3e07455046bd22fd3
[18:19:45] rubyonrailed: has joined #RubyOnRails
[18:21:35] l4v2: has joined #RubyOnRails
[18:22:26] bratsche: has joined #RubyOnRails
[18:24:04] fschuindt: ^ Actually Sidekiq::Testing.inline! solves it, FYI
[18:24:18] tildes: has joined #RubyOnRails
[18:24:24] ismaelga: has joined #RubyOnRails
[18:24:55] nertzy: has joined #RubyOnRails
[18:25:29] darrencauthon: has joined #RubyOnRails
[18:27:06] annlewis: has joined #RubyOnRails
[18:29:40] FailBit: Make everything as simple as possible, but no simpler
[18:29:54] Gustavo: has joined #RubyOnRails
[18:30:22] DLSteve: has joined #RubyOnRails
[18:32:40] nfk: has joined #RubyOnRails
[18:32:54] Sceko: has joined #RubyOnRails
[18:32:54] Sceko: has joined #RubyOnRails
[18:32:58] Palsson: has joined #RubyOnRails
[18:36:41] dstarh: has joined #RubyOnRails
[18:37:32] fschuindt: I really want to test the job code, not the Sidekiq queue, so I think that's fine
[18:37:46] baweaver: has joined #RubyOnRails
[18:38:37] rjn2: has joined #RubyOnRails
[18:40:01] baweaver: has joined #RubyOnRails
[18:40:34] towski_: has joined #RubyOnRails
[18:40:53] Guest96462: has joined #RubyOnRails
[18:44:38] owenjones: has joined #RubyOnRails
[18:44:44] pwnd_nsfw: has joined #RubyOnRails
[18:45:51] bmalum: has joined #RubyOnRails
[18:47:43] siaW: has joined #RubyOnRails
[18:48:50] bmalum_: has joined #RubyOnRails
[18:48:58] siaW: i???m not sure what i should do to make this test pass. can someone help? https://gist.github.com/siaw23/d7420435564fb4ac0e7d
[18:49:06] annlewis: has joined #RubyOnRails
[18:49:10] ur5us: has joined #RubyOnRails
[18:50:53] Spami: has joined #RubyOnRails
[18:51:10] badhatter: has joined #RubyOnRails
[18:51:10] badhatter: has joined #RubyOnRails
[18:51:10] badhatter-: has joined #RubyOnRails
[18:51:30] s2013: is it possible to do gem install and update the gemfile.lock ?
[18:51:41] s2013: instead of adding the gem and the version in the gemfile
[18:53:36] mentero: has joined #RubyOnRails
[18:54:06] Axsuul: has joined #RubyOnRails
[18:54:25] neilor: has joined #RubyOnRails
[18:55:49] ismaelga: has joined #RubyOnRails
[19:00:22] FailBit: how inconvenienced are you
[19:00:30] FailBit: by having to do both
[19:00:35] FailBit: for somewhat of a rarity
[19:00:44] FailBit: (having 100+ gems is problematic)
[19:01:50] futilegames: has joined #RubyOnRails
[19:03:15] stannard: has joined #RubyOnRails
[19:04:01] hotpancakes: has joined #RubyOnRails
[19:06:09] yardenbar: has joined #RubyOnRails
[19:07:35] hnanon: has joined #RubyOnRails
[19:08:06] hnanon: I have User, Location, and Market models.
[19:08:12] hnanon: Location belongs to Market.
[19:08:19] hnanon: User belongs to Location.
[19:08:30] hnanon: Is it also a good idea to make User belong to Market?
[19:08:55] zpe: has joined #RubyOnRails
[19:10:06] Tref: has joined #RubyOnRails
[19:10:32] FailBit: depends on what you're doing.
[19:13:25] nertzy: has joined #RubyOnRails
[19:14:52] thoraxe: has joined #RubyOnRails
[19:15:17] rubyonrailed: has joined #RubyOnRails
[19:15:35] hnanon: Failbit: What is a scenario you would also make User belong to Market?
[19:15:46] FailBit: I can't think of any.
[19:18:50] shibabu: has joined #RubyOnRails
[19:20:04] doodlehaus: has joined #RubyOnRails
[19:20:27] l: has joined #RubyOnRails
[19:21:37] camonz: has joined #RubyOnRails
[19:23:11] pulgalip1: has joined #RubyOnRails
[19:23:53] apotry: has joined #RubyOnRails
[19:26:17] erich__: has joined #RubyOnRails
[19:26:17] darrencauthon: has joined #RubyOnRails
[19:26:20] ElSif: has joined #RubyOnRails
[19:27:24] workmaster2n: has joined #RubyOnRails
[19:31:56] dionysus69: anyone know when approximately will the foundation 6 rails gem be ready?
[19:32:37] ereslibre: has joined #RubyOnRails
[19:32:37] ereslibre: has joined #RubyOnRails
[19:33:43] Cohedrin: has joined #RubyOnRails
[19:35:48] cac: has joined #RubyOnRails
[19:37:28] VeryBewitching: has joined #RubyOnRails
[19:38:51] erich__: has joined #RubyOnRails
[19:39:27] ibouvousaime: has joined #RubyOnRails
[19:39:49] rhizome: dionysus69: wrong channel
[19:42:18] Trynemjoel: has joined #RubyOnRails
[19:43:03] hardtail: has joined #RubyOnRails
[19:44:27] das3in: has joined #RubyOnRails
[19:45:06] rashkov: has joined #RubyOnRails
[19:45:09] rashkov: has joined #RubyOnRails
[19:45:19] bmalum: has joined #RubyOnRails
[19:46:21] rashkov: I'm able to hit comments#post using my browser, and I'm definitely sending data according to the browser console, but I only receive {"controller"=>"comments", "action"=>"create"}. Any ideas why? I'm using activemodel serializers with jsonapi incase that impacts naything.
[19:46:39] das3in: I'm using Devise and have an integer field in my User model to differentiate roles. How can I do User - User relationships based on roles? Ideally something like Teacher has_many Students, but they're not separate models
[19:47:00] hotpancakes: has joined #RubyOnRails
[19:47:46] sypheren: has joined #RubyOnRails
[19:49:54] workmaster2n: has joined #RubyOnRails
[19:51:14] pulgalipe: has joined #RubyOnRails
[19:52:33] m3_del: has joined #RubyOnRails
[19:53:12] rashkov: das3in: I'm thinking you might want to use a traditional "has_many through" type of association for this. So create a UsersGroups model with a user_id and a group_id, then add "user belongs_to groups through :user_groups", and then you can do "user has_many :users through: :user_groups"
[19:53:45] rashkov: das3in: http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association
[19:53:54] m3_del: has joined #RubyOnRails
[19:54:11] pulgalipe: has joined #RubyOnRails
[19:54:21] DanielN: has joined #RubyOnRails
[19:54:50] annlewis: has joined #RubyOnRails
[19:55:21] rashkov: das3in: actually this is more appropriate for your case: http://guides.rubyonrails.org/association_basics.html#self-joins
[19:55:27] juddey: has joined #RubyOnRails
[19:57:28] rashkov: das3in: a simpler option might be to do something like: User.where(group: 3). That'll give you a collection of all matching users with group being 3.
[19:57:53] das3in: OH! I was just looking into self joins but that might be easier
[19:57:57] DoubleMalt: has joined #RubyOnRails
[19:58:19] das3in: So "get all students for a teacher" could just be User.where(role: 2)
[19:58:22] das3in: That's simple thanks!
[19:58:55] das3in: Well that wouldn't work. Relationships :/ I think self-joins is the best
[19:59:10] rashkov: yeah it's more robust as a relationship for sure
[20:01:02] siaW: can someone please help me on why i???m getting the first 2 failings? https://gist.github.com/siaw23/61cfddf8186725d7c8b4
[20:04:26] alfie_max15: has joined #RubyOnRails
[20:04:33] lxsameer: has joined #RubyOnRails
[20:04:50] mentero: has joined #RubyOnRails
[20:05:58] stannard: has joined #RubyOnRails
[20:07:32] s2013: das3in you need to look at self joins
[20:07:40] s2013: nvm.. looks like someone pointed you to that
[20:08:13] das3in: haha thanks s2013 appreciate it. Watching an awesome railscast right now
[20:08:24] s2013: just be careful of railscast.. they are OLD
[20:08:30] s2013: but still helpful
[20:11:09] alfie_max15: has left #RubyOnRails: ()
[20:11:21] s2013: oh snap ryan bates is alive, didnt realize he came back to civlization
[20:12:07] rjn2: has joined #RubyOnRails
[20:12:55] StaticVoid: has joined #RubyOnRails
[20:13:13] surrealanalysis: has joined #RubyOnRails
[20:13:38] das3in: So I need to add teacher_id, student_id and administrator_id fields to the User model yea? then I can do User has_many :students, class_name: "User", foreign_key: "teacher_id"
[20:14:02] nickenchuggets: has joined #RubyOnRails
[20:14:02] nickenchuggets: has joined #RubyOnRails
[20:15:44] allcentury: has joined #RubyOnRails
[20:17:45] Radar: krainboltgreene: invited you to redis-store
[20:18:29] FailBit: I wish redis was better than memcached at caching HTML fragments
[20:18:34] FailBit: then we could drop memcached
[20:21:37] doodlehaus: has joined #RubyOnRails
[20:24:06] Pazician: has joined #RubyOnRails
[20:28:04] doodlehaus: has joined #RubyOnRails
[20:29:28] shinnya: has joined #RubyOnRails
[20:36:06] matthewd: das3in: That seems unlikely to work. But what you do need will depend on your data model.. e.g., does a student have more than one teacher?
[20:36:42] das3in: matthewd: no a student only has one a teacher. But a teacher can have many students.
[20:37:21] matthewd: das3in: Okay, then a teacher_id on User will work... but student_id doesn't make much sense
[20:39:11] shinenelson: has joined #RubyOnRails
[20:41:26] das3in: What if I"m on a student profile and want to his his/her teacher?
[20:44:30] matthewd: That's what teacher_id will contain -- it'll only be set for students
[20:44:48] m3_del: has joined #RubyOnRails
[20:45:05] das3in: ah right. That makes sense
[20:45:40] nertzy: has joined #RubyOnRails
[20:49:25] kitsuneyo: has joined #RubyOnRails
[20:51:07] EminenceHC: has joined #RubyOnRails
[20:51:45] StaticVoid: Hello all, DB question, let me know if this is not the right forum to ask. What would be the best DB to use for structured data, used for analysis and run algorythms on ?
[20:52:02] helpa: "Best" and "better" are subjective. Try to use a different term.
[20:52:37] framling: has joined #RubyOnRails
[20:53:34] StaticVoid: fair enough: what would be a DB that is suited for large volumes of structured data that would scale well from a performance standpoint. This would not be an enterprise app, so no massive hardware available.
[20:53:47] framling: has left #RubyOnRails: ()
[20:54:03] StaticVoid: I undestand that is still a 'vague' question
[20:54:17] StaticVoid: But I'm not sure how else to ask it :)
[20:54:39] FailBit: postgresql
[20:54:45] akira__: has joined #RubyOnRails
[20:55:06] FailBit: if anyone recommends mongodb, RUN.
[20:55:35] annlewis: has joined #RubyOnRails
[20:55:50] StaticVoid: FailBit: :) Thanks. I was leaning towards postgresql, but wasn't sure, I'll look into that some more.
[20:56:27] FailBit: postgresql is sort of the ideal rails DB anyways
[20:56:42] tildes: has joined #RubyOnRails
[20:57:02] quazimodo: has joined #RubyOnRails
[20:59:33] dionysus69: has joined #RubyOnRails
[21:01:36] xlegoman: has joined #RubyOnRails
[21:03:41] Coldblackice: has joined #RubyOnRails
[21:03:44] workmaster2n: has joined #RubyOnRails
[21:05:19] hnanon: Can I use a defined variable in one method in another method?
[21:06:00] henry1: has joined #RubyOnRails
[21:06:33] Radar: hnanon: !explain
[21:06:33] helpa: hnanon: Please explain your problem better as we are having trouble understanding what you mean. A Gist (http://gist.github.com) is always helpful!
[21:06:33] FailBit: if it's an instance, class or global variable
[21:06:38] FailBit: but yes, please explain
[21:06:46] twilling: has joined #RubyOnRails
[21:07:08] hnanon: Are variables in a method available within the rest of the class
[21:07:16] hnanon: I mean "?"
[21:07:26] twilling: hnanon: not unless you make it an instance variable
[21:07:31] twilling: i.e. @variable
[21:07:48] hnanon: twilling: Thanks.
[21:08:20] hnanon: When referring to it later, will I need the "@"?
[21:08:48] rhizome: just pass it in the method call so you don't have to wonder
[21:08:54] twilling: Not if you set attr_reader, attr_writer or attr_accessor for that instance variable, depending on what you???re trying to do
[21:09:42] mutantkeyboard: has joined #RubyOnRails
[21:13:18] mutantkeyboard: guys does anyone have any experience with creating booking calendars? I need to use one on my curernt project and I'm kind of divided whether to bake some "in house" solution, or use an existing one. Any advice is appreciated.
[21:15:42] kitsuneyo: any opinions on selectize vs select2? selectize seems good to me so far.
[21:15:53] Radar: krainboltgreene: np
[21:15:56] Radar: krainboltgreene: what's this about a gitter?
[21:16:09] krainboltgreene: radar: It's a chat thing, for repositories.
[21:16:15] platzhirsch: has joined #RubyOnRails
[21:16:15] Radar: krainboltgreene: mhm I know that
[21:16:20] Radar: is it for the entire organisation?
[21:16:26] framlinqp: has joined #RubyOnRails
[21:16:45] platzhirsch: How to test a method which needs to access something from the test database via raw sql, it's not available, since it's within the same transaction
[21:17:14] krainboltgreene: Hmm, good question. I may have not understood what they were asking for. Mind rejecting? I was trying to make a room for redis-store/redis-store, but they haven't updated my list of repos.
[21:17:21] Radar: platzhirsch: 1) turn off transactional fixtures 2) there is no step 3) PROFIT
[21:17:22] krainboltgreene: Or since I'm not a owner, I may not have permission.
[21:17:31] platzhirsch: Radar: niiice
[21:18:11] hotpancakes: has joined #RubyOnRails
[21:18:44] cac: has joined #RubyOnRails
[21:19:13] Radar: krainboltgreene: my understanding was that it's for the rubysherpas org, which does have some private repos I don't want to be granting access to
[21:19:30] krainboltgreene: radar: Oh right I did it for that org too.
[21:19:33] krainboltgreene: Yeah, just reject it.
[21:19:55] bennysan: has joined #RubyOnRails
[21:20:00] Fire-Dragon-DoL: kitsuneyo: missing pagination in selectize
[21:20:27] Fire-Dragon-DoL: for me it's a must-have
[21:20:34] kitsuneyo: Fire-Dragon-DoL, when would you use pagination with select2??
[21:20:44] IrishGringo: has joined #RubyOnRails
[21:21:04] Fire-Dragon-DoL: kitsuneyo: when you load remote data and there is more than ~100 records, the scroll automatically paginate it: while scrolling, it loads additional ~100 records
[21:21:19] Fire-Dragon-DoL: and it's a very common usecase unless you use select2 for trivial things
[21:21:34] shibabu: has joined #RubyOnRails
[21:21:57] kitsuneyo: that sounds like a lot of scrolling for a select box, but i guess people are using that
[21:22:00] Fire-Dragon-DoL: I use select2 mostly for "pick an object from a user-created list", so yes, I usually don't know how many objects are in the list, which for me makes pagination very important
[21:22:17] Radar: krainboltgreene: rightio
[21:22:28] kitsuneyo: thanks Fire-Dragon-DoL, i don't think this is an issue for me but appreciate the heads up :)
[21:22:55] krainboltgreene: Radar: If you could setup gitter for redis-store, paranoia, and forem that would be nice.
[21:23:13] Fire-Dragon-DoL: kitsuneyo: problem is, if they type let's say "rails" in select2 box for finding github repo, either you load 100 pages of records (just check github) OR you load only first X of them. I found the second option very disorienting: it makes you think there are only that amount of repositories with that name
[21:23:34] DLSteve: has joined #RubyOnRails
[21:24:05] qejk: has joined #RubyOnRails
[21:24:26] doodlehaus: has joined #RubyOnRails
[21:24:55] dtordable: has joined #RubyOnRails
[21:25:00] Fire-Dragon-DoL: kitsuneyo: I say this because I faced the issue in JIRA, they show you only 6 records in a select2-like box, but there are more of that. I wasn't aware until I started typing something, but this happened only after DAYS of usage
[21:25:10] Fire-Dragon-DoL: and I'm a software developer, not a common use :P
[21:26:06] Radar: Please don't swear.
[21:26:19] Radar: "JIRA" is a swear word where I am from
[21:30:22] rgtk: has joined #RubyOnRails
[21:30:25] hnanon: In my user create action I have: @user.build_company Company.set_company_code
[21:30:54] hnanon: In my Company model I have:
[21:31:06] hnanon: def self.set_company_code
[21:31:12] hnanon: company_code = rand(5)
[21:31:19] hnanon: update(code: company_code)
[21:31:27] Radar: hnanon: !gist
[21:31:27] helpa: hnanon: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:31:33] Radar: hnanon: You know that you should Gist code by now :(
[21:31:40] Radar: hnanon: Why is that a class method?
[21:31:53] hnanon: Radar: I thought it was short enough to not require a gist...
[21:32:03] Radar: hnanon: anything more than 2 lines of code goes in a Gist.
[21:32:16] helpa: Anything more than 2 lines goes in a Gist (http://gist.github.com) or a Pastie (http://pastie.org). Spamming the channel with walls of text is not welcome.
[21:33:14] hnanon: I made it a class method because I kept getting the error: undefined method `set_company_code'
[21:34:24] NBarnes: has joined #RubyOnRails
[21:35:00] Radar: Why are you calling Company.set_company_code in the first place?
[21:35:04] Radar: is a class method
[21:35:10] Radar: it won't set the company instance's code
[21:36:05] hnanon: Radar, I see...I changed that line to: @user.company.set_company_code and it's working now.
[21:36:13] kitsuneyo: i'm trying to understand how to use this "Wrapper of Selectize.js plugin for placecomplete" and the usage instructions are vague: https://github.com/comerc/selectize-placecomplete do i put this in <script> tags? how come it doesn't mention a css id?
[21:36:42] kitsuneyo: and where are the semicolons?!
[21:38:06] adaedra: that looks like coffeescript, there's no semi-columns
[21:38:22] djbkd: has joined #RubyOnRails
[21:38:24] hnanon: Radar: Do you use Stripe at Marketplacer?
[21:38:34] Radar: hnanon: We use Braintree.
[21:38:52] hnanon: Ok. Just curious.
[21:40:13] joshkovach: has joined #RubyOnRails
[21:40:20] kitsuneyo: adaedra you're right, it's coffeescript
[21:41:08] dtordable: has joined #RubyOnRails
[21:41:54] Radar: hnanon: I'm surprised that you made this mistake given how long you've been doing Ruby and Rails for.
[21:42:00] kitsuneyo: somebody asked the same question i just asked in the plugin issues page - https://github.com/comerc/selectize-placecomplete/issues/1 - and it was answered, but i'm not sure how to use this in rails
[21:42:50] ruurd: has joined #RubyOnRails
[21:43:19] kitsuneyo: is it ok to just use coffeescript inline?
[21:43:20] cajone: has joined #RubyOnRails
[21:44:09] maxz: has joined #RubyOnRails
[21:47:34] rgtk: has joined #RubyOnRails
[21:48:13] pwnd_nsfw: has joined #RubyOnRails
[21:49:13] dtordable: has joined #RubyOnRails
[21:50:01] StaticVoid: has joined #RubyOnRails
[21:50:12] yfeldblum: has joined #RubyOnRails
[21:50:41] bmalum: has joined #RubyOnRails
[21:50:54] hnanon: Radar: Yeah, I don't know what to say. I need to code daily. There are too many days that go by sometimes without me working on any apps...
[21:51:51] Radar: hnanon: The differences between classes and instances should be EMBEDDED IN YOUR BRAIN by now
[21:52:26] Radar: Maybe I expect too much of people :P
[21:53:02] VeryBewitching: hnanon: I find it helps to work on a Ruby project now and again, distinct from Rails projects. The Ruby language is (obviously) central to development with Rails.
[21:53:59] superlou: has joined #RubyOnRails
[21:55:19] platzhirsch: has joined #RubyOnRails
[21:55:20] crazy8s: has joined #RubyOnRails
[21:56:20] annlewis: has joined #RubyOnRails
[21:57:17] arooni: has joined #RubyOnRails
[21:57:31] s2013: hmm how can i convert something like 16:30 (time) into something like 16.5
[21:57:49] nso95: With code
[21:57:53] s2013: thanks nso95
[21:58:00] nso95: sure thing
[21:58:05] hotpancakes: has joined #RubyOnRails
[21:58:08] n00bDev: has joined #RubyOnRails
[21:59:42] n00bDev: If i need the foreign key of a parent object while creating a child object, do i used nested resource? alot of the examples on stack say to use a hidden field but thats just bad practice IMO?
[22:00:05] ewnd9: has joined #RubyOnRails
[22:00:35] Radar: s2013: why would you want to do that?
[22:00:57] VeryBewitching: s2013: "#{hour}.#{(minutes.to_f / 60).round(2)}"
[22:01:27] s2013: VeryBewitching yeah i was wondering if there was some ruby method that did it without doing the actual calculation.. guess not..
[22:01:31] VeryBewitching: Radar: Many timesheet systems store time spent as a float.
[22:01:36] s2013: Radar because im checking to see if something is in range
[22:01:42] Radar: s2013: code
[22:01:45] Radar: coddeeeee
[22:01:51] dikaio: has joined #RubyOnRails
[22:01:51] hnanon: VeryBewitching, Radar: I'm definitely weak in Ruby. I think I'm going to spend some times on the language itself (as opposed to the Rails framework) every day.
[22:01:52] xlegoman: has joined #RubyOnRails
[22:02:33] s2013: dont have any code yet. im just hitting google places api. im tryign to check if a place is open during certain time.. so im doing it in the console now
[22:02:41] VeryBewitching: hnanon: Playing inside irb or pry is exceedingly useful on my day to day.
[22:02:57] s2013: but google places returns open and close tiems as strings like "1700" or "1000"
[22:03:05] VeryBewitching: s2013: I'm sure you could compare time objects.
[22:03:13] Radar: s2013: Don't they return time ranges?
[22:03:27] Radar: s2013: Wouldn't you then need to convert to a time and then check that the time you have is within that range?
[22:03:36] Radar: I wouldn't expect Google of all people to return numbers for times!
[22:03:40] s2013: as strings like for the open key it would be "1000" and close key "1700"
[22:03:49] s2013: let me paste a sample one sec
[22:04:37] s2013: https://gist.github.com/ss2k/0d4c415ff7b2745da224
[22:04:40] s2013: this is the response
[22:04:56] griffindy: has joined #RubyOnRails
[22:05:27] griffindy: has joined #RubyOnRails
[22:05:41] SteenJobs: has joined #RubyOnRails
[22:06:08] njero: has joined #RubyOnRails
[22:06:57] doodlehaus: has joined #RubyOnRails
[22:07:10] griffindy: has joined #RubyOnRails
[22:07:10] wilsonc91: has joined #RubyOnRails
[22:07:16] stannard: has joined #RubyOnRails
[22:07:36] wilsonc91: Could someone help me with this? New to ruby, getting a undefined method `[]=' for nil:NilClass http://pastebin.com/82XafLJK
[22:07:55] platzhirsch: has left #RubyOnRails: ()
[22:08:27] VeryBewitching: s2013: You'll have to manipulate that string a bit so Time#parse or Date#parse (depending on whether you're using a date) can deal with it; after that you can make comparisons with objects.
[22:08:32] s2013: (dt.hour + (dt.minute.to_f / 100)).between?((o.to_f / 100), (c.to_f / 100))
[22:08:34] s2013: this is what i have
[22:08:40] s2013: o = "1000" .. c = "1700"
[22:08:43] s2013: dt = datetime
[22:08:47] s2013: that works fine
[22:09:00] VeryBewitching: Let the classes do the math for you.
[22:09:16] s2013: yeah i didnt wanna manipulate the string much
[22:09:31] VeryBewitching: 1700 -> 17:00 isn't a huge leap
[22:10:08] s2013: what would be more efficient? cause what i have works fine but i rather do whats most efficient. i figured with time it might be less efficient
[22:10:10] VeryBewitching: From the last char, -2 chars += ':' :D
[22:10:34] VeryBewitching: Well you're doing work so you can perform math; that's two steps already.
[22:10:39] Radar: I see what's happening there.
[22:10:49] Radar: wilsonc91: If you want help with that you'll need to follow helpa's instructions./
[22:10:50] hotpancakes: has joined #RubyOnRails
[22:10:59] s2013: Radar what do you suggest mighty one
[22:11:05] Radar: s2013: kissass
[22:11:19] s2013: you have great insights
[22:11:20] htmldrum: has joined #RubyOnRails
[22:11:21] Radar: s2013: Are you checking to see if the store is currently open?
[22:11:31] s2013: not currently open. if its open at a specific date time
[22:11:38] griffindy: has joined #RubyOnRails
[22:11:50] s2013: if its currently open then they have a response for that.
[22:11:53] Radar: Then you'll need to convert the times google gives you to Time objects.
[22:12:11] matthewd: .. for the date you're interested in
[22:12:35] s2013: no that part is easy
[22:12:40] VeryBewitching: I think I covered that.
[22:12:50] s2013: converted_day = (@datetime.wday / 6) % 7
[22:12:57] s2013: to get the day
[22:13:04] s2013: since google starts monday, and rails wday is sunday
[22:13:21] s2013: opening_time = place.opening_hours["periods"][converted_day]["open"]["time"] closing_time = place.opening_hours["periods"][converted_day]["close"]["time"]
[22:13:26] s2013: so i got all those covered
[22:14:56] rhizome: i'm still a little unclear on the "decimal time" part
[22:15:27] VeryBewitching: rhizome: He was trying to do math to compare; float > string
[22:15:52] DanielN: has joined #RubyOnRails
[22:16:07] s2013: Time.parse("1000".insert(-3, ':')) i can do that.. but
[22:16:58] Tref: has joined #RubyOnRails
[22:17:45] twilling: has joined #RubyOnRails
[22:18:10] juddey: has joined #RubyOnRails
[22:18:52] VeryBewitching: s2013: So long as they use padding for hours < 10, that would work fine.
[22:19:12] theblang: has joined #RubyOnRails
[22:19:17] VeryBewitching: And even then, it'll still work actually.
[22:19:44] matthewd: actual_opening_time = Time.new(@datetime.year, @datetime.month, @datetime.day, Integer(opening_time[0, 2], 10), Integer(opening_time[2, 2], 10))
[22:23:45] Trynemjoel: has joined #RubyOnRails
[22:25:13] henry1: has joined #RubyOnRails
[22:25:20] matthewd: Ah, AS can make that less ugly: actual_opening_time = @datetime.change(hour: Integer(opening_time[0, 2], 10), min: Integer(opening_time[2, 2], 10))
[22:25:50] s2013: ok let me check soemthing
[22:26:58] rickmasta: has joined #RubyOnRails
[22:27:35] rhizome: where is the float?
[22:29:59] ismaelga: has joined #RubyOnRails
[22:30:00] rgrmatt: has joined #RubyOnRails
[22:31:50] s2013: https://gist.github.com/ss2k/3a81e9a9e8dd7406f95e so these are the two methods i have
[22:31:59] s2013: so you guys suggest the second one correct?
[22:32:09] s2013: rhizome what you mean
[22:32:36] Radar: I dunno about Integer.
[22:32:37] rhizome: did you have to use single-letter variable names?
[22:32:51] Radar: s2013: Are the times always in 24hr format? i.e. 9am is 0900?
[22:32:58] s2013: o = opening c = closing.. .. yeah i beliee it is
[22:33:13] s2013: im just typing most of it in the console for now.. so using short variables
[22:33:26] rhizome: def start_time(thing_from_api); def end_time(thing2_from_api)
[22:33:38] Radar: time = "0900"
[22:33:39] Radar: hour, min = time[0,2] , time[2,2]
[22:33:44] Radar: that looks better imo
[22:33:58] s2013: k let me check
[22:34:11] mentero: has joined #RubyOnRails
[22:34:22] VeryBewitching: I would probably consume the whole result in DSL.
[22:34:33] Radar: Then it'd be change(hour: hour.to_i, min: min.to_i)
[22:34:58] rhizome: doesn't have to be a dsl, but working backwards from a desired method call is a favorite of mine
[22:35:08] Radar: I think this way it doesn't look too much like Java code :P
[22:35:16] s2013: ok. i ran a benchmark between the two methods that i posted. one sec
[22:35:18] s2013: ill update the gist
[22:35:23] Radar: ooooh a benchmark
[22:35:43] s2013: https://gist.github.com/ss2k/3a81e9a9e8dd7406f95e
[22:35:58] rhizome: be sure to benchmark the benchmark so you know how much overhead to account for :P
[22:36:23] matthewd: Yeah, I went for the strict check on incoming data, despite the ugliness, but there's a definite "ugly is ugly" argument there too :)
[22:36:27] bmalum: has joined #RubyOnRails
[22:37:29] blackhuey: has joined #RubyOnRails
[22:37:35] matthewd: s2013: Your other option would be string comparison
[22:37:36] digneety: has joined #RubyOnRails
[22:38:12] matthewd: Are you calling this enough that performance matters? Surely the IO to get the data would overshadow everything else.
[22:38:48] s2013: not that many times.. iwas just curious what was most efficient.. the method2 is nicer
[22:39:57] matthewd: (o..c).cover?(dt.strftime('%H%M'))
[22:40:01] s2013: ot = dt.change(hour: o[0,2].to_i, min: o[2,2].to_i <-- this is how i have it now. removed the Integer
[22:40:08] rgrmatt: has joined #RubyOnRails
[22:40:24] Scripore: has joined #RubyOnRails
[22:40:41] s2013: matthewd how would that work? o and c are strings
[22:40:56] matthewd: You can compare strings
[22:41:13] matthewd: dt.strftime(..) is a string too
[22:41:30] djbkd: has joined #RubyOnRails
[22:41:40] s2013: oh interested.. i knew you could compare string.. didnt know in that sense..
[22:41:42] s2013: interesting
[22:42:37] s2013: i actually like that the most matthewd tbh.. its simplest
[22:42:42] matthewd: It's ASCIIbetical comparison, but as you only have digits, that's fine
[22:44:04] matthewd: Yeah, it really depends whether you have any other use for the data. Time-ifying it is a good thing to put into the class representing the response... but if this is literally the only thing you need it for, maybe the simplest option is the best.
[22:44:32] matthewd: I'd want to know what happens when an open time spans midnight before I went to far, though.
[22:44:34] s2013: yeah i just wanted cleaner code.. i think its the cleanest. i did the benchmark mostly cause i was curious.. also method1 now i realize has a bug.ill just go with this method
[22:44:57] stannard: has joined #RubyOnRails
[22:46:02] s2013: hmm yeah now thats another issue.. cause if the close time is after midnight then that gets screwy.. even with the other thing.. but what i can do is add 2400 if close < open
[22:46:08] s2013: but that requires to convert it.. blah
[22:46:57] quazimodo: has joined #RubyOnRails
[22:47:05] matthewd: Yeah, seems like you would want real Times if that's the case
[22:47:35] s2013: https://gist.github.com/ss2k/2fd2762d1151cabaa76f
[22:47:37] matthewd: Because you also need to check yesterday's open times if dt is before today's
[22:48:43] doodlehaus: has joined #RubyOnRails
[22:49:18] agit0: has joined #RubyOnRails
[22:49:32] s2013: yeah i think this owrks now
[22:50:15] matthewd: Make sure it does the right thing for 0100 given a 2000-0200 range
[22:50:23] s2013: thanks Radar matthewd VeryBewitching
[22:50:55] matthewd: Though, if you're dealing with midnightish times, you have the double-bonus of potential DST interference :D
[22:50:59] matthewd: No worries!
[22:51:25] s2013: yeah its all good. i was working with the yelp api for a while until i realized they didnt offer open/close tiems which is really stupid
[22:52:08] rjn2: has joined #RubyOnRails
[22:53:27] Scripore: has joined #RubyOnRails
[22:53:50] User458764: has joined #RubyOnRails
[22:54:05] trosborn: has joined #RubyOnRails
[22:54:16] duncannz: has joined #RubyOnRails
[22:54:24] VeryBewitching: s2013: Oh hey, was havin' a smoke, but np :D
[22:54:51] duncannz: has joined #RubyOnRails
[22:55:46] VeryBewitching: s2013: Ideally it would be nice if the API allowed you to make a call that determines if it's open on date x
[22:56:13] s2013: i know.. actually im going to contribute to the gem to allow that now
[22:56:19] s2013: after i test out for edge cases and all that
[22:56:42] s2013: so you pass the location id and call open_at?(some_datetime) and it returns true or false
[22:57:06] annlewis: has joined #RubyOnRails
[22:57:09] Glenny: has joined #RubyOnRails
[23:00:30] ner0x: has joined #RubyOnRails
[23:01:58] ner0x: I have three models, account, company, and address. Address is polymorphic. Both account and company have an address. Is there a way to require columns in address for when it's attached to a company and make them optional when it's a company?
[23:03:07] Radar: ner0x: Sounds like what you need is Reform.
[23:03:22] Radar: ner0x: You can have an AccountAddressForm and a CompanyAddressForm, each with their own validations.
[23:04:14] Radar: ner0x: p.s. where do I send the invoice?
[23:09:18] greenride: has joined #RubyOnRails
[23:12:59] greenride: tubbo: Thanks for your comments on bamboo and capistrano yesterday. That helped me understand how to setup bamboo with the bamboozled-ruby-plugin and capistrano.
[23:13:49] Radar: Yay! Braintree v.zero checkout form work that I worked on for 2 weeks is now being pushed out live :D :D :D
[23:13:59] drale2k: has joined #RubyOnRails
[23:13:59] Radar: A++ would recommend to others.
[23:16:19] Radar: You can see it on bikeexchange.com.au's checkout now (you don't have to buy anything)
[23:16:29] njero: is there any ruby library to verify google sigin token?.
[23:16:32] Radar: Or actually, please do buy things because it helps me stay employed :P
[23:16:48] njero: i couldn't find from google api client ruby lib
[23:17:16] bmalum: has joined #RubyOnRails
[23:17:31] njero: ya.. token integrity check...
[23:17:45] njero: https://developers.google.com/identity/sign-in/android/backend-auth
[23:17:47] rhizome: don't you get that by...using it?
[23:18:06] njero: token can be sent by malicious client app.
[23:18:24] njero: claiming different email etc...
[23:18:26] K_r3aPeR: has joined #RubyOnRails
[23:18:46] rhizome: are you saying you need to determine whether a token is a random string or not?
[23:19:03] matthewd: > The ID token is a JWT that is properly signed
[23:19:10] njero: rhizome: nope.. if it is valid
[23:19:20] K_r3aPeR: has joined #RubyOnRails
[23:19:27] rhizome: ok, sorry. is *not* a random string.
[23:19:49] njero: matthewd: how to check that..?
[23:21:30] Palsson: has joined #RubyOnRails
[23:21:39] matthewd: n_e_o: I would expect one of the JWT-related gems could help with that
[23:22:37] annlewis: has joined #RubyOnRails
[23:22:38] matthewd: Though there also seems to be an official (alpha) Ruby library for the Google APIs, so I guess you should be able to call the tokeninfo endpoint using that
[23:22:58] njero: matthewd: k. let me check.. but also i need to cross check if the provided email is associated with this token? can i get it with touching token_info end point
[23:23:20] njero: matthewd: i checked that. i couldn't find any
[23:23:29] njero: matthewd: seems like dead
[23:23:48] shibabu: has joined #RubyOnRails
[23:24:03] twilling: has joined #RubyOnRails
[23:24:06] atomical: has joined #RubyOnRails
[23:24:22] wilsonc91: Hi, im having issue with rendering a form: It's just showing up as [] http://pastie.org/10574812
[23:25:12] twilling: If I build an API that will only ever be used by me, via a single Ember/React application, what is the minimum security that I should implement for requests to that API. I assume just a CORS policy is not enough. At minimum should I require an API key?
[23:26:09] matthewd: n_e_o: Couldn't find any what?
[23:27:41] njero: matthewd: needed functions for token verification :(
[23:29:58] rhizome: seems weird that you're the first to have to deal with this, maybe it's not actually a problem?
[23:30:35] njero: rhizome: to me?
[23:31:08] njero: nope.. there are unanswered qstns in stackoverflow and google groups
[23:31:40] njero: also same functions exists for other clients lib provided by google
[23:31:41] rhizome: how many sites would you say are using google logins
[23:32:03] rhizome: interesting. can you port them over to yours?
[23:32:12] njero: rhizome: most of the web apps use oauth
[23:32:39] njero: rhizome: i'm trying to use android signin with rails backend
[23:33:19] njero: to implement oauth i need to use webview... which i hate..
[23:33:29] matthewd: n_e_o: Is this not oauth? The tokeninfo endpoint recommended on that page lives under /oauth2/
[23:33:54] matthewd: .. and sounds like you should be able to call it from the ruby library: https://github.com/google/google-api-ruby-client/blob/master/generated/google/apis/oauth2_v2/service.rb#L113
[23:34:04] njero: matthewd: yeah but my case issued within device.. not through callback url
[23:34:47] matthewd: wilsonc91: Where's `form` coming from?
[23:34:55] njero: matthewd: oops.. let me see
[23:35:31] htmldrum: has joined #RubyOnRails
[23:35:38] nertzy: has joined #RubyOnRails
[23:35:49] stannard: has joined #RubyOnRails
[23:36:05] matthewd: twilling: I'm not sure what an API key will gain you
[23:36:07] jessemcgilallen: has joined #RubyOnRails
[23:36:20] Megamos: has joined #RubyOnRails
[23:36:54] twilling: I could use a key to generate an expiring token. But the key will have to be stored in the FE framework I imagine??? so that doesn???t feel very secure
[23:38:02] matthewd: Anything your frontend application can do, a malicious actor could also do, while pretending to be that frontend application
[23:39:04] matthewd: There's no way to ensure the requests can only come from your trusted JS; the API server needs to enforce whatever business rules are necessary to prevent unwanted changes
[23:39:18] Scriptonaut: has joined #RubyOnRails
[23:40:18] rhizome: ssh tunnelling and an api server that only responds to localhost
[23:40:35] twilling: matthewd: that makes sense. i guess i hadn???t considered it exactly like that. in which case i should be safe because it???s more or less a simple ???submit a desktop background??? esque site.
[23:41:16] matthewd: rhizome: I'll admit I was assuming the frontend app needs to run on other people's computers :)
[23:41:49] rhizome: oh right, i was thinking it was server to server for some reason
[23:43:02] matthewd: twilling: So, if you have a user account, for example, it needs to be the server that associates the new upload with the logged-in user, and not the frontend; you don't want someone to be able to fake an upload into someone else's account
[23:44:49] Gustavo: has joined #RubyOnRails
[23:45:05] twilling: yeah that jives with how i???ve written my server-code thus far. so that makes sense. there???s really nothing that this API exposes that one couldn???t do through a traditional view/erb-powered Rails site. For some reason I was mentally treating the API like it was inherently less secure
[23:45:36] isjaylee: has joined #RubyOnRails
[23:45:53] twilling: 1 index w/ pagination, 1 submission endpoint. no user autehntication. the only thing to guard against would be spammy input but that???s a problem that someone smarter than i has already solved.
[23:45:58] twilling: thanks for the second opinions
[23:46:57] isjaylee: I'm trying to implement dragonfly with a polymorphic image table. But, it's not saving the uid/name. Anyone have any ideas?
[23:49:17] Spami: has joined #RubyOnRails
[23:51:00] rhizome: try supplying the uid/name
[23:51:22] owenjones: has joined #RubyOnRails
[23:53:37] braincrash: has joined #RubyOnRails
[23:54:00] doodlehaus: has joined #RubyOnRails
[23:55:18] twilling: has joined #RubyOnRails
[23:55:53] hnanon: has joined #RubyOnRails
[23:56:13] doodleha_: has joined #RubyOnRails