« Back to channel list

#RubyOnRails - 29 July 2016

« Back 1 day Forward 1 day »
[00:00:16] fryguy: erikcw: see session_store in config/
[00:01:30] erikcw: fryguy: :cookie_store
[00:01:31] flashpoint9: has joined #RubyOnRails
[00:01:51] fryguy: k have you tried logging in via an incognito browser?
[00:02:13] flashpoi_: has joined #RubyOnRails
[00:03:27] evansparkman: has joined #RubyOnRails
[00:03:33] erikcw: fryguy: Just tried it, same result. 422 status code on my auth endpoint
[00:03:58] fryguy: k, not sure what else could have changed then
[00:04:07] arBmind1: has joined #RubyOnRails
[00:05:12] jenrzzz: has joined #RubyOnRails
[00:05:26] quazimodo: has joined #RubyOnRails
[00:05:27] quazimod1: has joined #RubyOnRails
[00:06:26] wrkrcoop: has joined #RubyOnRails
[00:15:33] barhum2013: has joined #RubyOnRails
[00:24:50] hwcomcn: has joined #RubyOnRails
[00:28:21] siaw23: has joined #RubyOnRails
[00:30:45] macsteps: has joined #RubyOnRails
[00:31:19] yardenbar: has joined #RubyOnRails
[00:32:05] jenrzzz: has joined #RubyOnRails
[00:32:05] jenrzzz: has joined #RubyOnRails
[00:36:32] hannelita: has joined #RubyOnRails
[00:44:04] adre: has joined #RubyOnRails
[00:46:11] ur5us: has joined #RubyOnRails
[00:46:59] jenrzzz: has joined #RubyOnRails
[00:47:07] ur5us: has joined #RubyOnRails
[00:47:12] dopamean_: has joined #RubyOnRails
[00:50:01] daveomcd: has joined #RubyOnRails
[00:51:03] xall: has joined #RubyOnRails
[00:53:00] roamingdog: has joined #RubyOnRails
[00:55:23] _Tariq: has joined #RubyOnRails
[01:02:18] hahuang61: has joined #RubyOnRails
[01:04:18] roamingdog: has joined #RubyOnRails
[01:10:06] jstransky: has joined #RubyOnRails
[01:19:32] A_Drone: has joined #RubyOnRails
[01:20:19] Spami: has joined #RubyOnRails
[01:22:00] Spami: I have the following line: tests.map(&:result)
[01:22:04] Spami: that return ["passed", "passed", "failed"]
[01:22:23] Spami: is there an easy way to know if all result aren't identical?
[01:23:07] SteenJobs: has joined #RubyOnRails
[01:23:20] dlite: has joined #RubyOnRails
[01:23:23] thisisfingstoopi: has joined #RubyOnRails
[01:30:24] blackmesa: has joined #RubyOnRails
[01:32:01] ur5us: has joined #RubyOnRails
[01:34:02] zpe: has joined #RubyOnRails
[01:36:24] ekinmur: has joined #RubyOnRails
[01:36:41] Derperperd: has joined #RubyOnRails
[01:37:11] Ropeney: has joined #RubyOnRails
[01:39:17] A_Drone: has joined #RubyOnRails
[01:44:15] evansparkman: has joined #RubyOnRails
[01:44:15] evansparkman: has joined #RubyOnRails
[01:45:16] xall: has joined #RubyOnRails
[01:47:07] barhum2013: has joined #RubyOnRails
[01:52:18] _sjs: has joined #RubyOnRails
[02:02:30] barhum2013: has joined #RubyOnRails
[02:04:29] benlieb: has joined #RubyOnRails
[02:05:07] jtong: has joined #RubyOnRails
[02:05:20] nacsurte: has joined #RubyOnRails
[02:13:11] KnownSyntax: has joined #RubyOnRails
[02:13:11] KnownSyntax: has joined #RubyOnRails
[02:15:45] IFrank00: has joined #RubyOnRails
[02:16:37] jtong: has joined #RubyOnRails
[02:23:53] Axilla: has joined #RubyOnRails
[02:24:43] Mia: has joined #RubyOnRails
[02:25:11] A_Drone: has joined #RubyOnRails
[02:27:16] dopamean_: has joined #RubyOnRails
[02:27:59] jtong: has joined #RubyOnRails
[02:28:14] A_Drone: *whoa* just discovered the Live Shell available in a rails error page
[02:28:40] A_Drone: that's pretty damn useful! I should read what's written on the screen more often /facepalm
[02:28:47] A_Drone: " This is a live shell. Type in here. "
[02:31:58] hannelita: has joined #RubyOnRails
[02:33:25] blackmesa: has joined #RubyOnRails
[02:34:32] braincrash: has joined #RubyOnRails
[02:34:55] wd40s: has joined #RubyOnRails
[02:39:28] xall: has joined #RubyOnRails
[02:39:30] jtong: has joined #RubyOnRails
[02:41:58] A_Drone: has joined #RubyOnRails
[02:43:01] jishankai: has joined #RubyOnRails
[02:47:58] bonhoeffer: has joined #RubyOnRails
[02:48:58] benlieb: has joined #RubyOnRails
[02:50:29] ekinmur: has joined #RubyOnRails
[02:50:46] jtong: has joined #RubyOnRails
[02:54:06] ecnalyr: has joined #RubyOnRails
[02:58:11] dlite: has joined #RubyOnRails
[03:01:05] braincrash: has joined #RubyOnRails
[03:02:31] jtong: has joined #RubyOnRails
[03:03:04] hahuang61: has joined #RubyOnRails
[03:09:26] A_Drone: has joined #RubyOnRails
[03:15:57] pawnbox: has joined #RubyOnRails
[03:17:04] phelpsiv: has joined #RubyOnRails
[03:20:53] k3rn31: has joined #RubyOnRails
[03:23:34] braincrash: has joined #RubyOnRails
[03:25:02] jtong: has joined #RubyOnRails
[03:25:29] phelpsiv: has joined #RubyOnRails
[03:26:04] hannelita: has joined #RubyOnRails
[03:27:44] conta: has joined #RubyOnRails
[03:34:34] A_Drone: has joined #RubyOnRails
[03:35:26] chouhoulis: has joined #RubyOnRails
[03:35:27] Axsuul: has joined #RubyOnRails
[03:35:51] IFrank00: has joined #RubyOnRails
[03:36:19] jtong: has joined #RubyOnRails
[03:36:27] blackmesa: has joined #RubyOnRails
[03:39:21] chouhoulis: has joined #RubyOnRails
[03:39:30] ur5us: has joined #RubyOnRails
[03:43:20] benlieb: has joined #RubyOnRails
[03:43:53] EXCHGR: has joined #RubyOnRails
[03:45:43] benlieb: has joined #RubyOnRails
[03:46:19] conta: has joined #RubyOnRails
[03:46:43] dionysus69: has joined #RubyOnRails
[03:50:52] JesseH: has joined #RubyOnRails
[03:51:09] zacts: has joined #RubyOnRails
[03:59:15] sevenseacat: has joined #RubyOnRails
[04:01:00] qguv: has joined #RubyOnRails
[04:03:12] kevr: has joined #RubyOnRails
[04:04:19] tlarevo: has joined #RubyOnRails
[04:05:05] wd40s: has joined #RubyOnRails
[04:09:47] AndrewIsHere: has joined #RubyOnRails
[04:10:56] KnownSyntax: has joined #RubyOnRails
[04:10:56] KnownSyntax: has joined #RubyOnRails
[04:11:55] mwcmitchell: has joined #RubyOnRails
[04:12:47] jtong: has joined #RubyOnRails
[04:14:38] Spami: has joined #RubyOnRails
[04:15:44] pawnbox: has joined #RubyOnRails
[04:20:19] hannelita: has joined #RubyOnRails
[04:22:08] jtong_: has joined #RubyOnRails
[04:23:44] JakFrist: has joined #RubyOnRails
[04:25:58] flashpoint9: has joined #RubyOnRails
[04:27:09] tlarevo: has joined #RubyOnRails
[04:27:29] dunpeal: has joined #RubyOnRails
[04:27:54] xall: has joined #RubyOnRails
[04:30:13] wd40s: has joined #RubyOnRails
[04:30:54] k3rn31: has joined #RubyOnRails
[04:32:12] rvanlieshout: has joined #RubyOnRails
[04:32:59] A_Drone: has joined #RubyOnRails
[04:33:24] qbantek: has joined #RubyOnRails
[04:33:25] jtong: has joined #RubyOnRails
[04:33:46] dionysus69: has joined #RubyOnRails
[04:38:27] nadav: has joined #RubyOnRails
[04:38:27] nadav: has joined #RubyOnRails
[04:39:28] blackmesa: has joined #RubyOnRails
[04:39:31] jtong: has joined #RubyOnRails
[04:42:20] quazimodo: has joined #RubyOnRails
[04:42:21] quazimod1: has joined #RubyOnRails
[04:44:04] alfiemax: has joined #RubyOnRails
[04:45:30] adre: has joined #RubyOnRails
[04:47:44] nadav: What are some good places one can deploy his RoR application to?
[04:49:30] rvanlieshout: bluerail.nl :)
[04:50:49] jtong: has joined #RubyOnRails
[04:50:52] nadav: I'll give it a go, you own it? Asking because of the smily and the .nl in your hostname :P
[04:50:55] nadav: Dead giveaway!
[04:51:21] A_Drone: Ah so we have the better_errors package that's why
[04:51:29] nadav: Oh it's in .nl language, should have guessed
[04:51:32] rvanlieshout: hehe yeah. it's shameless spam, but you asked for it :) I co-own it
[04:52:08] qbantek: has joined #RubyOnRails
[04:52:33] nadav: Looks good =) well done
[04:53:06] rvanlieshout: am a bit ashamed to tell the site isn't written in rails...
[04:53:37] rvanlieshout: it's elixir + phoenix
[04:55:45] Axilla: has joined #RubyOnRails
[04:56:02] dionysus69: has joined #RubyOnRails
[04:58:34] dionysus69: has joined #RubyOnRails
[04:59:37] nadav: rvanlieshout you infidel
[05:00:24] dlite: has joined #RubyOnRails
[05:03:49] hahuang61: has joined #RubyOnRails
[05:08:47] chouhoulis: has joined #RubyOnRails
[05:10:02] snoobydoo: has joined #RubyOnRails
[05:12:06] nadav: Design question: I
[05:13:32] nadav: Design question: I want to implement a upvote/downvote feature in my application, the way I thought of doing it is like that: If a user vote on the article, it will store the vote in a database with columns [UserID]:[ArticleID]:[Vote]
[05:14:06] nadav: Does that seem like a sensible solution that wherever a users query for an article, I'll query that DB to get his current vote status on it?
[05:14:22] hannelita: has joined #RubyOnRails
[05:14:48] rvanlieshout: nadav: you mean a table with user_id:references article_id:references vote:something ?
[05:14:56] rvanlieshout: with a uniq index on [user_id, article_id]
[05:15:11] Radar: his? making a man only site?
[05:15:19] Radar: Good luck enforcing that.
[05:15:46] rvanlieshout: nadav: yeah sure. you might want to add a counter_cache if you expect a lot of votes
[05:16:11] nadav: Radar was that directed to me? if so I'm not sure I completely understood
[05:16:23] Radar: nadav: I'm just being pedantic. nm
[05:16:28] nadav: rvanlieshout what do you mean?
[05:16:43] rvanlieshout: nadav: to get the current vote status you'll have to query that table and sum (or whatever) vote
[05:17:01] nadav: Oh, right, I had'nt thought of it
[05:17:15] rvanlieshout: that'll be fine if you add an index on article_id, but it might still be much if your articles are queried really often and you have a really big number of votes
[05:18:30] nadav: I see, so keep an attribute of current votes on article, and every time cache_counter for the article hits X, I'll update it?
[05:18:55] rvanlieshout: yeah. although iirc counter_cache only works for count, so you might need to create something yourself.
[05:19:02] rvanlieshout: something to consider when you've got this working :)
[05:19:17] nadav_: has joined #RubyOnRails
[05:19:17] nadav_: has joined #RubyOnRails
[05:19:21] Derperperd: has joined #RubyOnRails
[05:19:21] nadav_: [08:18:23] <rvanlieshout> yeah. although iirc counter_cache only works for count, so you might need to create something yoursel
[05:19:25] nadav_: then I got disconnected :)
[05:19:34] nadav_: Oh, I didn't know it's an actual struct
[05:19:53] rvanlieshout: nadav_: forget about it for now, after this is done read http://guides.rubyonrails.org/association_basics.html and seach for 'counter cache' in that guide
[05:20:02] rvanlieshout: it's in 4.1.2.3
[05:20:16] nadav_: Full disclosue - I'm new to RoR, I'm an embedded developer by professions, but I'm doing a RoR learning marathon on the weekend, so you'll see me around here quite a lot :P
[05:20:19] rvanlieshout: and has a hidden id: http://guides.rubyonrails.org/association_basics.html#options-for-belongs-to-counter-cache
[05:20:21] nadav_: Thanks! I'll look into it
[05:22:38] hahuang61: has joined #RubyOnRails
[05:24:55] jtong: has joined #RubyOnRails
[05:27:19] Cohedrin: has joined #RubyOnRails
[05:29:17] evansparkman: has joined #RubyOnRails
[05:30:44] jtong: has joined #RubyOnRails
[05:30:56] flashpoint9: has joined #RubyOnRails
[05:34:48] xall: has joined #RubyOnRails
[05:38:22] chouhoulis: has joined #RubyOnRails
[05:38:29] SteenJobs: has joined #RubyOnRails
[05:40:46] tlarevo: has joined #RubyOnRails
[05:42:07] jtong: has joined #RubyOnRails
[05:42:31] blackmesa: has joined #RubyOnRails
[05:44:18] r3vDev: has joined #RubyOnRails
[05:50:01] Macaveli: has joined #RubyOnRails
[05:50:32] evansparkman: has joined #RubyOnRails
[05:52:01] dminuoso: has joined #RubyOnRails
[05:54:43] ecnalyr: has joined #RubyOnRails
[05:57:35] minotep: has joined #RubyOnRails
[05:58:52] jtong: has joined #RubyOnRails
[06:01:49] AndrewIsHere: has joined #RubyOnRails
[06:04:21] A_Drone: has joined #RubyOnRails
[06:05:41] comrad: has joined #RubyOnRails
[06:08:29] hannelita: has joined #RubyOnRails
[06:10:13] jtong: has joined #RubyOnRails
[06:13:06] abhinav: has joined #RubyOnRails
[06:16:34] kevr: has joined #RubyOnRails
[06:17:44] jtong: has joined #RubyOnRails
[06:20:24] IFrank00: has joined #RubyOnRails
[06:24:31] tlarevo_: has joined #RubyOnRails
[06:24:36] rakm: has joined #RubyOnRails
[06:24:40] dminuoso_: has joined #RubyOnRails
[06:26:26] noob_on_rails: guys would it be possible to encapsulate a ruby app
[06:26:34] noob_on_rails: in a .net webpage?
[06:26:38] noob_on_rails: rails app* soryr
[06:26:49] rvanlieshout: you can encapsulate anything
[06:27:04] rvanlieshout: fetch on server using http, using api, on client using ajax, iframe (juch)
[06:27:14] noob_on_rails: i've set up the authentication using .net, but i want to continue write on rails
[06:27:28] violarium: has joined #RubyOnRails
[06:27:46] penguinpowernz: has joined #RubyOnRails
[06:28:00] z3ph: has joined #RubyOnRails
[06:29:06] dminuoso: has joined #RubyOnRails
[06:29:21] noob_on_rails: rvanlieshout: is there any resource on this?
[06:29:24] dunpeal: has joined #RubyOnRails
[06:32:35] r3vDev: has joined #RubyOnRails
[06:32:45] rvanlieshout: what exactly do you want to do?
[06:33:02] jtong: has joined #RubyOnRails
[06:33:19] flashpoint9: has joined #RubyOnRails
[06:33:44] A_Drone: has joined #RubyOnRails
[06:36:53] A_Drone: has joined #RubyOnRails
[06:39:00] SteenJobs: has joined #RubyOnRails
[06:39:43] alfiemax: how can i change this :
[06:39:44] alfiemax: has_many :guest_events, -> { merge(Reservation.accepted) }, through: :reservations, source: :event
[06:40:12] alfiemax: so that i could merge with reservations which is not accepted
[06:40:55] alfiemax: would i have to write another scope and use? or does active record enum have an option for scoping like !<status> ?
[06:42:07] tvw: has joined #RubyOnRails
[06:44:10] KnownSyntax_: has joined #RubyOnRails
[06:44:10] KnownSyntax_: has joined #RubyOnRails
[06:44:19] dionysus69: has joined #RubyOnRails
[06:44:47] jtong: has joined #RubyOnRails
[06:48:49] blackmesa: has joined #RubyOnRails
[06:49:41] eyeamaye: has joined #RubyOnRails
[06:50:53] aganov: has joined #RubyOnRails
[06:53:10] tlarevo: has joined #RubyOnRails
[06:53:25] DoubleMalt: has joined #RubyOnRails
[06:53:46] zpe: has joined #RubyOnRails
[06:56:13] nadav_: What is your perferable IDE? I'm currently working with Sublime Text 3
[06:56:17] nadav_: any recommendations?
[06:57:06] xall: has joined #RubyOnRails
[06:57:49] rvanlieshout: nadav_: ST3 for me to
[06:57:53] rvanlieshout: + vagrant with puppet :)
[06:59:52] srinidhi: has joined #RubyOnRails
[07:00:30] dminuoso: has joined #RubyOnRails
[07:00:45] yfeldblum: has joined #RubyOnRails
[07:01:29] jtong: has joined #RubyOnRails
[07:02:19] yfeldblum: has joined #RubyOnRails
[07:02:36] hannelita: has joined #RubyOnRails
[07:02:47] tlarevo: has joined #RubyOnRails
[07:03:37] r3vDev: has joined #RubyOnRails
[07:04:04] yfeldblum: has joined #RubyOnRails
[07:06:15] A_Drone: has joined #RubyOnRails
[07:08:24] violarium: nadav_: I prefer rubymine
[07:09:39] violarium: nadav_: I just like nice tests results view, debug and ide hotkeys
[07:10:05] violarium: nadav_: just installed and started to work
[07:13:01] jtong: has joined #RubyOnRails
[07:14:30] tlarevo_: has joined #RubyOnRails
[07:14:36] darutoko: has joined #RubyOnRails
[07:15:46] fernandomm: has joined #RubyOnRails
[07:18:13] k3rn31: has joined #RubyOnRails
[07:19:04] jtong: has joined #RubyOnRails
[07:20:46] jtong_: has joined #RubyOnRails
[07:21:15] lessless: has joined #RubyOnRails
[07:26:43] AimlessRAven: has joined #RubyOnRails
[07:26:46] AimlessRAven: https://gist.github.com/anonymous/aed38f00850f57c1fa57d1cadc07253d
[07:27:17] AimlessRAven: is it possible to set my humanized_money_with_symbol(p.discount_amount) + " OFF" on newline
[07:27:31] AimlessRAven: and add specific class to this code to style in css
[07:28:22] thorgi: has joined #RubyOnRails
[07:28:29] syndikate: Hello, could anybody help me install a game locally
[07:28:41] syndikate: as in I am testing out a gem and I don't want it to be installed globally
[07:28:55] dionysus69: has joined #RubyOnRails
[07:31:24] rvanlieshout: syndikate: what gem?
[07:31:32] rvanlieshout: and what do you mean by locally vs globally?
[07:31:35] arBmind: has joined #RubyOnRails
[07:31:57] syndikate: As in I wrote a gem, I am testing it out..so I did gem build and got the gem file...now I want to install it and test it
[07:32:09] rvanlieshout: so use it in an other application?
[07:33:05] syndikate: It's a standalone application that am sharing as a gem
[07:33:15] rvanlieshout: and how do you want to test it?
[07:34:26] syndikate: Actually I am trying to figure that out, any tips?
[07:34:35] rvanlieshout: is it a gem you use in a rails app?
[07:34:44] lxsameer: has joined #RubyOnRails
[07:35:07] rvanlieshout: how would i use that gem?
[07:36:30] syndikate: Ah okay, I figured, so you require 'gemname' and call the entry function :)
[07:47:16] finnnnnnnnnnn: has joined #RubyOnRails
[07:48:56] A_Drone: has joined #RubyOnRails
[07:49:07] jishankai: has joined #RubyOnRails
[07:50:23] artto: has joined #RubyOnRails
[07:50:43] blackmesa: has joined #RubyOnRails
[07:52:38] workmad3: has joined #RubyOnRails
[07:53:14] Spami: has joined #RubyOnRails
[07:55:12] tlarevo: has joined #RubyOnRails
[07:56:38] hannelita: has joined #RubyOnRails
[07:57:48] FCser: has joined #RubyOnRails
[07:58:21] violarium: has joined #RubyOnRails
[07:58:53] jtong: has joined #RubyOnRails
[08:00:29] Pumukel: has joined #RubyOnRails
[08:03:55] siaw23: has joined #RubyOnRails
[08:04:12] siaw23: good morning
[08:04:17] siaw23: if someone can help: http://stackoverflow.com/questions/38648105/model-attribute-not-being-serialized-with-activemodelserializer
[08:04:32] AndrewIsHere: has joined #RubyOnRails
[08:05:45] tlarevo: has joined #RubyOnRails
[08:05:58] universa1: siaw23: what has the serializer to do with permitted parameters?!
[08:06:36] tlarevo: has joined #RubyOnRails
[08:08:04] Macaveli: has joined #RubyOnRails
[08:08:29] adre: has joined #RubyOnRails
[08:10:18] jtong: has joined #RubyOnRails
[08:12:29] evansparkman: has joined #RubyOnRails
[08:13:23] AimlessRAven: someone knows how to add click event on select2 label
[08:13:44] AimlessRAven: its not work when i set $(.select2-label).click(function..
[08:14:02] zacts: has joined #RubyOnRails
[08:14:04] universa1: AimlessRaven: did you check the select2 docs?
[08:14:25] universa1: and be sure that when you define the callback the element is already there...
[08:14:43] universa1: but select2 probably has a dedicated callback already for what you want to do.
[08:15:00] AimlessRAven: universa1: yes this is the wrong .. my item is not there because is created by js
[08:15:18] dminuoso: AimlessRaven: If you have problems with $(.select2-label), then you might want to a) learn basic JavaScript to understand the syntax errors you will be getting, and read jQuery documentatio.
[08:15:31] illia: has joined #RubyOnRails
[08:15:37] finnnnnnnnnnn_: has joined #RubyOnRails
[08:16:05] jenrzzz: has joined #RubyOnRails
[08:19:46] Spami: has joined #RubyOnRails
[08:20:19] tlarevo: has joined #RubyOnRails
[08:21:15] jtong: has joined #RubyOnRails
[08:23:42] siaw23: universa1: i don’t fully understand serializers. but i don’t know why it’s not showing the attributes i want anyway.
[08:26:43] netzfisch: has joined #RubyOnRails
[08:27:15] artto: has joined #RubyOnRails
[08:27:53] Hyuk: has joined #RubyOnRails
[08:29:30] marr: has joined #RubyOnRails
[08:32:26] noob_on_rails: i just found the best way to indent html in sublime
[08:32:38] noob_on_rails: just c/p to Visual studio and then back in :P
[08:32:48] jtong: has joined #RubyOnRails
[08:32:48] mark_66: has joined #RubyOnRails
[08:34:00] finnnnnnnnnnn: If I’m mapping an array of obejcts and I want to add an extra property to an object how do I do it? There’s a gist here https://gist.github.com/fionnbharra/f804ea50cca640d8cdb9f4bbaf92f0f0 but it’s adding the exisintg props under a new key
[08:34:38] flashpoint9: has joined #RubyOnRails
[08:35:34] Velizar: has joined #RubyOnRails
[08:38:48] cleopatra: has joined #RubyOnRails
[08:39:58] Spami: has joined #RubyOnRails
[08:41:31] Ergo: has joined #RubyOnRails
[08:42:09] tlarevo: has joined #RubyOnRails
[08:44:07] jtong: has joined #RubyOnRails
[08:50:45] hannelita: has joined #RubyOnRails
[08:52:31] jtong: has joined #RubyOnRails
[08:54:00] tlarevo_: has joined #RubyOnRails
[08:54:23] SteenJobs: has joined #RubyOnRails
[08:56:17] AzaToth: has joined #RubyOnRails
[08:59:17] nacsurte: has joined #RubyOnRails
[08:59:49] Spami: has joined #RubyOnRails
[09:01:47] yfeldblum: has joined #RubyOnRails
[09:04:44] lxsameer: has joined #RubyOnRails
[09:05:37] lxsameer: has joined #RubyOnRails
[09:06:22] nacsurte: has joined #RubyOnRails
[09:07:02] jtong: has joined #RubyOnRails
[09:10:55] artto: has joined #RubyOnRails
[09:11:33] quazimodo: has joined #RubyOnRails
[09:11:34] quazimod1: has joined #RubyOnRails
[09:16:13] tennis: has joined #RubyOnRails
[09:16:23] Palsson: has joined #RubyOnRails
[09:17:14] andywww: has joined #RubyOnRails
[09:18:25] jtong: has joined #RubyOnRails
[09:19:27] pawnbox: has joined #RubyOnRails
[09:23:17] snowy: has joined #RubyOnRails
[09:23:50] jtong: has joined #RubyOnRails
[09:25:45] xall: has joined #RubyOnRails
[09:25:58] A_Drone: has joined #RubyOnRails
[09:26:43] tlarevo: has joined #RubyOnRails
[09:28:44] blackhuey: has joined #RubyOnRails
[09:30:33] jedmund: has joined #RubyOnRails
[09:31:31] ecnalyr: has joined #RubyOnRails
[09:31:37] AimlessRAven: has joined #RubyOnRails
[09:31:38] tlarevo: has joined #RubyOnRails
[09:35:06] jtong: has joined #RubyOnRails
[09:35:55] flashpoint9: has joined #RubyOnRails
[09:36:03] Pazician: has joined #RubyOnRails
[09:36:03] Pazician: has joined #RubyOnRails
[09:36:41] srinidhi: has joined #RubyOnRails
[09:37:38] universa1: siaw23: sorry, was busy working. but anyways: that is not an answer to my question. think about when something is called, at which part in a request/response cycle.
[09:39:38] siaw23: the serializer is fired when a request to a model instance is made? no?
[09:40:20] siaw23: universa1: it’s at this point the serializer is supposed to add the attributes to the model, it’s not doing that
[09:40:50] Pazician: has joined #RubyOnRails
[09:41:10] jtong: has joined #RubyOnRails
[09:41:14] pawnbox: has joined #RubyOnRails
[09:43:55] tlarevo: has joined #RubyOnRails
[09:45:33] universa1: siaw23: when are parameters permitted?!
[09:45:52] siaw23: when new items are being posted
[09:45:56] siaw23: new models
[09:45:58] mwlang: has joined #RubyOnRails
[09:46:21] universa1: siaw23: good enough, when is a serializer run?
[09:47:51] siaw23: when a request is made for json data of a model
[09:47:59] siaw23: get request in this case
[09:48:38] universa1: ok'ish, more simplified: when you want to get a json representation of some model.
[09:48:54] universa1: so: has this anything to do with permitting parameters?
[09:49:07] siaw23: now i see that it doesn't
[09:50:22] siaw23: but i still don’t know why the serializer won’t show parameters that were set in a model
[09:51:35] universa1: ok, can you please create a gist with the serializers, the failing test and the test output
[09:51:43] universa1: much more readable then stackoverflow.
[09:51:56] siaw23: universa1: on it
[09:54:11] noob_on_rails: guys , can <%= link_to %> act as <a> ? is this transferable to link_to ? <li><a data-toggle="tab" href="#menu3">Watchlist</a></li>
[09:54:22] noob_on_rails: plus a routing path?
[09:54:37] rvanlieshout: noob_on_rails: whut?
[09:54:39] universa1: noob_on_rails: link_to generates an <a> tag...
[09:55:06] noob_on_rails: so how would i merge the one above , with this : <%= link_to "listings" , listinglist_path(current_user) %>
[09:55:06] duderonomy: has joined #RubyOnRails
[09:55:17] noob_on_rails: cause i want to refer to a div of a .nav-tab
[09:55:20] universa1: noob_on_rails: you can not have two hrefs!
[09:55:23] SteenJobs: has joined #RubyOnRails
[09:55:51] universa1: noob_on_rails: <li><%= link_to "Watchlist", "#menu3" %></li>
[09:56:22] noob_on_rails: it's a situation where i want to refer to a div below (which is done by href) on a dynamic .nav-tab , and in the meantime i want to parse user id so i can <%= render 'page' %>
[09:56:34] universa1: noob_on_rails: what?!
[09:56:38] siaw23: universa1: https://gist.github.com/siaw23/bb2c28fb66a63433d4d91540c56a0522
[09:56:52] universa1: noob_on_rails: if it can be done in html, you can in 99,9% of the cases do it with rails helpers.
[09:57:18] noob_on_rails: ok let me think a bit, ill try to find a solution
[09:57:59] siaw23: universa1: failing test is on https://gist.github.com/siaw23/bb2c28fb66a63433d4d91540c56a0522#file-api_notice_search_spec-rb-L216 and some info from pry showing the empty array that i don’t expect to be empty https://gist.github.com/siaw23/bb2c28fb66a63433d4d91540c56a0522#file-pry-txt
[09:58:20] Klumben: has joined #RubyOnRails
[09:58:22] duderonomy: has joined #RubyOnRails
[09:58:23] universa1: siaw23: did you check that in the original object regulation_list is not empty.
[09:58:32] universa1: siaw23: since you're in pry, this should be quickly done.
[09:59:15] siaw23: yes it’s empty
[09:59:24] universa1: siaw23: https://gist.github.com/siaw23/bb2c28fb66a63433d4d91540c56a0522#file-api_notice_search_spec-rb-L207
[09:59:29] universa1: siaw23: on this object.
[09:59:53] universa1: siaw23: instance = create(...); expect(instance.regulation_list).not_to be_empty
[10:00:26] tlarevo: has joined #RubyOnRails
[10:00:30] siaw23: universa1: let me check that one
[10:02:58] siaw23: it’s NOT empty! :o
[10:03:09] siaw23: pry(#<RSpec::ExampleGroups::SearchingForNoticesViaTheAPI::CourtOrder>)> instance.regulation_list
[10:03:10] siaw23: => ["Foo bar 21", "Baz blee 22"]
[10:03:43] universa1: siaw23: ok. so now you know that the object going into the serialization has the attribute set. so it is somewhere in your serializers.
[10:04:09] universa1: siaw23: https://gist.github.com/siaw23/bb2c28fb66a63433d4d91540c56a0522#file-court_order_serializer-rb-L5
[10:04:17] universa1: siaw23: i'd pry here now, and inspect object
[10:04:43] siaw23: i’m not sure how to use pry here
[10:04:49] universa1: siaw23: binding.pry
[10:04:58] siaw23: yes i know that. but how to run it to see the result
[10:04:59] universa1: siaw23: before object.regulation_list
[10:05:04] universa1: siaw23: just run your test
[10:05:31] wd40s: has joined #RubyOnRails
[10:05:34] universa1: siaw23: it is basically the same as when you called binding.pry in your test, just at a different step.
[10:05:49] siaw23: right. checking
[10:05:53] kitsuneyo: has joined #RubyOnRails
[10:05:55] AndrewIsHere: has joined #RubyOnRails
[10:08:09] siaw23: universa1: that is empty https://i.gyazo.com/502ff6667124f7ccebd01dab26f7d5ad.png
[10:08:32] siaw23: and i have absolutely NO clue why it empty
[10:08:47] universa1: siaw23: object.inspect
[10:09:07] A_Drone: has joined #RubyOnRails
[10:10:14] siaw23: universa1: https://i.gyazo.com/eacf9f85b497bd0f14f4832cbaa1f4f2.png it’s not even shoing the attribute i’m looking for
[10:10:32] arBmind: has joined #RubyOnRails
[10:10:46] duderonomy: has joined #RubyOnRails
[10:10:59] kitsuneyo: i'm working on this helper method to dynamically set 'subcategory' select options in an edit form for an Image object, and it has a hash with all the different options in it. here's the gist: https://gist.github.com/kitsuneyo/4e6098a7bee5bfa2cdf2bf41d292984f. i feel like this hash should really go somewhere else as it could get big.
[10:11:09] universa1: siaw23: well then... CourtOrder.find(1053).inspect
[10:12:53] siaw23: universa1: https://i.gyazo.com/b255ddb133094db7ec17390e73201133.png not there
[10:12:57] snoobydoo: has joined #RubyOnRails
[10:13:35] kitsuneyo: is it best to use yaml for something like this?
[10:13:50] universa1: siaw23: CourtOrder.column_names
[10:14:20] violarium: has joined #RubyOnRails
[10:14:48] siaw23: universa1: https://gyazo.com/9c3c6360e0518777f02c2e0419331eaf
[10:15:21] universa1: siaw23: so no regulation_list
[10:15:44] universa1: siaw23: if you don't save the regulation_list to the database, you can not expect your serializer to get it back
[10:15:45] siaw23: universa1: no. it’s not there. i thought there’s a way to choose which attributes to serialize
[10:15:56] universa1: out of nowhere.
[10:16:07] siaw23: does that mean i have to have a regulation_list column?
[10:16:39] universa1: siaw23: if you want to serialize records from the database, and those should have a regulation_list attribute, then yes, you need a column for that.
[10:17:41] universa1: siaw23: if you only want to serialize records that have just been initialized, then a virtual attribute might be good enough... ...but your tests suggest otherwise.
[10:17:57] siaw23: but maybe i don’t necessary need a column in the db? what if i could use “virtual” attributes
[10:18:50] universa1: siaw23: well that decision is very easy: do different people/computers request the json representation of the same court order?
[10:20:07] universa1: siaw23: ok. where does the controller get the data from?
[10:20:27] yfeldblum: has joined #RubyOnRails
[10:20:41] abhinav: i have a hstore object where .attributes does not work. how can i iterate over its attributes?
[10:20:43] noob_on_rails: universa1: can i query a model from within a view?
[10:20:57] siaw23: universa1: from forms
[10:21:02] jtong: has joined #RubyOnRails
[10:21:23] universa1: noob_on_rails: you can do many things, but a large part of those you shouldn't do. you can jump of a bridge, but in 99,9% cases you shouldn't!
[10:21:36] universa1: abhinav: each ?!
[10:21:41] noob_on_rails: you mean i shouldnt do it
[10:21:54] noob_on_rails: ahh im trapped
[10:21:59] abhinav: universa1: .each undefined method
[10:22:05] universa1: abhinav: !code
[10:22:05] helpa: abhinav: 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.
[10:22:14] noob_on_rails: on the one hand i want to implement a nice .nav-tab for the user profile
[10:22:40] universa1: siaw23: ok, imagine you're the controller now, i come to you, and say give me the json for court-order 1053, what do you do?
[10:22:42] noob_on_rails: on the other , because the nav-tab href's to an inside #id , i can't load the page where i index the users classifieds
[10:23:01] universa1: noob_on_rails: what?!
[10:24:10] siaw23: universa1: i’d look for court_order with idea 1053, check what attributes are serialized and return them
[10:24:15] noob_on_rails: universa1: https://gist.github.com/frcake/f1ab8234abc13752169422a2bb5a9126
[10:24:18] universa1: siaw23: where do you look?
[10:25:03] benlieb: has joined #RubyOnRails
[10:25:04] universa1: siaw23: okay. so how would a virtual attribute work? remember you just retrieved the data from the database ;)
[10:25:25] pawnbox: has joined #RubyOnRails
[10:25:26] noob_on_rails: universa1: you see that the links href within the html
[10:25:31] universa1: noob_on_rails: so?
[10:25:47] siaw23: ummm a virtual attribute won’t be saved in the db as far as i understand
[10:25:50] noob_on_rails: so how can i route to another action :S
[10:26:02] noob_on_rails: if i can't change the url bar ?
[10:26:36] universa1: noob_on_rails: i can not follow you...
[10:26:46] universa1: siaw23: so you need a db attribute ;-)
[10:27:05] siaw23: universa1: now i get the whole point! :D :D
[10:27:13] universa1: noob_on_rails: what has a tab pane to do with linking to a different url?
[10:27:30] universa1: siaw23: :-)
[10:28:01] noob_on_rails: because i want to get 'listing/:id' => 'user#list' ,as: :listingpath
[10:28:38] universa1: noob_on_rails: in which pane?
[10:28:43] noob_on_rails: or is there a way to route to 'user#list' without changing the url?
[10:28:47] pawnbox_: has joined #RubyOnRails
[10:28:55] noob_on_rails: universa1: say #menu1
[10:29:16] universa1: noob_on_rails: https://gist.github.com/frcake/f1ab8234abc13752169422a2bb5a9126#file-menu-html-erb-L7 here? so change the link?
[10:29:27] universa1: noob_on_rails: and remove the data-toggle="tab"
[10:29:28] GorillaApe: has joined #RubyOnRails
[10:29:35] universa1: noob_on_rails: describe what you actually want to do...
[10:29:53] noob_on_rails: ok my user has classifieds
[10:30:12] noob_on_rails: in this bootstrap pane, on one tab i render the users details
[10:30:22] noob_on_rails: on the other tab i want to load the user's classifieds
[10:30:53] noob_on_rails: what would you suggest :S
[10:30:56] GorillaApe: Hello I am a bit confused
[10:31:16] GorillaApe: I am trying to write some tests
[10:31:33] universa1: noob_on_rails: so do the same as you did with render 'listing' ?!
[10:32:02] GorillaApe: but I dont know how to test some things
[10:32:39] GorillaApe: for example how can I test that for a model lets call it ModelX attribute name is valid
[10:32:57] GorillaApe: since its value is set from another service
[10:33:05] GorillaApe: but should not be
[10:33:09] GorillaApe: enterred from user
[10:33:39] noob_on_rails: listing is the page im actually trying to render
[10:33:43] arup_r: has joined #RubyOnRails
[10:33:53] universa1: noob_on_rails: render a partial?
[10:33:56] noob_on_rails: ok if i render listing , i have a static page, how can i add there my @user.classifieds?
[10:33:57] evansparkman: has joined #RubyOnRails
[10:34:20] noob_on_rails: no the page is rendering fine, but to load the @user.classifieds i have to invoke a controller action
[10:34:38] universa1: noob_on_rails: http://guides.rubyonrails.org/layouts_and_rendering.html
[10:35:22] universa1: noob_on_rails: why? your controller has already been called: the one where you're trying to render the tabs...
[10:35:46] noob_on_rails: ok , so is there something like
[10:35:56] noob_on_rails: <% render 'listing' method:list %>
[10:36:00] srinidhi: has joined #RubyOnRails
[10:36:13] universa1: noob_on_rails: what does that mean?!
[10:36:24] noob_on_rails: ok let's take it from the start
[10:36:36] noob_on_rails: i have a url : localhost/profile/id
[10:36:46] noob_on_rails: this is already routed to a cotroller action ok?
[10:37:03] universa1: soudns somewhat reasonable
[10:37:20] noob_on_rails: ok , its routed at user#show
[10:37:41] noob_on_rails: so i load the user details
[10:37:53] noob_on_rails: for example user.first_name , etc
[10:37:59] noob_on_rails: so far so good
[10:38:15] fcser_: has joined #RubyOnRails
[10:38:18] noob_on_rails: now , i have a classifieds model where classifieds belongs_to user, and user has_many classifieds
[10:38:53] noob_on_rails: so in the user profile page, i load the nav-bar , which brings the functionality of changing divs
[10:38:58] noob_on_rails: but not changing urls
[10:39:31] universa1: noob_on_rails: so, everything is rendered at once, but everything except the active tab is not shown.
[10:39:48] tlarevo: has joined #RubyOnRails
[10:39:52] noob_on_rails: hmmm no , just give me a second to finish
[10:40:05] universa1: noob_on_rails: well yes!
[10:40:13] universa1: this is the simple, basic solution.
[10:40:22] noob_on_rails: so i render the user details fine, but i don't know how to show , @user.classifieds
[10:40:38] noob_on_rails: keep in mind that the url doesn't change!
[10:40:56] noob_on_rails: so how do i query the associated records?
[10:41:04] Megamos: has joined #RubyOnRails
[10:41:05] universa1: noob_on_rails: i seriously don't see the problem. @user.classifieds?!
[10:42:01] noob_on_rails: undefined method `classifieds' for #<User:0xc56fb08> :(
[10:42:04] noob_on_rails: i thought of that too
[10:42:10] universa1: noob_on_rails: !associations
[10:42:10] helpa: noob_on_rails: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[10:48:17] nettoweb: has joined #RubyOnRails
[10:49:23] rodfersou: has joined #RubyOnRails
[10:49:31] noob_on_rails: universa1: im even trying in the console and i fail
[10:49:35] noob_on_rails: but my assocs are right
[10:49:48] noob_on_rails: shouldn't that return results
[10:50:00] noob_on_rails: a= User.find(4) - that's ok!
[10:50:09] noob_on_rails: b= a.classifieds.first
[10:50:19] noob_on_rails: but says in the console
[10:50:35] noob_on_rails: NoMethodError: undefined method `classifieds' for #<User:0x5c9a378>
[10:51:14] Derperperd: has joined #RubyOnRails
[10:52:55] universa1: noob_on_rails: well then your associations are not right!
[10:53:17] noob_on_rails: but , it's just 2 models , belongs_to and has_many
[10:53:25] noob_on_rails: and the belongs to is t.references :user
[10:53:34] universa1: noob_on_rails: show your models => gist
[10:55:24] noob_on_rails: how can this be
[10:55:25] tvw: has joined #RubyOnRails
[10:55:31] noob_on_rails: the assocs are not there
[10:55:40] noob_on_rails: oh , i did rake db:redo
[10:55:46] noob_on_rails: are they deleted?
[10:55:58] universa1: db:redo does not edit your files.
[10:56:03] finnnnnnnnnnn: has joined #RubyOnRails
[10:56:06] SteenJobs: has joined #RubyOnRails
[10:56:13] universa1: you most likely never added them!
[10:56:17] universa1: anyways, off to lunch.
[10:56:58] noob_on_rails: nono , i did , but rolled back to other version
[11:00:56] jtong: has joined #RubyOnRails
[11:01:48] shinnya: has joined #RubyOnRails
[11:02:46] flashpoint9: has joined #RubyOnRails
[11:04:09] tlarevo: has joined #RubyOnRails
[11:04:38] chrisml: has joined #RubyOnRails
[11:07:20] c355E3B: has joined #RubyOnRails
[11:07:46] nadav: has joined #RubyOnRails
[11:07:46] nadav: has joined #RubyOnRails
[11:08:10] adre: has joined #RubyOnRails
[11:09:41] minotep: has joined #RubyOnRails
[11:09:54] netzfisch: has joined #RubyOnRails
[11:11:08] Xentil: has joined #RubyOnRails
[11:12:11] jtong: has joined #RubyOnRails
[11:14:29] noob_on_rails: after the association how can i bring only one field ? :S if i go user.classifieds.each do |c| <%= c.title %>
[11:14:41] noob_on_rails: it just returns every detail of the classified
[11:16:08] noob_on_rails: the titles are correct tho :O , it just returns the detailed version too ^_-
[11:18:25] universa1: noob_on_rails: !code
[11:18:26] helpa: noob_on_rails: 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.
[11:18:46] tlarevo: has joined #RubyOnRails
[11:19:26] noob_on_rails: https://gist.github.com/frcake/a003de23df12b32b3811eaf8c6a4495c
[11:19:43] noob_on_rails: universa1: it works fine, but brings also a "query" version
[11:19:49] universa1: noob_on_rails: https://gist.github.com/frcake/a003de23df12b32b3811eaf8c6a4495c#file-gistfile1-txt-L5
[11:20:04] universa1: noob_on_rails: learn the difference between <% and <%=
[11:20:18] suchness: has joined #RubyOnRails
[11:20:20] noob_on_rails: ok that's a big lesson :D
[11:20:37] suchness: I have a bunch of admins using devise. Is it possible to show which admins are currently logged in?
[11:20:50] jtong: has joined #RubyOnRails
[11:21:10] suchness: Or are active?
[11:22:11] tlarevo_: has joined #RubyOnRails
[11:22:31] universa1: suchness: by default with devise, i don't think so. not sure if you can figure out something from the various fields devise has.
[11:22:50] suchness: Yeah, I was wondering about the defaults. I can build something up.
[11:26:03] nettoweb: hes guys, is it possible to access a file hosted in S3 through heroku console? seems that File.exists? donts work for any file in s3, even public files
[11:26:48] universa1: nettoweb: o0
[11:27:17] universa1: nettoweb: File in ruby means: File locally on this machine, on some hard-drive, ...
[11:27:37] universa1: nettoweb: S3 is somewhere in the internet.
[11:27:51] nettoweb: hmm.. so maybe carrierwave or fog gem tto acomplish this?
[11:37:48] nadav: has joined #RubyOnRails
[11:37:55] andywww: please can i get some input on this caching problem i’m stuck on
[11:37:56] andywww: https://gist.github.com/anonymous/012bb84a93b2f4c298ab199fe7934616
[11:38:17] Macaveli: has joined #RubyOnRails
[11:38:59] andywww: i need to give the cache_if a unique key because each iteration that is calling the helper is generating a different result
[11:40:41] andywww: https://gist.github.com/anonymous/9002e8d09d47beda9f594f3defa24d51
[11:40:47] andywww: didn’t give you the full picture
[11:41:07] defswork: has joined #RubyOnRails
[11:41:54] andywww: so each loop calls the helper that pulls back a number of tweets caught in that hour
[11:42:12] andywww: i’d like to cache all hours that are not the one I’m currently in
[11:42:22] andywww: its working in that it knows what to cache
[11:42:42] finnnnnnnnnnn_: has joined #RubyOnRails
[11:43:05] andywww: but i need it to see the result of each loop[ as a seperate cache entry
[11:43:22] andywww: how do you pass cache_if a unique key?
[11:44:14] adkoge: has joined #RubyOnRails
[11:44:18] nettoweb: universa1 do you now a simpler way? im trying with open-uri
[11:44:33] universa1: nettoweb: no. i don't use s3.
[11:45:10] dminca: has joined #RubyOnRails
[11:45:53] universa1: andywww: http://api.rubyonrails.org/classes/ActionView/Helpers/CacheHelper.html#method-i-cache_if -- looks like it accepts the same options as cache
[11:45:55] dminca: has joined #RubyOnRails
[11:47:24] Palsson_: has joined #RubyOnRails
[11:48:06] andywww: yeah i was just reading this
[11:48:18] andywww: i can’t find the options hash options
[11:49:02] artto: has joined #RubyOnRails
[11:49:09] umdstu: has joined #RubyOnRails
[11:50:34] universa1: andywww: https://github.com/rails/rails/blob/4dbb7f0758ca5e3132a590d05e86793853674d44/actionview/lib/action_view/helpers/cache_helper.rb#L152
[11:55:37] Macaveli: has joined #RubyOnRails
[11:55:38] andywww: fragment_cache_key: blah
[11:55:43] ldnunes: has joined #RubyOnRails
[11:55:46] andywww: thanks for that
[11:56:44] SteenJobs: has joined #RubyOnRails
[11:56:55] xall: has joined #RubyOnRails
[11:57:33] tennis: has joined #RubyOnRails
[11:58:43] defswork: has joined #RubyOnRails
[12:01:05] defswork_: has joined #RubyOnRails
[12:01:46] evansparkman: has joined #RubyOnRails
[12:03:51] hannelita: has joined #RubyOnRails
[12:03:58] tlarevo: has joined #RubyOnRails
[12:05:44] hwcomcn: has joined #RubyOnRails
[12:07:49] nadav_: has joined #RubyOnRails
[12:07:56] hwcomcn: has joined #RubyOnRails
[12:08:12] defswork_: has joined #RubyOnRails
[12:10:27] hwcomcn: has joined #RubyOnRails
[12:12:18] hwcomcn: has joined #RubyOnRails
[12:12:19] tlarevo_: has joined #RubyOnRails
[12:13:05] defswork_: has joined #RubyOnRails
[12:13:42] shaman42: has joined #RubyOnRails
[12:14:01] hwcomcn: has joined #RubyOnRails
[12:15:40] RubyOnRails005: has joined #RubyOnRails
[12:15:52] tlarevo: has joined #RubyOnRails
[12:18:45] GorillaApe: i am stucked
[12:20:18] roamingdog: has joined #RubyOnRails
[12:23:16] laszlo_1: has joined #RubyOnRails
[12:24:56] universa1: wrench or hammer?
[12:25:07] doge__: has joined #RubyOnRails
[12:25:33] hannelita: has joined #RubyOnRails
[12:30:41] haaj: has joined #RubyOnRails
[12:30:46] tlarevo: has joined #RubyOnRails
[12:35:04] dunpeal: has joined #RubyOnRails
[12:35:26] dminuoso: universa1: Does it have to be either?
[12:35:53] tlarevo: has joined #RubyOnRails
[12:37:55] universa1: dminuoso: nope, i don't know many words for tools in english ;)
[12:39:31] douglasholmes: has joined #RubyOnRails
[12:42:35] dminuoso: universa1: Here's a list of useful tools that can be useful at work: Chainsaw, jackhammer, meat cleaver, axe, sledge hammer, nail gun..
[12:42:48] dminuoso: Never again you shall have fruitless discussions with a coworker.
[12:42:55] universa1: dminuoso: <3
[12:43:16] dopamean_: has joined #RubyOnRails
[12:44:20] pawnbox: has joined #RubyOnRails
[12:45:15] flashpoint9: has joined #RubyOnRails
[12:45:22] shaman42: has joined #RubyOnRails
[12:45:47] doge__: has joined #RubyOnRails
[12:46:16] flashpoint9: has joined #RubyOnRails
[12:48:21] fmcgeough: has joined #RubyOnRails
[12:48:29] Ergo: has joined #RubyOnRails
[12:48:55] wd40s: has joined #RubyOnRails
[12:49:33] King_Rex: has joined #RubyOnRails
[12:50:22] hanneli: has joined #RubyOnRails
[12:54:24] dunpeal: has joined #RubyOnRails
[12:55:32] finnnnnnnnnnn: has joined #RubyOnRails
[12:57:18] ishamo: has joined #RubyOnRails
[12:57:47] SteenJobs: has joined #RubyOnRails
[12:58:10] dionysus69: if I have a admin namespace for example and I don't want to extend application_controller from admin::application_controller, do I add this to both of them ? protect_from_forgery with: :exception
[12:58:58] universa1: dionysus69: why would a non namespaced application controller be extended from the namespaced application controller?
[12:59:29] dionysus69: dunno in my previous applications I used to do that to inherit before_action :authenticate
[12:59:53] universa1: so you do: class ApplicationController < Admin::ApplicationController ???
[12:59:58] ramortegui: has joined #RubyOnRails
[13:00:14] dionysus69: so I put protect_from_forgery at both controllers?
[13:00:18] evansparkman: has joined #RubyOnRails
[13:00:19] dionysus69: my bad, on reverse
[13:00:22] matthewd: dionysus69: Yes
[13:00:42] dionysus69: Professor::ApplicationController < ApplicationController
[13:01:24] dionysus69: but now I am going to put before_action :authenticate_student in application controller which implies that professor will also be asked to authenticate as a student
[13:01:48] dionysus69: so I inherit ApplicationController:Base from both controllers?
[13:03:14] universa1: you mean the right thing, so yes.
[13:04:07] dionysus69: ok cool thanks :)
[13:04:44] snowy: has joined #RubyOnRails
[13:06:24] zpe: has joined #RubyOnRails
[13:06:36] P4Titan: has joined #RubyOnRails
[13:07:42] ecnalyr: has joined #RubyOnRails
[13:07:43] P4Titan: Hi all. I have a rails app that makes us of facebook's graph api. Now, I am having trouble authenticating using their api as turbolinks breaks something. Does anyone have any thoughts?
[13:08:04] arup_r: has joined #RubyOnRails
[13:08:58] universa1: P4Titan: breaks something is rather unspecific.
[13:09:34] P4Titan: Im not sure how to describe it
[13:09:47] P4Titan: but on an intial page load, everything is fine
[13:10:16] P4Titan: but if I navigate to the authentication page, turbolinks interferes there and various parts of the authenticating API aren't loaded (properly) or something
[13:10:22] bphogan: has joined #RubyOnRails
[13:10:44] eljimmy: has joined #RubyOnRails
[13:11:08] l4v2: has joined #RubyOnRails
[13:11:14] snowy: has joined #RubyOnRails
[13:13:04] Axilla: has joined #RubyOnRails
[13:14:11] universa1: P4Titan: why do you reload the authentication API when you're inside turbolinks?
[13:14:20] universa1: the js context has not changed.
[13:15:27] P4Titan: I believe I've tried what ur proposing
[13:16:11] Devalo: has joined #RubyOnRails
[13:16:21] P4Titan: I wrapped everything in a function and registered it with .ready and .on('page:load')
[13:16:33] P4Titan: so that it would execute on every page appearance
[13:16:41] Helheim: has joined #RubyOnRails
[13:16:48] pickandmix: has joined #RubyOnRails
[13:17:22] pickandmix: has joined #RubyOnRails
[13:19:27] Velizar: has joined #RubyOnRails
[13:21:20] pawnbox: has joined #RubyOnRails
[13:23:33] adkoge: has joined #RubyOnRails
[13:24:53] Rodya_: has joined #RubyOnRails
[13:27:05] artto: has joined #RubyOnRails
[13:30:57] Devalo: has joined #RubyOnRails
[13:35:31] ishahnaz: has joined #RubyOnRails
[13:36:07] norfumpit: has joined #RubyOnRails
[13:36:19] youch: has joined #RubyOnRails
[13:38:17] dlite: has joined #RubyOnRails
[13:41:53] xall: has joined #RubyOnRails
[13:45:12] Kedare: has joined #RubyOnRails
[13:45:38] pawnbox: has joined #RubyOnRails
[13:46:01] artto: has joined #RubyOnRails
[13:48:00] SteenJobs: has joined #RubyOnRails
[13:48:21] Zadrel: has joined #RubyOnRails
[13:52:10] xall: has joined #RubyOnRails
[13:52:59] ecnalyr: has joined #RubyOnRails
[13:53:41] A_Drone: has joined #RubyOnRails
[13:55:11] flashpoint9: has joined #RubyOnRails
[13:55:19] insanedreamer: has joined #RubyOnRails
[14:02:28] xall: has joined #RubyOnRails
[14:07:26] AndrewIsHere: has joined #RubyOnRails
[14:08:59] _sjs: has joined #RubyOnRails
[14:09:01] adre: has joined #RubyOnRails
[14:11:11] Rodya_: has joined #RubyOnRails
[14:12:13] Axilla: has joined #RubyOnRails
[14:15:03] jtong: has joined #RubyOnRails
[14:18:27] axl_: has joined #RubyOnRails
[14:18:50] Takumo: Hi all, quick question, how would I set up paperclip to store files based on some other properties of the model? e.g. :user_country
[14:19:14] Takumo: I've tried :path => '/:country/:url_param/:basename.:extension' but its not interpolated the :country or :url_param values
[14:21:12] defswork_: Takumo, you can use a lamba
[14:21:20] defswork_: so the path is evaluated always
[14:21:21] Takumo: defswork_: just doing that now, derp
[14:21:45] Takumo: Proc.new { |a| "uploads/#{a.country}/#{a.url_param}/:basename.:extension} ought to do it
[14:21:53] chouhoulis: has joined #RubyOnRails
[14:22:58] Takumo: hmm, appears the attachments get uploaded before the before_create hooks are run :/
[14:24:01] Takumo: that's a bother because I want to use an attribute set in a before_create hook
[14:24:02] Rodya_: has joined #RubyOnRails
[14:24:08] dunpeal: has joined #RubyOnRails
[14:31:34] SteenJobs: anyone know of a free PCI compliance scanner
[14:35:45] pickandmix: has joined #RubyOnRails
[14:37:21] shaman42: has joined #RubyOnRails
[14:37:34] macsteps: has joined #RubyOnRails
[14:37:35] doge__: has joined #RubyOnRails
[14:39:50] tubbo: do those exist?
[14:39:52] tubbo: that would be sa-weet
[14:41:23] prithaj: has joined #RubyOnRails
[14:42:46] defswork__: has joined #RubyOnRails
[14:43:21] JamieD: has joined #RubyOnRails
[14:43:40] dlite: has joined #RubyOnRails
[14:45:25] zacts: has joined #RubyOnRails
[14:45:26] defswork_: has joined #RubyOnRails
[14:45:46] dminuoso: has joined #RubyOnRails
[14:46:47] adre: has joined #RubyOnRails
[14:47:46] arup_r: has joined #RubyOnRails
[14:49:11] ruurd: Takumo did you use single quote?
[14:50:06] Takumo: ruurd: I was using paperclip's built in interpolation but it seems to only interpolate values for the attachment, not the model its associated with
[14:52:05] Spami: has joined #RubyOnRails
[14:53:47] zpe: has joined #RubyOnRails
[14:55:38] ekinmur: has joined #RubyOnRails
[14:57:19] Oliphaunte: has joined #RubyOnRails
[14:57:35] dminuoso: has joined #RubyOnRails
[15:02:11] nacsurte: has joined #RubyOnRails
[15:03:58] chouhoulis: has joined #RubyOnRails
[15:04:07] kjg: has joined #RubyOnRails
[15:04:53] diegoviola: has joined #RubyOnRails
[15:05:45] shinnya: has joined #RubyOnRails
[15:06:40] JamieD: has joined #RubyOnRails
[15:09:06] SteenJobs: if i need to query in_groups_of() where the number per group differs based on screen size, what is the best way to do that?
[15:11:33] shaman42: has joined #RubyOnRails
[15:11:48] pwnd_nsfw: has joined #RubyOnRails
[15:14:57] doge__: has joined #RubyOnRails
[15:15:03] one_zero: has joined #RubyOnRails
[15:16:03] adavia: has joined #RubyOnRails
[15:21:13] jhack: has joined #RubyOnRails
[15:24:15] Rodya_: has joined #RubyOnRails
[15:25:18] Axilla: has joined #RubyOnRails
[15:26:23] GodFather: has joined #RubyOnRails
[15:27:33] barhum2013: has joined #RubyOnRails
[15:27:45] chouhoul_: has joined #RubyOnRails
[15:29:12] chouhoul_: has joined #RubyOnRails
[15:30:11] nacsurte: has joined #RubyOnRails
[15:30:21] axilla_: has joined #RubyOnRails
[15:31:02] macsteps: has joined #RubyOnRails
[15:32:33] disgrntld: has joined #RubyOnRails
[15:33:19] GodFather: has joined #RubyOnRails
[15:33:56] someish: has joined #RubyOnRails
[15:35:01] xall: has joined #RubyOnRails
[15:35:03] wcarss: has joined #RubyOnRails
[15:35:19] GodFather: has joined #RubyOnRails
[15:36:09] wcarss: any doorkeeper experts in the house? I'm trying to use a static query parameter in a redirect uri and getting 'invalid redirect uri' when trying to authorize
[15:36:35] cschneid_: has joined #RubyOnRails
[15:36:52] wcarss: I know that doorkeeper doesn't allow dynamic params, but I'm not sure if I've somehow made an error adding the static one or if doorkeeper disallows those too
[15:38:45] akshat: has joined #RubyOnRails
[15:40:31] wd40s: has joined #RubyOnRails
[15:43:06] wcarss: sorry if this is a repeat (I just idented): anyone here know doorkeeper well? I'm trying to use a static query parameter in an oauth application's redirect URI and it's failing to authorize
[15:44:00] wcarss: I know they've removed dynamic parameter support, but I can't tell if I've done something wrong here or if they've also disallowed static url params
[15:45:27] xall: has joined #RubyOnRails
[15:47:56] dionysus69: has joined #RubyOnRails
[15:49:19] JamieD: has joined #RubyOnRails
[15:49:35] jetpackjoe: has joined #RubyOnRails
[15:52:27] nettoweb: has joined #RubyOnRails
[15:54:01] GodFather: has joined #RubyOnRails
[15:55:44] xall: has joined #RubyOnRails
[15:57:48] dblessing: has joined #RubyOnRails
[15:59:43] arup_r: has joined #RubyOnRails
[16:04:19] z3ph: has joined #RubyOnRails
[16:05:20] hannelita: has joined #RubyOnRails
[16:06:08] hahuang65: has joined #RubyOnRails
[16:10:56] [Butch]: has joined #RubyOnRails
[16:11:55] arifba: has joined #RubyOnRails
[16:12:08] Rodya_: has joined #RubyOnRails
[16:12:16] arifba: Right now my search route looks like /posts?utf8=✓&search=searchterm
[16:12:29] arifba: But I want to change it to look like /search/searchterm
[16:12:34] arifba: How would I do that?
[16:15:35] artto: has joined #RubyOnRails
[16:16:54] Terens: which books are good for beginners at testing genneraly
[16:17:00] Terens: and particulary with minitest/
[16:18:24] AndrewIsHere: has joined #RubyOnRails
[16:19:45] sebstrax: has joined #RubyOnRails
[16:23:05] siaw23: has joined #RubyOnRails
[16:25:38] alfiemax: has joined #RubyOnRails
[16:25:38] rakm: has joined #RubyOnRails
[16:26:23] JamieD: has joined #RubyOnRails
[16:27:48] GodFather: has joined #RubyOnRails
[16:29:47] flashpoint9: has joined #RubyOnRails
[16:32:29] chouhoulis: has joined #RubyOnRails
[16:35:13] Cohedrin: has joined #RubyOnRails
[16:36:52] dblessing: has joined #RubyOnRails
[16:40:06] Axilla: has joined #RubyOnRails
[16:43:23] sneakers: has joined #RubyOnRails
[16:43:48] phredus_: has joined #RubyOnRails
[16:48:10] clandry94: has joined #RubyOnRails
[16:49:29] pawnbox: has joined #RubyOnRails
[16:52:34] hahuang65: has joined #RubyOnRails
[16:53:17] dblessing: has joined #RubyOnRails
[16:53:49] jhack: has joined #RubyOnRails
[16:53:54] sypheren: has joined #RubyOnRails
[16:54:36] FCser: has joined #RubyOnRails
[16:54:54] rodferso1: has joined #RubyOnRails
[16:56:05] macsteps: has joined #RubyOnRails
[16:56:46] renegadeandy: has joined #RubyOnRails
[16:56:52] jsrn_: has joined #RubyOnRails
[16:57:24] seap: has joined #RubyOnRails
[16:58:50] benlieb: has joined #RubyOnRails
[16:59:59] cnk: has joined #RubyOnRails
[17:03:33] seap: has joined #RubyOnRails
[17:06:17] GodFather: has joined #RubyOnRails
[17:07:50] xall: has joined #RubyOnRails
[17:08:25] agit0: has joined #RubyOnRails
[17:09:37] tanuki4: has joined #RubyOnRails
[17:10:12] dmmoody: has joined #RubyOnRails
[17:14:08] etetz: has joined #RubyOnRails
[17:14:39] etetz: Anyone ever try to run a service command at the OS level in a rails console using the system command?
[17:14:56] etetz: For example, been trying to run something like `logstash` and am receiving the following error
[17:15:08] etetz: LoadError: no such file to load -- logstash/runner require at org/jruby/RubyKernel.java:1040 (root) at /usr/local/Cellar/logstash/2.2.2/libexec/lib/bootstrap/environment.rb:66
[17:15:16] nettoweb: hey guys, Im try to import an csv file but Im getting this error: "TypeError: no implicit conversion of StringIO into String", that's my code: https://gist.github.com/osnysantos/e6785a9bb459c3064c2ae857b3576f5c
[17:15:52] Cohedrin_: has joined #RubyOnRails
[17:15:54] nettoweb: I've tested with another csv file and worked, and the structure of csv file is the same
[17:17:53] laszlo_1: has joined #RubyOnRails
[17:18:08] xall: has joined #RubyOnRails
[17:18:28] dmmoody: has joined #RubyOnRails
[17:18:58] reuhssurance: has joined #RubyOnRails
[17:19:10] Cohedrin: has joined #RubyOnRails
[17:19:55] rafaelfranca: has joined #RubyOnRails
[17:21:36] etetz: has joined #RubyOnRails
[17:22:53] arup_r: has joined #RubyOnRails
[17:26:56] macsteps: has joined #RubyOnRails
[17:28:25] xall: has joined #RubyOnRails
[17:29:44] maxx88: has joined #RubyOnRails
[17:31:08] d5sx43: has joined #RubyOnRails
[17:32:22] Coldblackice: has joined #RubyOnRails
[17:33:33] dmmoody: has joined #RubyOnRails
[17:36:58] d5sx43: has joined #RubyOnRails
[17:38:32] banisterfiend: has joined #RubyOnRails
[17:39:50] cnk: etetz: I would guess that is a path issue. Check your ruby load paths
[17:40:33] etetz: I was kind of thinking along that route, but it could be messy to mess with that in a rails c environment right?
[17:40:59] Oliphaunte: has joined #RubyOnRails
[17:41:47] cnk: Well you can add paths to the load path. But not sure if that is going to help
[17:42:01] cnk: are you in MRI? 'cause that error mentions jruby
[17:42:23] etetz: yeah, I think it mentions jruby because it's logstash
[17:42:33] etetz: If I just straight irb, it works
[17:42:42] etetz: but it gives me the error when i rails c in the rails app i'm working in
[17:42:56] etetz: So I just did a $LOAD_PATH.push(path_to_bin_for_ls)
[17:43:00] etetz: and it returned the same error
[17:43:07] dvinciguerra: has joined #RubyOnRails
[17:43:07] etetz: (inside of rails c)
[17:43:41] etetz: I've actually tried calling something like this as well
[17:43:49] cnk: OK that's odd - the working in irb part
[17:43:51] etetz: system("full_path_to_executable) and nada
[17:44:03] cnk: same ruby? same gempath (except for the rails bit)
[17:44:07] etetz: Yeah, that's kind of why I thought load path too..
[17:44:12] etetz: ou you know what let me check
[17:44:42] etetz: yeah same ruby version
[17:46:39] etetz: I'm not sure if this information helps, but I'm on os x and Logstash is brew installed
[17:47:19] SteenJobs: has joined #RubyOnRails
[17:47:45] vlad_starkov: has joined #RubyOnRails
[17:47:46] matthewd: etetz: You're probably fighting bundler
[17:47:46] vlad_starkov: Hi! Is it possible in RSpec to lazy load dependencies for specs based on spec's path?
[17:48:43] etetz: matthewd: It's funny you mention that. If I system("brew") in rails c this is the output
[17:48:43] etetz: Could not find rake-11.2.2 in any of the sources (Bundler::GemNotFound)
[17:49:00] xall: has joined #RubyOnRails
[17:49:11] etetz: And again, works in IRB
[17:50:00] slappy16: has joined #RubyOnRails
[17:50:29] cnk: ya what matthewd said - rails console will use your Gemfile - which probably doesn't have logstash
[17:51:08] cnk: irb will look in your gempath when you require a gem - so any installed gem is fair game
[17:52:07] AndrewIs_: has joined #RubyOnRails
[17:53:20] rakm: has joined #RubyOnRails
[17:53:36] jenrzzz: has joined #RubyOnRails
[17:53:36] jenrzzz: has joined #RubyOnRails
[17:54:09] matthewd: etetz: http://bundler.io/v1.3/man/bundle-exec.1.html#Shelling-out
[17:54:59] etetz: @matthewd wow, that worked
[17:55:55] Terens: which books are good for beginners at testing genneraly
[17:55:57] Terens: and particulary with minitest/
[17:57:12] dmmoody: has joined #RubyOnRails
[17:57:15] openstruct: has joined #RubyOnRails
[17:57:46] etetz: +1 for the link @matthewd really helped
[17:58:04] cnk: Terens: The best thing I have read about how to decide what to test - and strategies for testing - is POODR by Sandi Metz
[17:58:28] cnk: but if you are looking for something to help with the mechanics of testing, you may want something else
[17:58:30] matthewd: etetz: No worries. It was surprisingly hard to find, given that I knew it existed :/
[17:59:12] cnk: I didn't know it existed. Filing this away for future reference. Thanks matthewd
[17:59:18] etetz: Yeah I don't know how I would've gone to bundler for that issue haha. It seems unrelated, but I have some stuff to look up at least now
[18:00:55] vlad_starkov: Terens: 1) https://pragprog.com/book/nrtest2/rails-4-test-prescriptions 2) https://pragprog.com/book/hwcuc/the-cucumber-book 3) http://www.informit.com/store/practical-object-oriented-design-in-ruby-an-agile-primer-9780321721334 4) https://sandimetz.dpdcart.com/product/135180
[18:00:56] flashpoint9: has joined #RubyOnRails
[18:02:57] AndrewIsHere: has joined #RubyOnRails
[18:03:26] Terens: i was looking for minitest cookbook etc but you didnt mention them
[18:03:40] SteenJobs_: has joined #RubyOnRails
[18:03:49] Derperperd: has joined #RubyOnRails
[18:03:53] CodingWolf: has joined #RubyOnRails
[18:04:32] Spami: has joined #RubyOnRails
[18:04:40] matthewd: Terens: Wait, you'd already decided what answer you wanted, before you asked the question?
[18:05:36] Terens: No matthewd
[18:05:57] cnk: Terens: If you want how to set up minitest, you might look at Rails Tutorial and just skim for the testing bits. I believe the latest version uses minitest
[18:06:09] Terens: I meant that since you are mentioning these books I will take a look at them.
[18:06:23] Terens: But during my initial research I found that one
[18:06:27] Pupeno: has joined #RubyOnRails
[18:06:27] Pupeno: has joined #RubyOnRails
[18:06:54] Terens: @cnk thanks for the hint
[18:08:05] noob_on_rails: has joined #RubyOnRails
[18:08:37] xall: has joined #RubyOnRails
[18:09:45] noob_on_rails: guys , to go back to the page you came from within a site, do you have to use JS and all that?
[18:09:54] etetz_: has joined #RubyOnRails
[18:10:13] dopamean_: has joined #RubyOnRails
[18:10:31] arup_r: noob_on_rails: if you want to do it from rails controller action then redirect_to :back will do it for you
[18:10:43] noob_on_rails: oh that's cool! thanks
[18:12:19] noob_on_rails: so i have to route it in route.rb , get 'back' => 'controller#back' , and then implement it inside the controller?
[18:15:04] tego101: has joined #RubyOnRails
[18:15:58] noob_on_rails: hmm doesnt seem quite right but ill find it ! thanks again
[18:18:42] arup_r: hehe, no. it is out of the box rails ... it does the job for you.. Hmm, that is why I say Rails made me _lazy_ . :p
[18:18:55] fox_mulder_cp: Happy SysAdmin Day!
[18:21:10] Axsuul: has joined #RubyOnRails
[18:26:20] pLaTo0n: has joined #RubyOnRails
[18:27:21] Cohedrin_: has joined #RubyOnRails
[18:31:21] evanspar_: has joined #RubyOnRails
[18:31:40] Devalo: has joined #RubyOnRails
[18:33:01] jhack: has joined #RubyOnRails
[18:33:12] vlad_starkov: Terens: I believe POODR book http://www.informit.com/store/practical-object-oriented-design-in-ruby-an-agile-primer-9780321721334 is A MUST for you, as it just excellently explains WHAT to test. When you get the main principle, you'll be able to test anything in Ruby with nearly any testing framework, be it Minitest / RSpec / or enything.
[18:33:54] JamieD: has joined #RubyOnRails
[18:34:05] vlad_starkov: Terens: And I'd say not only in Ruby...
[18:34:47] cnk: Yes POODR did fabulous things for my Python code
[18:36:37] tubbo: hay renegadeandy
[18:36:56] _djbkd: has joined #RubyOnRails
[18:37:44] renegadeandy: If I want to pass in a couple of extra parameters in to a new instance of an active record object, and im using model.new({field1:1,field2:2,extra_info:”extra bit”}) - how do i let that work so the before_action methods have scope of the extra_info field, and so that rails doesnt complain about it not being able to find “extra_info” as a field in the model?
[18:39:12] tubbo: renegadeandy: attr_accessor
[18:40:30] tubbo: as long as there are writer methods available on the AR class, the AR::Base#initialize method will assign params to those methods
[18:41:02] whathappens: has joined #RubyOnRails
[18:45:44] dionysus69: has joined #RubyOnRails
[18:47:00] Derperperd: has joined #RubyOnRails
[18:47:57] dmmoody: has joined #RubyOnRails
[18:48:18] jtperreault: has joined #RubyOnRails
[18:49:56] fox_mulder_cp: hi folks. how to get second regex \d+\.\d+ from line "Rate: USD 25.00, RUB 67.00"
[18:50:17] fox_mulder_cp: for first match it works fine
[18:50:32] fox_mulder_cp: .match(/\d+\.\d+/i)[0].to_s
[18:50:40] dvinciguerra: has joined #RubyOnRails
[18:50:43] matthewd: fox_mulder_cp: scan
[18:51:15] fox_mulder_cp: matthewd: what is difference between scan and match?
[18:51:32] fox_mulder_cp: array of regexes?
[18:56:26] tjbiddle: has joined #RubyOnRails
[18:56:48] tjbiddle: Hi everyone!
[18:57:16] tjbiddle: Bit of a JS noob; but Rails precompile seems to break on `(item.items.map(function(obj) { return parseFloat(obj.price) })).reduce((a, b) => a + b, 0);` with the error “ExecJS::ProgramError: Unexpected token: operator (>)” - Works fine in development
[18:57:37] tjbiddle: I’m using that as a means of totalling up a few items from a JSON response.
[18:57:54] SteenJobs: “God currently only works on Linux (kernel 2.6.15+), BSD, and Darwin systems. No support for Windows is planned. Event based conditions on Linux systems require the cn (connector) kernel module loaded or compiled into the kernel and god must be run as root.”
[18:58:10] agent_white: has joined #RubyOnRails
[18:58:15] SteenJobs: meant to message that to my friend, whoops - but relevant here too!…no way to run God NOT as root?
[19:02:05] dionysus69: has joined #RubyOnRails
[19:03:28] flashpoint9: has joined #RubyOnRails
[19:03:31] SteenJobs: oh whoops. only for event based conditions
[19:03:40] DoubleMalt: has joined #RubyOnRails
[19:11:45] Axsuul: has joined #RubyOnRails
[19:12:50] fox_mulder_cp: i load ERB.new(File.read('my_erb_template')). how i can render to string for put it in socket?
[19:13:06] maucar: has joined #RubyOnRails
[19:13:26] tubbo: fox_mulder_cp: the result method, http://ruby-doc.org/stdlib-2.3.1/libdoc/erb/rdoc/ERB.html#method-i-result
[19:13:36] tubbo: ERB.new('...').result(binding) is usually how i call it
[19:16:30] evansparkman: has joined #RubyOnRails
[19:16:33] jenrzzz: has joined #RubyOnRails
[19:18:28] Axsuul: has joined #RubyOnRails
[19:19:31] doodlehaus: has joined #RubyOnRails
[19:21:24] fox_mulder_cp: tubbo: can congrats me - i can use socket with ssl and write my own EPP client :)
[19:21:56] tubbo: fox_mulder_cp: neat :)
[19:22:07] tubbo: yeah SSL is pretty straightforward
[19:22:15] tubbo: but now you have to keep a sharp eye on OpenSSL vulnerabilities ;)
[19:22:46] nadav: has joined #RubyOnRails
[19:22:46] nadav: has joined #RubyOnRails
[19:23:05] fox_mulder_cp: tubbo i need only connect to EPP server for checking domain availability, register it and other domain registrator stuff
[19:23:38] fox_mulder_cp: tubbo: i write FULL hosting operator panel :)
[19:24:28] tjohnson: has joined #RubyOnRails
[19:24:32] fox_mulder_cp: tubbo: no php, plesk, cpanel, but i usr docker for real apps hosting, not only php/cgi
[19:24:42] etetz: has joined #RubyOnRails
[19:24:46] tubbo: yeah that's good...plesk and cpanel are terrible.
[19:25:13] tubbo: writing those kinds of control center apps is fun...i still have an app lying around here that i need to finish that basically acts as a frontend for a zfs-based NAS fileserver
[19:25:19] tubbo: similar to FreeNAS but without all the cruft.
[19:25:36] fox_mulder_cp: tubbo: blog.sites.mulder.kiev.ua - working container based on apache+php image
[19:25:56] tjbiddle: Answer to my question: The precompiler seems to have not agreed with the lambda for some reason - just rewrote it
[19:26:07] tubbo: so you're basically building your own PaaS?
[19:27:41] fox_mulder_cp: tubbo: some like heroku :)
[19:28:13] tubbo: yeah definitely
[19:28:22] tubbo: i've used a couple things like that: Dokku and Deis are pretty neat
[19:28:28] tubbo: and Flynn
[19:32:23] rafaelfranca: has joined #RubyOnRails
[19:32:23] rafaelfranca: has joined #RubyOnRails
[19:33:26] fox_mulder_cp: tubbo: screenshot https://1drv.ms/i/s!AvS3PCPMZNLuiLEaiZjWEwpgr7hdVA
[19:34:15] fox_mulder_cp: rails + redis + resque + ansible + docker + pgsql + docker + adminlte based on twbs
[19:34:34] tubbo: fox_mulder_cp: is adminlte just a template?
[19:34:43] tubbo: also you said docker twice ;)
[19:34:54] tubbo: but docker is really useful so i can understand why
[19:35:19] fox_mulder_cp: tubbo: ok. lxc, openvz - containers foor FULL v,
[19:35:44] fox_mulder_cp: siith rsyslog, systemd, crond, fail2ban, etc
[19:36:15] fox_mulder_cp: docker - container for ONLY ONE daemon with hardcoded app
[19:36:26] fox_mulder_cp: for it's basic ideology
[19:37:09] fox_mulder_cp: so, u git clone http://your.cool.app.repo -> /opt and runs /opt/app/start_app
[19:37:32] fox_mulder_cp: abd clone tons of this app image instances
[19:38:39] tvw: has joined #RubyOnRails
[19:40:53] fox_mulder_cp: tubbo: adminlte very good template, http://www.almsaeedstudio.com/preview
[19:41:02] fox_mulder_cp: but sometimes hard and slowly
[19:43:09] SteenJobs_: has joined #RubyOnRails
[19:43:26] evanspar_: has joined #RubyOnRails
[19:46:09] naftilos76: has joined #RubyOnRails
[19:46:19] tjbiddle: has joined #RubyOnRails
[19:47:37] barhum2013: has joined #RubyOnRails
[19:47:52] naftilos76: Hi everyone, is there a way to exclude a certain .css file from loading? Maybe something in application.css ? Or do i have to explicitly define all the .css files i want to load and leave out the one i do not want?
[19:48:10] naftilos76: again in application.css?
[19:48:27] hannelita: has joined #RubyOnRails
[19:50:44] dmmoody: has joined #RubyOnRails
[19:50:49] SteenJobs: soooo “drwxr-xr-x 2 deploy deploy 4096 Jul 29 15:29 log”, yet “ERROR: Log directory '/home/deploy/apps/my_app/current/log' is not writable by deploy”….wtf?
[19:52:03] sagax: has joined #RubyOnRails
[19:53:13] matthewd: naftilos76: There's the 'stub' directive.. but generally the best choice is to list the things you do want.
[19:54:03] matthewd: naftilos76: Consider moving most of the files into a subdirectory, if you don't want to enumerate them individually
[19:54:31] SteenJobs: and since i can’t write to it, i can’t see why my God script isn’t starting, because it can’t log the error!
[19:55:11] matthewd: SteenJobs: 'current' is suspicious.. if that's a symlink, maybe it's not pointing where you expect, at the time of the error?
[19:56:30] Rodya_: has joined #RubyOnRails
[19:56:48] SteenJobs: interesting - it’s definitely a symlink, to the release folder which is some random string of numbers, and those directories are constantly changing with deployments…whereas current will always be symlinked to the current release (hence why i need current so it’s dynamic), but the symlink is definitely good…otherwise the most recent deployment wouldn’t be running
[19:57:04] SteenJobs: (using cap, hence the whole current symlink deal)
[19:57:19] tjbiddle: has joined #RubyOnRails
[19:57:19] SteenJobs: matthewd: don’t you love dealing with other people’s server issues :D?
[19:58:20] flashpoint9: has joined #RubyOnRails
[19:58:26] matthewd: Doesn't log normally live in the shared directory?
[19:58:43] naftilos76: matthewd, thanks and sorry for me being in aa hurry. I googled it and it showed up. I tried it and it works.
[20:00:10] shinnya: has joined #RubyOnRails
[20:01:08] SteenJobs: matthewd: yea i think that’s the general organization, but the dev that set up production chose to kep logs in current/log, so instead of changing everything else, i just pointed God’s logs to current/log…but god is running as deploy, and given the permissions on the log folder, i just don’t get how this could be an issue
[20:01:41] meoblast001: has joined #RubyOnRails
[20:01:51] adre: has joined #RubyOnRails
[20:01:51] matthewd: SteenJobs: If in doubt, strace
[20:02:44] rails750: has joined #RubyOnRails
[20:04:57] nadav: wow, scaffolding it pretty awesome
[20:04:59] rails750: Im using Devise + RoR4, and I display my sign_up form elsewhere in my app, following Devise's wiki directions. However I have a problem. If a person signs up containing errors, it redirects to the default form pages. How to prevent that?
[20:08:41] edeferia: has joined #RubyOnRails
[20:10:42] SteenJobs: matthewd: tried the strace move, if only i knew what…any of it meant haha
[20:10:49] SteenJobs: i can pick out bits and pieces, but nothing helpful yet
[20:10:49] johnkpaul: Does anyone know of a more recent version of https://github.com/JohnColvin/mailbag ?
[20:13:27] workmad3: has joined #RubyOnRails
[20:17:25] rails750: Im using Devise + RoR4, and I display my sign_up form elsewhere in my app, following Devise's wiki directions. However I have a problem. If a person signs up containing errors, it redirects to the default form pages. How to prevent that?
[20:17:30] nadav_: has joined #RubyOnRails
[20:18:11] macsteps: has joined #RubyOnRails
[20:18:24] Devalo: has joined #RubyOnRails
[20:18:31] capin: rails750: change the route on the redirect page ;)
[20:19:15] Oliphaunte: has joined #RubyOnRails
[20:19:37] capin: SteenJobs: how's it going?
[20:19:55] pickandmix: has joined #RubyOnRails
[20:20:43] SteenJobs: in general or my issue in particular haha
[20:21:01] dvinciguerra: has joined #RubyOnRails
[20:21:01] SteenJobs: capin: how’s it going w you?
[20:21:18] rails750: capin: not sure i understood what you wrote. do you mean change the route on the Devise controller that handles the signup?
[20:21:41] brianpWins_: has joined #RubyOnRails
[20:24:08] eyeamaye: has joined #RubyOnRails
[20:24:33] zpe: has joined #RubyOnRails
[20:24:54] flashpoint9: has joined #RubyOnRails
[20:25:03] beingjohnm: I also have a devise question. Per L#45 in the passwords controller I should be able to set the path after a user resets their password using after_resetting_password_path_for but the update function doesn't seem to be doing so. Any ideas? https://gist.github.com/willjohnson/cff7c7c74df1f1553cf310a695eabab4#L45
[20:26:16] phaze: has joined #RubyOnRails
[20:26:17] ablemike: has joined #RubyOnRails
[20:26:27] Rodya_: has joined #RubyOnRails
[20:26:34] brianpWins: has joined #RubyOnRails
[20:27:14] ablemike: Happy Friday. I have an array of dates and totals like [['mon', 100], ['tue
[20:27:48] workmad3: beingjohnm: did you update the devise line in `routes.rb` to point to your overridden passwords controller?
[20:28:32] capin: SteenJobs: not bad, just trying to enjoy #SysAdminDay
[20:30:03] beingjohnm: workmad3: I did not. Doh!
[20:30:06] ablemike: My array looks like this [['mon', 100],['tue',200],['wed',300],['thu',400],['fri',500]]
[20:30:27] workmad3: beingjohnm: heh :) there we go
[20:30:45] ablemike: I need to somehow make a baseline for this array and subtract every day with the starting count.
[20:31:07] fox_mulder_cp: ablemike: hmm.. why? [mon: '100', tue: '200'] ...
[20:31:09] ablemike: each day is the grand total but I want the total for that day if that makes sense.
[20:31:26] _djbkd: has joined #RubyOnRails
[20:32:16] workmad3: ablemike: ah, so you want a new array where each number has the previous day's total subtracted?
[20:32:19] ablemike: fox_mulder_cp: Model.all.collect{|x| [x.created_at, x.total]} gets tossed to javascript for a flot chart.
[20:35:47] ablemike: maybe map is the answer?
[20:35:48] fox_mulder_cp: ablemike: add scope for today_salary_summ and select where created_at by today's date
[20:36:06] workmad3: ablemike: well, I can think of `arr.map.with_index{|item, idx| idx.zero? ? item : [item[0], item[1] - arr[idx - 1][1]] }` but that's a bit crappy
[20:36:42] fox_mulder_cp: or your js may be loong, very long - 365 values for one year only
[20:37:22] ablemike: this is actually for 60 records (last hour)
[20:37:30] _djbkd: has joined #RubyOnRails
[20:37:40] ablemike: but each record is the total of that minute
[20:37:59] ablemike: trying to find an efficient way to just show change between each record really
[20:38:04] fox_mulder_cp: ablemike: actually... but what if app work for some years?
[20:38:22] fox_mulder_cp: an have tons of salaries per hour
[20:38:40] workmad3: fox_mulder_cp: why are you talking about 'salaries'?
[20:39:38] ablemike: fox_mulder_cp: I am not worried about any of that.
[20:39:44] fox_mulder_cp: workmad3: as example of many long list values
[20:40:19] workmad3: ablemike: annoyingly, I could think of `arr.each_cons(2).map { |item1, item2| [item2[0], item2[1] - item1[1]] }` but that wouldn't give you the first minute, it would just give you the deltas from minute 1-2, 2-3, 3-4, etc.
[20:40:22] c355E3B: has joined #RubyOnRails
[20:40:41] ablemike: THATS THE WORD I WAS LOOKING FOR!
[20:40:47] workmad3: ablemike: haha :)
[20:41:02] ablemike: I was literally on dicitonary.com looking for "opposite of ...."
[20:41:12] rails750: +capin sorry, still didn't understand the change the route on the redirect page =/
[20:42:05] workmad3: fox_mulder_cp: when you're answering questions, it's generally a good idea to not confuse issues by making up domain-specific names for things when the question is very obviously nothing to do with the name you've picked
[20:42:39] dopamean1: has joined #RubyOnRails
[20:43:03] ablemike: each_cons is AWESOME
[20:43:15] fox_mulder_cp: workmad3: thanks
[20:43:43] ablemike: I swear enumerable has more methods i've never seen than ANYTHING
[20:44:23] workmad3: ablemike: yeah... I still frequently find myself on enumerable's docs, finding out about new collection methods that have been added :)
[20:44:49] workmad3: ablemike: I had fun playing around with things when `slice_before`, `slice_after` and `slice_when` were introduced
[20:45:40] macsteps: has joined #RubyOnRails
[20:46:06] ablemike: workmad3: that did the trick!!!!
[20:46:26] workmad3: ablemike: ah, cool :)
[20:46:52] ablemike: deltas are upside down but thats easy to fix
[20:47:02] SteenJobs: capin: what’s SysAdminDay??
[20:49:34] tvon: has joined #RubyOnRails
[20:49:42] workmad3: SteenJobs: it's when you give your sysadmin a hug
[20:49:57] workmad3: SteenJobs: and he pulls your ethernet cable as retribution for invading his personal space
[20:50:01] nadav: has joined #RubyOnRails
[20:50:01] nadav: has joined #RubyOnRails
[20:50:24] SteenJobs: workmad3: hahaha - i wouldn’t know, since i’m the frontend developer, and the backend developer, and the sysadmin. fml.
[20:50:34] SteenJobs: can i hug myself? does that count? i need it right now...
[20:50:42] rogue_koder: has joined #RubyOnRails
[20:50:45] workmad3: SteenJobs: ok, so give yourself a hug, then look in the mirror and say "You're doing an awesome job!"
[20:50:59] SteenJobs: workmad3: see - “drwxr-xr-x 2 deploy deploy 4096 Jul 29 15:29 log”, yet “ERROR: Log directory '/home/deploy/apps/my_app/current/log' is not writable by deploy”
[20:51:36] workmad3: SteenJobs: is it actually a different user in the deploy group, and the fact it's not group writable is giving you that issue?
[20:52:17] pickandmix: has joined #RubyOnRails
[20:53:28] SteenJobs: workmad3: only one member, deploy
[20:53:46] SteenJobs: workmad3: and yea i’m setting uid and gid in the upstart script, so it should be executing the command as deploy:deploy
[20:54:40] workmad3: SteenJobs: the other thing I'd check... I'm guessing `log` is actually a symlink to the shared directory? Is the original directory correctly permissioned?
[20:55:21] SteenJobs: workmad3: log isn’t a symlink, but current/ is…to the release folder for this release, and it’s correctly permissioned as well
[20:55:34] tjbiddle: has joined #RubyOnRails
[20:55:41] SteenJobs: workmad3: “drwxr-xr-x 14 deploy deploy 4096 Jul 29 15:58 20160729153323”
[20:55:42] workmad3: SteenJobs: ah, I'm used to symlinking log so that you preserve logs between releases :)
[20:56:14] SteenJobs: on my list to fix that - the dev who set prod up had puma and nginx logs in current/log and havent moved it all into shared yet
[20:56:16] workmad3: SteenJobs: but yeah, that sounds weird...
[20:57:02] SteenJobs: workmad3: the best part is there’s an error in my god config file, but because the log file isn’t being created, i can’t see what it is haha
[20:57:13] SteenJobs: i can obviously put the log file somewhere else, but i’d prefer to fix this permissions issue
[20:57:13] Devalo: has joined #RubyOnRails
[20:57:14] jenrzzz: has joined #RubyOnRails
[20:57:53] test-jul29: has joined #RubyOnRails
[20:58:01] workmad3: SteenJobs: yay!
[20:58:08] workmad3: SteenJobs: that sounds like it'll be a fun weekend to fix :P
[20:58:20] SteenJobs: haha woohoooo, so excited!
[21:00:01] workmad3: ACTION needs to spend some time building out his ansible web server scripts at some point soon
[21:03:19] JamieD: has joined #RubyOnRails
[21:06:41] AndrewIsHere: has joined #RubyOnRails
[21:08:09] brianpWins: has joined #RubyOnRails
[21:08:23] SteenJobs: workmad3: fixed - i realized that the god log file was fine…it was the log file for the resque process god was monitoring that was causing the issue, and found that the God config file was setting uid for the resque process…i guess it caused some sort of conflict
[21:08:34] SteenJobs: capin: woohoooo happy SysAdminDay!
[21:10:05] workmad3: SteenJobs: haha :)
[21:10:28] SteenJobs: so i removed setting the uid in god and it worked! although service god start is still requiring sudo which is odd
[21:12:50] SteenJobs: workmad3: ah, upstart docs make it clear that the service should still require a privileged user
[21:12:51] lxsameer: has joined #RubyOnRails
[21:13:38] SteenJobs: workmad3: i’m just worried that there are duplicate processes if god is started with cap vs the upstart script on the server
[21:13:59] SteenJobs: workmad3: but can’t use cap to start the upstart script since it requires sudo…would it be dangerous to allow x access for deploy on that particular script?
[21:15:01] rails750: omg I got it -____- *bangs head on the table*
[21:15:39] snowy: has joined #RubyOnRails
[21:16:01] SteenJobs: rails750: nice! how’d you hack around devise?
[21:16:16] firmus: has joined #RubyOnRails
[21:16:25] roamingdog: has joined #RubyOnRails
[21:17:04] rails750: SteenJobs: Gotta override the registration controller form devise, which I already did. but there was a line where it keeps on redirecting to the original devise form page, just have to replace it with the new one and to display the errors now
[21:17:17] sumobob: has joined #RubyOnRails
[21:17:44] SteenJobs: rails750: yep - redirects you to the templates packaged with the library, easy to miss since they’re not in your views dir
[21:18:19] rails750: SteenJobs: just gotta display the errors now on the new page.
[21:19:13] matcouto: has joined #RubyOnRails
[21:19:16] Coldblackice: has joined #RubyOnRails
[21:19:17] yfeldblum: has joined #RubyOnRails
[21:19:17] SteenJobs: rails750: there should be a devise_error_messages helper
[21:19:42] rails750: hm, gonna look into that
[21:20:04] nadav_: has joined #RubyOnRails
[21:29:58] JamieD: has joined #RubyOnRails
[21:30:31] nettoweb: has joined #RubyOnRails
[21:31:47] SteenJobs: anyone know how to update the execution date of a delayed job using resque-scheduler?
[21:31:50] flashpoint9: has joined #RubyOnRails
[21:33:34] evansparkman: has joined #RubyOnRails
[21:36:18] sagax: has joined #RubyOnRails
[21:39:55] silverdust: What's the name of this inner gem that devise uses for auth providers?
[21:40:08] silverdust: Begins with a W
[21:40:25] matthewd: silverdust: Check the devise gem's dependencies?
[21:40:35] silverdust: I didn't see it in there
[21:40:47] silverdust: I did. Thought I'd see it in the Gemfile
[21:41:22] silverdust: Saw it in the documentation
[21:44:11] rails750: SteenJobs: hmm, do you know if the devise_error_messages helper can be executed in other views than Devise's ?
[21:44:27] flashpoint9: has joined #RubyOnRails
[21:45:02] Rodya_: has joined #RubyOnRails
[21:48:43] ur5us: has joined #RubyOnRails
[21:48:43] quazimodo: has joined #RubyOnRails
[21:52:38] Rodya_: has joined #RubyOnRails
[21:55:10] Rodya_: has joined #RubyOnRails
[21:55:38] hannelita: has joined #RubyOnRails
[21:56:48] qejk: has joined #RubyOnRails
[21:57:51] Rodya_: has joined #RubyOnRails
[21:58:52] quazimod1: has joined #RubyOnRails
[22:01:06] Rodya_: has joined #RubyOnRails
[22:05:50] macsteps: has joined #RubyOnRails
[22:06:12] ekinmur: has joined #RubyOnRails
[22:08:43] dlite: has joined #RubyOnRails
[22:09:42] AndrewIsHere: has joined #RubyOnRails
[22:13:16] rubyonrails491: has joined #RubyOnRails
[22:13:31] Rodya_: has joined #RubyOnRails
[22:15:25] kies: has joined #RubyOnRails
[22:15:32] Rodya_: has joined #RubyOnRails
[22:16:07] Spami: has joined #RubyOnRails
[22:18:10] eljimmy: has joined #RubyOnRails
[22:25:08] Gabriel403: has joined #RubyOnRails
[22:25:08] Gabriel403: has joined #RubyOnRails
[22:27:22] LambdaSource: has joined #RubyOnRails
[22:28:49] Mia: has joined #RubyOnRails
[22:28:49] Mia: has joined #RubyOnRails
[22:29:00] pawnbox: has joined #RubyOnRails
[22:29:49] Spami: has joined #RubyOnRails
[22:38:08] crdpink: has joined #RubyOnRails
[22:39:55] duncannz: has joined #RubyOnRails
[22:41:15] AndrewIsHere: has joined #RubyOnRails
[22:41:30] akshat: has joined #RubyOnRails
[22:42:38] Ebok: has joined #RubyOnRails
[22:45:20] zeknox1: has left #RubyOnRails: ()
[22:49:01] Derperperd: has joined #RubyOnRails
[22:49:06] Palsson: has joined #RubyOnRails
[22:49:45] pawnbox: has joined #RubyOnRails
[22:51:26] FCser: has joined #RubyOnRails
[22:53:46] zpe: has joined #RubyOnRails
[22:58:58] jetpack_joe: has joined #RubyOnRails
[23:08:28] _djbkd: has joined #RubyOnRails
[23:09:46] nettoweb: has joined #RubyOnRails
[23:11:14] Palsson: has joined #RubyOnRails
[23:11:36] SteenJobs: has joined #RubyOnRails
[23:14:26] SteenJobs: anyone know how to change the timestamp on a resque delayed job? or would it just be easier to delete the given job and recreate it with the new timestamp
[23:16:46] Rodya_: has joined #RubyOnRails
[23:18:45] Derperperd: has left #RubyOnRails: ()
[23:19:14] Derperperd: has joined #RubyOnRails
[23:25:10] pawnbox: has joined #RubyOnRails
[23:26:36] macsteps: has joined #RubyOnRails
[23:31:16] Pupeno: has joined #RubyOnRails
[23:32:26] creaked: has joined #RubyOnRails
[23:34:37] nettoweb: has joined #RubyOnRails
[23:39:25] qejk: has joined #RubyOnRails
[23:40:49] dalbusch1t: has joined #RubyOnRails
[23:42:05] banisterfiend: has joined #RubyOnRails
[23:43:44] Rubie: has joined #RubyOnRails
[23:45:49] qejk: has joined #RubyOnRails
[23:49:27] creaked: has joined #RubyOnRails
[23:51:52] kies: has joined #RubyOnRails
[23:54:06] cnk: has joined #RubyOnRails
[23:55:51] _djbkd: has joined #RubyOnRails
[23:56:26] AndrewIsHere: has joined #RubyOnRails