« Back to channel list

#RubyOnRails - 01 January 2016

« Back 1 day Forward 1 day »
[00:00:09] joshkovach: has joined #RubyOnRails
[00:03:43] reaVer: has left #RubyOnRails: ()
[00:04:43] siaW: has joined #RubyOnRails
[00:05:45] peeja: has joined #RubyOnRails
[00:09:38] pawnbox: has joined #RubyOnRails
[00:11:03] gaustin: has joined #RubyOnRails
[00:13:48] viner: has joined #RubyOnRails
[00:14:09] DLSteve: has joined #RubyOnRails
[00:14:55] lethjakman: has joined #RubyOnRails
[00:19:06] _Tariq: has joined #RubyOnRails
[00:21:46] bradleyprice: has joined #RubyOnRails
[00:24:16] drale2k: has joined #RubyOnRails
[00:30:36] Cervajz_: has joined #RubyOnRails
[00:32:03] sandstrom: has joined #RubyOnRails
[00:35:07] Cache_Money: has joined #RubyOnRails
[00:38:33] viner: has joined #RubyOnRails
[00:39:26] pawnbox: has joined #RubyOnRails
[00:42:55] diegoviola: has joined #RubyOnRails
[00:45:28] Cervajz__: has joined #RubyOnRails
[00:53:54] fox_mulder_cp: hm. how partial render word for object, not for it's childs? in article show a can say 'render article.comments', but how in article.index say 'render partial for all articles'?
[00:57:06] mary5030: has joined #RubyOnRails
[00:58:30] peeja: has joined #RubyOnRails
[01:00:13] s2013: has joined #RubyOnRails
[01:08:00] _Tariq: has joined #RubyOnRails
[01:09:11] pawnbox: has joined #RubyOnRails
[01:11:07] threeminutemonta: has joined #RubyOnRails
[01:11:12] diegoviola: has joined #RubyOnRails
[01:11:31] thejamespinto: has joined #RubyOnRails
[01:14:51] claytonzaugg: has joined #RubyOnRails
[01:16:53] pyemkey: has joined #RubyOnRails
[01:18:24] SteenJobs: has joined #RubyOnRails
[01:20:41] diego1: has joined #RubyOnRails
[01:20:45] diego1: has joined #RubyOnRails
[01:25:18] drale2k: has joined #RubyOnRails
[01:33:02] shibabu: has joined #RubyOnRails
[01:33:23] darkxploit: has joined #RubyOnRails
[01:36:32] arooni-mobile: has joined #RubyOnRails
[01:40:48] atomical: has joined #RubyOnRails
[01:41:50] juddey: has joined #RubyOnRails
[01:42:47] ascarter: has joined #RubyOnRails
[01:48:59] pawnbox: has joined #RubyOnRails
[01:50:00] duncannz: has joined #RubyOnRails
[01:51:10] Scripore: has joined #RubyOnRails
[01:57:31] _Tariq: has joined #RubyOnRails
[02:01:04] thejamespinto: has joined #RubyOnRails
[02:02:21] nickenchuggets: has joined #RubyOnRails
[02:03:08] nickenchuggets: has joined #RubyOnRails
[02:03:33] nickenchuggets: I'm having an issue with the `rails server` command
[02:03:46] havenwood: nickenchuggets: Error?
[02:03:58] nickenchuggets: where after maybe a few minutes, it says from the terminal: can only send to local networks 127.0.0.1
[02:04:23] nickenchuggets: when I started the command like this: `rails server -b 0.0.0.0`
[02:04:46] nickenchuggets: so at some point it seems to bind to 127.0.0.1
[02:04:51] nickenchuggets: instead of 0.0.0.0
[02:05:15] fox_mulder_cp: nickenchuggets: `rails about`?
[02:05:16] nickenchuggets: and this is WEBrick I'm using
[02:05:42] nickenchuggets: fox_mulder_cp: gives me the standard help output
[02:06:26] nickenchuggets: fox_mulder_cp: the output is the same as `rails help`
[02:06:27] fox_mulder_cp: oh, sorry, rake about
[02:06:53] fox_mulder_cp: what rails|ruby version
[02:07:20] nickenchuggets: Rails is 4.2.5, Ruby is 2.2.3-p173
[02:07:58] fox_mulder_cp: by the way, webrick - single thread for testing, no production using recommendation
[02:08:11] fox_mulder_cp: in rails 5 by default puma :)
[02:08:33] nickenchuggets: huh, interesting
[02:08:38] nickenchuggets: I had the same problem with Puma
[02:09:03] FailBit: why bind to 0.0.0.0?
[02:09:04] nickenchuggets: it's not a major issue, but it is kind of pesky having to restart the server every few minutes or so
[02:09:12] fox_mulder_cp: nickenchuggets: i use ruby 2.2.4 and rails 2.4.5, and webrick uptime for some day in dev env, but front - nginx
[02:09:17] diegoviola: happy new year
[02:09:21] FailBit: bind to 127.0.0.1 and set a firewall rule to dropall from external on that port
[02:09:33] nickenchuggets: FailBit: it's a VM
[02:09:38] fox_mulder_cp: but for some minutes - ooh, i don't know
[02:09:44] FailBit: then why bother
[02:09:49] fox_mulder_cp: nickenchuggets: use nginx as proxy frontend?
[02:10:06] nickenchuggets: fox_mulder_cp: I suppose I could, but I'd rather not
[02:10:17] FailBit: it's really easy to set up nginx for rails
[02:10:26] _Tariq: has joined #RubyOnRails
[02:10:26] nickenchuggets: yeah, I know, I use nginx myself
[02:11:12] nickenchuggets: at some point it seemed the default was to bind to 0.0.0.0, but now it seems to bind to localhost by default
[02:11:19] FailBit: https://gist.github.com/liamwhite/f64f44c5382d1ab1dbf1
[02:11:58] iateadonut: has joined #RubyOnRails
[02:12:01] nickenchuggets: simple enough I guess
[02:12:57] fox_mulder_cp: oh, about routes - i have a one form for edit. i want rename my 'post' save button to create or update. how i can think from what url i open this edit form?
[02:14:49] FailBit: this was the nginx config for my app when we used unicorns
[02:14:52] FailBit: https://raw.githubusercontent.com/derpibooru/derpibooru/master/config/nginx.conf.example?token=AJNg6BpEWT3RBHGSmDgeGDpcTQN_mlEHks5WjxuGwA%3D%3D
[02:15:41] fox_mulder_cp: ooh. 4am, but i don't want a sleep and refactor my blogapp to foundation from boostrap (
[02:16:43] lethjakman: has joined #RubyOnRails
[02:20:24] _Tariq: has joined #RubyOnRails
[02:25:02] FailBit: https://twitter.com/SSF1991/status/682718335033839616
[02:26:24] drale2k: has joined #RubyOnRails
[02:26:55] fox_mulder_cp: don't like am/pm, use 24h
[02:27:02] FailBit: I use 24h myself
[02:27:08] FailBit: it's 21:27, still 2015
[02:30:44] sleungcy: has joined #RubyOnRails
[02:32:45] DLSteve: has joined #RubyOnRails
[02:32:48] hackeron: has joined #RubyOnRails
[02:34:35] shibabu: has joined #RubyOnRails
[02:40:49] magdy: has joined #RubyOnRails
[02:40:52] fox_mulder_cp: gcm 'Migrate views to Zurb Foundation gem'
[02:40:53] fox_mulder_cp: [master 2f69003] Migrate views to Zurb Foundation gem 20 files changed, 2084 insertions(+), 259 deletions(-)
[02:41:24] fox_mulder_cp: my biggest commit. and 108 for BlogApp from official guide
[02:46:25] _Tariq: has joined #RubyOnRails
[02:52:18] johnflux_: has joined #RubyOnRails
[02:52:19] johnflux_: has joined #RubyOnRails
[02:55:46] emptyflask: has joined #RubyOnRails
[02:56:28] mheld: has joined #RubyOnRails
[02:56:30] dfr|wfh: has joined #RubyOnRails
[02:56:52] ruid: has joined #RubyOnRails
[02:56:52] ruid: has joined #RubyOnRails
[03:01:14] Pazician: has joined #RubyOnRails
[03:01:24] _Tariq: has joined #RubyOnRails
[03:04:44] viner: has joined #RubyOnRails
[03:05:14] A124: has joined #RubyOnRails
[03:14:58] doodlehaus: has joined #RubyOnRails
[03:17:35] smathy: has joined #RubyOnRails
[03:17:57] lethjakman: has joined #RubyOnRails
[03:18:45] pawnbox: has joined #RubyOnRails
[03:21:30] stannard: has joined #RubyOnRails
[03:23:14] threeminutemonta: has joined #RubyOnRails
[03:23:56] xlegoman: has joined #RubyOnRails
[03:27:34] drale2k: has joined #RubyOnRails
[03:28:19] ur5us: has joined #RubyOnRails
[03:31:56] sleungcy: has joined #RubyOnRails
[03:32:58] Y2KBug: has joined #RubyOnRails
[03:36:08] Y2KBug: hi everyone
[03:36:14] shibabu: has joined #RubyOnRails
[03:36:15] AlexTheLion: has joined #RubyOnRails
[03:37:01] Y2KBug: I'd like to know how to learn Rails, I was poking at it with railstutorial.org which was great but then I got to Chapter 8 and I've been stuck for 2 months without moving... It seems like a lot of work just for a basic login logout system
[03:37:15] Y2KBug: do people normally use gems for such system?
[03:37:30] Y2KBug: I'm completely confused and don't know where to go for help
[03:37:52] Y2KBug: Well I'm specifically looking for a different way to learn heh
[03:41:24] yfeldblum: has joined #RubyOnRails
[03:47:02] speakingcode: has joined #RubyOnRails
[03:49:25] fryguy: Y2KBug: yes people typically use gems for authentication and authorization
[03:53:31] bobbobbins: has joined #RubyOnRails
[03:53:43] Y2KBug: fryguy: do you know of a tutorial on that revolves around stuff like using gems
[03:55:03] fryguy: not really, gems aren't very special, it's just ruby code somewhere else
[03:59:52] SylarRuby: has joined #RubyOnRails
[04:02:38] dgynn: has joined #RubyOnRails
[04:02:46] FailBit: Y2KBug: typically
[04:02:53] FailBit: everyone uses devise for that
[04:03:06] FailBit: it's extremely easy to set up, configure, and forget
[04:03:09] pontiki: has joined #RubyOnRails
[04:03:53] mostlybadfly: has joined #RubyOnRails
[04:09:09] lethjakman: has joined #RubyOnRails
[04:16:43] sevenseacat: has joined #RubyOnRails
[04:17:51] braincrash: has joined #RubyOnRails
[04:18:56] pyemkey: has joined #RubyOnRails
[04:23:00] stannard: has joined #RubyOnRails
[04:23:20] pawnbox: has joined #RubyOnRails
[04:28:26] puria: has joined #RubyOnRails
[04:28:33] asccigcc: has joined #RubyOnRails
[04:28:37] drale2k: has joined #RubyOnRails
[04:36:40] brandoncc: has joined #RubyOnRails
[04:39:04] brandoncc: has left #RubyOnRails: ()
[04:39:57] ziggy: has joined #RubyOnRails
[04:44:04] diegoviola: floats can't be represented as json, right?
[04:44:38] diegoviola: => {Fri, 01 Jan 2016 04:37:01 UTC +00:00=>0.2690264169996226, Fri, 01 Jan 2016 04:37:04 UTC +00:00=>0.2429880960007722}
[04:44:41] diegoviola: for example, this
[04:46:13] havenwood: diegoviola: JSON.parse [6.28].to_json #=> [6.28]
[04:47:42] sevenseacat: of course floats are valid in json
[04:49:09] brandoncc: has joined #RubyOnRails
[04:49:34] dideler: has joined #RubyOnRails
[04:51:19] diegoviola: I'm trying to render something as json but I get a null back
[04:51:26] diegoviola: render json: @logins.to_json
[04:51:32] diegoviola: @logins = Measurement.login_chart_data
[04:51:59] diegoviola: my Measurement.login_chart_data is basically this: where(code: 'login_interval').group(:created_at).sum(:value)
[04:52:05] asccigcc: has joined #RubyOnRails
[04:52:18] diegoviola: [21] pry(main)> Measurement.login_chart_data.to_json
[04:52:21] diegoviola: => "{\"2016-01-01 04:37:01 UTC\":0.2690264169996226,\"2016-01-01 04:37:04 UTC\":0.2429880960007722}"
[04:52:38] ZiggyTheHamster: has joined #RubyOnRails
[04:52:39] ZiggyTheHamster: has joined #RubyOnRails
[04:52:44] diegoviola: I'm confused
[04:54:41] slash_nick: diegoviola: that string looks fine when put into a linter... null, huh? so js, can you show us that?
[04:55:50] diegoviola: I just solved the issue
[04:56:33] diegoviola: @logins was null
[04:57:24] slash_nick: which resulted in null json :D
[05:02:10] Pazician: has joined #RubyOnRails
[05:07:07] pawnbox: has joined #RubyOnRails
[05:08:19] AlexTheLion: Happy new year and may your mood migration never be down
[05:09:21] uberjar: has joined #RubyOnRails
[05:14:16] arup_r: has joined #RubyOnRails
[05:19:51] joshkovach: has joined #RubyOnRails
[05:20:47] ElFerna: has joined #RubyOnRails
[05:22:26] doublemalt_: has joined #RubyOnRails
[05:26:21] startupality: has joined #RubyOnRails
[05:27:29] nickenchuggets: got nginx set up on my dev box
[05:29:41] drale2k: has joined #RubyOnRails
[05:33:25] sevenseacat: i'm not sure why you would want that, but yay :)
[05:36:06] slash_nick: sevenseacat: my guess is lots of ajax directed at localhost?...view makes more requests than than webrick can handle quickly
[05:36:43] slash_nick: nickenchuggets: how's pry work for you with that setup?
[05:36:49] slash_nick: pretty well?
[05:37:03] nickenchuggets: I don't use pry
[05:37:40] slash_nick: oh what do you use?
[05:37:40] nickenchuggets: I'm using nginx for my dev setup because...
[05:37:51] slash_nick: for debugging, if not pry?
[05:37:57] nickenchuggets: rails server defaults to localhost for the binding address
[05:38:22] nickenchuggets: and if I bind to 0.0.0.0, after... every few minutes or so, it rebinds to localhost
[05:38:43] nickenchuggets: which isn't a huge problem, but it's a bit pesky having to restart the server every so often
[05:38:50] shibabu: has joined #RubyOnRails
[05:39:07] nickenchuggets: also, my dev machine is a GUI-less VM
[05:39:45] nickenchuggets: slash_nick: I don't use any debugging tools beyond the occasional 'puts' statement
[05:39:50] sevenseacat: if thats true, you should file it as a bug
[05:51:38] Megamos: has joined #RubyOnRails
[05:54:32] Sawbones: has joined #RubyOnRails
[05:59:07] arup_r: has joined #RubyOnRails
[06:00:29] peeja: has joined #RubyOnRails
[06:01:50] ishamo: has joined #RubyOnRails
[06:06:52] smoitra: has joined #RubyOnRails
[06:07:56] diegoviola: has joined #RubyOnRails
[06:12:44] claytonzaugg: has joined #RubyOnRails
[06:13:48] pawnbox: has joined #RubyOnRails
[06:20:47] pyemkey: has joined #RubyOnRails
[06:21:41] Cohedrin: has joined #RubyOnRails
[06:24:17] ur5us: has joined #RubyOnRails
[06:27:41] nerium: has joined #RubyOnRails
[06:28:53] nerium: Is there a way to serialize an ar relation object?
[06:30:50] drale2k: has joined #RubyOnRails
[06:34:07] siaW: has joined #RubyOnRails
[06:38:28] arup_r: nerium: http://api.rubyonrails.org/classes/ActiveModel/Serialization.html#method-i-serializable_hash you can.. The examples are true for the AR object as well
[06:40:07] nerium: arup_r: That???s for serializing single objects, I need to serialize a AR relation
[06:40:29] nerium: Like Person.first. I need to serialize Person.limit(10)
[06:40:40] nerium: The query, not the result
[06:49:53] arup_r: has joined #RubyOnRails
[06:52:43] juddey: has joined #RubyOnRails
[06:54:21] chipotle: has joined #RubyOnRails
[06:56:53] peeja: has joined #RubyOnRails
[06:59:36] worknick: has joined #RubyOnRails
[07:00:28] worknick: this is my pet.rb https://gist.github.com/wrknck/f6bb01f3d77a1f26d237 where i create another model instance of model "Album" whenever new pet is added. how can I now add that newly created albums id to this new pet? self.album_id=@album.id do not add anything. its blank.
[07:15:30] chipotle_: has joined #RubyOnRails
[07:17:14] chipotle: has joined #RubyOnRails
[07:18:55] joshkovach: has joined #RubyOnRails
[07:21:03] AlexTheLion: has joined #RubyOnRails
[07:22:59] worknick: nvm. just a missing save.
[07:28:16] matthewd: nerium: No. Why do you want to?
[07:29:29] matthewd: slash_nick: We'll take care of the backport if needed... but that's probably considered a new feature, and thus not eligible
[07:32:03] drale2k: has joined #RubyOnRails
[07:33:13] Megamos: has joined #RubyOnRails
[07:40:17] smoitra_: has joined #RubyOnRails
[07:42:53] shibabu: has joined #RubyOnRails
[07:51:06] s2013: has joined #RubyOnRails
[07:57:39] nyaa: has joined #RubyOnRails
[08:00:21] RegulationD: has joined #RubyOnRails
[08:09:34] Radar: Don't you people have NYE celebrations
[08:12:11] threeminutemonta: has joined #RubyOnRails
[08:16:39] chipotle_: has joined #RubyOnRails
[08:22:19] nerium: has joined #RubyOnRails
[08:22:20] pyemkey: has joined #RubyOnRails
[08:23:43] darutoko: has joined #RubyOnRails
[08:23:57] smoitra: has joined #RubyOnRails
[08:26:22] atmosx: happy new year
[08:26:23] srinidhi: has joined #RubyOnRails
[08:29:25] chipotle: has joined #RubyOnRails
[08:30:52] njero: has joined #RubyOnRails
[08:33:02] drale2k: has joined #RubyOnRails
[08:40:46] smoitra: happy new year
[08:41:02] chipotle: atmosx: you too!
[08:41:07] chipotle: how have you been buddy?
[08:44:54] shibabu: has joined #RubyOnRails
[08:48:54] jxs_: has joined #RubyOnRails
[08:50:10] arup_r: has joined #RubyOnRails
[08:56:54] atmosx: very well, 2015 was the most prolific year so far, I'm eager to see how 2016 is going to end up, you
[08:57:17] thejamespinto: has joined #RubyOnRails
[08:57:38] arooni-mobile: has joined #RubyOnRails
[08:58:02] nerium: has joined #RubyOnRails
[08:58:16] pawnbox: has joined #RubyOnRails
[09:01:51] chipotle: atmosx: prolific year for you?
[09:01:59] chipotle: what do you mean?
[09:08:22] yfeldblum: has joined #RubyOnRails
[09:13:29] iateadonut: has joined #RubyOnRails
[09:31:50] chipotle_: has joined #RubyOnRails
[09:34:08] drale2k: has joined #RubyOnRails
[09:37:43] sleungcy: has joined #RubyOnRails
[09:47:06] nerium: has joined #RubyOnRails
[09:50:00] shibabu: has joined #RubyOnRails
[09:54:50] chipotle: has joined #RubyOnRails
[10:00:27] atmosx: chipotle: I got married, finished my MPharm degree exams ( \o/ ), my wife got a transfer, finished building my house (no loans) and got hired at an amazing remote job :-P
[10:04:28] arup_r: has joined #RubyOnRails
[10:11:13] PedramT: has joined #RubyOnRails
[10:19:48] agit0: has joined #RubyOnRails
[10:23:55] pyemkey: has joined #RubyOnRails
[10:25:48] PedramT: has joined #RubyOnRails
[10:26:31] mdw: has joined #RubyOnRails
[10:27:06] Audrius: has joined #RubyOnRails
[10:33:07] CocoJumbo: has joined #RubyOnRails
[10:34:16] chipotle_: has joined #RubyOnRails
[10:34:36] AzaToth: has joined #RubyOnRails
[10:35:10] drale2k: has joined #RubyOnRails
[10:37:51] steffkes: has joined #RubyOnRails
[10:37:51] steffkes: has joined #RubyOnRails
[10:38:39] sleungcy: has joined #RubyOnRails
[10:39:53] reaVer_: has joined #RubyOnRails
[10:40:58] reaVer_: has left #RubyOnRails: ()
[10:42:07] agit0: has joined #RubyOnRails
[10:45:11] pawnbox: has joined #RubyOnRails
[10:47:02] qejk: has joined #RubyOnRails
[10:49:46] FernandoBasso: has joined #RubyOnRails
[10:55:05] kies: has joined #RubyOnRails
[10:55:57] pawnbox: has joined #RubyOnRails
[11:04:07] jondot: has joined #RubyOnRails
[11:05:00] PedramT_: has joined #RubyOnRails
[11:05:04] fox_mulder_cp: oh. have a question - i want recursive relations - client has_many client - it's really?
[11:06:21] Megamos: has joined #RubyOnRails
[11:06:45] fox_mulder_cp: sevenseacat: reursive relation for same object
[11:06:54] sevenseacat: fox_mulder_cp: what's your question?
[11:17:14] arup_r: fox_mulder_cp: Yes, possible `self join` ?
[11:18:27] fox_mulder_cp: arup_r: i read about strategies http://stackoverflow.com/questions/8236796/writing-associations-for-a-recursive-relationship
[11:18:36] fox_mulder_cp: http://stackoverflow.com/questions/19041843/rails-model-association-for-recursive-user-model-relationship
[11:20:11] IFrank00: has joined #RubyOnRails
[11:21:12] alphaatom: has joined #RubyOnRails
[11:26:43] zpe: has joined #RubyOnRails
[11:33:24] srinidhi: has joined #RubyOnRails
[11:36:07] wethu: has joined #RubyOnRails
[11:36:17] grassass: has joined #RubyOnRails
[11:36:19] drale2k: has joined #RubyOnRails
[11:39:17] sleungcy: has joined #RubyOnRails
[11:50:42] build22: has joined #RubyOnRails
[11:52:00] stamina: has joined #RubyOnRails
[11:55:39] kmckelvin: has joined #RubyOnRails
[11:57:59] nyaa: has joined #RubyOnRails
[11:58:36] Cervajz_: has joined #RubyOnRails
[12:01:52] RegulationD: has joined #RubyOnRails
[12:02:58] robbyoconnor: has joined #RubyOnRails
[12:06:32] futilegames: has joined #RubyOnRails
[12:07:49] sandstrom: has joined #RubyOnRails
[12:08:26] pyemkey: has joined #RubyOnRails
[12:12:03] Megamos: has joined #RubyOnRails
[12:20:15] mrchris: has joined #RubyOnRails
[12:20:44] fgo: has joined #RubyOnRails
[12:23:20] snowy: has joined #RubyOnRails
[12:26:10] mrbubbles: has joined #RubyOnRails
[12:31:56] worknick: has joined #RubyOnRails
[12:32:08] Jet4Fire: has joined #RubyOnRails
[12:32:30] worknick: i want to pass a non model temp variable from form to controller. i added it to permit params. but then it gives error while creating new model instance. should i use the old accr accessible?
[12:32:44] sevenseacat: worknick: !debug
[12:32:44] helpa: worknick: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[12:32:56] worknick: sevenseacat: because this a theoratical question?
[12:33:07] sevenseacat: if you have an error message, its not a theoretical question
[12:33:40] sevenseacat: and the answer is no, you shouldnt use attr_accessible.
[12:34:37] fgo: has joined #RubyOnRails
[12:34:59] worknick: in my create mothed where i do @var = Model.new(params) it says cant create new var because :myvar is unknown attribute. It is. Becaues its not part of my model. I just want to pass it to my params for some condition cehcking.
[12:35:19] worknick: where params=(:allmymodelattributes, :myvar)
[12:35:45] sevenseacat: if you can't gist some semblance of code, i can't help you.
[12:36:40] sevenseacat: you've been here long enough to know how we work here in this channel.
[12:37:23] drale2k: has joined #RubyOnRails
[12:40:05] sleungcy: has joined #RubyOnRails
[12:41:40] worknick: sevenseacat: this is my controller and params https://gist.github.com/wrknck/30e463eb21f576ddf024 i get error at line @pet_activity = PetActivity.new(pet_activity_params) saying unknown attribute: isimg
[12:42:02] worknick: Because isimg is not part of my PetActivity Model. i just need for temporary checking.
[12:42:12] pawnbox: has joined #RubyOnRails
[12:42:15] sevenseacat: so what is isimg and why are you trying to pass it to the model?
[12:42:59] worknick: :isimg can be true or false. if its true this record contains image. i have to assign album id. else not.
[12:45:04] worknick: sevenseacat: i am not trying to pass it to model. i want to pass it to controller.
[12:45:26] sevenseacat: its already in the controller - you're permitting it and passing it to the model, which is where the error is coming from
[12:45:48] worknick: yes. I am looking workaround for this.
[12:45:54] worknick: to pass a non model var to controller.
[12:45:58] sevenseacat: if you dont need to pass it to the model, then don't even permit it because you don't need it
[12:46:01] sevenseacat: its already in the controller!
[12:46:26] sevenseacat: whitelisting is to sanitize params *to pass to the model*
[12:46:28] worknick: if i remove it from permitted params list how can i do if params[:isimg] ??
[12:46:35] sevenseacat: exactly like that
[12:47:14] sevenseacat: except with the right name, because your isimg value is inside params[:pet_activity]
[12:47:31] worknick: :isimg is the name.
[12:47:54] sevenseacat: indeed, and params[:isimg] will always be nil.
[12:48:52] worknick: you just said to use it like that...
[12:49:02] sevenseacat: [20:47:13] sevenseacat: except with the right name, because your isimg value is inside params[:pet_activity]
[12:49:08] sevenseacat: check your submitted params
[12:49:26] worknick: "pet_id"=>"25", "isimg"=>"true"}, "commit"=>"Share"}
[12:49:32] worknick: last line of my post call.
[12:50:01] sevenseacat: because look, its inside a nested hash.
[12:51:03] worknick: sevenseacat: https://gist.github.com/wrknck/98d9aa04b89260f3c436
[12:51:12] neoliis: has joined #RubyOnRails
[12:51:23] sevenseacat: look, it *is* inside the params[:pet_activity] hash!
[12:51:37] worknick: yes. but i dont know how to access it. how do i access it?
[12:51:55] nerium: has joined #RubyOnRails
[12:51:57] worknick: params[:pet_act][:isimg] ??
[12:52:16] sevenseacat: :pet_act != :pet_activity
[12:52:28] sevenseacat: this is where learning the basics of ruby comes in handy before trying to learn rails
[12:52:41] worknick: short hand?
[12:54:39] wethu: has joined #RubyOnRails
[13:00:30] FooMunki: has joined #RubyOnRails
[13:06:09] nerium: has joined #RubyOnRails
[13:11:14] USvER: has joined #RubyOnRails
[13:12:16] Cervajz: has joined #RubyOnRails
[13:12:49] Cervajz__: has joined #RubyOnRails
[13:25:25] mrbubbles: has joined #RubyOnRails
[13:30:40] kies: has joined #RubyOnRails
[13:33:03] threeminutemonta: has joined #RubyOnRails
[13:36:51] Cervajz: has joined #RubyOnRails
[13:38:49] MaDErroR123: has joined #RubyOnRails
[13:38:54] agit0: has joined #RubyOnRails
[13:40:50] sleungcy: has joined #RubyOnRails
[13:43:53] ruid: has joined #RubyOnRails
[13:43:53] ruid: has joined #RubyOnRails
[13:49:19] mdw: has joined #RubyOnRails
[13:52:13] drale2k: has joined #RubyOnRails
[13:52:31] pawnbox: has joined #RubyOnRails
[13:55:39] PedramT: has joined #RubyOnRails
[13:56:01] pawnbox: has joined #RubyOnRails
[13:58:17] sandstrom: has joined #RubyOnRails
[13:58:56] nonmadden: has joined #RubyOnRails
[14:05:15] _Tariq: has joined #RubyOnRails
[14:07:28] FernandoBasso: has joined #RubyOnRails
[14:09:33] meoblast001: has joined #RubyOnRails
[14:12:58] c355E3B: has joined #RubyOnRails
[14:15:34] johnflux_: has left #RubyOnRails: ("Konversation terminated!")
[14:18:36] Juampi: has joined #RubyOnRails
[14:18:51] mrchris: Good morning
[14:21:16] Juampi: Good morning guys. Happy new year!
[14:22:01] nertzy: has joined #RubyOnRails
[14:22:10] Juampi: I was wondering, what is the estimated release date for Rails 5? I know the beta is already out.
[14:22:32] sevenseacat: Juampi: there isn't one.
[14:23:43] Juampi: I see. Alright then!
[14:26:24] mary5030: has joined #RubyOnRails
[14:29:09] _Tariq: has joined #RubyOnRails
[14:29:52] peeja: has joined #RubyOnRails
[14:29:54] Palsson: has joined #RubyOnRails
[14:31:11] s2013: has joined #RubyOnRails
[14:33:38] viner: has joined #RubyOnRails
[14:35:40] lacrymology: has joined #RubyOnRails
[14:39:23] jottr: has joined #RubyOnRails
[14:40:58] meoblast: has joined #RubyOnRails
[14:41:40] sleungcy: has joined #RubyOnRails
[14:46:01] doodlehaus: has joined #RubyOnRails
[14:49:10] nerium: has joined #RubyOnRails
[14:51:34] ElFerna: has joined #RubyOnRails
[14:51:51] ghox: has joined #RubyOnRails
[14:54:58] nerium: Is there a way to serialize an ar relation object? Is Marshal.dump the way to go maybe?
[14:55:31] sevenseacat: serialize to what format? eg. .to_json will serialize to json
[14:55:42] matthewd: nerium: No, and I doubt it (but you can obviously try). Why do you want to?
[14:56:03] nerium: sevenseacat: Any format
[14:56:17] nerium: matthewd: I need to store objects for later use
[14:56:21] sevenseacat: you kinda can't specify to 'any format'
[14:56:53] nerium: sevenseacat: I dont care about the format as long as its storable
[14:57:22] sevenseacat: storing activerecord objects seems like not a good idea
[14:57:27] sevenseacat: why do you want to do this?
[14:57:37] brklyn8900: has joined #RubyOnRails
[14:57:41] shibabu: has joined #RubyOnRails
[14:57:49] nerium: sevenseacat: I would like to push havey jobs to a queue and run them later on.
[14:57:57] sevenseacat: definitely no t a good idea then
[14:58:08] FailBit: And you can't fetch them within the jobs?
[14:58:12] sevenseacat: store the IDs or primitives of your objects, and re-fetch the data
[14:58:16] FailBit: because that's what I would do
[14:58:23] FailBit: since they're jobs
[14:58:45] nerium: I???m trying to build a generic interface where any AR relation object can be posponed and ran later
[14:59:07] sevenseacat: "running relations later" doesnt make sense
[14:59:37] nerium: sevenseacat: why?
[14:59:45] sevenseacat: what is there to run?
[14:59:52] sevenseacat: you have a relation, which is just data
[14:59:55] sevenseacat: you don't run data
[15:00:12] nerium: sevenseacat: No, a relation is to become data
[15:00:21] sevenseacat: ACTION raises eyebrow
[15:01:03] nerium: Movie.limit(10) is just a relational object. The query might take 1 day to run, you dont know this.
[15:01:06] sevenseacat: a relation is a lazy-loaded result of running a database query
[15:01:46] gaustin: has joined #RubyOnRails
[15:01:58] sevenseacat: so what exactly is the point of running Movie.limit(10) in a background job?
[15:02:20] nerium: sevenseacat: Just for the record (to set the level of knowage from my part). I???ve been using rails since version 1.2. So I???m not a beginner
[15:02:30] nerium: sevenseacat: Like a said, it might be slow
[15:02:35] sevenseacat: i never said you were, i'm just not seeinf the point of what you're doing
[15:02:55] defsdoor: has joined #RubyOnRails
[15:03:03] nerium: sevenseacat: I just want to be clear that I understand the basics of rails and that I???m not trying to do something unrealtistic
[15:03:06] sevenseacat: nerium: so what is the point of fetching all of the data if you're just going to then... do nothing with it?
[15:03:16] sevenseacat: loading data isnt a 'job'
[15:03:18] nerium: sevenseacat: Who said that?
[15:03:48] nerium: No, I said I want to store the ar obect and run it later. I didn???t say what I would like to do with the data
[15:04:20] sevenseacat: i dont think that makes sense.
[15:04:23] sevenseacat: and i dont think its going to work.
[15:04:38] nerium: I can do a bunch of things with it. 1. store in a a predefined cached table. Push it to the client and so on
[15:04:39] matthewd: nerium: If you want to have a conversation about solving your overall problem, you're going to need to actually discuss it.
[15:05:07] matthewd: nerium: If you already know exactly what you're doing, and just want a flat answer to your question-as-asked, it's "no."
[15:05:19] sevenseacat: i cannot think of a use case in which your rails app will create a relation then push the actual loading of that relation to a background job
[15:06:08] nerium: sevenseacat: Running slow jobs async and pushing the results to the client?
[15:06:09] chipotle: has joined #RubyOnRails
[15:06:43] nerium: matthewd: My question was just if there???s a good way (now a days) to persist an ar relation. That???s it
[15:06:47] sevenseacat: in which case, you would push the details of the job to be performed to the worker, not the actual relation itself
[15:07:11] srinidhi: has joined #RubyOnRails
[15:07:23] matthewd: nerium: Then the answer is no.
[15:07:44] nerium: sevenseacat: Would would that be? I???m trying to define a generic interface for it so anything hard coded wont work
[15:08:01] nerium: matthewd: Marshal.dump?
[15:08:19] nerium: matthewd: I tried it for a few objects and it seams to work fine
[15:08:21] neoliis: has joined #RubyOnRails
[15:08:39] nerium: I???m just curius why it would work long term
[15:08:46] nerium: *wouldn???t
[15:08:49] matthewd: nerium: Across processes?
[15:09:10] nerium: matthewd: No, in the same mem space
[15:09:21] matthewd: It hopefully goes without saying that it could break even over a patch release of rails, but that's a different matter
[15:09:54] nerium: matthewd: What do you mean?
[15:09:59] codelahoma: has joined #RubyOnRails
[15:10:05] sevenseacat: ACTION bites back what I was just about to say
[15:10:13] nerium: that you would store an objectl, upgrade rails and then run it?
[15:11:30] matthewd: nerium: Yes. If you're not storing it / moving it across processes, you don't need to serialize anything in the first place... and if you're moving across processes, there's likely a moment when those processes may not be running identical code
[15:11:43] matthewd: (unless you always do a full stop-the-world for deploys)
[15:12:10] sevenseacat: which is why things like sidekiq tell you to only store primitive objects like Integers and strings
[15:15:06] lxsameer: has joined #RubyOnRails
[15:17:49] ElFerna: has joined #RubyOnRails
[15:19:13] Cervajz: has joined #RubyOnRails
[15:19:18] atomical: has joined #RubyOnRails
[15:21:04] agit0: has joined #RubyOnRails
[15:21:17] ElFerna: has joined #RubyOnRails
[15:22:03] peeja: has joined #RubyOnRails
[15:23:55] chipotle: has joined #RubyOnRails
[15:27:15] nerium: has joined #RubyOnRails
[15:27:50] The_Phoenix: has joined #RubyOnRails
[15:30:28] TheMoonMaster: has joined #RubyOnRails
[15:36:15] PedramT: has joined #RubyOnRails
[15:36:26] futilegames: has joined #RubyOnRails
[15:38:44] smathy: has joined #RubyOnRails
[15:40:58] voker57: has joined #RubyOnRails
[15:40:58] voker57: has joined #RubyOnRails
[15:41:36] stannard: has joined #RubyOnRails
[15:42:01] nerium: has joined #RubyOnRails
[15:44:22] rgtk: has joined #RubyOnRails
[15:46:01] FailBit: https://static.pinboard.in/ob/ob.041.jpg
[15:47:20] futilegames_: has joined #RubyOnRails
[15:48:37] disgrntld: has joined #RubyOnRails
[15:49:37] Megamos: has joined #RubyOnRails
[15:53:11] DEA7TH: has joined #RubyOnRails
[15:53:50] njero: has joined #RubyOnRails
[15:56:37] nullwarp: has joined #RubyOnRails
[15:57:31] nerium: has joined #RubyOnRails
[15:59:41] sankaber: has joined #RubyOnRails
[16:01:35] brklyn8900: has joined #RubyOnRails
[16:03:03] jondot: has joined #RubyOnRails
[16:05:29] s2013: has joined #RubyOnRails
[16:06:10] futilegames_: has joined #RubyOnRails
[16:09:26] shibabu: has joined #RubyOnRails
[16:15:38] rgtk: has joined #RubyOnRails
[16:17:47] mrchris: has joined #RubyOnRails
[16:18:23] peeja: has joined #RubyOnRails
[16:18:45] Palsson: has joined #RubyOnRails
[16:20:38] Megamos: has joined #RubyOnRails
[16:25:31] xlegoman: has joined #RubyOnRails
[16:26:54] xlegoman: has joined #RubyOnRails
[16:31:36] chridal: Thinking about using something like Firebase to do our chat server untill Rails 5.0 is fully out. Their pricing deals with storage and transfer. How can I meaningfully reason about how much transfer we're going to need?
[16:31:39] arup_r: has joined #RubyOnRails
[16:33:20] ElFerna: has joined #RubyOnRails
[16:36:49] PedramT_: has joined #RubyOnRails
[16:37:54] FailBit: how much are they charging
[16:39:11] chridal: FailBit: https://www.firebase.com/pricing.html we're thinking about the $149 plan
[16:39:48] DEA7TH: I messed up my migration a bit. Can I drop a table from the cli?
[16:39:53] PedramT_: has joined #RubyOnRails
[16:39:55] speakingcode: has joined #RubyOnRails
[16:40:05] FailBit: DEA7TH: ActiveRecord::Migration.drop_table
[16:40:29] chridal: FailBit: do you think it's an expensive service?
[16:40:46] _HombreTepic: has joined #RubyOnRails
[16:40:47] darkxploit: has joined #RubyOnRails
[16:41:23] FailBit: but most cloud stuff is, so..
[16:41:53] Papierkorb: *cough* Ejabberd with Strophe.JS
[16:42:28] xlegoman_: has joined #RubyOnRails
[16:42:52] Papierkorb: chridal: If you're looking for a chat server .. use a chat server? Stuff is OSS and most likely outscales the concurrent connections your rails can handle
[16:42:52] darkxploit: has joined #RubyOnRails
[16:43:05] FailBit: I like to avoid cloud stuff wherever possible because it just ends up turning into a giant money pit
[16:43:11] sleungcy: has joined #RubyOnRails
[16:43:55] FailBit: but then again I also include the cost of the vending machines at the colo :P
[16:44:41] USvER: has joined #RubyOnRails
[16:47:01] chridal: We're currently deployed on Heroku so that limits it a bit.
[16:47:09] FailBit: you're wasting your money
[16:47:14] chridal: Also we're deploying in less than 2 weeks.
[16:47:37] xlegoman: has joined #RubyOnRails
[16:50:08] chridal: FailBit: Wasting our money deploying on Heroku you mean?
[16:50:55] chridal: It's a good alternative for us atm given the time constraints and the size of our team.
[16:51:39] xlegoman: has joined #RubyOnRails
[16:53:34] puria: has joined #RubyOnRails
[16:54:08] _Tariq: has joined #RubyOnRails
[16:55:13] nullwarp: has joined #RubyOnRails
[16:56:38] TheMoonMaster: has joined #RubyOnRails
[16:56:54] shibabu: has joined #RubyOnRails
[16:57:54] catfoodkid: has joined #RubyOnRails
[17:00:13] chridal: Papierkorb: Do you have any experience with Ejabberd? What we basically need is a chat service that a iOS device will consume with the posibility of unlimited channels.
[17:01:15] Papierkorb: chridal: It serves as my WebSocket API (and Chat) back-end. WhatsApp is also using it because of its scalability.
[17:01:24] Papierkorb: The configuration file is a bit fiddly though
[17:01:38] nerium: has joined #RubyOnRails
[17:01:54] Papierkorb: Its syntax isn't .. 100% YAML compliant. Tip: Always "quote" your string values. Will save you some headache.
[17:02:03] arup_r: has joined #RubyOnRails
[17:04:29] DEA7TH: I've created a new model inheriting from ActiveRecord::Base, and I've created a migration to add its table, in the migration I also try to add attributes to it, but Rails fails to do this? Error message is undefined method `arel_table' for Ironing
[17:05:04] DEA7TH: the migration goes like Booking.ironing.create
[17:05:07] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[17:05:11] ziyadb: has joined #RubyOnRails
[17:05:42] chubijs: has joined #RubyOnRails
[17:06:13] DEA7TH: I'll look for the relevant parts
[17:06:35] chubijs: A quick question - is rubymine free after 30 days if I need it for personal use?
[17:06:43] pontiki: chubijs: no
[17:06:51] chubijs: Ok, then i've been given false info lol
[17:06:57] pontiki: chubijs: i don't know what it does, though
[17:07:07] chubijs: I saw it somewhere that If i'm a student i can use it for free
[17:07:17] pontiki: chubijs: as in, it might let you keep using it, like sublime does, but with nag screens?
[17:07:20] chubijs: Ok, thank you, pontiki
[17:07:35] pontiki: honestly, i don't know
[17:07:41] fox_mulder_cp: i'm use mcedit :)
[17:07:53] pontiki: there are, i think, community editions that are free?
[17:08:04] chubijs: I just really wanted to give it a try. Because as far as reviews go, it seems to be a really good rails IDE
[17:08:08] pontiki: also, they just changed their licensing structure
[17:08:46] pontiki: give it a go for the 30 days at least
[17:10:29] smathy: chubijs, "for personal use" and "student" are different things. They have a student program: https://www.jetbrains.com/student/
[17:10:42] _Tariq: has joined #RubyOnRails
[17:10:55] Papierkorb: Oh, and @ejabberd, you'll want to add your own authentication backend. Meaning people accessing the server can authenticate against your rails app. https://gist.github.com/Papierkorb/7466c24b6fa58fe20af7 is basically my script to do that chridal
[17:11:14] fox_mulder_cp: my development located in lxc vm into azure ubuntu vm, i can connect to this vm only from host node. i don't want nat for vm's ssh for editor
[17:11:26] Papierkorb: Hacky but it works.
[17:11:33] DEA7TH: Is this code enough? https://gist.github.com/VelizarHristov/c51a4e257bc29117b1ba
[17:13:07] chubijs: Okay, tyvm smathy
[17:13:18] ElFerna: has joined #RubyOnRails
[17:13:26] smathy: chubijs, you're welcome.
[17:13:32] chubijs: pontiki, the only free versions I could find were cracked lol. But i dont want to go that route. I think.
[17:14:22] smathy: DEA7TH, !gist-usage - for next time
[17:14:22] helpa: DEA7TH: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[17:14:41] DEA7TH: ah, I forgot about this
[17:14:47] Megamos: Anyone else had problems reindexing sunspot in test environment?
[17:14:54] catfoodkid: has joined #RubyOnRails
[17:15:10] shapeshifter: I have a problem with ActionMailer. When I send an email with an attachment where the filename contains an umlaut (??), then the filename gets garbled or at least encoded incorrectly and then mail clients have trouble opening the file. The filename should be "Bestell??bersicht R354524050.pdf" (provided when doing attachments["<name here>"] =, but in the email source, this is filename="=?UTF-8?B?Q
[17:15:16] shapeshifter: mVzdGVsbMO8YmVyc2ljaHQgUjM1NDUyNDA1MC5wZGY=?=" and when I save the PDF in thunderbird, it gets saved as "Bestell???bersicht R354524050.pdf (invalid encoding)"
[17:15:31] DEA7TH: I also tried naming the table `ironings` but that didn't fix it.
[17:16:15] DEA7TH: I generated the migration without the model, and created a file for the model - maybe I should've generated a model migration? Or maybe I need to refresh it somehow, but Ironing.reset_column_information yields method not found.
[17:16:17] smathy: DEA7TH, re-run your db:migrate with the --trace option and paste the output of that into your gist please.
[17:16:44] chipotle: has joined #RubyOnRails
[17:16:55] nerium: has joined #RubyOnRails
[17:17:51] smathy: DEA7TH, although I think the problem is that you need to Ironing.reset_column_information too - to get the
[17:18:03] smathy: DEA7TH, ...to get the association stuff setup properly.
[17:18:38] DEA7TH: smathy: https://gist.github.com/VelizarHristov/c51a4e257bc29117b1ba (it's the same link, I know)
[17:19:14] DEA7TH: smathy: Ironing.reset_column_information yielded unexisting method
[17:20:35] Pazician: has joined #RubyOnRails
[17:21:08] lacrymology: has joined #RubyOnRails
[17:21:15] smathy: DEA7TH, you will definitely need to use `ironings` as the table name -or- specify the table in the model.
[17:21:43] smathy: DEA7TH, but that the method doesn't exist suggests that Rails isn't loading that model class at all.
[17:21:59] DEA7TH: smathy: ironings didn't work.
[17:22:16] DEA7TH: (still undefined method reset_column_information)
[17:22:57] catfoodkid: has joined #RubyOnRails
[17:23:00] smathy: DEA7TH, right, as I said, although that will create a problem, that isn't the explanation for the "undefined method" problem. That's as if Rails isn't loading the model class at all.
[17:23:23] DEA7TH: ACTION looking up on rails autoloading models
[17:23:28] smathy: DEA7TH, I don't know how Rails would do that, maybe the Rails autoloading exits if it can't find the table.
[17:23:53] smathy: DEA7TH, honestly, I'd just have the create_table migration in its own migration, then do the data update in a separate one.
[17:23:58] DEA7TH: smathy: in the console, I can access Ironing, but Ironing.first is unexisting.
[17:24:03] akshat: has joined #RubyOnRails
[17:24:13] smathy: DEA7TH, now *that* is probably because of the table name.
[17:24:35] DEA7TH: smathy: that happens at a moment when my DB doesn't have any table for Ironing
[17:24:41] DEA7TH: neither ironing nor ironings
[17:25:27] smathy: DEA7TH, ok, well it'd still happen if you had `ironing` table name without setting it explicitly in the model :)
[17:25:29] DEA7TH: will split into two separate migrations, but between them, the app will be in an unusable state - is that OK?
[17:25:38] smathy: ...but yeah, to get past your underlying problem I'd split the migration in two.
[17:26:10] DEA7TH: I thought the concept of migrations is that it's usable at any point between them, although I've never needed that property
[17:26:46] smathy: DEA7TH, well - depends on how busy your app is, you'd run both in the same migration I assume so the window for issues is probably small. The other alternative is to just use raw SQL for your update.
[17:28:54] smathy: DEA7TH, that really depends on when the migration is run vs when the app is restarted (and hence new classes loaded), and whether your DB change is compatible with your old code, and your new code compatible with your old DB.
[17:29:11] smathy: DEA7TH, it also depends on your DB's transaction isolation setting.
[17:29:26] atomical: has joined #RubyOnRails
[17:29:46] SylarRuby: has joined #RubyOnRails
[17:29:48] smathy: ...and whether your DB supports transactional DDL.
[17:30:14] DEA7TH: oh, my app has 2 users in total. :D
[17:30:30] smathy: In summary, no, that sort of safety is not something migrations even set out to guarantee :)
[17:30:51] smathy: ...with only two users I'd just do your deploy in a window when you know they're not using the system (heavily).
[17:31:21] DEA7TH: that's >50% of the time. Ok, will split in two migrations
[17:31:30] DEA7TH: good to know for future applications, though
[17:35:12] kknight: has joined #RubyOnRails
[17:35:17] atm0sphere: has joined #RubyOnRails
[17:35:43] ibouvousaime: has joined #RubyOnRails
[17:37:01] smathy: DEA7TH, FWIW, for busy apps I usually set up my depoy.rb so it puts the app into maintenance mode during any deployment that has a migration.
[17:37:20] mrbubbles: has joined #RubyOnRails
[17:37:38] matthewd: DEA7TH: Something (not shown in your gist) is creating an Ironing *module*.. unrelated to the newly-appearing table
[17:37:44] catfoodkid: has joined #RubyOnRails
[17:38:11] DEA7TH: matthewd: You're right! Ironing.class # => Module
[17:38:22] DEA7TH: also splitting it didn't fix
[17:38:28] DEA7TH: I'll just fix the module
[17:42:13] stannard: has joined #RubyOnRails
[17:43:55] sleungcy: has joined #RubyOnRails
[17:44:10] stannard: has joined #RubyOnRails
[17:46:22] smathy: Heh, nice catch.
[17:46:31] lethjakman: has joined #RubyOnRails
[17:47:37] dopie: has joined #RubyOnRails
[17:52:14] nerium: has joined #RubyOnRails
[17:53:21] DEA7TH: can I replace all instances of Ironing::Application with Rails.application?
[17:53:43] DEA7TH: looks like it's used for routes
[17:56:13] kmckelvin: has joined #RubyOnRails
[17:56:34] USvER: has joined #RubyOnRails
[17:57:32] neoliis: has joined #RubyOnRails
[17:57:56] SylarRuby: has joined #RubyOnRails
[17:58:12] legohead: has joined #RubyOnRails
[17:58:13] PedramT: has joined #RubyOnRails
[18:02:46] Tempesta: has joined #RubyOnRails
[18:07:59] nerium: has joined #RubyOnRails
[18:10:30] atomical_: has joined #RubyOnRails
[18:12:41] drim: has joined #RubyOnRails
[18:13:01] drim: what can be the reason, the digest for my application.js is wrong on staging env?
[18:14:11] atomical: has joined #RubyOnRails
[18:14:25] srinidhi: has joined #RubyOnRails
[18:14:52] ur5us: has joined #RubyOnRails
[18:15:36] s2013: has joined #RubyOnRails
[18:18:21] mdw: has joined #RubyOnRails
[18:19:15] chipotle_: has joined #RubyOnRails
[18:20:39] build22: has left #RubyOnRails: ()
[18:21:21] akshat: has joined #RubyOnRails
[18:21:51] mary5030: has joined #RubyOnRails
[18:23:24] viner: has joined #RubyOnRails
[18:27:24] ruid: has joined #RubyOnRails
[18:30:34] shibabu: has joined #RubyOnRails
[18:32:33] PedramT: has joined #RubyOnRails
[18:33:17] nerium: has joined #RubyOnRails
[18:34:23] asoliman: has joined #RubyOnRails
[18:35:17] asoliman: has left #RubyOnRails: ()
[18:38:39] choke: has joined #RubyOnRails
[18:40:09] kknight: has joined #RubyOnRails
[18:41:11] Hans267: has joined #RubyOnRails
[18:42:06] meoblast001: has joined #RubyOnRails
[18:42:11] diegoviola: has joined #RubyOnRails
[18:42:29] diegoviola: I'm having issues with turbolinks and the js ready function, should I just disable turbolinks?
[18:42:36] diegoviola: how do you guys deal with this issue, if you do?
[18:42:57] diegoviola: s/guys/folks/
[18:43:07] tbuehlmann: if you are missing the know-how to correctly use turbolinks, disable it
[18:43:13] slash_nick: diegoviola: honestly i've always disabled it
[18:43:29] tbuehlmann: I personally really like and use turbolinks
[18:43:29] fox_mulder_cp: i don't know about turbolinks tooo (
[18:43:35] diegoviola: ok seems to be working for me now after I just added ready
[18:43:58] diegoviola: I thought it wouldn't work
[18:44:01] drim: otherwise, you can simply include jquery.turbolink to fix that
[18:44:13] diegoviola: I was having issues before
[18:44:27] choke: I'm with slash_nick on that one, I've always disabled it for the most part
[18:44:37] tbuehlmann: you _thought_ it wouldn't work?!
[18:44:42] nerium: has joined #RubyOnRails
[18:44:48] slash_nick: choke: it just doesn't have what plants need
[18:45:00] sleungcy: has joined #RubyOnRails
[18:45:41] choke: slash_nick definitely.. Of course, I've done very few actual apps that require actual javascript code or html views so there is that
[18:48:19] FernandoBasso: has joined #RubyOnRails
[18:50:43] pawnbox: has joined #RubyOnRails
[18:51:21] gambl0re: has joined #RubyOnRails
[18:51:48] arup_r: has joined #RubyOnRails
[18:52:39] diegoviola: I'm getting this issue:
[18:52:41] diegoviola: Asset was not declared to be precompiled in production.
[18:52:42] diegoviola: Add `Rails.application.config.assets.precompile += %w( chartkick.js )` to `config/initializers/assets.rb` and restart your server
[18:52:50] diegoviola: should I just do what says in there, or is there a better way to fix this?
[18:52:51] thejamespinto: has joined #RubyOnRails
[18:54:10] slash_nick: choke: weird... opposite here. i usually turn it off when i start writing a lot of ajaxy js
[18:54:49] slash_nick: diegoviola: that's what to do... if you're not including the asset in your js manifest, it won't precompile
[18:54:57] slash_nick: UNLESS you do what it says there..
[18:55:04] tvon: has joined #RubyOnRails
[18:55:08] slash_nick: you tend to do this with assets you dont want on every page
[18:55:09] choke: slash_nick that makes sense. I've known rails for a very short time ( less than a year really ) and learned it mostly to take over writing a JSON api -- which doesn't need it
[18:55:12] Cervajz: has joined #RubyOnRails
[18:55:51] diegoviola: slash_nick: I have //= require chartkick in my application.js file
[18:56:33] slash_nick: diegoviola: then i'd expect it to precompile... are you sure you ran the precompile task since adding it there?
[18:56:56] diegoviola: slash_nick: no, I didn't but I'm also in development mode
[18:57:01] diegoviola: so do I have to?
[18:57:49] slash_nick: ..noooo. shouldn't.
[18:58:30] diegoviola: not sure why I'm getting this then
[19:00:00] brklyn8900: has joined #RubyOnRails
[19:00:37] slash_nick: i dunno.. you'd have to share code for me to assume it's anything more than a typo :P
[19:01:14] diegoviola: <%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>
[19:01:19] diegoviola: I actually have this in my layout
[19:01:28] diegoviola: when I take that out the error goes away
[19:01:47] diegoviola: but I need this, otherwise my charts won't load
[19:04:48] nerium: has joined #RubyOnRails
[19:05:55] slash_nick: nah... if you have application.js in your layout, then you wouldn't need a javascript include tag for chartkick
[19:06:22] ziggy: has joined #RubyOnRails
[19:06:23] ziggy: has joined #RubyOnRails
[19:07:22] mrbubbles: has joined #RubyOnRails
[19:08:20] futilegames: has joined #RubyOnRails
[19:09:35] diegoviola: Error Loading Chart: No adapter found
[19:09:41] diegoviola: <%= javascript_include_tag "http://www.google.com/jsapi", "chartkick" %>
[19:09:45] diegoviola: it's expecting me to include this
[19:11:49] diegoviola: ok so I've included <%= javascript_include_tag "http://www.google.com/jsapi" %> before application and now it works
[19:11:52] diegoviola: but that's ugly
[19:12:03] lacrymology: has joined #RubyOnRails
[19:12:03] diegoviola: I wonder if I can include this jsapi in my application.js too
[19:13:53] slash_nick: diegoviola: if you can include it's source in your project, then you can
[19:14:29] diegoviola: but application.js requires a file, it won't do urls, right?
[19:14:37] diegoviola: I need to download that file to my project?
[19:15:25] fox_mulder_cp: oh. offtop - how to in lxc create ubuntu vm with my own requested release - lxc--create -t ubuntu -n test -r wily |--release wily fails execution
[19:15:29] slash_nick: diegoviola: yup
[19:16:05] slash_nick: how you do that is up to you... if you just curl it > app/assets/javascripts/foobar.js then you won't get updates... that might be okay with you
[19:17:42] diegoviola: I would like to not have to worry about updates
[19:17:49] diegoviola: so should I just include in my layout then?
[19:23:20] slash_nick: sounds good to me :) it's not ugly imo
[19:24:27] sankaber: has joined #RubyOnRails
[19:27:11] pawnbox: has joined #RubyOnRails
[19:27:12] stannard: has joined #RubyOnRails
[19:29:16] doodlehaus: has joined #RubyOnRails
[19:30:06] atmosx: has joined #RubyOnRails
[19:30:09] mary5030: has joined #RubyOnRails
[19:30:09] sergey_makagon: has joined #RubyOnRails
[19:30:27] djbkd: has joined #RubyOnRails
[19:31:09] tibra: has joined #RubyOnRails
[19:31:25] FooMunki: has joined #RubyOnRails
[19:33:25] PedramT_: has joined #RubyOnRails
[19:34:35] ruid: has joined #RubyOnRails
[19:34:36] ruid: has joined #RubyOnRails
[19:35:21] Cervajz__: has joined #RubyOnRails
[19:37:56] viner: has joined #RubyOnRails
[19:38:08] nerium: has joined #RubyOnRails
[19:39:17] sameerynho: has joined #RubyOnRails
[19:41:58] lacrymology: has joined #RubyOnRails
[19:45:48] sleungcy: has joined #RubyOnRails
[19:45:50] viner: has joined #RubyOnRails
[19:46:21] jxs_: has joined #RubyOnRails
[19:46:49] thejamespinto: has joined #RubyOnRails
[19:49:54] diego1: has joined #RubyOnRails
[19:51:43] PedramT: has joined #RubyOnRails
[19:52:34] bradleyprice: has joined #RubyOnRails
[19:52:57] diego1: has joined #RubyOnRails
[19:53:59] chipotle: has joined #RubyOnRails
[19:55:25] meoblast: has joined #RubyOnRails
[19:59:06] AlexTheLion: has joined #RubyOnRails
[19:59:23] pawnbox: has joined #RubyOnRails
[20:01:08] lethjakman: has joined #RubyOnRails
[20:01:21] meoblast001: has joined #RubyOnRails
[20:01:25] doodlehaus: has joined #RubyOnRails
[20:02:19] kadoppe: has joined #RubyOnRails
[20:09:23] futilegames: has joined #RubyOnRails
[20:11:26] meoblast001: has joined #RubyOnRails
[20:17:56] bobbobbins: has joined #RubyOnRails
[20:18:37] ewnd9: has joined #RubyOnRails
[20:25:28] viner: has joined #RubyOnRails
[20:27:39] peeja_: has joined #RubyOnRails
[20:31:50] ziggy: has joined #RubyOnRails
[20:31:56] ziggy: has joined #RubyOnRails
[20:33:06] shibabu: has joined #RubyOnRails
[20:33:32] asoliman: has joined #RubyOnRails
[20:34:30] existensil: has joined #RubyOnRails
[20:37:37] AlexTheLion_: has joined #RubyOnRails
[20:37:51] unreal_: has joined #RubyOnRails
[20:39:07] doodlehaus: has joined #RubyOnRails
[20:39:55] Cohedrin: has joined #RubyOnRails
[20:40:00] diegoviola: has joined #RubyOnRails
[20:40:27] ElFerna: has joined #RubyOnRails
[20:43:30] Cervajz: has joined #RubyOnRails
[20:44:14] marcdel: has joined #RubyOnRails
[20:44:56] diegoviola: has joined #RubyOnRails
[20:46:19] jxs_: has joined #RubyOnRails
[20:48:16] jxs_: has joined #RubyOnRails
[20:56:28] thejamespinto: has joined #RubyOnRails
[20:57:14] nfk|laptop: has joined #RubyOnRails
[20:59:17] chipotle: has joined #RubyOnRails
[21:00:46] djbkd: has joined #RubyOnRails
[21:01:49] stannard: has joined #RubyOnRails
[21:05:00] ur5us: has joined #RubyOnRails
[21:07:46] yfeldblum: has joined #RubyOnRails
[21:09:41] sycofly: has joined #RubyOnRails
[21:11:50] ur5us: has joined #RubyOnRails
[21:13:56] _Tariq: has joined #RubyOnRails
[21:16:29] s2013: has joined #RubyOnRails
[21:20:18] AlexTheLion_: has joined #RubyOnRails
[21:23:27] zpe: has joined #RubyOnRails
[21:23:28] brklyn8900: has joined #RubyOnRails
[21:24:34] pawnbox: has joined #RubyOnRails
[21:26:59] sankaber: has joined #RubyOnRails
[21:28:41] doodlehaus: has joined #RubyOnRails
[21:29:51] _Tariq: has joined #RubyOnRails
[21:30:40] ElFerna: has joined #RubyOnRails
[21:35:01] phrozen77: has joined #RubyOnRails
[21:36:01] viner: has joined #RubyOnRails
[21:36:12] wethu: has joined #RubyOnRails
[21:40:05] diegoviola: has joined #RubyOnRails
[21:40:12] diegoviola: https://gist.github.com/90ade74b0f36b2970184
[21:40:17] diegoviola: how can I fix this mess of a controller?
[21:40:44] diegoviola: I don't like the #index method being that big, but I need all that data (it's a dashboard), and I don't like the #login_data and #report_data being in there
[21:41:53] Cohedrin: well if you look at the view and decide you really need all those instance variables
[21:42:02] Cohedrin: and theres no other way of doing it
[21:42:37] jottr: has joined #RubyOnRails
[21:42:54] Cohedrin: then you can seperate the instance variable declarations into methods
[21:42:59] Cohedrin: and that will make it "cleaner"
[21:43:13] rhizome: @correspondences = Correspondence.some_method; @measurements = Measurement.some_method
[21:43:16] Cohedrin: what do you mean by you don't like login data and report data there
[21:43:19] matthewd: diegoviola: A number of those calculations sound like business logic
[21:45:23] rhizome: @stats = SomeClass.method_that_creates_a_hash_or_ostruct
[21:46:26] diegoviola: matthewd: they are business logic, yes
[21:46:38] diegoviola: https://gist.github.com/f90ba861593c82de81e5
[21:46:41] diegoviola: here's the models
[21:47:13] sleungcy: has joined #RubyOnRails
[21:47:36] diegoviola: I just want to organize it better, make it cleaner, I have no idea how
[21:47:50] matthewd: Business logic doesn't go in controllers
[21:47:54] diegoviola: because it keeps getting larger, the app
[21:48:39] brandoncc: has joined #RubyOnRails
[21:49:17] diegoviola: how do you suggest I rewrite this then?
[21:49:21] kitsuneyo: has joined #RubyOnRails
[21:49:35] chipotle: has joined #RubyOnRails
[21:50:12] diegoviola: @average_login_time = Measurement.average_login_time
[21:50:19] diegoviola: Measurement.average_login_time is actually a method in the model
[21:50:36] _Tariq: has joined #RubyOnRails
[21:51:23] diegoviola: you mean I should create instance methods instead and instantiate the models only once?
[21:51:31] diegoviola: and call @stats.foo in the view?
[21:51:39] diegoviola: I'm confused
[21:54:37] pawnbox: has joined #RubyOnRails
[21:56:36] chipotle_: has joined #RubyOnRails
[21:57:04] brandoncc: has joined #RubyOnRails
[21:57:43] brandoncc: has joined #RubyOnRails
[22:00:50] nullwarp: has joined #RubyOnRails
[22:03:16] slash_nick: diegoviola: not quite... at least that's not what i think is meant...
[22:03:39] TheMoonMaster: has joined #RubyOnRails
[22:04:04] asoliman: has left #RubyOnRails: ()
[22:04:33] slash_nick: controllers should utilize the objects that are required in order to get the job done and to render a response within the request/response cycle... the objects it uses could be models, or classes provided by gems, or POROs you write yourself...
[22:07:02] slash_nick: diegoviola: this is an example of how to wrap your business logic up in something other than a model or controller: https://github.com/rthbound/eenie_meenie
[22:11:10] diegoviola: hrm, I'm confused
[22:11:25] blackhuey: has joined #RubyOnRails
[22:12:44] diegoviola: you mean I should use something like facades?
[22:12:48] lethjakman: has joined #RubyOnRails
[22:14:57] pawnbox: has joined #RubyOnRails
[22:15:17] s2013: has joined #RubyOnRails
[22:19:38] ziyadb: has joined #RubyOnRails
[22:23:23] jottr: has joined #RubyOnRails
[22:23:53] brklyn8900: has joined #RubyOnRails
[22:24:37] Rodya_: has joined #RubyOnRails
[22:24:46] diegoviola: that makes more sense now
[22:25:59] diegoviola: Cohedrin: by separating the instance variables into methods, you mean using something like helpers?
[22:26:16] Cohedrin: I mean you can do it however you want
[22:26:31] Cohedrin: I would just make some methods within the controller that set the instance varaibles to whatever you want them to be
[22:26:40] Cohedrin: easier to read/understand imo that way
[22:26:46] Cohedrin: but you can do helpers if you'd like
[22:27:11] kitsuneyo: has joined #RubyOnRails
[22:29:12] drim: when using uglifier with sprocket, the digest is wrong which lead to a 404. Any idea how to fix that?
[22:29:25] diegoviola: I'm not sure how that would work, because I need those instance variables in the #index method
[22:29:49] kitsuneyo: has joined #RubyOnRails
[22:30:12] diegoviola: I use those instance variables in dashboard/index.html.erb
[22:36:50] neoliis: has joined #RubyOnRails
[22:37:32] smathy: drim, wrong as in you run `sha256sum public/assets/your_file-FINGERPRINT.css` and you get something OTHER than FINGERPRINT?
[22:38:45] new_bruins: has joined #RubyOnRails
[22:44:57] GragHarker: has joined #RubyOnRails
[22:45:50] circ-user-dSmqi: has joined #RubyOnRails
[22:47:36] ewnd9: has joined #RubyOnRails
[22:48:11] atomical_: has joined #RubyOnRails
[22:48:23] futilegames: has joined #RubyOnRails
[22:48:30] sublimate: has joined #RubyOnRails
[22:49:46] AwchinBruh: has joined #RubyOnRails
[22:50:11] Sawbones: has joined #RubyOnRails
[22:54:26] chipotle: has joined #RubyOnRails
[22:56:24] wethu: has joined #RubyOnRails
[22:57:00] eToThePiIPower: has joined #RubyOnRails
[22:58:28] diegoviola: https://gist.github.com/diegoviola/5e0adbed3eb46d95aa1f
[22:58:34] diegoviola: I've just moved the methods to my model
[22:58:53] diegoviola: but my controller still feels bulky with all those instance methods
[22:59:02] diegoviola: any ideas how to improve this further?
[22:59:14] atomical: has joined #RubyOnRails
[22:59:32] AwchinBruh: has left #RubyOnRails: ("Leaving")
[23:00:08] rhizome: diegoviola: didn't i paste the url to the metz refactoring video a couple weeks ago
[23:00:54] AwchinBruh: has joined #RubyOnRails
[23:00:57] diegoviola: rhizome: I read the metz stuff but I still have a hard time getting my brain adjusted to that
[23:01:56] diegoviola: rhizome: metz would probably create different classes for Sedex, Department, Delivery and so on
[23:02:48] diegoviola: rhizome: I know she said something about a dashboard controller instantiating only one object
[23:02:57] diegoviola: and using facades for calling the rest
[23:03:20] diegoviola: I don't know I want to go that far
[23:04:08] stannard: has joined #RubyOnRails
[23:05:01] ElFerna: has joined #RubyOnRails
[23:05:01] rhizome: you don't have to do as much meta as she does
[23:05:51] rhizome: dump all that stuff into a class and change your invocations in the view from @foo to @thing.foo
[23:05:59] smathy_: has joined #RubyOnRails
[23:06:44] diegoviola: sounds good, thanks
[23:07:03] rhizome: you can have a data structure with objects, json, and whatever else you like
[23:07:26] yfeldblum: has joined #RubyOnRails
[23:09:11] shibabu: has joined #RubyOnRails
[23:12:11] ElFerna: has joined #RubyOnRails
[23:14:34] pawnbox: has joined #RubyOnRails
[23:15:00] lethjakman: has joined #RubyOnRails
[23:15:28] kitsuneyo: has joined #RubyOnRails
[23:18:09] manfrin: has joined #RubyOnRails
[23:21:33] asoliman: has joined #RubyOnRails
[23:22:26] alex88: has joined #RubyOnRails
[23:22:34] Pazician: has joined #RubyOnRails
[23:24:06] diegoviola: my views just keep getting bulkier and bulkier
[23:24:19] diegoviola: should I use something like slim or just keep moving stuff to partials?
[23:24:30] diegoviola: what do you guys tend to do?
[23:25:03] rhizome: what do you mean by "bulk"?
[23:26:14] diegoviola: https://gist.github.com/diegoviola/41fc33f055464a3821f8
[23:26:19] diegoviola: this is my index view right now
[23:26:30] diegoviola: I don't know, just feels verbose to me
[23:29:58] Cohedrin: degoviola if you're unhappy with the view containing lots of elments, you can always use helpers
[23:30:25] Cohedrin: slim isn't going to make it less bulky, its just going to not have tons of html everywhere
[23:31:18] Cohedrin: if you like the syntax of slim then go for it, it's what I use and I'm personally a fan, but its not going to remove the bulk you're talking about
[23:31:35] s2013: has joined #RubyOnRails
[23:32:02] Cohedrin: 72 lines also isn't terrible, especially if this is your first rails app
[23:33:01] Cohedrin: as you go you'll obvs figure out some patterns, that are useful to you, and be able to extract some of your more commonly used code to helpers that you can reuse
[23:34:47] ewnd9: has joined #RubyOnRails
[23:34:49] rhizome: that's not bad, but like i said weeks ago you can combine the bottom three divs if you want to sometime.
[23:35:39] s2013: has joined #RubyOnRails
[23:35:43] kitsuneyo: has joined #RubyOnRails
[23:36:09] diegoviola: yes, I still need to move some of that stuff to my layout
[23:36:24] rhizome: not so much that, whatever you're thinking
[23:36:24] fox_mulder_cp: now have interesting skill - update blogapp layout for google microlayout
[23:37:34] Helheim: has joined #RubyOnRails
[23:39:00] nerium: has joined #RubyOnRails
[23:39:02] pontiki: rhizome: what was the link to metz's refactoring video?
[23:39:25] diegoviola: rhizome: sorry I might have misread you, not sure what you mean by bottom three divs
[23:39:26] pontiki: is it the one from bathconf 2015?
[23:49:09] sleungcy: has joined #RubyOnRails
[23:50:25] PedramT: has joined #RubyOnRails
[23:53:18] Contigi777: has joined #RubyOnRails
[23:53:23] nyaa: has joined #RubyOnRails
[23:53:27] _Tariq: has joined #RubyOnRails
[23:53:44] legohead258: has joined #RubyOnRails
[23:54:37] Mia: has joined #RubyOnRails
[23:54:38] Mia: has joined #RubyOnRails
[23:55:23] tvon_: has joined #RubyOnRails
[23:55:26] Sawbones_: has joined #RubyOnRails
[23:55:44] jtdowney: has joined #RubyOnRails
[23:55:44] jtdowney: has joined #RubyOnRails
[23:56:05] k1io-: has joined #RubyOnRails
[23:57:12] matthewd_: has joined #RubyOnRails
[23:57:27] machuga_: has joined #RubyOnRails
[23:57:43] Obi_obi_: has joined #RubyOnRails
[23:57:46] jxf_: has joined #RubyOnRails
[23:57:53] acosonic_: has joined #RubyOnRails
[23:57:56] pfg_: has joined #RubyOnRails
[23:57:58] amitchellbullard: has joined #RubyOnRails
[23:58:24] arathald_: has joined #RubyOnRails
[23:58:25] machty_: has joined #RubyOnRails
[23:58:26] RubyNewbey____: has joined #RubyOnRails
[23:58:40] jlyndon_: has joined #RubyOnRails
[23:58:41] sdn90_: has joined #RubyOnRails
[23:58:42] Puffball_: has joined #RubyOnRails
[23:58:42] andatche_: has joined #RubyOnRails
[23:58:43] sublimate_: has joined #RubyOnRails
[23:58:43] rheddry: has joined #RubyOnRails
[23:58:43] iamdevnul_: has joined #RubyOnRails
[23:58:51] it_tard: has joined #RubyOnRails
[23:58:57] borkdude_: has joined #RubyOnRails
[23:59:08] arthurnn: has joined #RubyOnRails
[23:59:09] goezz: has joined #RubyOnRails
[23:59:15] p8m_: has joined #RubyOnRails
[23:59:18] robbyoconnor: has joined #RubyOnRails
[23:59:23] ur5us: has joined #RubyOnRails
[23:59:23] alxndr_: has joined #RubyOnRails
[23:59:25] Y_Ichiro_: has joined #RubyOnRails
[23:59:29] davidcelis: has joined #RubyOnRails
[23:59:29] davidcelis: has joined #RubyOnRails
[23:59:33] czetter_: has joined #RubyOnRails
[23:59:43] drupald: has joined #RubyOnRails
[23:59:43] jacobat_: has joined #RubyOnRails
[23:59:54] thejoecarroll_: has joined #RubyOnRails