« Back to channel list

#RubyOnRails - 10 February 2016

« Back 1 day Forward 1 day »
[00:00:25] tildes: has joined #RubyOnRails
[00:01:02] floror: has joined #RubyOnRails
[00:02:19] rubyonrailed: has joined #RubyOnRails
[00:04:35] bauerbob: i think i got it: Student.eager_load(:grades).preload(:grade_climbs)
[00:05:06] pawnbox: has joined #RubyOnRails
[00:05:38] macsteps: has joined #RubyOnRails
[00:10:13] itscj: why can't I do this? <ul style="<%='display:none;' if params[:controller] != 'pages' || 'images' || 'videos' %>">
[00:10:19] itscj: specifically the 'pages' || 'images' || 'videos' part
[00:10:45] baweaver: has joined #RubyOnRails
[00:11:52] itscj: I'm trying to display:none when any of those three controllers are selected
[00:13:59] waka: has joined #RubyOnRails
[00:14:47] maesitos: has joined #RubyOnRails
[00:18:24] ni291187: has joined #RubyOnRails
[00:18:36] kknight: has joined #RubyOnRails
[00:19:29] kies^: has joined #RubyOnRails
[00:20:37] yoongkang: has joined #RubyOnRails
[00:20:50] floror: has joined #RubyOnRails
[00:22:16] MaDErroR123: has joined #RubyOnRails
[00:22:57] krzkrz: has joined #RubyOnRails
[00:24:36] ElFerna: has joined #RubyOnRails
[00:25:35] snowy: has joined #RubyOnRails
[00:26:00] tfdd_dude: has joined #RubyOnRails
[00:26:12] mwlang: itscj: I would strongly recommend extracting that code to a helper method. <ul style=???<%= style_for_controller %>???>
[00:27:09] mwlang: signed out, I see???.oh well. :-)
[00:29:02] yfeldblum: has joined #RubyOnRails
[00:29:18] J30: has joined #RubyOnRails
[00:29:35] tfdd_dude: Hey all. I have a strange question. I'm using Rails 4.2.5 with Minitest/Test::Unit, and I'm trying to run a SINGLE test, via: rube test/integration/login.rb -n test_login_status The problem I'm having is every test in the file (login.rb) kicks off, and no matter what I google, I cannot figure out how to make a SINGLE test run. Halp a dummy, ple
[00:30:01] askhat: has joined #RubyOnRails
[00:30:49] yeapiekiyay: has joined #RubyOnRails
[00:31:05] DLSteve: has joined #RubyOnRails
[00:31:24] smathy: tfdd_dude, !gist a copy-paste of your console showing you running the command and the output.
[00:31:24] helpa: tfdd_dude: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[00:31:42] smathy: tfdd_dude, and the contents of the file in question.
[00:32:13] TinkerTyper: has joined #RubyOnRails
[00:33:50] tfdd_dude: Sure...I don't think it is file-related, though. All the tests pass. https://gist.github.com/squirrelpoop/3209c8f90c12e514b183
[00:34:13] tfdd_dude: I just can't run a SINGLE test. :)
[00:34:20] tfdd_dude: They all fire off.
[00:34:46] pawnbox: has joined #RubyOnRails
[00:35:41] roshanavand: has joined #RubyOnRails
[00:36:04] hahuang61: has joined #RubyOnRails
[00:36:13] mikecmpbll: has joined #RubyOnRails
[00:37:18] y2mq37: has joined #RubyOnRails
[00:37:25] ensyde: has joined #RubyOnRails
[00:38:00] mickey_mouse: has joined #RubyOnRails
[00:40:43] manfrin: has joined #RubyOnRails
[00:41:27] swarm_lurker: has joined #RubyOnRails
[00:41:30] tildes: has joined #RubyOnRails
[00:41:35] mostlybadfly: has joined #RubyOnRails
[00:41:56] djbkd: has joined #RubyOnRails
[00:42:15] ElFerna: has joined #RubyOnRails
[00:42:42] chouhoulis: has joined #RubyOnRails
[00:44:08] smathy: tfdd_dude, if you change your mind and add the file contents just ping me with my nick.
[00:44:34] psvcb: has joined #RubyOnRails
[00:45:14] baweaver: has joined #RubyOnRails
[00:45:40] chintanparikh: has joined #RubyOnRails
[00:48:43] benlieb: has joined #RubyOnRails
[00:48:58] manfrin: has joined #RubyOnRails
[00:49:00] ravster: has joined #RubyOnRails
[00:50:51] askhat: has joined #RubyOnRails
[00:51:43] kknight: help in debugging https://gist.github.com/aj07/794468a5f6f92ea63dfb
[00:55:20] samgranieri: has joined #RubyOnRails
[00:55:27] Sadin: has joined #RubyOnRails
[00:55:54] TinkerTyper: has joined #RubyOnRails
[00:56:10] s2013: has joined #RubyOnRails
[00:58:05] smathy: kknight, https://gist.github.com/aj07/794468a5f6f92ea63dfb#file-controller-code-L56 you set website (not @website) and so @website is nil here: https://gist.github.com/aj07/794468a5f6f92ea63dfb#file-html-erb-file-L48
[01:00:36] maesitos: has joined #RubyOnRails
[01:00:45] quazimodo: I have a custom rule in /etc/udev/rules.d such that when my IBM Model M keyboard is plugged in, it'll run another script to change my keybindings via xkbcomp https://gist.github.com/siassaj/2fbefdb53fe6c65a4db7
[01:01:04] quazimodo: wrong channel, please ignore!
[01:02:25] maesitos_: has joined #RubyOnRails
[01:03:32] TinkerTyper: has joined #RubyOnRails
[01:04:01] rew: has joined #RubyOnRails
[01:04:18] maesitos: has joined #RubyOnRails
[01:04:25] rubyonrailed: has joined #RubyOnRails
[01:04:29] yeapiekiyay: has joined #RubyOnRails
[01:06:15] maesitos: has joined #RubyOnRails
[01:07:08] krzkrz: has joined #RubyOnRails
[01:08:04] maesitos: has joined #RubyOnRails
[01:08:08] askhat: has joined #RubyOnRails
[01:08:18] atan: has joined #RubyOnRails
[01:10:00] maesitos: has joined #RubyOnRails
[01:10:12] tildes: has joined #RubyOnRails
[01:11:52] maesitos_: has joined #RubyOnRails
[01:13:47] maesitos: has joined #RubyOnRails
[01:15:02] pawnbox: has joined #RubyOnRails
[01:15:45] maesitos: has joined #RubyOnRails
[01:17:34] maesitos: has joined #RubyOnRails
[01:19:26] maesitos: has joined #RubyOnRails
[01:20:39] SteenJobs: has joined #RubyOnRails
[01:20:53] eljimmy: has joined #RubyOnRails
[01:21:19] maesitos: has joined #RubyOnRails
[01:23:09] maesitos_: has joined #RubyOnRails
[01:23:11] rubyonrailed: has joined #RubyOnRails
[01:25:04] maesitos: has joined #RubyOnRails
[01:25:23] askhat: has joined #RubyOnRails
[01:25:56] baweaver: has joined #RubyOnRails
[01:26:40] Maletor: has joined #RubyOnRails
[01:26:51] kzsh: has joined #RubyOnRails
[01:26:57] maesitos: has joined #RubyOnRails
[01:28:10] JoshGlzBrk: has joined #RubyOnRails
[01:30:41] maesitos: has joined #RubyOnRails
[01:30:55] bfrog: has joined #RubyOnRails
[01:31:05] bfrog: has left #RubyOnRails: ("WeeChat 1.4")
[01:31:10] yeapiekiyay: has left #RubyOnRails: ()
[01:31:14] yeapiekiyay: has joined #RubyOnRails
[01:31:33] samgranieri: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[01:31:42] n1lo: has joined #RubyOnRails
[01:32:26] yeapiekiyay: Does anyone here use atom for rails projects?
[01:32:37] maesitos: has joined #RubyOnRails
[01:32:46] roshanavand: has joined #RubyOnRails
[01:34:29] maesitos_: has joined #RubyOnRails
[01:35:58] hardtail: has joined #RubyOnRails
[01:36:18] maesitos: has joined #RubyOnRails
[01:37:52] AntiSpamMeta: has joined #RubyOnRails
[01:38:13] maesitos: has joined #RubyOnRails
[01:40:05] maesitos_: has joined #RubyOnRails
[01:41:08] djbkd: has joined #RubyOnRails
[01:41:24] NeoHamled: has joined #RubyOnRails
[01:41:46] djbkd: has joined #RubyOnRails
[01:42:01] maesitos: has joined #RubyOnRails
[01:43:32] SteenJobs: has joined #RubyOnRails
[01:43:40] chouhoulis: has joined #RubyOnRails
[01:43:50] maesitos_: has joined #RubyOnRails
[01:45:43] maesitos: has joined #RubyOnRails
[01:46:40] yeapiekiyay: Well, then. I guess no one's actually active in here at the moment? :P
[01:47:36] maesitos: has joined #RubyOnRails
[01:49:28] maesitos: has joined #RubyOnRails
[01:51:21] maesitos_: has joined #RubyOnRails
[01:51:25] Devalo: has joined #RubyOnRails
[01:53:18] maesitos: has joined #RubyOnRails
[01:54:46] pawnbox: has joined #RubyOnRails
[01:55:29] maesitos: has joined #RubyOnRails
[01:56:48] DoctorMonocular: has joined #RubyOnRails
[01:57:00] maesitos: has joined #RubyOnRails
[01:58:55] maesitos_: has joined #RubyOnRails
[01:59:16] yoongkang: has joined #RubyOnRails
[02:00:50] maesitos: has joined #RubyOnRails
[02:02:41] maesitos: has joined #RubyOnRails
[02:04:32] maesitos: has joined #RubyOnRails
[02:06:25] maesitos: has joined #RubyOnRails
[02:08:20] maesitos_: has joined #RubyOnRails
[02:09:13] eljimmy: has joined #RubyOnRails
[02:10:11] maesitos_: has joined #RubyOnRails
[02:10:36] grahamsavage_: has joined #RubyOnRails
[02:11:15] MaDErroR123: has joined #RubyOnRails
[02:12:04] maesitos: has joined #RubyOnRails
[02:12:23] symbol: has joined #RubyOnRails
[02:12:42] Coldblackice: has joined #RubyOnRails
[02:12:44] grahamsavage_: has joined #RubyOnRails
[02:13:58] maesitos_: has joined #RubyOnRails
[02:14:45] grahamsavage_: has joined #RubyOnRails
[02:15:50] maesitos_: has joined #RubyOnRails
[02:17:44] maesitos: has joined #RubyOnRails
[02:18:07] eGGsha: has joined #RubyOnRails
[02:19:37] maesitos: has joined #RubyOnRails
[02:20:11] greengriminal: has joined #RubyOnRails
[02:21:28] yoongkang: has joined #RubyOnRails
[02:21:28] maesitos: has joined #RubyOnRails
[02:22:36] stardiviner: has joined #RubyOnRails
[02:23:22] maesitos: has joined #RubyOnRails
[02:24:19] pawnbox: has joined #RubyOnRails
[02:25:10] quazimodo: yeapiekiyay: lots of people I work with use atom, why?
[02:25:13] maesitos: has joined #RubyOnRails
[02:25:22] pawnbox_: has joined #RubyOnRails
[02:26:32] pawnbox: has joined #RubyOnRails
[02:26:59] yeapiekiyay: quazimodo: I'm curious as to what packages are highly recommended for rails development with atom.
[02:27:33] pawnbox: has joined #RubyOnRails
[02:27:44] rew: has joined #RubyOnRails
[02:28:11] havenwood: yeapiekiyay: the default ruby and ruby-on-rails packages are nice
[02:28:40] havenwood: yeapiekiyay: ruby-block gives nice block highlighting
[02:29:00] maesitos: has joined #RubyOnRails
[02:29:16] rew: has joined #RubyOnRails
[02:29:45] nettoweb: has joined #RubyOnRails
[02:29:55] havenwood: yeapiekiyay: the merge-conflicts package isn't Rails-specific but it's the best merge tool i've worked with
[02:30:55] maesitos: has joined #RubyOnRails
[02:32:12] nettoweb: has joined #RubyOnRails
[02:32:34] yeapiekiyay: havenwood: ooo, i like. :)
[02:32:48] maesitos: has joined #RubyOnRails
[02:32:52] yoongkang: has joined #RubyOnRails
[02:33:00] shmilan: has joined #RubyOnRails
[02:34:02] quazimodo: yeapiekiyay: i can ask
[02:34:34] yeapiekiyay: quazimodo: it'd be highly appreciated! i'll whisper you my email, if you wouldn't mind shooting me the info your coworkers provide you with. :)
[02:34:40] maesitos: has joined #RubyOnRails
[02:36:24] yeapiekiyay: havenwood: thanks for the tips! i grabbed the merge-conflicts and ruby-block packages. atom came with the others. so, i'm all good there!
[02:36:30] maesitos: has joined #RubyOnRails
[02:36:48] yfeldblum: has joined #RubyOnRails
[02:38:26] yoongkang: has joined #RubyOnRails
[02:38:27] maesitos: has joined #RubyOnRails
[02:40:17] maesitos: has joined #RubyOnRails
[02:40:26] AntiSpamMeta: has joined #RubyOnRails
[02:41:18] shmilan: has joined #RubyOnRails
[02:42:12] maesitos: has joined #RubyOnRails
[02:43:00] ss_much: has joined #RubyOnRails
[02:43:28] J30: has joined #RubyOnRails
[02:44:07] maesitos: has joined #RubyOnRails
[02:44:25] chouhoulis: has joined #RubyOnRails
[02:45:59] maesitos_: has joined #RubyOnRails
[02:47:08] SteenJobs: it???s been a year since my last rails app???anyone have a list of gems for standard apps?
[02:47:29] jon31: smathy: erasing the deployed directory and redeploying from scratch helped. I just don't like not knowing why it broke and why the gems were outdated. This is the capistrano output before i deleted the directory. it was running bundle install i see: https://gist.github.com/slavajacobson/00c23440aea758710b20
[02:47:51] maesitos: has joined #RubyOnRails
[02:49:08] aloneintheworld: has joined #RubyOnRails
[02:49:11] professor_sadasd: has joined #RubyOnRails
[02:49:42] maesitos: has joined #RubyOnRails
[02:49:50] deweysdecimal: has joined #RubyOnRails
[02:49:57] ravster: has joined #RubyOnRails
[02:51:15] chintanparikh: has joined #RubyOnRails
[02:51:35] maesitos: has joined #RubyOnRails
[02:52:52] pawnbox: has joined #RubyOnRails
[02:53:30] maesitos: has joined #RubyOnRails
[02:55:22] maesitos_: has joined #RubyOnRails
[02:55:49] eljimbo: has joined #RubyOnRails
[02:57:01] roshanavand: has joined #RubyOnRails
[02:57:17] maesitos: has joined #RubyOnRails
[02:57:19] DmitryBochkarev: has joined #RubyOnRails
[02:58:03] jon31: noooooooooooo
[02:59:29] jon31: i just noticed that the gem version is correct, but for some reason it tries to find nokogiri parser in a folder of every gem.. for example:
[02:59:35] jon31: open("/home/deployer/apps/loco-engine/shared/bundle/ruby/2.2.0/gems/http-cookie-1.0.2/lib/nokogiri/html/sax/parser.rb", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[03:01:03] maesitos_: has joined #RubyOnRails
[03:02:54] maesitos: has joined #RubyOnRails
[03:03:33] jon31: or for example: stat64("/home/deployer/apps/loco-engine/shared/bundle/ruby/2.2.0/gems/devise-2.2.7/app/mailers/base", 0xbfefc4d0) = -1 ENOENT (No such file or directory)
[03:03:43] jon31: base doesn't exist in mailers
[03:03:57] jon31: somehow it got messed up?? :-/
[03:04:31] jon31: open("/home/deployer/apps/loco-engine/shared/bundle/ruby/2.2.0/gems/responders-0.9.3/lib/locomotive/photospheres_helper.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[03:04:48] maesitos: has joined #RubyOnRails
[03:04:49] s2013: has joined #RubyOnRails
[03:04:52] jon31: 32mb log file of these errors
[03:05:55] jtong: has joined #RubyOnRails
[03:06:35] shmilan: has joined #RubyOnRails
[03:08:35] maesitos: has joined #RubyOnRails
[03:09:37] eGGsha: has joined #RubyOnRails
[03:10:27] maesitos: has joined #RubyOnRails
[03:12:21] maesitos: has joined #RubyOnRails
[03:14:01] shmilan: has joined #RubyOnRails
[03:14:14] maesitos: has joined #RubyOnRails
[03:14:56] rattatmatt: has joined #RubyOnRails
[03:15:31] griffindy: has joined #RubyOnRails
[03:16:07] maesitos: has joined #RubyOnRails
[03:17:58] maesitos: has joined #RubyOnRails
[03:18:05] crdpink: has joined #RubyOnRails
[03:18:40] bePolite: has joined #RubyOnRails
[03:18:40] bePolite: has joined #RubyOnRails
[03:18:43] chintanparikh: has joined #RubyOnRails
[03:19:52] maesitos: has joined #RubyOnRails
[03:20:53] neilfse: has joined #RubyOnRails
[03:21:16] NBarnes: has joined #RubyOnRails
[03:21:43] maesitos: has joined #RubyOnRails
[03:21:57] quazimodo: anyone been playing with action cable?
[03:22:04] quazimodo: what kind of capacity does it have?
[03:22:16] quazimodo: our faye server is a piece of crap
[03:22:46] pawnbox: has joined #RubyOnRails
[03:23:12] krzkrz: has joined #RubyOnRails
[03:25:28] maesitos: has joined #RubyOnRails
[03:25:30] shmilan: has joined #RubyOnRails
[03:27:22] maesitos_: has joined #RubyOnRails
[03:29:18] maesitos: has joined #RubyOnRails
[03:30:36] NBarnes: has joined #RubyOnRails
[03:31:08] maesitos: has joined #RubyOnRails
[03:31:59] djbkd: has joined #RubyOnRails
[03:32:38] djbkd: has joined #RubyOnRails
[03:33:17] pawnbox: has joined #RubyOnRails
[03:33:30] rubyonrailed: has joined #RubyOnRails
[03:35:09] NBarnes: has joined #RubyOnRails
[03:35:54] jon31: smathy_afk: but as soon as i rebooted the server, it got messed up again, strace of puma process is producing a huge error output and it keeps on restarting. it keeps trying to open some non existing files that are not even meant to be there
[03:39:15] jgt4: has joined #RubyOnRails
[03:39:41] NBarnes: has joined #RubyOnRails
[03:41:55] NBarnes: has joined #RubyOnRails
[03:42:58] rhizome: quazimodo: what's crappy about faye?
[03:43:12] yeapiekiyay: i'm out! you all have a nice night! :)
[03:43:15] symbol: has joined #RubyOnRails
[03:45:12] chouhoulis: has joined #RubyOnRails
[03:46:31] moeabdol: has joined #RubyOnRails
[03:47:04] NBarnes: has joined #RubyOnRails
[03:47:54] moeabdol1: has joined #RubyOnRails
[03:49:49] barhum2013: has joined #RubyOnRails
[03:49:50] askhat: has joined #RubyOnRails
[03:51:26] NBarnes: has joined #RubyOnRails
[03:52:45] Devalo: has joined #RubyOnRails
[03:55:22] NBarnes: has joined #RubyOnRails
[03:56:02] tego101: has joined #RubyOnRails
[03:57:11] chipotle_: has joined #RubyOnRails
[03:58:45] pawnbox: has joined #RubyOnRails
[03:58:54] MaDErroR123: has joined #RubyOnRails
[03:59:29] NBarnes: has joined #RubyOnRails
[04:00:02] blackmesa: has joined #RubyOnRails
[04:02:23] KensoDev: has joined #RubyOnRails
[04:03:09] tego101: has joined #RubyOnRails
[04:04:32] KitsuneDrag0n: has joined #RubyOnRails
[04:05:05] dopamean_: has joined #RubyOnRails
[04:05:48] roshanavand: has joined #RubyOnRails
[04:06:24] krzkrz: has joined #RubyOnRails
[04:06:44] shmilan: has joined #RubyOnRails
[04:07:04] TinkerTyper: has joined #RubyOnRails
[04:08:09] quazimodo: rhizome: _our_ faye server is being a piece of crap
[04:08:24] quazimodo: i'm not sure if faye's reliable and can handle good load for everyone or not :)
[04:08:32] quazimodo: I think we need to switch to the nodejs server
[04:10:29] treaki: has joined #RubyOnRails
[04:10:50] hahuang61: has joined #RubyOnRails
[04:11:50] bga57: has joined #RubyOnRails
[04:12:54] shmilan: has joined #RubyOnRails
[04:13:03] pawnbox: has joined #RubyOnRails
[04:14:09] braincrash: has joined #RubyOnRails
[04:15:46] NBarnes: has joined #RubyOnRails
[04:17:29] NBarnes: has joined #RubyOnRails
[04:21:00] sarink: has joined #RubyOnRails
[04:23:50] NBarnes: has joined #RubyOnRails
[04:25:29] NBarnes: has joined #RubyOnRails
[04:29:23] shmilan: has joined #RubyOnRails
[04:32:40] stardiviner: has joined #RubyOnRails
[04:32:57] bratsche_: has joined #RubyOnRails
[04:33:09] axilla_: has joined #RubyOnRails
[04:33:30] duderonomy: has joined #RubyOnRails
[04:38:54] rubyonrailed: has joined #RubyOnRails
[04:41:11] braincra-: has joined #RubyOnRails
[04:41:58] hinbody: has joined #RubyOnRails
[04:42:38] kirillzh: has joined #RubyOnRails
[04:44:06] rhizome: seems like something that should at least not be a piece of crap, whether that's ops or platform is up to you :)
[04:44:25] rhizome: that looks like a terrible sentence, sorry
[04:45:54] chouhoulis: has joined #RubyOnRails
[04:46:30] professor_sadasd: has left #RubyOnRails: ()
[04:50:56] ravster: has joined #RubyOnRails
[04:51:00] moeabdol1: has joined #RubyOnRails
[04:52:06] Honeycomb: has joined #RubyOnRails
[04:53:31] baweaver: has joined #RubyOnRails
[04:53:32] moeabdol: has joined #RubyOnRails
[04:56:29] IrishGringo: has joined #RubyOnRails
[05:00:15] Eswar: has joined #RubyOnRails
[05:01:25] blackmesa: has joined #RubyOnRails
[05:06:58] pawnbox: has joined #RubyOnRails
[05:08:08] maxx88: has joined #RubyOnRails
[05:09:30] youngmathimus0: has joined #RubyOnRails
[05:12:02] youngmathimus0: has left #RubyOnRails: ()
[05:12:09] youngmathimus0: has joined #RubyOnRails
[05:14:24] chintanparikh: has joined #RubyOnRails
[05:15:47] youngmathimus0: how to put hello world?
[05:25:36] srinidhi: has joined #RubyOnRails
[05:28:15] madebymarkca: has joined #RubyOnRails
[05:28:37] tildes: has joined #RubyOnRails
[05:29:40] djbkd: has joined #RubyOnRails
[05:29:50] ensyde_: has joined #RubyOnRails
[05:31:09] apotry: has joined #RubyOnRails
[05:32:00] maesitos: has joined #RubyOnRails
[05:32:50] chintanparikh1: has joined #RubyOnRails
[05:34:14] moeabdol1: has joined #RubyOnRails
[05:34:38] krzkrz: has joined #RubyOnRails
[05:35:22] moeabdol2: has joined #RubyOnRails
[05:37:38] procfile: has joined #RubyOnRails
[05:37:46] betafive: has joined #RubyOnRails
[05:38:12] sarink: has joined #RubyOnRails
[05:40:19] procfile: has left #RubyOnRails: ()
[05:40:38] roshanavand: has joined #RubyOnRails
[05:40:44] proc-file: has joined #RubyOnRails
[05:40:53] rvanlieshout: has joined #RubyOnRails
[05:40:57] proc-file: has left #RubyOnRails: ()
[05:42:23] procfile: has joined #RubyOnRails
[05:42:32] Pazician: has joined #RubyOnRails
[05:42:33] procfile: has left #RubyOnRails: ()
[05:43:26] procfile: has joined #RubyOnRails
[05:43:33] procfile: has left #RubyOnRails: ()
[05:43:59] ur5us: has joined #RubyOnRails
[05:44:25] Eswar: has joined #RubyOnRails
[05:46:40] chouhoulis: has joined #RubyOnRails
[05:46:57] grahamsavage_: has joined #RubyOnRails
[05:47:03] MaDErroR123: has joined #RubyOnRails
[05:47:30] processid: has joined #RubyOnRails
[05:47:53] processid: has left #RubyOnRails: ()
[05:48:53] grahamsavage_: has joined #RubyOnRails
[05:49:11] pyemkey: has joined #RubyOnRails
[05:50:09] processid: has joined #RubyOnRails
[05:50:19] lele: has joined #RubyOnRails
[05:50:24] processid: every once in a while I see 'AppName::Application.routes.draw do' 'Rails.application.routes.draw do', is that just an old rails syntax? Or is there a difference?
[05:50:28] apotry: has joined #RubyOnRails
[05:55:59] EMCHAMP_: has joined #RubyOnRails
[05:57:43] pyemkey: has joined #RubyOnRails
[05:58:43] rhizome: yes, rails 3 vs 4
[05:59:39] processid: thanks rhizome
[05:59:57] jahbrewski: has joined #RubyOnRails
[06:00:20] rhizome: you're welcome
[06:00:28] processid: I never did rails 3, so it's been making me paranoid that I have been doing something wrong with my routes
[06:00:44] rvanlieshout: hehe. wait untill you see some Rails 1 or 2 magic
[06:00:49] Devalo: has joined #RubyOnRails
[06:02:00] rhizome: i have some 2 laying around in appname.bak's
[06:02:52] processid: I just hate when I'm working on things, and everything seems fine, but my code is different then the example. Makes feel like it well break any minute >:|
[06:04:24] blackmesa: has joined #RubyOnRails
[06:05:27] processid: happens all the time no mater what language I use, so I guess I should be used to it by now though
[06:10:30] speakingcode: has joined #RubyOnRails
[06:18:07] krzkrz: has joined #RubyOnRails
[06:19:46] darrik: has joined #RubyOnRails
[06:19:55] Macaveli: has joined #RubyOnRails
[06:21:55] Macaveli: has joined #RubyOnRails
[06:23:15] mdw: has joined #RubyOnRails
[06:23:40] youngmathimus0: Try and stick with examples from within the last 3 years
[06:28:51] aganov: has joined #RubyOnRails
[06:29:59] jahbrewski: has joined #RubyOnRails
[06:32:26] ur5us: has joined #RubyOnRails
[06:32:38] arup_r: has joined #RubyOnRails
[06:32:47] Eswar: has joined #RubyOnRails
[06:35:18] Macaveli: has joined #RubyOnRails
[06:39:03] sarink: has joined #RubyOnRails
[06:39:50] gmas: has joined #RubyOnRails
[06:44:34] nodejunkie: has joined #RubyOnRails
[06:47:27] chouhoulis: has joined #RubyOnRails
[06:47:35] lxsameer: has joined #RubyOnRails
[06:48:26] solars: has joined #RubyOnRails
[06:51:53] ravster: has joined #RubyOnRails
[06:55:53] prgmmr: has joined #RubyOnRails
[06:56:50] gingray: has joined #RubyOnRails
[06:57:01] tego101: has joined #RubyOnRails
[06:57:29] intrigueD: has joined #RubyOnRails
[06:58:02] Eswar: has joined #RubyOnRails
[06:59:17] yogeshrt: has joined #RubyOnRails
[06:59:59] jahbrewski: has joined #RubyOnRails
[07:01:20] SteenJobs: has joined #RubyOnRails
[07:03:18] moeabdol: has joined #RubyOnRails
[07:05:47] blackmesa: has joined #RubyOnRails
[07:07:03] mhoungbo: has joined #RubyOnRails
[07:10:26] roshanavand: has joined #RubyOnRails
[07:11:53] greengriminal: has joined #RubyOnRails
[07:12:09] bePolite: has joined #RubyOnRails
[07:12:21] pawnbox: has joined #RubyOnRails
[07:13:05] intrigueD: has joined #RubyOnRails
[07:14:35] scepticulous: has joined #RubyOnRails
[07:16:44] Spami: has joined #RubyOnRails
[07:18:33] pawnbox: has joined #RubyOnRails
[07:22:16] Tempesta: has joined #RubyOnRails
[07:23:13] techsethi: has joined #RubyOnRails
[07:23:46] AimlessRAven: has joined #RubyOnRails
[07:23:51] Palsson: has joined #RubyOnRails
[07:24:06] AimlessRAven: hi someone knows how to test monetize fielf with rspec
[07:24:22] AimlessRAven: my error is ActiveModel::MissingAttributeError: can't write unknown attribute `price_cents`
[07:24:39] rvanlieshout: AimlessRaven: is there an attribute price_cents
[07:24:50] AimlessRAven: yea the wrong comes here monetize :price_cents
[07:25:17] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[07:27:21] Pazician: has joined #RubyOnRails
[07:27:26] AimlessRAven: https://gist.github.com/anonymous/12126d5f926f8fcb3e7b
[07:29:59] jahbrewski: has joined #RubyOnRails
[07:30:48] pawnbox: has joined #RubyOnRails
[07:32:33] dionysus69: has joined #RubyOnRails
[07:32:53] maesitos: has joined #RubyOnRails
[07:33:09] rvanlieshout: AimlessRaven: include db/schema.rb
[07:33:37] rafaelfranca: has joined #RubyOnRails
[07:35:55] AimlessRAven: https://gist.github.com/anonymous/b60dab97f7eef2a4a864
[07:35:57] nfsnobody: has joined #RubyOnRails
[07:36:06] penguinpowernz: has joined #RubyOnRails
[07:36:23] yogeshrt: has joined #RubyOnRails
[07:36:42] PedramT: has joined #RubyOnRails
[07:37:14] rvanlieshout: it would help if you would gist separate files (cause gist supports it)
[07:39:32] MaDErroR123: has joined #RubyOnRails
[07:40:05] rvanlieshout: run it with --trace
[07:40:58] pawnbox: has joined #RubyOnRails
[07:41:01] sarink: has joined #RubyOnRails
[07:42:49] kirillzh: has joined #RubyOnRails
[07:43:44] Eswar: has joined #RubyOnRails
[07:45:03] pawnbox: has joined #RubyOnRails
[07:46:46] arup_r: has joined #RubyOnRails
[07:48:13] chouhoulis: has joined #RubyOnRails
[07:48:57] null__: has joined #RubyOnRails
[07:49:39] jas02: has joined #RubyOnRails
[07:50:58] null__: could someone help point me in the right direction with some routes I'm trying to setup? I have a Property model with an association to an Area model via area_id. I'd like to do /properties/[area-slug]/[property-slug]
[07:54:32] PedramT: has joined #RubyOnRails
[07:56:53] quazimodo: has joined #RubyOnRails
[07:57:33] roshanavand: has joined #RubyOnRails
[07:59:33] null__: right now I'm selecting the area via an area param
[07:59:52] artto: has joined #RubyOnRails
[07:59:57] jahbrewski: has joined #RubyOnRails
[08:01:52] rvanlieshout: that won't change, null__
[08:02:04] rvanlieshout: you could have a custom route /properties/:area_slug/:property_slug
[08:05:26] duncannz: has joined #RubyOnRails
[08:07:11] blackmesa: has joined #RubyOnRails
[08:10:38] yogeshrt: has joined #RubyOnRails
[08:10:39] uberjar: has joined #RubyOnRails
[08:11:55] darutoko: has joined #RubyOnRails
[08:12:33] null__: rvanlieshout: okay -- thanks. I thought there might be something I could do with "resources :properties, param: :area" but I couldn't find much documentation on it
[08:13:08] nfsnobody: has joined #RubyOnRails
[08:13:27] rvanlieshout: there are things to prefix it
[08:13:32] rvanlieshout: or use a nested resource
[08:13:55] kirillzh: has joined #RubyOnRails
[08:15:17] kirillzh: has joined #RubyOnRails
[08:16:32] Palsson_: has joined #RubyOnRails
[08:16:54] Ergo: has joined #RubyOnRails
[08:18:07] PedramT: has joined #RubyOnRails
[08:19:25] pawnbox: has joined #RubyOnRails
[08:19:46] johnflux_: has joined #RubyOnRails
[08:20:46] krzkrz: has joined #RubyOnRails
[08:21:41] yfeldblum: has joined #RubyOnRails
[08:23:14] Devalo: has joined #RubyOnRails
[08:24:38] dcunit3d: has joined #RubyOnRails
[08:24:44] pawnbox: has joined #RubyOnRails
[08:25:04] Eswar: has joined #RubyOnRails
[08:25:22] nocontrol: has joined #RubyOnRails
[08:25:37] nocontrol: hi all, can anyone help with Action Cable ? http://stackoverflow.com/questions/35310037/how-to-filter-results-before-broadcasting-with-actioncable-in-rails-5
[08:26:58] solars: has joined #RubyOnRails
[08:27:26] comrad: has joined #RubyOnRails
[08:27:58] defsdoor: has joined #RubyOnRails
[08:33:05] arBmind1: has joined #RubyOnRails
[08:38:07] roshanav_: has joined #RubyOnRails
[08:38:47] kitsuneyo: has joined #RubyOnRails
[08:41:47] sarink: has joined #RubyOnRails
[08:43:17] srinidhi: has joined #RubyOnRails
[08:44:57] jahbrewski: has joined #RubyOnRails
[08:49:06] chouhoulis: has joined #RubyOnRails
[08:50:03] msyvich: has joined #RubyOnRails
[08:51:18] pawnbox: has joined #RubyOnRails
[08:52:52] ravster: has joined #RubyOnRails
[08:52:55] lipoqil: has joined #RubyOnRails
[08:54:15] snowy: has joined #RubyOnRails
[08:54:23] mdw: has joined #RubyOnRails
[08:54:51] PedramT: has joined #RubyOnRails
[08:55:43] robbyoconnor: has joined #RubyOnRails
[08:59:30] EdwardIII: hrm odd. i'm sure FKs were getting saved on this model before i went to bed last night, then this morning the fks are going in as null
[08:59:36] defsdoor: has joined #RubyOnRails
[09:00:25] null__: well, I got the routes setup -- I'm just running into an issue with simple_form now: https://gist.github.com/anonymous/d62dc68c441cc39f8a7f
[09:01:08] mark4: has joined #RubyOnRails
[09:02:59] rubyonrailed: has joined #RubyOnRails
[09:03:18] mikecmpbll: has joined #RubyOnRails
[09:03:22] fwaokda: has joined #RubyOnRails
[09:03:46] floror: has joined #RubyOnRails
[09:04:30] arup_r: EdwardIII: :)
[09:05:03] artto: has joined #RubyOnRails
[09:05:40] arup_r: you must enable null: false in DB migration for foreign key columns..
[09:06:29] roshanavand: has joined #RubyOnRails
[09:07:37] rodfersou: has joined #RubyOnRails
[09:08:31] benlieb: has joined #RubyOnRails
[09:08:33] null__: if I use edit_property_path(@property.area.slug, @property.id) in my _form.html it all works, by the way
[09:08:34] blackmesa: has joined #RubyOnRails
[09:08:44] jtong: has joined #RubyOnRails
[09:09:38] jsrn_: has joined #RubyOnRails
[09:11:02] Bloomer: has joined #RubyOnRails
[09:12:00] DoubleMalt: has joined #RubyOnRails
[09:14:00] ewnd9: has joined #RubyOnRails
[09:14:53] null__: hm I think I'm not supposed to use an instance model in a template partial
[09:14:55] jahbrewski: has joined #RubyOnRails
[09:14:59] null__: instance variable, I mean
[09:15:07] betafive: has joined #RubyOnRails
[09:16:17] ewnd9: has joined #RubyOnRails
[09:16:39] kitsuneyo: has joined #RubyOnRails
[09:20:54] EdwardIII: the docs say "When the :autosave option is not present then new association records are saved but the updated association records are not saved." my relation is getting saved when i say parent.child = new Child() then parent.save, i can see child going into the db, but parent.child_id stays nill?
[09:20:58] jottr: has joined #RubyOnRails
[09:21:07] EdwardIII: (i did stick autosave: true on boht sides of the relation to be safe)
[09:25:19] floror: has joined #RubyOnRails
[09:26:44] EdwardIII: hrm i guess parent.child = Child.new is the wrong way to create the association
[09:28:13] PedramT: has joined #RubyOnRails
[09:28:51] blackmesa: has joined #RubyOnRails
[09:30:30] srinidhi1: has joined #RubyOnRails
[09:33:04] defsdoor: Child.new doesnt have an id yet
[09:33:26] defsdoor: parent.child = Child.create might be better
[09:33:29] arBmind: has joined #RubyOnRails
[09:35:25] rvanlieshout: parent.build_child
[09:36:46] sarink: has joined #RubyOnRails
[09:36:51] EdwardIII: ah, sorry that is in association_basics
[09:36:55] EdwardIII: i should have rtfm properly
[09:38:42] tvw: has joined #RubyOnRails
[09:39:03] EdwardIII: grrr even with build_<association> the same thing happens, lemme gist some code
[09:41:20] EdwardIII: https://gist.github.com/EdwardIII/d1d0ac1100694a6252a8
[09:41:58] EdwardIII: https://gist.github.com/EdwardIII/d1d0ac1100694a6252a8#file-c-rb-L7 is where i save it. do i have to save the booking_response first or something?
[09:43:11] tbuehlmann: EdwardIII, why do you define an #id method?
[09:43:31] nocontrol: hi all, can anyone help with Action Cable ? http://stackoverflow.com/questions/35310037/how-to-filter-results-before-broadcasting-with-actioncable-in-rails-5
[09:43:44] EdwardIII: that's what's breaking it isn't it heh
[09:43:58] EdwardIII: because the booking responses have a unique id that the api provider gives them which i wanted a shorthand to access
[09:44:06] yogeshrt: has joined #RubyOnRails
[09:44:18] EdwardIII: but that's wrong, either i should use a different name or use that id as the actual db id too i guess
[09:44:56] jahbrewski: has joined #RubyOnRails
[09:46:41] apg_: has joined #RubyOnRails
[09:47:23] yfeldblum: has joined #RubyOnRails
[09:48:09] pawnbox: has joined #RubyOnRails
[09:48:12] FooMunki: has joined #RubyOnRails
[09:48:56] EdwardIII: thanks tbuehlmann
[09:49:49] EdwardIII: more generally, when i'm getting responses from the api i'm just banging them into my own object, storing them in an attribute called 'contents' then doing def []() and some methods for special bits, e.g. arrival_date so i can convert the string into a real date
[09:49:51] chouhoulis: has joined #RubyOnRails
[09:50:03] EdwardIII: i know i'm creating some risk e.g. if the api changes or i want to use a different api
[09:50:33] EdwardIII: but in symfony we had to use this huge, slow, ugly and unwiedly hydration system which i'd like to avoid
[09:50:45] EdwardIII: whaddya you guys do in this situation?
[09:51:09] arup_r1: has joined #RubyOnRails
[09:51:33] kitsuneyo: has joined #RubyOnRails
[09:52:32] apg_: has joined #RubyOnRails
[09:52:49] AzaToth: has joined #RubyOnRails
[09:52:56] bruce__lee: has joined #RubyOnRails
[09:53:15] tbuehlmann: EdwardIII, what about saving the API response in your model, including the object id as "origin_id" oder something?
[09:53:40] EdwardIII: tbuehlmann: yeah that's what i've done which has solved that issues (thanks for the pointer)
[09:53:46] EdwardIII: issues/issue
[09:53:55] EdwardIII: but i'm wondering like generally, is this a sane approach?
[09:54:27] Eswar: has joined #RubyOnRails
[09:54:52] EdwardIII: let the model basically deal with the hydrate aspect (turning date strings into datetimes etc) rather than delegating that to some kind of hydration object
[09:55:24] kitsuneyo: has joined #RubyOnRails
[09:56:03] tbuehlmann: I see pros and cons for both options
[09:56:12] sergey_makagon: has joined #RubyOnRails
[09:56:20] tetraktys: has joined #RubyOnRails
[09:56:26] PedramT: has joined #RubyOnRails
[09:57:22] EdwardIII: simplicity vs extra complexity for the bonus of better abstraction you mean?
[09:57:55] tbuehlmann: yes, like that
[09:59:14] pawnbox: has joined #RubyOnRails
[10:02:38] PedramT: has joined #RubyOnRails
[10:04:11] pawnbox: has joined #RubyOnRails
[10:04:52] rubyonrailed: has joined #RubyOnRails
[10:05:54] lacrymology: has joined #RubyOnRails
[10:07:31] maesitos: has joined #RubyOnRails
[10:08:10] daganev: has joined #RubyOnRails
[10:09:13] marr: has joined #RubyOnRails
[10:09:25] daganev: Looking for some help with this question here: http://stackoverflow.com/questions/35309663/how-can-i-inform-the-user-of-an-error-in-a-different-activerecord
[10:09:54] rvanlieshout: daganev: run it in a transaction
[10:09:54] maesitos: has joined #RubyOnRails
[10:10:09] rvanlieshout: and update with !, so that it'll perform a rollback
[10:10:15] rvanlieshout: rescue that and notify user
[10:10:57] daganev: Ok, if I google transaction, and rescue will I understand what you are saying? :)
[10:11:16] daganev: I'm able to print out the roll back and error when it happens
[10:11:46] rvanlieshout: well.. if you wrap this in a db transaction
[10:11:58] rvanlieshout: and have your update fail hard (e.g. throw an exception)
[10:12:05] rvanlieshout: it'll revert all changes within that transaction
[10:12:15] johnflux: has joined #RubyOnRails
[10:12:19] rvanlieshout: so when you have saved 10 instances
[10:12:25] rvanlieshout: and the 11th fails, it'll revert the first 10
[10:12:31] rvanlieshout: and throw that exception
[10:12:43] rvanlieshout: you rescue that exception outside of the transaction block
[10:12:45] rvanlieshout: to inform the user
[10:12:45] daganev: Ok, it seems to be doing that already
[10:13:00] msyvich: has joined #RubyOnRails
[10:13:28] daganev: So I just need to find a way to get the exception to the current view
[10:13:50] rvanlieshout: by using rescue
[10:14:04] daganev: Though I don't have any line of code that specifies a transaction
[10:14:27] rvanlieshout: it could be automatic, but you might want to explicitly enforce it
[10:14:31] daganev: But its rolling back everything and stopping anything futher from happenign
[10:14:56] jahbrewski: has joined #RubyOnRails
[10:15:26] Eswar: has joined #RubyOnRails
[10:15:32] rvanlieshout: it should roll back everything, no?
[10:15:47] daganev: Aha, I see that save an destroy are automatically wrapped in transactions
[10:15:52] daganev: and I am indeed using those.
[10:16:00] rvanlieshout: but all saves in a single transaction? or one per each?
[10:16:22] daganev: It loops through all the objects and only calls save at the end
[10:19:27] daganev: Seems its more complicated than I thought...
[10:20:02] daganev: Cause I don't know what happens behind the scenes when I call functions :P
[10:20:21] tvw: has joined #RubyOnRails
[10:21:07] krzkrzkrz: has joined #RubyOnRails
[10:21:16] coffeejunk: has joined #RubyOnRails
[10:21:45] kitsuneyo: has joined #RubyOnRails
[10:21:50] daganev: the function I'm suing are build, save, and first_or_initialize
[10:22:04] daganev: - functions I'm using
[10:22:31] daganev: Are all of those automatically transactions or should I wrap everything in a transaction?
[10:22:49] rvanlieshout: you're doing this for multiple objects, right?
[10:23:08] rvanlieshout: then i would wrap that complete thing in a transaction
[10:23:13] daganev: 3 sets of objects, one of which has objects of its own
[10:23:26] ferr: has joined #RubyOnRails
[10:23:41] rvanlieshout: start transaction block
[10:23:42] daganev: So its 3 loops with 1 being having a loop of its own inside
[10:23:43] rvanlieshout: try to update all
[10:23:47] rvanlieshout: rescue failure
[10:24:00] daganev: Ok sounds simple enough
[10:24:10] daganev: famous last words in rails...
[10:24:32] Devalo: has joined #RubyOnRails
[10:24:38] daganev: Do I have to know exactly what type of failure will happen?
[10:24:50] daganev: or will it catch all reasons for a rollback?
[10:24:59] rvanlieshout: you should catch specific ones
[10:25:21] herpless: has joined #RubyOnRails
[10:25:29] Skelz0r: has joined #RubyOnRails
[10:25:42] daganev: Ofcourse...
[10:27:34] Pazician: has joined #RubyOnRails
[10:28:03] daganev: if I'm going to delete all my objects and then create new ones, do I want to use delete or destroy?
[10:28:37] rvanlieshout: delete vs destroy depends on callbacks
[10:28:43] _3by8: has joined #RubyOnRails
[10:28:59] daganev: I want to forcefully remove the item and all things referencing the item.
[10:29:17] _3by8: So who has experience with sendmail and the hosts file on Linux? I'm sending out some emails with sendmail. I've been able to successfully send emails to Gmail recipients but not users with Microsoft emails. Here's a Gist of mail.log and my hosts file: https://gist.github.com/threebyeight/f6d58d002c75af264a6a
[10:29:32] rvanlieshout: if you want to follow dependent associations you use destroy
[10:30:11] tlarevo: has joined #RubyOnRails
[10:30:18] rvanlieshout: _3by8: you mean <admin@amazontonerportal.com>... User unknown
[10:30:43] _3by8: rvanlieshout: that's probably part of it. Does that have something to do with the aliases file?
[10:30:54] rvanlieshout: what's the issue?
[10:30:58] rvanlieshout: the exact failure
[10:31:13] rvanlieshout: also amazontonerportal.com doesn't have MX-records
[10:31:29] kerunaru: has joined #RubyOnRails
[10:32:02] rvanlieshout: so any message to @amazontonerportal.com shoudn't work
[10:32:46] _3by8: rvanlieshout: I've been able to send emails to it from my Gmail account...
[10:32:53] antgel: has joined #RubyOnRails
[10:33:01] rvanlieshout: then find out what the full error is here
[10:33:17] arup_r: has joined #RubyOnRails
[10:33:19] _3by8: rvanlieshout: how do I do that?
[10:33:34] rvanlieshout: and i doubt that you were able to send mail from gmail to it
[10:33:40] rvanlieshout: because it doesn't have MX records
[10:34:13] daganev: If I have clone.actions can I call clone.actions.destroy, or do I need to do clone.actions do |action|; action.destroy ?
[10:35:27] redasus: has joined #RubyOnRails
[10:35:28] hamed_r: has joined #RubyOnRails
[10:35:39] daganev: Thanks again
[10:35:57] daganev: Sorry for such noob questions. I find the results on google never quite have the situation I'm working on.
[10:36:18] daganev: Cause I don't know enough to formulate the query correctly.
[10:36:47] redasus: I''m namespacing one of my controller like this
[10:36:51] redasus: class Admins::UsersController < ApplicationController
[10:37:17] redasus: The second approach is
[10:37:29] redasus: module admins
[10:37:35] redasus: class UsersController < ApplicationController
[10:37:46] redasus: Both of them works
[10:37:56] rvanlieshout: redasus: choose whichever follows your company code styleguide
[10:37:59] redasus: Please suggest which is a better way ?
[10:38:08] rvanlieshout: cause they are similar
[10:38:30] roshanavand: has joined #RubyOnRails
[10:38:55] redasus: rvanlieshout, thanks man :)
[10:39:08] rvanlieshout: yw. you might want to use robocop if you don't have a styleguide yet
[10:39:40] daganev: Whats the difference between "build" and "first_or_initalize" ?
[10:40:00] rvanlieshout: build and initialize are different things
[10:40:29] daganev: I see that build takes params and initalize take a the result of a create
[10:40:46] daganev: but why would I use one over the other?
[10:41:09] rvanlieshout: build knows about the relationship
[10:41:12] rvanlieshout: where new doesn't
[10:41:20] rvanlieshout: Book.new vs @author.books.build
[10:41:26] rvanlieshout: second has book.author present
[10:41:37] msyvich: has joined #RubyOnRails
[10:41:53] daganev: so I'd want to do clone.actions.build
[10:42:13] daganev: but parent.action.first_or_initalize
[10:42:26] daganev: parent = self
[10:42:42] rvanlieshout: if parent.action is a has_one or belongs there wouldn't be a first_or_initialize
[10:42:51] JohnBat26: has joined #RubyOnRails
[10:43:13] daganev: parent.action is a has_many
[10:43:20] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[10:43:22] daganev: parent.actions
[10:43:41] rvanlieshout: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many
[10:43:56] rvanlieshout: it'll show you what methods should be used
[10:44:57] jahbrewski: has joined #RubyOnRails
[10:45:11] daganev: Oh woah, create doesn't create the item in the DB?
[10:45:19] kerunaru: has joined #RubyOnRails
[10:45:51] rvanlieshout: where did you find that?
[10:46:20] rvanlieshout: oh. the "This only works if the base model already exists in the DB"
[10:46:27] rvanlieshout: which should be model already is persisted
[10:46:40] ldnunes: has joined #RubyOnRails
[10:47:22] rvanlieshout: but indeed. it cannot save a child related to a parent if the parent hasn't been saved yet
[10:48:00] daganev: So I need to create the clone, save it, then create the actions, save them?
[10:48:12] daganev: erm build..
[10:48:16] rvanlieshout: maybe you need to explain what you're trying to do :)
[10:48:26] rvanlieshout: and why not update the clones?
[10:48:32] rvanlieshout: over detroying and creating them
[10:48:44] daganev: updating is causing errors and its annoying :P
[10:49:19] daganev: basically, I have a facebook app, and I need to create databases of all the open graph actions and objects for the development versions of the apps, which are clones
[10:49:35] silverdust: Is lib/assets always autoloaded. Do the scripts in it stay above every other scripts in app/assets?
[10:49:58] daganev: So when the clones are created, they go to facebook to validate that the objects are correct and exist.
[10:50:28] chouhoulis: has joined #RubyOnRails
[10:50:32] rvanlieshout: silverdust: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[10:50:37] rvanlieshout: what's a clone?
[10:50:48] MaDErroR123: has joined #RubyOnRails
[10:50:55] daganev: Its an exact replica of the parent app, but with different facebook ids
[10:51:12] rvanlieshout: 'parent app'?
[10:51:29] daganev: Right now when I try to sync them up with update, things get all all out whack with the wrong ids and such
[10:51:39] rvanlieshout: so your sync stuff is wrong
[10:51:45] daganev: parent app is the live facebook app, clones are the test facebook apps
[10:52:09] rvanlieshout: so 'parent app' is a activerecord model?
[10:52:22] daganev: Its more that the developers haven't set up all the objects and actions in facebook yet, so it validates as false and rolls back to hte parent values
[10:52:36] daganev: Yeah, "parent app" is an activerecord model
[10:52:42] daganev: as are the clones
[10:52:42] rvanlieshout: i really don't understand what you have or what you're trying to do
[10:52:49] rvanlieshout: and it's called 'parent app'?
[10:52:50] nettoweb: has joined #RubyOnRails
[10:52:57] daganev: its called app
[10:53:13] rvanlieshout: so make a proper sync from App to it's related Apps
[10:53:21] ravster: has joined #RubyOnRails
[10:53:29] daganev: The sync relies on facebook ids existing
[10:53:44] rvanlieshout: then know about that
[10:53:49] rvanlieshout: and delete all ones that don't exist anymore
[10:53:57] rvanlieshout: create ones that are new
[10:53:58] rvanlieshout: and sync the rest
[10:54:13] daganev: so it was suggested that i just delete everything and only create the objects that have ids, rather than trying to validate objects that will always fail if it doesn't exist in facebook yet
[10:54:46] rvanlieshout: i've got no clue about that
[10:54:50] rvanlieshout: cause i still don't understand it
[10:54:58] rvanlieshout: if it's only a facebook id that is different
[10:55:06] rvanlieshout: then you must have a list of valid facebook ids, no?
[10:55:20] daganev: No, facebook won't allow you to retreive valid ids
[10:55:31] rvanlieshout: then how would you know if they are valid?
[10:55:47] daganev: You pass in the properties of the object, and it returns with the ID
[10:55:59] daganev: or an error saying it doesn't exist
[10:56:18] rvanlieshout: so why not destroy apps that are invalid?
[10:56:24] rvanlieshout: or should the user know about that?
[10:56:31] daganev: Cause they are in the process of being built
[10:56:58] Ergo: has joined #RubyOnRails
[10:57:00] daganev: The user needs to know that his app isn't valid, or that some objects are missing, so they can create them.
[10:57:27] daganev: So I need to be able to show what is working and is valid so far
[10:58:30] DoubleMalt: has joined #RubyOnRails
[10:58:43] snowy: has joined #RubyOnRails
[10:58:43] daganev: I also need to show them that they created an object or action that isn't yet valid.
[10:58:44] rvanlieshout: and that makes sense
[10:58:48] rvanlieshout: but why the full clone?
[10:59:21] daganev: I'm not understanding the question
[10:59:41] rvanlieshout: why are you creating full clones of 'apps' because of 1 id being different
[10:59:48] rvanlieshout: you could also just store an array of facebook id's in the app
[10:59:57] rvanlieshout: and inform the user of invalid ones in there
[11:00:00] jahbrewski: has joined #RubyOnRails
[11:00:00] daganev: When you develop a facebook app and try to share stories or post things on the wall, you want to make sure it doesn't go public and you do that by having multiple apps on facebook that are all the same thing, save for the ids
[11:00:37] rvanlieshout: exactly. so facebook_ids would be an array of integers on app
[11:00:43] pawnbox: has joined #RubyOnRails
[11:01:22] daganev: Oh I see, there are different types of facebook ids
[11:01:58] daganev: There is the facebook app id, which you can access and get lists, and then there are the fb_ids of the objects and actions which are "secret" (sortof)
[11:02:30] daganev: So I have a collection of objects and actions that are associated with each facebook id
[11:02:31] rvanlieshout: then make it an hstore? :)
[11:02:36] rvanlieshout: lunch. back in 30 ish
[11:03:11] daganev: and stories, and the randomized stuff
[11:03:22] pawnbox: has joined #RubyOnRails
[11:04:02] daganev: Then I have the users who are only allowed to access or see the information of specific facebook apps and their clones
[11:05:17] daganev: So what happens in the sync, is that a dev might delete an object or action in facebook on the clone, but it still exists in the parent app, and then thats when my database gets all messed up and out of sync.
[11:05:35] roshanavand: has joined #RubyOnRails
[11:05:37] rubyonrailed: has joined #RubyOnRails
[11:05:41] daganev: Or they delete it in the parent, but not the clone etc.
[11:06:37] renegadeandy: has joined #RubyOnRails
[11:08:25] renegadeandy: Hello. Is there a way I can make rails validation surround a validated field with ???field_without_errors??? just like the failed fields get ???field_with_errors???
[11:10:30] PedramT_: has joined #RubyOnRails
[11:14:55] jahbrewski: has joined #RubyOnRails
[11:15:13] Ropeney: has joined #RubyOnRails
[11:15:34] daganev: I think just "field" is the same as "field_without_errors"
[11:15:48] daganev: But I'm a newb
[11:18:45] wethu: has joined #RubyOnRails
[11:19:26] fox_mulder_cp: renegadeandy: write custom generator
[11:19:47] renegadeandy: fox_mulder_cp: thank you - got a starting point for me?
[11:20:24] roshanavand: has joined #RubyOnRails
[11:21:21] silverdust: Is everything in app/lib/assets autoloaded by default?
[11:22:10] fox_mulder_cp: http://stackoverflow.com/questions/5267998/rails-3-field-with-errors-wrapper-changes-the-page-appearance-how-to-avoid-t
[11:22:16] ddv: silverdust: what are you trying to do?
[11:22:27] fox_mulder_cp: silverdust: not, only pics
[11:22:41] ddv: pics don't need to be loaded :p
[11:22:41] fox_mulder_cp: http://stackoverflow.com/questions/12252286/how-to-change-the-default-rails-error-div-field-with-errors
[11:23:17] baweaver: has joined #RubyOnRails
[11:23:29] silverdust: I'm trying to have a JS class in app/lib/js/main.js and create instance in app/assets/js
[11:24:56] silverdust: I thought it'd be neater to have it that way over a classes.js in app/assets
[11:26:02] Devalo: has joined #RubyOnRails
[11:26:05] Bugson: has joined #RubyOnRails
[11:26:19] renegadeandy: fox_mulder_cp: Ok - so now I understand how to alter field_with_errors. But that is actually fine, I want to add a proc for fields with no errors...
[11:27:25] silverdust: ddv: here's what I mean http://pastie.org/10716175
[11:28:56] fox_mulder_cp: renegadeandy: so, i don't know, why u must track fields without errors, but take this example and write your own generator
[11:30:59] silverdust: I guess I'm not making much sense. My whole point was to understand the use of app/lib
[11:31:21] silverdust: I've never had to use it and I was really hoping I'd understand its use
[11:31:38] fox_mulder_cp: silverdust: lib - only for .rb.
[11:32:06] ddv: silverdust: JS belongs in assets/javascripts
[11:32:07] Ropeney: has joined #RubyOnRails
[11:32:44] fox_mulder_cp: read config, by default js/css assets compiled from some predefined paths, such as vendor/assets/js|css and app/assets/js|css
[11:34:32] silverdust: okay I understand that now. The assets folder in app/lib is misleading
[11:34:36] EdwardIII: am i being dumb? is there not a way to say 'default value if not set' for inputs with simple_form?
[11:39:00] sergey_makagon: has joined #RubyOnRails
[11:39:28] renegadeandy: fox_mulder_cp: which example?
[11:41:11] eGGsha: has joined #RubyOnRails
[11:45:49] universa1: EdwardIII: my guess is you can do it in quite a similar way to how you would without simple_form
[11:46:58] Ergo^: has joined #RubyOnRails
[11:47:05] codedmart: has joined #RubyOnRails
[11:48:18] EdwardIII: universa1: f.input :fieldname, :fieldname || 'default value'?
[11:49:05] universa1: EdwardIII: so you would do f.text_field :fieldname || 'default value' ?
[11:50:15] ql6wlld: has joined #RubyOnRails
[11:50:32] EdwardIII: universa1: but then how would simple_form tie know that this field still relates to :fieldname?
[11:50:52] PedramT: has joined #RubyOnRails
[11:51:16] chouhoulis: has joined #RubyOnRails
[11:52:16] ElFerna: has joined #RubyOnRails
[11:55:18] nocontrol: has joined #RubyOnRails
[11:56:03] lubekpl: has joined #RubyOnRails
[11:56:31] universa1: EdwardIII: if you would not use simple_form but the plain rails input helpers, how would you set a default value?
[11:56:33] nocontrol: can anyone help http://stackoverflow.com/questions/35310037/how-to-filter-results-before-broadcasting-with-actioncable-in-rails-5 ?
[11:56:53] yogeshrt: has joined #RubyOnRails
[11:57:13] tetraktys: has joined #RubyOnRails
[11:59:59] jahbrewski: has joined #RubyOnRails
[12:00:43] artto: has joined #RubyOnRails
[12:01:16] krzkrzkrz: has joined #RubyOnRails
[12:01:26] sevenseacat: has joined #RubyOnRails
[12:02:25] EdwardIII: universa1: i'm actually not sure. the closest i've done is this (which is still simple_form): <%= form.hidden_field :rateplan_id, {value: rateplan.id} %>
[12:02:33] EdwardIII: but that always overrides the id whether it's set on the model o rnot
[12:04:15] universa1: EdwardIII: so value: exisiting_value.blank? ? default_value : existing_value ?
[12:05:25] EdwardIII: hrm but i kinda felt like i was doing it wrong. having a way to say default_value seems like something simple_form or the default form tools would have built in?
[12:05:40] universa1: EdwardIII: check the docs.
[12:05:52] EdwardIII: i checked the docs, couldn't find it, so asked here
[12:06:05] universa1: EdwardIII: and then it is probably easier to prepare your object then having the form handle it
[12:06:24] rubyonrailed: has joined #RubyOnRails
[12:06:52] arup_r: has left #RubyOnRails: ()
[12:06:56] MaDErroR123: has joined #RubyOnRails
[12:07:38] EdwardIII: yes i guess so
[12:07:45] EdwardIII: you mean have a default db value set through the migration?
[12:08:03] universa1: EdwardIII: no. that wouldn't end up in a newly instantiated object
[12:08:04] Ergo^: has joined #RubyOnRails
[12:08:57] renegadeandy: Can somebody help here : http://stackoverflow.com/questions/35313635/rails-highlight-fields-which-pass-validation-like-fields-with-errors-div-on-f
[12:09:07] renegadeandy: fox_mulder_cp: i have tried but cannot work it out
[12:09:52] EdwardIII: makes sense
[12:10:17] hackerkid: has joined #RubyOnRails
[12:10:20] techsethi: has joined #RubyOnRails
[12:10:35] universa1: EdwardIII: wherever you instantiate the object for the form, set the default values, or have the getters return default values if not set, theere should also be gems for handling default values
[12:11:05] EdwardIII: that sounds good, just have my own constructor
[12:11:20] universa1: renegadeandy: sounds like you want a custom form builder, which isn't that hard to implement.
[12:11:40] EdwardIII: ok, don't override the constructor, do def after_initialize maybe
[12:11:44] urbanmonk: has joined #RubyOnRails
[12:12:20] universa1: EdwardIII: hmm.. i never can remember which is the right after_... callback, google should ahve something on that topic
[12:12:29] EdwardIII: found a decent SO post, thanks for the pointers
[12:12:57] universa1: EdwardIII: http://blog.endpoint.com/2014/02/rails-activerecord-with-database-column.html
[12:13:16] universa1: EdwardIII: looks like db defaults do end up in the model ;) so this might be the simplest solution depending on your requirements
[12:15:13] nekrodesk: has joined #RubyOnRails
[12:16:38] PedramT: has joined #RubyOnRails
[12:17:04] ql6wlld: has joined #RubyOnRails
[12:18:07] EdwardIII: i'll stick it in the accesssor i think
[12:19:06] FooMunki: has joined #RubyOnRails
[12:22:28] manveru: has joined #RubyOnRails
[12:24:39] manveru: ok folks, who's gotten sprockets-es6 and import statements to work?
[12:25:13] manveru: fun times :(
[12:26:53] manveru: and jspm and rails?
[12:28:54] vyorkin: has joined #RubyOnRails
[12:29:01] EdwardIII: manveru: i think ddv is saying it would be better to ask your question (e.g. when i try to do import statements this happens)
[12:29:02] DEA7TH: has joined #RubyOnRails
[12:29:28] kitsuneyo: has joined #RubyOnRails
[12:29:42] vyorkin: has joined #RubyOnRails
[12:29:49] manveru: oh, ok, when i try it, this happens: "SyntaxError: import declarations may only appear at top level"
[12:29:55] jahbrewski: has joined #RubyOnRails
[12:30:20] EdwardIII: manveru: and maybe gist your code?
[12:30:55] manveru: it's two lines.. i'm using `javascript_include_tag 'path/to/foo.js'` and `import React from 'react';` in the foo.js
[12:32:52] barhum2013: has joined #RubyOnRails
[12:33:16] renegadeandy: universa1: can you show how - perhaps as an answer to the SO question. Seems like it would help a number of people out!
[12:33:34] josemotanet: has joined #RubyOnRails
[12:34:02] manveru: EdwardIII: i'll try react-rails next, was just wondering why imports weren't working
[12:34:04] chipotle: has joined #RubyOnRails
[12:34:11] EdwardIII: it's a good question
[12:34:20] EdwardIII: i'm pretty much totally new to both ruby and rails
[12:34:56] manveru: been doing ruby for around 12 years now... but not much rails
[12:34:58] josemotanet: hi everyone! I have a quick, off-topic question: do you usually use software to expose your rails server through a vpn or some service? I've looked at it a long time ago but forgotten all about it. I intend to show a client some stuff and a heroku app is not cutting it.
[12:35:10] stardiviner: has joined #RubyOnRails
[12:35:10] kknight: has joined #RubyOnRails
[12:35:36] EdwardIII: manveru: is that js file getting parsed?
[12:35:46] EdwardIII: manveru: (i literally know nothing about this, feel free to ignore)
[12:36:33] manveru: josemotanet: try something like https://ngrok.com/
[12:36:40] CornishPasty: Does anyone know anything like pghero but for mysql?
[12:36:55] snowy: has joined #RubyOnRails
[12:37:18] josemotanet: manveru: thanks! I found it just before you mentioned it. :doh:
[12:37:25] josemotanet: installing it now. Have a good one!
[12:37:28] PedramT: has joined #RubyOnRails
[12:37:41] ngr: has joined #RubyOnRails
[12:38:33] pawnbox: has joined #RubyOnRails
[12:39:51] msyvich: has joined #RubyOnRails
[12:40:50] PedramT: has joined #RubyOnRails
[12:41:08] Ropeney: has joined #RubyOnRails
[12:43:29] universa1: renegadeandy: sorry, quite busy currently. but http://guides.rubyonrails.org/form_helpers.html#customizing-form-builders might provide a starting point.
[12:43:46] ensyde__: has joined #RubyOnRails
[12:44:54] jahbrewski: has joined #RubyOnRails
[12:45:13] redasus: has joined #RubyOnRails
[12:45:15] hcnewsom: has joined #RubyOnRails
[12:46:28] renegadeandy: universa1: hmm, interesting. That is a starting point???but it leaves me confused! Thanks for the starting point. if you find time, i would appreciate your time on the SO post.
[12:47:03] solars: if I want to follow jsonapi.org - is it better to use something like jsonapi-resource, or what are people using these days?
[12:52:06] chouhoulis: has joined #RubyOnRails
[12:54:20] ravster: has joined #RubyOnRails
[12:54:23] ddv: solars: grape
[12:54:26] kitsuneyo: has joined #RubyOnRails
[12:54:37] quazimodo: has joined #RubyOnRails
[12:55:07] arup_r: has joined #RubyOnRails
[12:55:35] Grundell_: has joined #RubyOnRails
[12:56:00] grahamsavage__: has joined #RubyOnRails
[12:56:13] solars: ddv, that's something different..
[12:57:00] solars: I think jsonapi is overkill though for my purpose, so I stick to simpler structures
[12:57:19] ss_much: has joined #RubyOnRails
[12:57:54] grahamsavage__: has joined #RubyOnRails
[12:58:26] floror: has joined #RubyOnRails
[12:59:48] grahamsavage__: has joined #RubyOnRails
[13:01:47] grahamsavage__: has joined #RubyOnRails
[13:02:31] symbol: has joined #RubyOnRails
[13:03:44] grahamsavage__: has joined #RubyOnRails
[13:04:23] MaDErroR123: has joined #RubyOnRails
[13:05:48] grahamsavage__: has joined #RubyOnRails
[13:05:57] tvw: has joined #RubyOnRails
[13:07:01] hardtail: has joined #RubyOnRails
[13:07:10] rubyonrailed: has joined #RubyOnRails
[13:07:19] hardtail: has joined #RubyOnRails
[13:07:36] mikecmpbll: has joined #RubyOnRails
[13:10:05] pawnbox: has joined #RubyOnRails
[13:11:33] berserk_ren: has joined #RubyOnRails
[13:13:38] blackmesa: has joined #RubyOnRails
[13:14:56] jahbrewski: has joined #RubyOnRails
[13:17:00] drbayer: has joined #RubyOnRails
[13:18:02] MaDErroR123: has joined #RubyOnRails
[13:20:42] yardenbar: has joined #RubyOnRails
[13:22:31] msyvich: has joined #RubyOnRails
[13:23:52] emilkarl: has joined #RubyOnRails
[13:24:10] Grundell_: has joined #RubyOnRails
[13:25:53] baweaver: has joined #RubyOnRails
[13:27:00] ubuntu_: has joined #RubyOnRails
[13:27:44] Devalo: has joined #RubyOnRails
[13:28:11] Ropeney: has joined #RubyOnRails
[13:28:19] pawnbox: has joined #RubyOnRails
[13:29:04] yogeshrt: has joined #RubyOnRails
[13:30:08] pawnbox: has joined #RubyOnRails
[13:33:07] jahbrewski: has joined #RubyOnRails
[13:35:08] rvanlieshout: has joined #RubyOnRails
[13:35:47] scepticulous: has joined #RubyOnRails
[13:38:04] kitsuneyo: has joined #RubyOnRails
[13:38:55] kichawa: has joined #RubyOnRails
[13:39:15] kichawa: am i find here some support for passenger?
[13:40:51] lacrymology: has joined #RubyOnRails
[13:40:52] rubyonrails415: has joined #RubyOnRails
[13:41:01] jas02_: has joined #RubyOnRails
[13:41:23] PedramT: has joined #RubyOnRails
[13:41:31] ddv: no idea
[13:42:04] Mia: has joined #RubyOnRails
[13:44:12] tbuehlmann: kichawa, try it in #passenger
[13:47:04] PedramT: has joined #RubyOnRails
[13:47:47] lubekpl: has joined #RubyOnRails
[13:48:14] jxs_: has joined #RubyOnRails
[13:52:15] PedramT_: has joined #RubyOnRails
[13:52:52] chouhoulis: has joined #RubyOnRails
[13:57:09] DmitryBochkarev: has joined #RubyOnRails
[13:58:47] M-shine: has joined #RubyOnRails
[13:59:55] jahbrewski: has joined #RubyOnRails
[14:02:48] ramortegui: has joined #RubyOnRails
[14:03:07] pulgalipe: has joined #RubyOnRails
[14:07:54] rubyonrailed: has joined #RubyOnRails
[14:09:36] EdwardIII: hrm for some reason trying to use this causes a circular dep? https://gist.github.com/EdwardIII/3e8c69b190399fed4b94
[14:09:52] EdwardIII: is it because i called my submodule 'Ogone' and there's another module called ogone? i guess so
[14:10:47] penguinpowernz: has joined #RubyOnRails
[14:10:51] kitsuneyo: how can i use rails date_select year, month and day as separate elements?
[14:11:10] EdwardIII: is there a nice solution for this? do i just have to call my module MyOgone?
[14:12:40] PedramT: has joined #RubyOnRails
[14:13:04] PedramT: has joined #RubyOnRails
[14:13:30] roshanavand: has joined #RubyOnRails
[14:13:44] deur-: EdwardIII: would extending from ::Ogone::Ecommerce work?
[14:14:00] deur-: guesswork from my part though
[14:15:03] roshanavand: has joined #RubyOnRails
[14:15:49] roshanavand: has joined #RubyOnRails
[14:16:11] renegadeandy: has joined #RubyOnRails
[14:16:30] EdwardIII: deur-: yeah, that's it!
[14:16:40] B1n4r10: has joined #RubyOnRails
[14:16:48] EdwardIII: i should probably read up more on how the constant autoloading resolution works i guess
[14:17:08] deur-: ah good. :: refers to the top namespace to avoid conflicts
[14:17:45] EdwardIII: is there a preferred way of writing this? like in another language at the top i'd probably do like use Ogone::Ecommerce as EcommerceOld
[14:17:56] kzsh: has joined #RubyOnRails
[14:20:06] deur-: EdwardIII: not that I know of tbh
[14:20:21] kzsh: has left #RubyOnRails: ()
[14:21:27] Eswar: has joined #RubyOnRails
[14:22:03] tego101: has joined #RubyOnRails
[14:23:50] mrbubbles: has joined #RubyOnRails
[14:23:57] EdwardIII: deur-: ok then heh
[14:24:40] blackmesa: has joined #RubyOnRails
[14:24:53] dragon9783: has joined #RubyOnRails
[14:25:29] jottr: has joined #RubyOnRails
[14:29:11] aaronr: has joined #RubyOnRails
[14:29:57] jahbrewski: has joined #RubyOnRails
[14:30:10] snowy: has joined #RubyOnRails
[14:30:57] chintanparikh: has joined #RubyOnRails
[14:31:53] rubyonra_: has joined #RubyOnRails
[14:33:21] tetraktys: has joined #RubyOnRails
[14:35:08] n1lo: has joined #RubyOnRails
[14:36:56] Pumukel: has joined #RubyOnRails
[14:36:57] devdazed: has joined #RubyOnRails
[14:37:55] sankaber: has joined #RubyOnRails
[14:42:07] redasus: has joined #RubyOnRails
[14:42:12] hcnewsom: has joined #RubyOnRails
[14:42:54] redasus: has joined #RubyOnRails
[14:45:11] Timberwo|f: has joined #RubyOnRails
[14:45:24] aegis3121: has joined #RubyOnRails
[14:45:55] kitsuneyo: has joined #RubyOnRails
[14:47:13] NBarnes: has joined #RubyOnRails
[14:49:08] Frem: has joined #RubyOnRails
[14:52:53] sankaber: has joined #RubyOnRails
[14:53:25] chouhoulis: has joined #RubyOnRails
[14:53:41] mrbubbles: has joined #RubyOnRails
[14:53:54] dstarh: has joined #RubyOnRails
[14:55:20] ravster: has joined #RubyOnRails
[14:55:34] hexhaxtron_: has joined #RubyOnRails
[14:56:39] PedramT: has joined #RubyOnRails
[14:58:31] pulgalip1: has joined #RubyOnRails
[14:58:58] hackerkid: has joined #RubyOnRails
[14:59:17] chintanparikh: has joined #RubyOnRails
[14:59:58] jahbrewski: has joined #RubyOnRails
[15:01:07] TinkerTyper: has joined #RubyOnRails
[15:01:14] artto: has joined #RubyOnRails
[15:01:47] mercwithamouth: has joined #RubyOnRails
[15:02:38] hexhaxtron_: has left #RubyOnRails: ("Electric Guitar Wiki - http://e-guitar.co.uk")
[15:02:44] dionysus69: has joined #RubyOnRails
[15:04:46] PedramT: has joined #RubyOnRails
[15:05:05] yogeshrt: has joined #RubyOnRails
[15:06:29] maxx88: has joined #RubyOnRails
[15:07:29] ravster: has joined #RubyOnRails
[15:14:42] lxsameer: has joined #RubyOnRails
[15:14:58] jahbrewski: has joined #RubyOnRails
[15:17:35] B1n4r10: has joined #RubyOnRails
[15:17:37] TinkerTy_: has joined #RubyOnRails
[15:17:37] rafaelfr_: has joined #RubyOnRails
[15:18:21] diegoviola: has joined #RubyOnRails
[15:21:09] TheMonster: has joined #RubyOnRails
[15:21:40] macsteps: has joined #RubyOnRails
[15:23:44] TheMonster: Hi, say I have a Project model which has a public attribute set to true if the project is public, otherwise set to false. In the index method of the ProjectsController I want to show all projects that are public or belong to the current user(they are private to everyone but him). Is there a way to achieve that using default_scope(i.e without changing controller method)?
[15:24:04] TheMonster: a public attribute => a "public" attribute *
[15:24:37] msyvich: has joined #RubyOnRails
[15:25:24] Xat`: has joined #RubyOnRails
[15:25:43] Xat`: I get this error ""NameError: uninitialized constant ActionView::Helpers::ActiveModelHelper" when building redmine
[15:25:48] mhoungbo: has joined #RubyOnRails
[15:25:49] Xat`: I am using ruby 2.0.0p598 on CentOS 7.2
[15:26:08] dopamean_: has joined #RubyOnRails
[15:26:24] Xat`: what should I give you to get help please :)
[15:27:24] momomomomo: has joined #RubyOnRails
[15:27:30] nettoweb: hello guys I have a job object and I'm creating a method to show the region from this job open, this method can show just the city, the city with state and finally city+state+country. Here is my code till now: https://gist.github.com/osnysantos/feed812b86432da72970
[15:28:24] adavia: has joined #RubyOnRails
[15:28:26] nettoweb: just asking you if there a clever way to achieve this... maybe a better way to check the params, because most of the cases it will have no parameters.
[15:29:02] centrx: has joined #RubyOnRails
[15:30:05] floror: has joined #RubyOnRails
[15:31:43] symbol: has joined #RubyOnRails
[15:31:55] pawnbox: has joined #RubyOnRails
[15:32:26] benhuda: has joined #RubyOnRails
[15:34:53] jahbrewski: has joined #RubyOnRails
[15:35:13] mary5030: has joined #RubyOnRails
[15:35:25] symbole: has joined #RubyOnRails
[15:36:22] mary5030: has joined #RubyOnRails
[15:38:52] msyvich: has joined #RubyOnRails
[15:39:11] jottr: has joined #RubyOnRails
[15:40:53] msyvich: has joined #RubyOnRails
[15:42:59] bruce__lee: has joined #RubyOnRails
[15:45:08] jgt4: has joined #RubyOnRails
[15:45:47] msyvich: has joined #RubyOnRails
[15:49:08] eljimbo: has joined #RubyOnRails
[15:49:48] hcnewsom: has joined #RubyOnRails
[15:49:58] TinkerTyper: has joined #RubyOnRails
[15:50:43] mostlybadfly: has joined #RubyOnRails
[15:51:56] fwaokda: has joined #RubyOnRails
[15:52:30] fwaokda: if i change my data type for my column from string to decimal, will it keep my data?
[15:54:00] konsolebox: has joined #RubyOnRails
[15:54:29] ss_much: has joined #RubyOnRails
[15:56:30] dalpo: has joined #RubyOnRails
[15:58:45] momomomomo: fwaokda: Rails doesn't change the type in the database for you
[15:58:52] momomomomo: unless something is new in rails 5
[15:59:01] momomomomo: you'll still have to manage this on your own a la http://www.postgresonline.com/journal/archives/29-How-to-convert-a-table-column-to-another-data-type.html
[16:00:22] TinkerTyper: has joined #RubyOnRails
[16:07:58] gingray: has joined #RubyOnRails
[16:10:47] chintanparikh: has joined #RubyOnRails
[16:11:27] nekrodesk: has joined #RubyOnRails
[16:12:07] sarink: has joined #RubyOnRails
[16:12:11] robbyoconnor: has joined #RubyOnRails
[16:12:40] s1|verfox: has joined #RubyOnRails
[16:16:28] morfin: does rails have name for HTTP status 451?
[16:16:36] morfin: just interested because did not find it
[16:17:27] pwnd_nsfw: https://github.com/rack/rack/blob/master/lib/rack/utils.rb#L554
[16:17:51] hcnewsom: has joined #RubyOnRails
[16:18:13] Xat`: anyone could help me please to resolve this on CentOS 7
[16:18:16] morfin: maybe my guide is old hm
[16:18:32] Xat`: I get this error ""NameError: uninitialized constant ActionView::Helpers::ActiveModelHelper" when using bundle rake
[16:19:22] kies^: has joined #RubyOnRails
[16:19:25] morfin: maybe you need bundle exec rake?
[16:20:21] Xat`: morfin: yes sorry is what I use
[16:20:26] kitsuneyo: has joined #RubyOnRails
[16:21:48] Xat`: exactly this command line : bundle exec rake generate_secret_token
[16:21:51] morfin: are you sure you installed whole bundle properly
[16:22:18] Xat`: but when using bundle exec rake anything I get this error
[16:22:23] TinkerTyper: has joined #RubyOnRails
[16:22:36] Xat`: morfin: yes
[16:23:06] Xat`: I have followed the prerequisites
[16:24:43] baweaver: has joined #RubyOnRails
[16:27:02] ravster: Xat`: what version of rails?
[16:27:22] Sadin: has joined #RubyOnRails
[16:28:34] TheMonster: has left #RubyOnRails: ("Konversation terminated!")
[16:28:50] disgrntld: has joined #RubyOnRails
[16:29:26] pwnd_nsfw: morfin, btw, that was code from rack and not rails I just noticed
[16:30:39] Xat`: ravster: rails (4.2.0)
[16:30:39] moeabdol: has joined #RubyOnRails
[16:31:05] Xat`: I have exactly same issue this guy : http://www.redmine.org/boards/2/topics/45991
[16:31:25] TinkerTyper: has joined #RubyOnRails
[16:32:06] NeoHamled: has joined #RubyOnRails
[16:32:43] blackmesa: has joined #RubyOnRails
[16:33:14] sonofdirt: has joined #RubyOnRails
[16:34:28] moeabdol1: has joined #RubyOnRails
[16:35:15] chouhoulis: has joined #RubyOnRails
[16:35:18] centrx: Xat`, maybe 'actionpack-action_caching' is not compatible with the latest version of Rails?
[16:36:17] Xat`: really don't know
[16:36:24] Xat`: I'll remove it and test again
[16:36:33] morfin: i am not very familiar with rails and rack
[16:37:43] Xat`: same problem when removing actionpack-action_caching
[16:39:08] msyvich: has joined #RubyOnRails
[16:40:55] tubbo: Xat`: why do you need action caching btw?
[16:41:14] Xat`: don't need it
[16:41:34] Jasaka: has joined #RubyOnRails
[16:41:43] tubbo: well it is deprecated
[16:42:06] tubbo: so you might want to just drop it and use an HTTP cache (like rack-cache) and fragment caching to get the job done
[16:42:27] Xat`: I dont think so I need it
[16:42:47] tubbo: you probably don't...there are better ways of doing caching
[16:43:13] tubbo: check out the articles on signalvsnoise about how basecamp does russian-doll caching, i think there's a guide on rubyonrails.org about it as well.
[16:43:26] Xat`: I have exactly same issue this guy has : http://www.redmine.org/boards/2/topics/45991
[16:43:43] Xat`: but he does know how he solved the issue
[16:44:06] codedmart: has joined #RubyOnRails
[16:44:22] [Butch]: has joined #RubyOnRails
[16:44:23] Xat`: I'm on this error for 5 hours
[16:44:29] tubbo: Xat`: why are you still using 4.2.0? have you been unaware of the major security fixes released since 4.2.0 was cut?
[16:45:18] Xat`: I downgraded from 4.2.5 cause I had the issue
[16:45:30] Xat`: but the downgrade does not resolve it
[16:45:33] aarkerio: has joined #RubyOnRails
[16:46:01] centrx: Xat`, Recommend paste your actual error, not refer to someone else's. Could be different?
[16:46:03] kies^: has joined #RubyOnRails
[16:46:17] Xat`: what about removing all gems, then reinstall them
[16:46:22] codedmart: has joined #RubyOnRails
[16:46:30] nocontrol: has joined #RubyOnRails
[16:46:35] nocontrol: hi all, can anyone help with Action Cable ? http://stackoverflow.com/questions/35310037/how-to-filter-results-before-broadcasting-with-actioncable-in-rails-5
[16:46:47] Xat`: cause here I don't know which gem have good version number ..
[16:46:55] tubbo: Xat`: i'd argue that something else is wrong, like your `bundle` might be pointing to the wrong place. because here's the source to ActionView::Helpers::ActiveModelHelper -> https://github.com/rails/rails/blob/v4.2.0/actionview/lib/action_view/helpers/active_model_helper.rb
[16:47:01] Xat`: btw, the issue is always the same
[16:47:13] tubbo: Xat`: and, as you can see, i'm on Tag: 4.2.0, which means i'm looking at the source code to the version of rails you say you have installed.
[16:47:41] tubbo: Xat`: it can't possibly be a gem version discrepancy...`bundle` is just not loading the right gem bundle.
[16:47:45] codedmart: has joined #RubyOnRails
[16:47:51] tubbo: what does `which bundle` say?
[16:48:26] Xat`: /usr/local/bin/bundle
[16:49:12] Sylario: has joined #RubyOnRails
[16:49:26] tubbo: Xat`: interesting. do you have a `bin/bundle` binstub in your rails app?
[16:49:28] morfin: btw is not that better to install rails and other stuff using gem installed for ruby installed using rbenv?
[16:49:47] devFrederick: has joined #RubyOnRails
[16:49:48] Xat`: tubbo: yes
[16:49:56] tubbo: morfin: re-word your question, i'm not sure what you meant.
[16:50:06] tubbo: Xat`: use that one. `bin/bundle exec rake generate_secret_token`.
[16:50:06] dcunit3d: has joined #RubyOnRails
[16:50:11] tubbo: does the error still happen?
[16:50:17] TheMonster: has joined #RubyOnRails
[16:50:30] Xat`: tubbo: give me a second, I just removed all gem :x
[16:50:31] morfin: i mean install ruby-build + rbenv then install ruby, then install gem bundler then using it install other stuff
[16:50:53] Ropeney: has joined #RubyOnRails
[16:51:03] tubbo: Xat`: well now it doesn't even matter lol
[16:51:18] kitsuneyo: has joined #RubyOnRails
[16:51:23] pawnbox: has joined #RubyOnRails
[16:51:27] tubbo: Xat`: if you re-install gems it will a.) fix your symptom (but still mask the actual problem) or b.) cause more problems. because you haven't actually determined what the problem was yet.
[16:51:34] tubbo: so yeah, sledgehammer it...but it's risk.y
[16:52:18] tubbo: morfin: yeah that's way better, easier to upgrade ruby and switch versions. rbenv has a plugin called default-gems which will run `gem install` for the gems you provide it upon each new installation of Ruby
[16:52:35] tubbo: so when you upgrade Ruby to e.g. 2.4.0 (when it comes out in the future), rbenv automatically executes e.g. `gem install rails bundler`
[16:53:22] nodejunkie: has joined #RubyOnRails
[16:53:30] kirillzh: has joined #RubyOnRails
[16:54:03] morfin: i think he yum installed ruby and then did gem install bundler hmm
[16:54:40] kitsuneyo: has joined #RubyOnRails
[16:55:09] tubbo: morfin: it's usually a bad idea to install ruby with your operating system's package manager, because package maintainers don't/can't keep up with ruby's pace.
[16:55:31] tubbo: plus a lot of package management solutions don't support multiple versions running concurrently, which is typically something you need on a developer workstation.
[16:55:50] gmas: has joined #RubyOnRails
[16:56:26] tubbo: here's an idea -> i wish i could write tests that "invalidated" other tests
[16:56:43] kitsuneyo: has joined #RubyOnRails
[16:56:44] tubbo: so if expect(whatever).to be_present fails, i can write other BDD specs that will just not get run because the other test failed
[16:57:12] tubbo: it would actually describe my environment a lot better than rspec tends to do.
[16:57:15] rakm: has joined #RubyOnRails
[16:57:23] Xat`: the bin/bundle script needs gem install bundler
[16:58:32] silverdust: I created a route as in this paste http://pastie.org/10716613 I'm not getting expected result
[16:58:35] tubbo: Xat`: yeah, you probably aren't installing bundler properly
[16:58:56] silverdust: The pastes shows what's expected and what I get
[16:59:21] tubbo: silverdust: not sure if you can "override" what the show action would be
[16:59:31] tubbo: silverdust: why have an 'api' action when you're just trying to show something?
[17:00:17] silverdust: That's right. I could just have it in my show method but show takes an id by default
[17:00:24] em0ral: has joined #RubyOnRails
[17:00:33] silverdust: I don't need a show view. Just a json response
[17:00:39] tubbo: silverdust: oh sorry i misinterpreted what that was
[17:00:50] Xat`: by the way when using bundle to install I get a failing build on this :
[17:00:51] Xat`: An error occurred while installing nokogiri (1.6.7.2), and Bundler cannot continue.
[17:00:55] Xat`: Make sure that `gem install nokogiri -v '1.6.7.2'` succeeds before bundling.
[17:01:06] tubbo: silverdust: you have to specify that the route is on the collection, because by default rails assumes you want to add member routes. so surround your route in a `collection { }` block and it should generate what you want.
[17:01:17] Xat`: I solved it before by using yum install ruby-devel
[17:01:36] tubbo: Xat`: if i were you, i wouldn't use your operating system's package manager to install ruby.
[17:01:52] tubbo: first of all you can't run multiple versions of ruby on the same box, which is bad on a workstation.
[17:02:09] sarink: has joined #RubyOnRails
[17:02:13] tubbo: and second of all, it's a lot easier to reason about where your gems are if you `bundle` to a path, like ./vendor/bundle, rather than the global $GEM_HOME.
[17:02:52] silverdust: tubbo: you mean the get route within the resource route alone in the collection block right?
[17:03:06] chipotle: has joined #RubyOnRails
[17:03:22] tubbo: silverdust: yes
[17:03:48] msyvich: has joined #RubyOnRails
[17:04:03] Xat`: tubbo: yes but how to resolve this nokogiri installation
[17:04:37] tubbo: Xat`: look up in your gemfile for the yellow warning/error text (
[17:04:44] tubbo: Xat`: it will tell you what packages you need to install.
[17:04:54] silverdust: Thanks tubbo
[17:05:05] benhuda: has joined #RubyOnRails
[17:05:11] allcentury: has joined #RubyOnRails
[17:06:04] Xat`: actually I get this message : http://pastebin.com/RAU32hWk
[17:06:13] Xat`: oh sorry
[17:06:23] pyemkey: has joined #RubyOnRails
[17:06:36] tubbo: Xat`: maybe you do need ruby-devel
[17:06:47] Xat`: yum install ruby-devel
[17:06:57] tubbo: hurf durf
[17:07:24] kfs: has joined #RubyOnRails
[17:07:54] mickey_mouse_2: has joined #RubyOnRails
[17:07:59] tubbo: Xat`: hope the last 5-6 hours have taught you something
[17:08:48] tubbo: use rbenv to install Ruby next time, and configure .bundle/config to set `BUNDLE_PATH: vendor/bundle` so you can just `rm -rf vendor/bundle` to blow away your gems, and use `rbenv install 2.3.0` to upgrade Ruby
[17:09:15] tubbo: it's a relatively trivial abstraction that saves you hours of work and the trade-off is simply that rbenv creates binstub "shims" instead of actual binsubs.
[17:09:17] tubbo: binstubs*
[17:09:25] Xat`: now I get this on nokogiri
[17:09:29] Xat`: http://pastie.org/10716634
[17:09:34] Sylario: I am working on a open source app with Devise. Devise want a secret key in the config file. The project use the default "put a key here" placeholder in devise conf. It means every time I commit, i have to revert the devise config file and Gemfile.lock. Is there a way to make the process easier ?
[17:09:45] kitsuneyo: has joined #RubyOnRails
[17:10:10] tubbo: sylario: by leaving that commented out (as devise.rb's comments tell you), it uses Rails' secret_key_base which is defined by an environment variable.
[17:10:30] Xat`: so I'll use gem install nokogiri -v '1.6.7.2'
[17:10:45] pulgalip1: has joined #RubyOnRails
[17:11:00] maxx88: has joined #RubyOnRails
[17:11:26] Sylario: tubbo: I am not in charge of the app, i do not think a minor contributor should come and tell everybody how to configure devise in the project
[17:11:36] PedramT: has joined #RubyOnRails
[17:11:41] Xat`: then the install works, don't understand why bundle is not able to do it
[17:11:55] kfs: has left #RubyOnRails: ()
[17:12:00] Xat`: Bundle complete! 30 Gemfile dependencies, 54 gems now installed.
[17:12:15] Xat`: I had that also before
[17:12:43] Sylario: tubbo : Also i still have rake leaving his version number at the bottom of Gemfile.lock
[17:13:30] Xat`: I have exactly same behavior after reinstalling all gems
[17:13:57] Xat`: when using bin/bundle from redmine , or installed bundle from gem install
[17:14:28] KorriX: Hello! I'm having complex arel query and want to pack its result into some kind of active-record-base-like class (so I could use further chaining on it). What would be the easiest way of doing it?
[17:14:33] devdazed_: has joined #RubyOnRails
[17:14:34] mr-spoon: has left #RubyOnRails: ("Gone.")
[17:14:46] glennfu: has joined #RubyOnRails
[17:15:07] Xat`: anyway thank you tubbo ;)
[17:15:17] artto: has joined #RubyOnRails
[17:15:29] lubekpl: has joined #RubyOnRails
[17:16:17] mdw: has joined #RubyOnRails
[17:17:04] qejk: has joined #RubyOnRails
[17:19:24] gambl0re: has joined #RubyOnRails
[17:20:23] greengriminal: has joined #RubyOnRails
[17:22:57] rubyonrailed: has joined #RubyOnRails
[17:23:01] KorriX: Or stating it better: How to translate SQL query "select * from myfunction(current_date)" to arel?
[17:24:17] kirillzh: has joined #RubyOnRails
[17:24:37] guerrero: has joined #RubyOnRails
[17:24:48] chintanparikh: has joined #RubyOnRails
[17:24:56] jgt4: has joined #RubyOnRails
[17:24:57] TinkerTyper: has joined #RubyOnRails
[17:25:55] guerrero: has joined #RubyOnRails
[17:26:42] eljimmy: has joined #RubyOnRails
[17:27:20] KitsuneDrag0n: has joined #RubyOnRails
[17:29:21] jottr: has joined #RubyOnRails
[17:30:12] james1: has left #RubyOnRails: ()
[17:30:41] aegis3121: has joined #RubyOnRails
[17:31:18] mrfoto: has joined #RubyOnRails
[17:32:52] sleungcy: has joined #RubyOnRails
[17:33:22] gambl0re: has joined #RubyOnRails
[17:33:22] gambl0re: has joined #RubyOnRails
[17:33:24] worknick: has joined #RubyOnRails
[17:33:33] Palsson: has joined #RubyOnRails
[17:33:42] worknick: when i have @var = Model.where(condition).all can i just do @var.delete or not?
[17:34:36] smathy: has joined #RubyOnRails
[17:34:53] tbuehlmann: worknick, `Model.where(condition).delete_all` will do
[17:35:01] worknick: oh! thanks tbuehlmann
[17:35:42] tbuehlmann: this will delete the records directly from the database. .destroy_all will first retrieve and then delete them
[17:37:17] worknick: why to retrieve when we wwant to just delete it?
[17:37:23] jgt4: has joined #RubyOnRails
[17:37:36] tbuehlmann: callbacks will be called when using .destroy_all
[17:37:48] tbuehlmann: that doesn't happen when using .delete_all
[17:39:08] leofrozenyogurt: has joined #RubyOnRails
[17:39:33] greengriminal: has joined #RubyOnRails
[17:40:46] safety_cut: has joined #RubyOnRails
[17:40:48] Thouren: has joined #RubyOnRails
[17:40:59] fedexo: has joined #RubyOnRails
[17:41:03] fedexo_: has joined #RubyOnRails
[17:41:54] devdazed: has joined #RubyOnRails
[17:42:32] djbkd: has joined #RubyOnRails
[17:42:57] pyemkey: has joined #RubyOnRails
[17:43:18] leofrozenyogurt: has joined #RubyOnRails
[17:43:43] _djbkd: has joined #RubyOnRails
[17:43:57] chintanparikh: has joined #RubyOnRails
[17:44:25] mickey_mouse_2: has joined #RubyOnRails
[17:44:30] leofrozenyogurt: im trying to get the base index of a group_by hash
[17:44:33] leofrozenyogurt: https://gist.github.com/leofrozenyogurt/852b229dfb63f8ad10e7
[17:45:05] safety_cut: has joined #RubyOnRails
[17:45:45] samgranieri: has joined #RubyOnRails
[17:45:52] maesitos: has joined #RubyOnRails
[17:46:42] centrx: leofrozenyogurt, You're reusing the same index variable name
[17:47:38] leofrozenyogurt: https://gist.github.com/leofrozenyogurt/852b229dfb63f8ad10e7
[17:48:03] drbayer: has joined #RubyOnRails
[17:48:25] leofrozenyogurt: that just index's the array count again
[17:48:39] leofrozenyogurt: so if there are 4 arrays created of the brackets it goes 0,1,2,4
[17:48:51] leofrozenyogurt: what i need it to do is index the original @brackets which is 16
[17:49:51] centrx: What's the overall purpose of this?
[17:49:51] leofrozenyogurt: centrx: any tips?
[17:50:04] leofrozenyogurt: to have the brackets grouped by a division
[17:50:09] kirillzh: has joined #RubyOnRails
[17:50:14] leofrozenyogurt: but i need them to have an id of the original index
[17:51:03] centrx: I would add the ID before doing the group_by, making each element either a tuple (array) or a hash
[17:51:13] amorbix: has joined #RubyOnRails
[17:55:31] chipotle_: has joined #RubyOnRails
[17:55:32] gthank: has joined #RubyOnRails
[17:55:32] gthank: has joined #RubyOnRails
[17:55:37] kirillzh: has joined #RubyOnRails
[17:56:05] leofrozenyogurt: centrx: not really understanding how to do that
[17:56:13] leofrozenyogurt: wouldnt it do a double repeat then?
[17:56:15] leofrozenyogurt: https://gist.github.com/leofrozenyogurt/852b229dfb63f8ad10e7
[17:56:40] Coldblackice: has joined #RubyOnRails
[17:56:47] kirillzh: has joined #RubyOnRails
[17:57:35] cschneid_: has joined #RubyOnRails
[18:01:09] leofrozenyogurt: the issue is that the id has to be set in the group by block
[18:01:11] mices: has joined #RubyOnRails
[18:02:47] worknick: public_activity gem tracks my activity and other things. now when i delete pet, how can i delete all petactivity records in public activity database?
[18:02:49] ElFerna: has joined #RubyOnRails
[18:03:12] amorbix: has joined #RubyOnRails
[18:03:47] dalpo: has joined #RubyOnRails
[18:04:35] colleen_: has joined #RubyOnRails
[18:04:57] glennfu: leofrozenyogurt: maybe not as efficient, but how about id="<% @brackets.index(b) %>"
[18:05:15] Shidash: has joined #RubyOnRails
[18:05:28] nfk: has joined #RubyOnRails
[18:05:56] benlieb: has joined #RubyOnRails
[18:06:06] leofrozenyogurt: glennfu: thanks !
[18:06:26] Cervajz: has joined #RubyOnRails
[18:06:27] maesitos: has joined #RubyOnRails
[18:07:41] devdazed: has joined #RubyOnRails
[18:08:12] jgpawletko: has joined #RubyOnRails
[18:10:33] speakingcode: has joined #RubyOnRails
[18:10:42] AnomalousBit: has joined #RubyOnRails
[18:10:56] roshanav_: has joined #RubyOnRails
[18:11:44] worknick: how to delete from <all tables from this db>?
[18:12:05] Cervajz__: has joined #RubyOnRails
[18:12:12] godzillaenlacasa: is there a resource of what might break if I upgrade from 2.1.4 to 2.3 ?
[18:12:39] Cervajz: has joined #RubyOnRails
[18:13:37] Devalo: has joined #RubyOnRails
[18:15:37] devdazed: has joined #RubyOnRails
[18:16:27] Cervajz__: has joined #RubyOnRails
[18:17:14] centrx: godzillaenlacasa, not much will break
[18:17:37] godzillaenlacasa: @centrx ok, thanks!
[18:18:39] centrx: godzillaenlacasa, After 1.9.3, there are not many backwards-incompatible changes. Ruby is perfect.
[18:18:58] centrx: New features, but backwards compatible
[18:19:32] arthropododo: has joined #RubyOnRails
[18:19:32] lacrymology: has joined #RubyOnRails
[18:19:37] centrx: worknick, E.g. select 'drop table "' || tablename || '" cascade;' from pg_tables;
[18:19:52] centrx: worknick, http://stackoverflow.com/a/3327326
[18:20:30] KorriX: Hello again. Is there any way to supply own list of model columns instead of automatic active record column discovery?
[18:20:49] srinidhi: has joined #RubyOnRails
[18:21:11] Devalo: has joined #RubyOnRails
[18:21:30] mdw: has joined #RubyOnRails
[18:22:33] worknick: centrx: ok.
[18:22:44] benlieb: has joined #RubyOnRails
[18:23:52] centrx: KorriX, You might be able to find which underlying ActiveRecord columns method to override, but why?
[18:24:22] Cervajz: has joined #RubyOnRails
[18:24:26] shock_one: has joined #RubyOnRails
[18:24:57] yfeldblum: has joined #RubyOnRails
[18:25:20] tubbo: worknick: DROP DATABASE ;)
[18:25:24] [Butch]: has joined #RubyOnRails
[18:25:51] tubbo: though i'm pretty sure you can iterate over all tables in SQL (or models in rails) and run `TRUNCATE #{table_name}`.
[18:26:21] corioliss: has joined #RubyOnRails
[18:26:27] KorriX: centrx: I have two models stored in the same table, but their column sets are disjoint. AR column discovery puts all the columns to both of models
[18:26:45] crystal77: has joined #RubyOnRails
[18:26:59] tubbo: KorriX: normalize the table and separate concerns.
[18:27:23] tubbo: if you really care that much about not letting one class access the methods of another
[18:27:39] tubbo: i mean you could just never call those getter methods and get the same result but (shrug)
[18:27:44] KorriX: tubbo: I know what you mean :) My case is just much more complicated - I want to manually list columns in one class
[18:28:00] smathy: KorriX, the quick answer is no, you can't control that.
[18:29:34] macsteps: has joined #RubyOnRails
[18:29:40] tubbo: one could make their own collection of method names, then override method_missing to raise a NoMethodError when the method name doesn't match your whitelist
[18:29:42] baweaver: has joined #RubyOnRails
[18:29:42] tubbo: otherwise return super
[18:30:37] tubbo: KorriX: why can't you just make two SQL VIEWs?
[18:30:54] tubbo: rails treats views the same way it treats tables, it just will think that your view is your model's table
[18:31:26] tubbo: KorriX: if you have class Foo < ActiveRecord::Base, but the foos "table" is actually a view (or materialized view), AR treats them just the same as if it was a "real" table.
[18:31:31] KorriX: tubbo: What I'm trying to achieve is to have parametric view (stored procedure)
[18:31:31] msyvich: has joined #RubyOnRails
[18:31:50] KorriX: Unfortunately rails does not support that
[18:31:52] shock_one: has joined #RubyOnRails
[18:31:59] smathy: tubbo, Rails hasn't used method_missing to add attribute methods for a long time :)
[18:32:31] tubbo: smathy: that doesn't matter, last i checked Ruby still uses method_missing.
[18:32:33] KorriX: I'd like to SELECT * FROM users INNER JOIN parametric_view(arg1, arg2, ...) on users.id = parametric_view.user_id
[18:32:41] tubbo: oh WAIT never mind
[18:32:44] KorriX: But using arel
[18:32:45] smathy: tubbo, yeah, but the methods won't be missing for attributes in the ta.... :)
[18:32:52] KorriX: Not raw sql queries
[18:33:14] AnomalousBit: Good afternoon! Just seeking some opinions... do you guys write integration tests for your apps? Do you use minitest's assert_select religiously? Use another framework entirely like selenium?
[18:33:18] drbayer: has joined #RubyOnRails
[18:33:39] smathy: AnomalousBit, yes, yes, sometimes.
[18:33:41] tubbo: KorriX: you can drop down to sql within the joins() (and i *think* includes() method)...like joins('parametric_view(arg1,arg2)')
[18:34:06] AnomalousBit: Thanks smathy, my first real dive into integration tests with rails, just trying to get some seasoned advice :)
[18:34:08] tubbo: KorriX: but yeah you'll have to specify which of the comma-separated args you'll want in the view.
[18:34:25] rubyonrailed: has joined #RubyOnRails
[18:35:17] nunchuck: has joined #RubyOnRails
[18:35:18] KitsuneDrag0n: has joined #RubyOnRails
[18:35:23] AnomalousBit: smathy: Seeing as how you use assert_select (which I like so far), do you test views in your controller tests or integration? both?
[18:35:47] smathy: AnomalousBit, you should note that I'm fairly unusual in the Rails world, not many others even know about assert_select - but yes, I use it a lot and love it, and it's very quick. I generally only use a web driver like selenium (or more likely webkit or phantom) when there's JS or other heavy UI to check and for a handful of just overall smoke tests.
[18:35:53] rakm: has joined #RubyOnRails
[18:36:36] smathy: AnomalousBit, honestly I use controller tests mostly for view testing, because it's much quicker and a view test is just as valid without the routing piece that integration adds over the top of controller test env.
[18:36:50] [Butch]: has joined #RubyOnRails
[18:37:32] tubbo: AnomalousBit: i use capybara rather than assert_select, but yes i do write integration tests
[18:38:11] AnomalousBit: Great advice, thanks smathy. I come from a much larger development team where we had dedicated human testers (but still had some basic unit testing), I started my own company about a year and half ago, so trying to automate as much of the "human testing" aspects as I can
[18:38:47] AnomalousBit: tubbo, I keep seeing the capybara gem pop up in here as well as some of the open source stuff I'm reading, I really need to take a look and become familiar, thanks
[18:39:17] smathy: AnomalousBit, good approach.
[18:39:33] tubbo: AnomalousBit: automated testing and human testing are not comparable. i've worked with both human QA teams and teams without QA and only automated tests. can you guess which one had to deal with less problems?
[18:39:43] JoshGlzBrk: has joined #RubyOnRails
[18:39:57] greengriminal: has joined #RubyOnRails
[18:39:57] tubbo: that said, we still have automated tests...it's just we *also* have a QA team. my last company didn't. they fired their QA team because they thought they could handle it all with automated tests.
[18:40:03] Cervajz__: has joined #RubyOnRails
[18:40:04] tubbo: they were wrong, and are now about to go under with all devs leaving.
[18:40:16] tubbo: someone, somewhere, needs to do QA. a human being, not a script.
[18:40:19] AnomalousBit: lol well so far for me it's been the non-human tests, but now I sound condescending
[18:40:42] tubbo: AnomalousBit: since you started your company i assume you're the one doing QA. definitely fine.
[18:40:54] tubbo: but *someone* has to do it, is what i'm trying to emphasize
[18:41:08] AnomalousBit: our testers were not well experienced or versed in software testing / QA though, so I'm sure it's quite a bit different
[18:41:24] smathy: You absolutely could replace all your QA with automated tests, but the tests would be cumbersome and fragile.
[18:41:32] rakm: has joined #RubyOnRails
[18:41:42] drbayer_: has joined #RubyOnRails
[18:41:57] AnomalousBit: tubbo, yeah, I typically do "the normal things a client would" test when I deploy, but it's starting to rack up some serious time as my app grows
[18:42:00] tubbo: that's not a replacement, smathy
[18:42:23] Cervajz__: has joined #RubyOnRails
[18:42:31] tubbo: yeah i mean...you want automated tests, but you can't be like "oh it passes capybara so it must be right" because that's absolutely not true.
[18:42:36] manfrin: has joined #RubyOnRails
[18:42:39] mdw: has joined #RubyOnRails
[18:43:11] JohnBat26: has joined #RubyOnRails
[18:43:40] AnomalousBit: I see the merits of both sides, speed and absolute-ness (automated testing) vs flexibility and detection of on-the-fly problems (human testing)
[18:44:08] AnomalousBit: I come from a scrum background and I did enjoy the fact our business analysts would basically sign off when a task was completed to spec
[18:44:17] PedramT: has joined #RubyOnRails
[18:44:21] smathy: tubbo, it could be, why couldn't it be? A QA human can't check anything during a QA process that a developer human couldn't write an automated check for.
[18:44:55] tubbo: smathy: because developers don't check for the same things that QA engineers do.
[18:44:56] smathy: tubbo, it's just that the interactive QA test is more robust, if something gets moved a bit, or a flow changes a bit, that human can adapt to the new flow and still conduct a valid test.
[18:45:08] smathy: tubbo, doesn't mean they can't.
[18:45:18] tubbo: smathy: but they don't, so the point is moot.
[18:45:53] tubbo: smathy: i mean i *can* ban you right now from this chat, but i don't :)
[18:46:01] tubbo: (and i think you can ban me too)
[18:46:25] smathy: tubbo, to repeat, I'm not advocating this, just saying that you could do it (and I have done it in certain very stable apps).
[18:46:31] rakm_: has joined #RubyOnRails
[18:46:36] tubbo: interesting
[18:47:07] smathy: In fact I've had QA people who have written automated tests to make their own jobs easier.
[18:47:57] tubbo: oh yeah, QA people writing automated tests is actually the best way to go smathy (and AnomalousBit)
[18:47:58] AnomalousBit: thanks for the discussion guys, in an ideal situation I would have a human tester but I'll just have to make due with tests for now :)
[18:48:08] tubbo: but until you ARE a QA engineer, or hang out with them a lot, you just don't realize what they are looking for
[18:48:19] smathy: tubbo, well, it's still fragile if the app is changing frequently.
[18:48:21] tubbo: as a dev who's got a shitload of stuff to do and needs to bang out features, my mind just doesn't work like that.
[18:48:39] triptec: has joined #RubyOnRails
[18:48:42] smathy: Yeah, it's tiresome.
[18:48:50] AntiSpamMeta: has joined #RubyOnRails
[18:49:07] maesitos: has joined #RubyOnRails
[18:49:16] smathy: I've also had UI people with enough skill and motivation to write those sorts of QA-level of tests.
[18:49:22] AnomalousBit: I agree, I think writing massive integration tests would be a large time sink for an app that is still very fluid in it's design
[18:49:31] youngmathimus0: has joined #RubyOnRails
[18:49:35] braian: has joined #RubyOnRails
[18:49:42] smathy: Yep, and they're not easy to edit either.
[18:50:43] godzillaenlacasa: anyone know what the latest ruby_build_version is? I'm running 20141028 in my rubber-ruby.yml file
[18:52:25] smathy: godzillaenlacasa, you mean this? https://github.com/rbenv/ruby-build/blob/master/bin/ruby-build#L16
[18:52:53] NBarnes: has joined #RubyOnRails
[18:53:06] braian: Hello guys! I have a issue with a callback. It never run. Here's my code: https://gist.github.com/braiandickson/aee2702ee9fd1e17d58c
[18:53:47] smathy: braian, what makes you believe it doesn't run?
[18:54:45] frank00: has joined #RubyOnRails
[18:55:08] braian: smathy: I try it on rails console and nothing happens. I create products on the view and nothing happens. No errors in server console or on the chrome
[18:55:21] pawnbox: has joined #RubyOnRails
[18:55:24] braian: smathy: sorry for my english, is a bit poor
[18:56:31] pawnbox: has joined #RubyOnRails
[18:56:46] smathy: braian, no problem, your English is fine.
[18:57:16] smathy: braian, put a `raise` into the method, reload your console, then try again.
[18:57:21] pawnbox: has joined #RubyOnRails
[18:57:23] smathy: braian, just to confirm for yourself that it's being called.
[18:57:33] braian: smathy: Ok!
[18:59:24] IFrank00: has joined #RubyOnRails
[19:00:16] IFrank00: has joined #RubyOnRails
[19:00:37] braian: smathy: Here is the result on console: https://gist.github.com/braiandickson/aee2702ee9fd1e17d58c
[19:01:05] kenpoint: has joined #RubyOnRails
[19:01:16] smathy: braian, right, so you can see that it *is* being called, that's why that exception was raised.
[19:01:54] smathy: braian, so now you need to ask yourself why the statement in that method isn't doing what you expect it to: `self.cod_barra ||= generate_cod`
[19:01:57] AnomalousBit: tubbo, capybara looks pretty slick, I only have experience with the selenium web driver though which I found to be quite buggy (missing click events, failed element detection, etc). Do you suggest the built-in capybara-webkit? poltergeist?
[19:02:53] DoubleMalt: has joined #RubyOnRails
[19:03:05] netzfisch: has joined #RubyOnRails
[19:03:12] braian: smathy: Yes, Its been called. If I try for example on rails console: @p.generate_cod its fine, returns a cod
[19:03:16] smathy: AnomalousBit, yes, both of those are better than selenium. I like poltergeist best, it's fastest and raises JS errors in your tests.
[19:03:28] tubbo: AnomalousBit: definitely poltergeist. it's just a driver for PhantomJS so you don't need to install Qt and C bindings.
[19:03:31] smathy: braian, that's a different method.
[19:03:55] AnomalousBit: much appreciated smathy & tubbo, you guys rock
[19:04:08] smathy: braian, we were confirming that the `set_bar_code` callback was being called. You thought it wasn't being called, but it is.
[19:04:10] braian: smathy: Yes, but I use it on the other for generate a cod for save into the product
[19:04:20] smathy: braian, so now you have to ask yourself why isn't the code in that method doing what you expect it to?
[19:04:21] macsteps: has joined #RubyOnRails
[19:04:37] IFrank00: Hi so im having this problem im using will_paginate and prawnpdf my problem is that when I render my pdf it will only show the first page of my index "will_paginate first page". I Like to have all the records and not only the first page of will_paginate. what info do you guys need from me.
[19:04:38] braian: smathy: Ok! Ill check that line
[19:04:42] smathy: braian, well, that's not always what `self.cod_barra ||= generate_cod` is going to do.
[19:05:23] mdw: Hey people, I want to build a website with Rails + React.js. I want to use the Rails MVC with the V being React.js.
[19:05:33] godzillaenlacasa: If I'm using a PostGRES RDS DB, do I still need the 'pg' gem in my Gemfile?
[19:05:34] smathy: IFrank00, why would your web pagination have anything to do with the PDF you're generating?
[19:06:00] mdw: can anyone reccomend a good book, or online guide, that explains well, using React.js and Rails together?
[19:06:38] scoot: has joined #RubyOnRails
[19:07:20] baweaver: has joined #RubyOnRails
[19:07:28] smathy: mdw, google.
[19:07:58] IFrank00: smathy, dont know why but I check and if I ask for lvh.me:3000/inspections.pdf it only show me the current page output of the will_paginate. On my controller I ask paginate to display 10 record for pages.
[19:08:16] chipotle: has joined #RubyOnRails
[19:08:42] fox_mulder_cp: evening hard core?
[19:08:52] IFrank00: smathy, What output or code do you need ??
[19:08:54] celly: has joined #RubyOnRails
[19:09:02] mdw: smathy I ask here because some people here may have written said book / blog
[19:09:11] fox_mulder_cp: IFrank00: hm. plz wait.
[19:09:15] smathy: IFrank00, ok, so you're using an action that paginates the results and you're wondering why the results are paginated?
[19:09:46] smathy: mdw, not that I know of.
[19:09:52] fox_mulder_cp: IFrank00: gem 'wicked_pdf' ?????????
[19:09:55] fox_mulder_cp: gem 'wkhtmltopdf-binary'
[19:09:57] prgmmr: has joined #RubyOnRails
[19:10:22] lemur: has joined #RubyOnRails
[19:10:50] prgmmr: Hello, any gems out there for authentication for api? I don't want people not using my app be able to use the api.
[19:11:02] IFrank00: fox_mulder_cp, thank you but I already have the prawn pdf gem all over my app :/ to much code.
[19:11:04] celly: has joined #RubyOnRails
[19:12:28] ElFerna: has joined #RubyOnRails
[19:12:42] vsmak: has joined #RubyOnRails
[19:13:15] arup_r: first time using https://rails-assets.org/ .. so as they said gem 'rails-assets-BOWER_PACKAGE_NAME' where `BOWER_PACKAGE_NAME` can be any a name which belongs to the site right?
[19:13:38] arup_r: if it doesn't belong, i can't use it..
[19:13:40] fox_mulder_cp: IFrank00: format.pdf do ????????? render pdf: "@article.title", template: 'articles/show.pdf.erb' # Excluding ".pdf" extension.
[19:13:55] IFrank00: smathy, what im asking is if theres a way to print when I ask for the pdf versi?n all the records. Like bypass the pagination. example @records has 20 items but with the pagination its only show 10 records for page, but on my pdf version I like to have the full 20 items If im making
[19:14:03] fox_mulder_cp: IFrank00: add this to show method
[19:14:19] lexileo: has joined #RubyOnRails
[19:15:09] smathy: IFrank00, the respond_to block.
[19:15:14] nocontrol: has joined #RubyOnRails
[19:15:26] IFrank00: fox_mulder_cp, I have a more complex pdf with a lot of costume stuff. but thank you any way
[19:15:29] kirillzh: has joined #RubyOnRails
[19:15:51] yfeldblum: has joined #RubyOnRails
[19:16:00] smathy: prgmmr, generally with an API you just give someone a private key to use in all their requests.
[19:16:11] fox_mulder_cp: IFrank00: format.pdf do is critical for generating
[19:16:18] maesitos: has joined #RubyOnRails
[19:16:57] prgmmr: smathy: how would I generate the private key?
[19:17:38] smathy: prgmmr, could be many different ways but SecureRandom.uuid would be my preference.
[19:18:05] prgmmr: Alright I'll take a look thanks.
[19:18:47] momomomomo: has joined #RubyOnRails
[19:22:01] VeryBewitching: has joined #RubyOnRails
[19:24:42] IFrank00: smathy, https://gist.github.com/Frank004/13db0163b104d0519150 this the code maybe I was think extract the .paginate(:page => params[:inspections], :per_page => 10) to another variable and use that variable for the view ???
[19:25:37] Quintasan: uh, is it normal that rails g scaffold doesnt use params.require(:object).permit(:attributes) under rails 4.2.5?
[19:27:07] IFrank00: smathy, I update the gist
[19:28:44] mrbubbles: has joined #RubyOnRails
[19:28:52] PedramT: has joined #RubyOnRails
[19:32:21] NeoHamled: has joined #RubyOnRails
[19:33:11] celly: has joined #RubyOnRails
[19:33:12] slash_nick: Anyone know of a really good json deserializer that uses jsonapi-serializer AND supports rails' nested_attributes?
[19:33:53] slash_nick: ActiveModelSerializers seems... wanting.
[19:33:56] gambl0re: has joined #RubyOnRails
[19:34:35] Scriptonaut: has joined #RubyOnRails
[19:35:15] scoot: has left #RubyOnRails: ()
[19:35:16] rubyonrailed: has joined #RubyOnRails
[19:35:50] Scriptonaut: In my migration, I am setting the activerecord logger level to error, but when I have pure sql in my migration it is still outputting all of the queries
[19:35:54] Scriptonaut: how can I make it not output the query?
[19:36:03] Scriptonaut: So far, the only way I've manage to do it is to: rake db:migrate VERBOSE=false
[19:36:11] MaDErroR123: has joined #RubyOnRails
[19:37:30] greengriminal: Hey all, I am trying to patch `redirect_to` to take an additional param and i am using it in my controller like so: https://gist.github.com/davidpatters0n/bd2fedd9c9214a9c75ba. However I am getting `wrong number of arguments (3 for 0..2)` which is odd. Am i missing something basic
[19:39:37] kirillzh: has joined #RubyOnRails
[19:39:46] smathy: IFrank00, no, you should do that pagination stuff inside the format.html block of your respond_to
[19:40:05] Scriptonaut: greengriminal: what's the true and empty {} for?
[19:40:43] braian: smathy: I change some lines and this is the result: https://gist.github.com/braiandickson/aee2702ee9fd1e17d58c still does not work :/
[19:41:01] greengriminal: Scriptonaut, https://gist.github.com/davidpatters0n/bd2fedd9c9214a9c75ba#file-redirect_to_patch-rb-L9
[19:41:55] greengriminal: my patch takes in 3 params, so therefore when i do `redirect_to url, {}, true` it would wok as expected.
[19:42:49] Scriptonaut: maybe your patch sin't being applied
[19:42:52] smathy: IFrank00, like the comment I just added.
[19:42:56] Scriptonaut: because it's telling you that it takes 0-2 args
[19:44:09] smathy: greengriminal, modules get mixed in before your module code is being read.
[19:44:38] smathy: greengriminal, why not just write your own method in ApplicationController like _redirect_to or something.
[19:45:23] smathy: braian, "does not work" doesn't help me understand what you're expecting it to do, and how what it is doing varies from that.
[19:46:18] smathy: braian, we established already that it *is* being called, I can tell you that ruby doesn't just not do what you tell it to randomly, so that statement is running. Explain what you think it should be doing, and how what it's actually doing varies from that.
[19:47:12] braian: smathy: Sorry, I have a form for create products, this products hasta bar code. If I dont write a bar code when it is created, then this callback should create it with the product.id and some '0's.
[19:47:45] pulgalip1: has joined #RubyOnRails
[19:48:04] smathy: braian, ok, and you understand what ||= does right?
[19:48:06] blackmesa: has joined #RubyOnRails
[19:48:38] braian: I can create products with the app without the "before_save :set_bar_code" line. But if I put that line in the product.rb the app does not create them, with or without bar codes
[19:49:42] braian: ||= -> if the var does not has valor then puts the right valor into it
[19:50:51] macsteps: has joined #RubyOnRails
[19:50:55] smathy: braian, no, not if it doesn't have a value, if it evaluates to false then it will put the right value into it.
[19:52:20] IFrank00: has joined #RubyOnRails
[19:52:28] srinidhi: has joined #RubyOnRails
[19:52:44] smathy: braian, but what you said just before that is even more alarming, you're saying that with that before_save in there your product isn't saved at all?
[19:52:47] kitsuneyo: has joined #RubyOnRails
[19:52:52] braian: smathy: ohhh sh1t, then in my schema I can initialize the field with a '' instead of nil, right{?
[19:53:19] smathy: braian, it's nothing to do with your DB schema.
[19:53:28] diegoviola: has joined #RubyOnRails
[19:53:32] braian: smathy: ok xD
[19:54:03] smathy: braian, what value does `self.cod_barra` have before that statement is executed?
[19:54:22] shilon: has joined #RubyOnRails
[19:54:24] smathy: braian, right, and does that evaluate to false in ruby?
[19:54:31] IFrank00: smathy, wow did not know that you can pass that in a block there
[19:54:55] smathy: IFrank00, I wasn't passing anything, just assigning the instance variable.
[19:55:03] braian: smathy: Now I'm using "if" for compare with ''
[19:55:12] braian: smathy: and it is working
[19:55:29] IFrank00: smathy, yes assigning correct word
[19:55:32] smathy: braian, ok cool. Still very confused why it wasn't saving at all, maybe you still had the `raise` in your actual code or something, but excellent.
[19:56:01] braian: smathy: Thanks, I understad somethings more now! :D
[19:56:10] IFrank00: smathy, now to refactor my code thank you.
[19:56:20] smathy: braian, you could also check out the empty? or blank? methods.
[19:56:26] smathy: braian, you're welcome.
[19:56:33] smathy: IFrank00, you're welcome.
[19:57:45] braian: smathy: Ok! Ill use it :)
[19:58:00] unl0ckd: has joined #RubyOnRails
[20:00:43] jottr: has joined #RubyOnRails
[20:01:16] blackmesa: has joined #RubyOnRails
[20:01:51] freezevee: has joined #RubyOnRails
[20:02:19] freezevee: can I get the :id of a url from jquery by DOM or something ?
[20:02:32] freezevee: I don't have it exposed in the page in my .erb
[20:02:42] freezevee: is there any way to get it elsewhere on the page ?
[20:03:07] codedmart: has joined #RubyOnRails
[20:03:17] smathy: freezevee, it'd be better to actually set it in some JS on the page because the URL doesn't identify which part is the actual :id vs just other segments of various different URL patterms.
[20:03:36] shilon: has joined #RubyOnRails
[20:03:38] freezevee: smathy: as a hidden field in the DOM ?
[20:06:25] smathy: freezevee, yes, or just in a script tag.
[20:07:11] ur5us: has joined #RubyOnRails
[20:07:46] gambl0re: has joined #RubyOnRails
[20:09:08] shock_one: has joined #RubyOnRails
[20:10:52] mdw: has joined #RubyOnRails
[20:11:04] doublemalt_: has joined #RubyOnRails
[20:11:09] diegoviola: has joined #RubyOnRails
[20:12:07] freezevee: smathy: live var my_id = "<%= my.id %>" ?
[20:12:46] nettoweb: has joined #RubyOnRails
[20:13:42] ferr: has joined #RubyOnRails
[20:15:48] jottr: has joined #RubyOnRails
[20:15:55] floror: has joined #RubyOnRails
[20:16:11] mdw7: has joined #RubyOnRails
[20:16:12] Scriptonaut: how do I set the log level in a rails migration to only show errors?
[20:17:05] mdw7_: has joined #RubyOnRails
[20:18:22] smathy: freezevee, yeah, you'll probably want to attach it to `window` or `document` or something.
[20:18:40] manfrin: has joined #RubyOnRails
[20:20:12] grahamsavage_: has joined #RubyOnRails
[20:21:04] netzfisch: has joined #RubyOnRails
[20:22:05] grahamsavage_: has joined #RubyOnRails
[20:23:55] grahamsavage_: has joined #RubyOnRails
[20:24:09] tetraktys: has joined #RubyOnRails
[20:24:18] EdwardIII: hrm, what comes after 'foo, bar, baz, quux'?
[20:24:23] tetraktys: Hey guys, what is the difference between calling Rake::Task['whatever'].invoke and system 'bundle exec rake whatever' ?
[20:24:25] tubbo: EdwardIII: real data.
[20:24:41] EdwardIII: that's no good for a unit test!
[20:24:49] EdwardIII: i'm trying to do a patch for button_to
[20:25:06] tubbo: EdwardIII: you can use whatever you want if it's truly dummy data.
[20:25:32] EdwardIII: yeah but i wanted to make the author happy
[20:25:40] EdwardIII: i usually use beavis & butthead characters for my tests
[20:25:55] tubbo: if daria.is_a? Dork
[20:26:12] safety_cut: has joined #RubyOnRails
[20:26:20] smathy: EdwardIII, wee, woo, wonk, derp, derpity derp
[20:26:21] baweaver: has joined #RubyOnRails
[20:29:16] aaronr: has joined #RubyOnRails
[20:29:34] seanrdev: has joined #RubyOnRails
[20:32:37] macsteps: has joined #RubyOnRails
[20:34:54] seanrdev: Hello I had a couple of questions if anyone minds. I have a separate machine with mysql installed via apt-get install mysql-server mysql-client if my rails website is going to be on another server do I still need to install libmysqlclient-dev on the mysql server? I assumed that I would install dev libraries on the webserver where rails is.
[20:35:55] Cohedrin: has joined #RubyOnRails
[20:37:11] jgt4: has joined #RubyOnRails
[20:37:15] rubyonrailed: has joined #RubyOnRails
[20:38:47] baweaver: has joined #RubyOnRails
[20:39:22] arup_r: When I was searching 'select2`, rails-assets.org, I got gem 'rails-assets-select2' .. but when I write $("#users").select2({ }); it gives me error as "Uncaught Error: No select2/compat/inputData" which has a solution like https://groups.google.com/forum/#!topic/select2/yifYbU1HPOY
[20:39:39] fox_mulder_cp: but u must setup a) firewall on mysql server for open 3306 port from ip of rails app, and add a right mysql user with ip mask
[20:39:42] arup_r: but with rails-assets.org I will fix it ?
[20:41:52] adre: has joined #RubyOnRails
[20:42:13] unl0ckd: has joined #RubyOnRails
[20:42:13] devdazed: has joined #RubyOnRails
[20:42:58] tildes: has joined #RubyOnRails
[20:43:14] Conflict: has joined #RubyOnRails
[20:43:38] lubekpl: has joined #RubyOnRails
[20:44:10] seanrdev: fox_mulder_cp, thanks
[20:45:30] jds: has joined #RubyOnRails
[20:45:48] godzillaenlacasa: anyone have decent knowledge of Rubber
[20:46:05] seanrdev: Installing rails from the synaptic package manager ok?
[20:46:12] adis: has joined #RubyOnRails
[20:46:34] lost_soul: has joined #RubyOnRails
[20:46:38] adis: has left #RubyOnRails: ()
[20:47:28] lost_soul_: has joined #RubyOnRails
[20:48:05] greengriminal: smathy, apologies for the delayed response. But yes I did do this initially. But the codebase i am working on is large and would require me to make that change throughout the code base.
[20:48:20] unl0ckd: I'm not positive, but the rails installed by package manager may be out of date compared to the gem install
[20:48:59] lost_soul_: Would anyone be able to tell me why I cannot get the form_for to pass the manufacturer_id attribute using this code? http://pastie.org/10716901
[20:49:28] lost_soul_: Been fighting this for days...no luck
[20:49:44] fox_mulder_cp: seanrdev: from ip - to ip, of course
[20:52:19] seanrdev: fox_mulder_cp, Ok thanks a lot!
[20:52:48] kitsuneyo: has joined #RubyOnRails
[20:54:40] Pazician: has joined #RubyOnRails
[20:56:19] mhoungbo: has joined #RubyOnRails
[20:58:48] diegoviola: has joined #RubyOnRails
[20:59:00] unl0ckd: has joined #RubyOnRails
[20:59:07] smathy: greengriminal, you have multiple ApplicationControllers?
[21:00:21] tvw: has joined #RubyOnRails
[21:00:33] unl0ckd: has joined #RubyOnRails
[21:00:47] greengriminal: smathy, no i don't have multiple applciation_controllers. But i am saying going with your suggestion (what i tried initially) would mean I would have to do a find and replace on _all_ `redirect_to` -> `_redirect_to`
[21:00:52] maesitos: has joined #RubyOnRails
[21:01:08] benlieb: has joined #RubyOnRails
[21:01:50] smathy: lost_soul_, it's not clear what you expect that code to do, nor what it's doing.
[21:01:52] assember: has joined #RubyOnRails
[21:02:04] kitsuneyo: has joined #RubyOnRails
[21:02:27] smathy: greengriminal, oh right, then just implement `def redirect_to` in your ApplicationController.
[21:02:33] smathy: greengriminal, sorry, I forgot what I'd recommended.
[21:03:06] lost_soul_: It's pulling a list of manufacturers from the db and making each available as a option in a drop down menu within a form. I need that selection from the dropdown to be passed onto the database as the manufacturer_id when I hit submit.
[21:03:48] lost_soul_: It works up to when I hit submit, where it's not passing the value of the dropdown to the database and the manufacturer id for the instance returns as 0
[21:04:48] manfrin: has joined #RubyOnRails
[21:06:02] DmitryBochkarev: has joined #RubyOnRails
[21:06:46] lost_soul_: which leads to what I assume is my actual problem: that I need to get the name of the manufacturers to be the options and then have the form pass the id of said manufacturer to the db
[21:06:52] nfk: has joined #RubyOnRails
[21:06:57] rodfersou: has joined #RubyOnRails
[21:07:26] lost_soul_: It works when it goes id => id, but not manufacturer name => manufacturer id
[21:07:47] EdwardIII: hrm this turned out trickier than i thought
[21:08:31] baweaver: has joined #RubyOnRails
[21:08:35] lemur: has joined #RubyOnRails
[21:08:42] smathy: lost_soul_, so you're looking at your logs where it shows you the parameters submitted with the POST and manufacture_id is not there?
[21:09:18] pulgalipe: has joined #RubyOnRails
[21:09:29] EdwardIII: i was thinking about trying to make this deep/recursive: https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/url_helper.rb#L330
[21:09:51] EdwardIII: but i don't know if it's right to just use parent[child] fieldnames to do that hehe
[21:09:59] EdwardIII: i'm guessing there's some other part of rails i should be using
[21:11:20] evenix: has joined #RubyOnRails
[21:12:18] n1lo_: has joined #RubyOnRails
[21:13:15] jtong: has joined #RubyOnRails
[21:13:45] greengriminal: smathy, created another gist based on your suggestion: https://gist.github.com/davidpatters0n/a5990b42eaee47c1e521
[21:14:50] smathy: greengriminal, super not redirect_to
[21:15:14] lost_soul_: smathy, it is, but it's passing the manufacturer_id as 0 when I use manufacturer's name. I guess my question here is, how can I get the form to show manufacturer names in the dropdown and pass the corresponding manufacturer_id instead of the manufacturer name
[21:17:36] greengriminal: :| - "undefined method `delete' for true:TrueClass" with the updated gist.
[21:17:50] SteenJobs: has joined #RubyOnRails
[21:17:53] smathy: lost_soul_, just as the docs suggest: http://devdocs.io/rails/actionview/helpers/formbuilder#method-i-select
[21:20:22] Synthead: has joined #RubyOnRails
[21:21:02] lost_soul_: Well, that makes a lot more sense. Thanks smathy, I hadn't run into that documentation when I was researching the issue. I'll be sure to bookmark the page for future use.
[21:21:45] smathy: greengriminal, calling `super` by itself will pass whatever parameters were passed to your overridden method.
[21:22:17] smathy: greengriminal, you needed to literally replace your redirect_to with super, ie. `super location.to_s` - or whatever you had.
[21:22:41] smathy: greengriminal, I'm assuming that you're already sure that none of your code uses/needs any of the other arguments for redirect_to.
[21:25:08] teaearlgraycold: So I have a default scope for my model ('updated_at: :desc'), but when I try to explicity sort it in the controller by a field it seems like the scope I specify has no effect
[21:26:07] teaearlgraycold: Disabling the default scope in the model gives the desired effect, but then it won't have the default sorting I'm looking for when no sort field is specified
[21:26:42] ElFerna: has joined #RubyOnRails
[21:26:46] lost_soul_: If I want to store year(s) as a string, would you guys suggest normalizing the data?
[21:27:00] teaearlgraycold: But why not store as a datetime?
[21:27:55] smathy: teaearlgraycold, not sure what option you think there is, if you have a default scope then it will be applied even when other scopes are supplied and if you disable it then it won't be applied.
[21:28:20] teaearlgraycold: smathy: I want a default scope /unless/ another scope is specified
[21:29:00] smathy: teaearlgraycold, so only disable it if another scope is specified.
[21:29:26] smathy: ...or even better, don't use a default scope, use a named scope, and only apply it if no other is specified.
[21:29:28] teaearlgraycold: How can I disable the scope? When I said I disabled it I commented it out :/
[21:29:55] smathy: teaearlgraycold, ah, well you can disable it somehow, I forget because I never use them, with_exclusive_scope or something - but use a named scope instead.
[21:30:28] mices: has joined #RubyOnRails
[21:30:29] lost_soul_: teaearlgraycold, I'm storing the year as a model year, for vehicles.
[21:30:31] Cohedrin: has joined #RubyOnRails
[21:30:40] mices: what's it like developing on windows?
[21:31:15] mices: none of the linux distros or fbsd work with my graphics adapter
[21:31:17] lost_soul_: I'm storing it as an integer, not string, sorry
[21:31:30] teaearlgraycold: lost_soul_: oh okay. Yeah just do a string and add verifies :year, with: /\d{4}/ or something like that
[21:32:34] teaearlgraycold: or /[12][90]\d{2}/
[21:33:15] smathy: Please shoot me.
[21:33:46] lost_soul_: Hmm, yeah, I'm storing it as a string. I implemented a method to search by year, but yeah, the traditional select_year won't work (obviously).
[21:34:21] lost_soul_: Sorry, not string, sigh. Integert.
[21:35:01] smathy: lost_soul_, did you try just using select_year?
[21:35:07] shock_one: has joined #RubyOnRails
[21:36:04] rubyonrailed: has joined #RubyOnRails
[21:36:30] dalpo: has joined #RubyOnRails
[21:37:04] lost_soul_: smathy, yep. That's the method I'm using right now, but because the year is stored as an integer, it does not pick it up and instead returns all value.
[21:37:50] kpwarr: in other web frameworks I've used I would create migrations by making a model file and then generating the migration based on the model file. I have just used the model generator with a single field and I was surprised when it made a migration file with that field, but the model file had no fields in it. what is going on here?