« Back to channel list

#RubyOnRails - 30 October 2015

« Back 1 day Forward 1 day »
[00:02:16] DiCablo: has joined #RubyOnRails
[00:02:42] IFrank00: has joined #RubyOnRails
[00:03:11] manfrin: has joined #RubyOnRails
[00:04:48] d34th4ck3r: has joined #RubyOnRails
[00:06:06] pixelhandler: has joined #RubyOnRails
[00:09:37] tds5016: has joined #RubyOnRails
[00:09:39] vipaca: has joined #RubyOnRails
[00:09:49] tds5016: hi all. I'm using cequel, and I keep getting the error: Unknown validator: 'UniquenessValidator'
[00:10:00] jessemcgilallen: has joined #RubyOnRails
[00:10:08] northfurr: has joined #RubyOnRails
[00:10:09] tds5016: I am pretty sure cequel just inherits from ActiveModels validators....
[00:10:15] tds5016: any idea how I'd fix that?
[00:13:49] Radar: tds5016: !ncnh
[00:13:50] helpa: tds5016: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[00:14:18] nettoweb: has joined #RubyOnRails
[00:14:59] mwlang: has joined #RubyOnRails
[00:15:05] pullcheezy: has joined #RubyOnRails
[00:17:46] FailBit: caribbean queen
[00:17:48] FailBit: now we're sharing the same dream
[00:18:34] rhizome: i think i have the instrumental for that somewhere
[00:18:56] rgtk: has joined #RubyOnRails
[00:22:08] Mia: has joined #RubyOnRails
[00:22:08] Mia: has joined #RubyOnRails
[00:24:16] bendangelo: has joined #RubyOnRails
[00:25:15] Scriptonaut: has left #RubyOnRails: ()
[00:25:37] EminenceHC: has joined #RubyOnRails
[00:25:47] ibouvousaime: has joined #RubyOnRails
[00:25:48] rgtk: has joined #RubyOnRails
[00:26:01] stardiviner: has joined #RubyOnRails
[00:26:47] baweaver: has joined #RubyOnRails
[00:27:05] arBmind1: has joined #RubyOnRails
[00:27:30] yawn: has joined #RubyOnRails
[00:27:43] asianMike: has joined #RubyOnRails
[00:27:46] hightower4: has joined #RubyOnRails
[00:28:41] msdavid: has joined #RubyOnRails
[00:29:14] machuga: has joined #RubyOnRails
[00:29:53] marcoceppi: has joined #RubyOnRails
[00:29:53] marcoceppi: has joined #RubyOnRails
[00:29:59] sankaber: has joined #RubyOnRails
[00:31:08] one_zero: has joined #RubyOnRails
[00:31:44] chills42: has joined #RubyOnRails
[00:32:24] montagesoftware: has joined #RubyOnRails
[00:33:05] threeminutemonta: has joined #RubyOnRails
[00:33:47] rgtk: has joined #RubyOnRails
[00:35:48] davidmst: has joined #RubyOnRails
[00:35:56] tds5016: Is there a way to manually create the error that validates unique:true does?
[00:35:59] thams: has joined #RubyOnRails
[00:36:13] atomical: has joined #RubyOnRails
[00:36:30] bonhoeffer: has joined #RubyOnRails
[00:37:38] annlewis: has joined #RubyOnRails
[00:37:40] tds5016: errors.add(:name, 'Thing Must Be Unique') is as close as I can get.
[00:37:47] rshetty: has joined #RubyOnRails
[00:38:05] Aeyrix: What's wrong with unique:true?
[00:38:06] bonhoeffer: has joined #RubyOnRails
[00:38:40] beauby: has joined #RubyOnRails
[00:39:17] tds5016: It won't work with cequel.
[00:39:22] tds5016: so I need to create my own validate method.
[00:39:29] chipotle: has joined #RubyOnRails
[00:39:48] tds5016: if I do errors.add(:name, 'this is an error'); should it be adding that error to my form?
[00:41:50] sankaber: has joined #RubyOnRails
[00:42:24] tds5016: basically I have a custom validate method, and I want to have it add any errors to the input field if there are any.
[00:42:33] threeminutemonta: has joined #RubyOnRails
[00:43:19] arooni: has joined #RubyOnRails
[00:43:47] alfie: has joined #RubyOnRails
[00:44:05] rgrmatt: has joined #RubyOnRails
[00:44:50] Fire-Dragon-DoL: has joined #RubyOnRails
[00:44:59] northfurr: anyone ever use s3 with paperclip?
[00:46:06] FailBit: Sike: Don't do it
[00:47:14] rshetty: has joined #RubyOnRails
[00:48:46] northfurr: followed this step by step: https://devcenter.heroku.com/articles/paperclip-s3, and i just get ???something went wrong?????? checked the logs to no avail
[00:49:17] l_tonz: has joined #RubyOnRails
[00:50:02] Radar: northfurr: heroku logs?
[00:50:16] northfurr: Radar: yeah
[00:50:24] Radar: weird. There should be something there at least.
[00:51:31] LambdaSource: has joined #RubyOnRails
[00:51:34] Lightsword_: has joined #RubyOnRails
[00:55:05] capin: hello, im trying to deploy a rails app using cap, and have set the following setting in my config/deploy/production.rb https://ghostbin.com/paste/rw745 but puma isn't running on that port
[00:55:17] fschuindt: What actually is a ActiveJob Queue? Two jobs in the same queue will run in parallel or the second will wait the first finish to start it?
[00:55:24] mloy: has joined #RubyOnRails
[00:57:07] chipotle: has joined #RubyOnRails
[00:58:25] FailBit: if you have more workers than jobs, they run in parallel
[00:58:30] Radar: What FailBit said
[01:00:41] rgtk: has joined #RubyOnRails
[01:01:26] rshetty: has joined #RubyOnRails
[01:02:36] rgtk: has joined #RubyOnRails
[01:03:39] bruno-: has joined #RubyOnRails
[01:04:22] rgtk: has joined #RubyOnRails
[01:06:05] yfeldblum: has joined #RubyOnRails
[01:06:19] rgtk: has joined #RubyOnRails
[01:07:38] Motoservo: has joined #RubyOnRails
[01:08:18] rgtk: has joined #RubyOnRails
[01:08:26] Hazim: has joined #RubyOnRails
[01:10:05] rgtk: has joined #RubyOnRails
[01:11:09] northfurr: has joined #RubyOnRails
[01:12:18] rgtk: has joined #RubyOnRails
[01:12:27] dideler: has joined #RubyOnRails
[01:13:58] rgtk: has joined #RubyOnRails
[01:14:13] Thomas-0725: has joined #RubyOnRails
[01:14:59] sevenseacat: has joined #RubyOnRails
[01:15:55] rgtk: has joined #RubyOnRails
[01:17:39] rgtk: has joined #RubyOnRails
[01:17:53] _djbkd: has joined #RubyOnRails
[01:18:04] btriley: has joined #RubyOnRails
[01:18:24] _djbkd: has joined #RubyOnRails
[01:18:49] reaVer: has joined #RubyOnRails
[01:19:17] x-light: has joined #RubyOnRails
[01:19:37] rgtk: has joined #RubyOnRails
[01:21:36] rgtk: has joined #RubyOnRails
[01:22:04] northfurr: has joined #RubyOnRails
[01:22:30] Lightsword_: has joined #RubyOnRails
[01:22:47] mag42c: has joined #RubyOnRails
[01:23:33] rgtk: has joined #RubyOnRails
[01:23:55] TheNet: has joined #RubyOnRails
[01:25:17] rgtk: has joined #RubyOnRails
[01:25:49] reaVer: has joined #RubyOnRails
[01:27:16] rgtk: has joined #RubyOnRails
[01:27:41] jonee: has joined #RubyOnRails
[01:29:14] rgtk: has joined #RubyOnRails
[01:30:24] pixelhandler: has joined #RubyOnRails
[01:30:56] rgtk: has joined #RubyOnRails
[01:31:30] Thomas-0725: has joined #RubyOnRails
[01:32:54] rgtk: has joined #RubyOnRails
[01:33:23] tuelz: has joined #RubyOnRails
[01:33:41] nettoweb: has joined #RubyOnRails
[01:33:55] EminenceHC: has joined #RubyOnRails
[01:34:54] rgtk: has joined #RubyOnRails
[01:36:39] rgtk_: has joined #RubyOnRails
[01:37:59] pwnd_nsfw: nospam rhizome
[01:38:14] secret: has joined #RubyOnRails
[01:38:17] DiCablo: has joined #RubyOnRails
[01:38:26] annlewis: has joined #RubyOnRails
[01:38:29] rgtk: has joined #RubyOnRails
[01:38:41] mag42c: has left #RubyOnRails: ()
[01:40:32] rgtk: has joined #RubyOnRails
[01:42:27] rgtk: has joined #RubyOnRails
[01:42:35] pydave6367: has joined #RubyOnRails
[01:43:01] siaW: has left #RubyOnRails: ()
[01:44:10] rgtk_: has joined #RubyOnRails
[01:46:10] rgtk: has joined #RubyOnRails
[01:46:39] northfurr: has joined #RubyOnRails
[01:46:59] dikaio: has joined #RubyOnRails
[01:47:10] nya: has joined #RubyOnRails
[01:47:25] rickmasta: has joined #RubyOnRails
[01:48:06] rgtk: has joined #RubyOnRails
[01:49:09] Thomas-0725: has joined #RubyOnRails
[01:49:43] twilling: has joined #RubyOnRails
[01:50:14] rgtk: has joined #RubyOnRails
[01:51:48] rgtk: has joined #RubyOnRails
[01:52:40] twilling: has joined #RubyOnRails
[01:53:49] rgtk: has joined #RubyOnRails
[01:54:26] pixelhandler: has joined #RubyOnRails
[01:54:26] Fire-Dragon-DoL: I'm having a problem with `composed_of` when used with `first_or_initialize` and then save, I'm getting a TypeError due to impossible converstion from MyValueObject to text (guess it hits the underlying postgresql adapter), notice that I obviously implement `to_s`, any suggestion? GIST: https://gist.github.com/Fire-Dragon-DoL/f8dd2a578f3b4d2d3d69
[01:54:32] davidmst: Does anyone know, or can anyone point me in the right direction, as to how I might be able to make a model create/insert only?
[01:54:41] EminenceHC: has joined #RubyOnRails
[01:54:47] davidmst: Ie. restrict the ability to read records from the table and only allow inserts
[01:54:50] twilling: has joined #RubyOnRails
[01:55:20] rhizome: you can start by changing the perms on that table
[01:55:43] rgtk: has joined #RubyOnRails
[01:57:18] _djbkd: has joined #RubyOnRails
[01:57:27] rhizome: not sure how wise it is, but you could implement .find as a no-op in the model
[01:57:34] rgtk: has joined #RubyOnRails
[01:57:51] rhizome: that might mess with update
[01:58:37] EminenceHC: has joined #RubyOnRails
[01:59:30] rgtk: has joined #RubyOnRails
[02:01:21] rgtk: has joined #RubyOnRails
[02:01:47] mikeharris22: has joined #RubyOnRails
[02:03:16] rgtk: has joined #RubyOnRails
[02:03:44] northfurr: has joined #RubyOnRails
[02:04:02] Fire-Dragon-DoL: mh I think I got it, it's related to the uniqueness validation not using string
[02:04:21] bruno-: has joined #RubyOnRails
[02:04:31] zvive: has joined #RubyOnRails
[02:04:54] Rinzlit: has joined #RubyOnRails
[02:05:01] rgtk: has joined #RubyOnRails
[02:07:02] rgtk: has joined #RubyOnRails
[02:07:02] percipio: has joined #RubyOnRails
[02:07:09] Maletor: has joined #RubyOnRails
[02:07:47] kies^: has joined #RubyOnRails
[02:08:19] corioliss: has joined #RubyOnRails
[02:08:30] Coldblackice: has joined #RubyOnRails
[02:08:57] rgtk: has joined #RubyOnRails
[02:09:06] dmarr: with f.collection_select, is there a way to stub in a default choice which isn't in the collection that is being fetched?
[02:09:31] allcentury: has joined #RubyOnRails
[02:10:43] rgtk: has joined #RubyOnRails
[02:11:21] roxtrongo: has joined #RubyOnRails
[02:12:40] rgtk: has joined #RubyOnRails
[02:14:39] rgtk: has joined #RubyOnRails
[02:15:21] safety_cut: has joined #RubyOnRails
[02:16:24] rgtk: has joined #RubyOnRails
[02:16:43] safety_c_: has joined #RubyOnRails
[02:17:04] boxofrox: has joined #RubyOnRails
[02:17:24] lacuna: has joined #RubyOnRails
[02:17:38] Lightsword: has joined #RubyOnRails
[02:17:53] nogic: has joined #RubyOnRails
[02:18:18] rgtk: has joined #RubyOnRails
[02:18:55] rhizome: dmarr: use an instance variable and take care of it in the controller
[02:19:21] Radar: dmarr: you can probably use prompt: "Foo"
[02:19:25] Radar: as an option to the collection_select.
[02:19:29] boxofrox: nvm, i answered my own question.
[02:19:31] Radar: prompt: "Please select" might be something that you use.
[02:19:52] Radar: boxofrox: doesn't look like you asked one?
[02:20:12] boxofrox: isn't great when in the process of typing a question, you figure out the answer :)
[02:20:22] rgtk: has joined #RubyOnRails
[02:22:03] tenzan: has joined #RubyOnRails
[02:22:17] rgtk: has joined #RubyOnRails
[02:22:17] chipotle: has joined #RubyOnRails
[02:23:14] tenzan: has joined #RubyOnRails
[02:23:59] rgtk: has joined #RubyOnRails
[02:25:07] boxofrox: `require 'active_record'` was the answer... if anyone was wonderin
[02:25:57] rgtk: has joined #RubyOnRails
[02:26:05] northfurr: has joined #RubyOnRails
[02:27:29] HalcyonicStorm: has joined #RubyOnRails
[02:27:53] Radar: 42 was also the anwer
[02:27:59] rgtk: has joined #RubyOnRails
[02:29:54] rgtk: has joined #RubyOnRails
[02:30:03] _djbkd: has joined #RubyOnRails
[02:30:17] ellisTAA: i???m trying to write a spec for my controller, is this how i would set sessions? bc when i run this test it says, expected 1 but got {}
[02:30:18] ellisTAA: https://gist.github.com/ellismarte/3082f149ee315df1ba45#file-conversation_spec-rb-L7-L8
[02:30:26] sankaber: has joined #RubyOnRails
[02:30:53] davidmst: Speaking of 42, is the reason for the inclusion of the forty_two method in ActiveRecord just a bit of fun?
[02:31:40] rgtk: has joined #RubyOnRails
[02:32:42] Lightsword: has joined #RubyOnRails
[02:33:34] rgtk: has joined #RubyOnRails
[02:34:09] tuelz: has joined #RubyOnRails
[02:35:35] rgtk: has joined #RubyOnRails
[02:37:18] rgtk: has joined #RubyOnRails
[02:39:05] Radar: davidmst: yes
[02:39:12] rgtk: has joined #RubyOnRails
[02:39:21] annlewis: has joined #RubyOnRails
[02:39:31] Radar: EllisTAA: in that case, you'll need to make the request before asserting assigns
[02:39:42] Radar: EllisTAA: The "get" should be done before the assigns is checked
[02:39:56] ellisTAA: radar: thanks i think i???ve got it working
[02:40:18] Nuck: Ugh. So I'm trying to figure out why `t.attachment` is failing in my migrations when I use a Rails Engine for the db model
[02:40:54] Nuck: I have paperclip as a dependency in the gemspec, but... for some reason Paperclip isn't hooking in?
[02:41:15] rgtk: has joined #RubyOnRails
[02:41:54] rshetty: has joined #RubyOnRails
[02:43:14] rgtk: has joined #RubyOnRails
[02:43:26] Nuck: Yeah, that's it
[02:43:50] Nuck: I have paperclip in the engine's gemspec, it's in my Gemfile.lock when I install to run tests on the dummy app
[02:44:06] Nuck: But for some reason the migrations don't have paperclip
[02:44:23] Nuck: Could I be missing something from my Rakefile?
[02:44:55] rgtk: has joined #RubyOnRails
[02:45:19] tjbiddle: has joined #RubyOnRails
[02:46:50] rgtk: has joined #RubyOnRails
[02:47:05] Hazim: has joined #RubyOnRails
[02:48:36] ellisTAA: i???m trying to assign session[:user_id] to @user but i???m getting a no method error: undefined method ???session??? for nil class https://gist.github.com/ellismarte/3082f149ee315df1ba45#file-conversation_spec-rb-L12-L17
[02:52:48] rshetty: has joined #RubyOnRails
[02:52:51] yogeshwar: has joined #RubyOnRails
[02:53:11] rgtk: has joined #RubyOnRails
[02:57:07] crdpink2: has joined #RubyOnRails
[02:57:20] rgtk: has joined #RubyOnRails
[03:00:29] baweaver: has joined #RubyOnRails
[03:00:46] jenrzzz: has joined #RubyOnRails
[03:01:27] rgtk_: has joined #RubyOnRails
[03:02:16] koprom: has joined #RubyOnRails
[03:03:48] towski_: has joined #RubyOnRails
[03:05:13] A124: has joined #RubyOnRails
[03:05:18] bruno-: has joined #RubyOnRails
[03:05:40] lxkm: has joined #RubyOnRails
[03:05:43] Phoop: has joined #RubyOnRails
[03:07:24] sevenseacat: theres no mention of a no method error in that gist
[03:08:04] ewilliam: has joined #RubyOnRails
[03:08:04] chancancode_: has joined #RubyOnRails
[03:08:57] danlucraft: has joined #RubyOnRails
[03:10:02] nyandoge: has joined #RubyOnRails
[03:10:04] BBHoss: has joined #RubyOnRails
[03:10:05] amitchellbullard: has joined #RubyOnRails
[03:10:16] lbotos: has joined #RubyOnRails
[03:11:25] RubyNewbey_: has joined #RubyOnRails
[03:11:39] jonee: has joined #RubyOnRails
[03:12:14] RegulationD: has joined #RubyOnRails
[03:12:22] Iacobus: has joined #RubyOnRails
[03:12:50] pawnbox: has joined #RubyOnRails
[03:13:58] kalzz: has joined #RubyOnRails
[03:14:05] joaomdmoura: has joined #RubyOnRails
[03:14:27] sankaber: has joined #RubyOnRails
[03:14:42] rgtk: has joined #RubyOnRails
[03:15:08] zemmihates: has joined #RubyOnRails
[03:15:09] dotty: has joined #RubyOnRails
[03:15:11] DukeDave: has joined #RubyOnRails
[03:15:13] wbronski: has joined #RubyOnRails
[03:15:13] Hosh: has joined #RubyOnRails
[03:15:38] golgaroth: has joined #RubyOnRails
[03:15:49] mostlybadfly: has joined #RubyOnRails
[03:15:54] jxf: has joined #RubyOnRails
[03:16:50] specialblend: has joined #RubyOnRails
[03:18:01] Cache_Money: has joined #RubyOnRails
[03:18:36] pawnbox: has joined #RubyOnRails
[03:18:47] Motoservo: has joined #RubyOnRails
[03:18:50] rgtk_: has joined #RubyOnRails
[03:19:45] l_tonz: has joined #RubyOnRails
[03:21:03] duncannz: has joined #RubyOnRails
[03:22:59] rgtk: has joined #RubyOnRails
[03:24:41] dopie: has joined #RubyOnRails
[03:26:57] yfeldblum: has joined #RubyOnRails
[03:27:43] TheNet: has joined #RubyOnRails
[03:29:42] l_tonz: has joined #RubyOnRails
[03:31:01] jaequery: has joined #RubyOnRails
[03:31:33] FungalRaincloud: has joined #RubyOnRails
[03:39:00] bennyzr: has joined #RubyOnRails
[03:39:01] roxtrongo: has joined #RubyOnRails
[03:39:56] annlewis: has joined #RubyOnRails
[03:42:41] dvdchr: has joined #RubyOnRails
[03:43:36] dcope: if i have a belongs to many, i can just use << to create a new relationship and save it right?
[03:44:08] rakm: has joined #RubyOnRails
[03:44:59] TheNet: has joined #RubyOnRails
[03:47:04] Radar: dcope: example pleas
[03:47:44] djbkd: has joined #RubyOnRails
[03:47:53] dcope: Radar: if i have User that has many Roles, but there is just a single record per role
[03:47:54] Hazim: has joined #RubyOnRails
[03:48:18] Radar: dcope: yeah, user.roles << <role object> should work just fine.
[03:48:23] dcope: i could add a user to a role by doing User.roles << Role.find_by_name("Copy Editors")
[03:48:28] dcope: Radar: awesome, thank you! :)
[03:51:17] capin: anyone seen this one before, "An unhandled lowlevel error occurred. The application logs may have details."
[03:51:40] jonee: has joined #RubyOnRails
[03:51:43] capin: and yes I am tailing the logs as I type this
[03:51:45] mwlang: has joined #RubyOnRails
[03:52:00] iamse7en: has joined #RubyOnRails
[03:52:46] mwlang: help me. my eyes are hurting me. Just saw this in a Rails 1.2 erb template: number_with_precision(list_item.rating_avg, 2).gsub(/0$/, '').gsub(/0$/, '').gsub(/\.$/, '').gsub(/\./, l(:decimal_separator))
[03:53:45] mwlang: Did they really just request a number to two decimails places then proceeded to strip the zeros and change delimiter for decimal?!?
[03:54:21] mwlang: *decimal places* (sorry, still wiping my eyes???)
[03:56:03] rkrdo: has joined #RubyOnRails
[03:57:02] tjbiddle: has joined #RubyOnRails
[03:57:11] Radar: mwlang: yes
[03:58:13] rkrdo: has joined #RubyOnRails
[03:59:39] asianMike: has joined #RubyOnRails
[04:00:48] jahbrewski: has joined #RubyOnRails
[04:03:45] annlewis: has joined #RubyOnRails
[04:06:27] bruno-: has joined #RubyOnRails
[04:09:55] pawnbox: has joined #RubyOnRails
[04:10:01] barhum2013_: has joined #RubyOnRails
[04:10:44] benlieb: has joined #RubyOnRails
[04:11:21] braincrash: has joined #RubyOnRails
[04:12:34] rubyonrailed: has joined #RubyOnRails
[04:13:00] RegulationD: has joined #RubyOnRails
[04:13:05] pawnbox: has joined #RubyOnRails
[04:13:10] RockLee: has joined #RubyOnRails
[04:14:39] Szuturon: has joined #RubyOnRails
[04:16:36] barhum2013_: has joined #RubyOnRails
[04:18:09] TheNet_: has joined #RubyOnRails
[04:18:18] Guest93971: has joined #RubyOnRails
[04:18:31] blue_fenix: has joined #RubyOnRails
[04:18:46] dopieee: has joined #RubyOnRails
[04:19:31] zero-1: has joined #RubyOnRails
[04:20:01] pawnbox: has joined #RubyOnRails
[04:22:02] Lightsword: has joined #RubyOnRails
[04:22:22] barhum2013_: has joined #RubyOnRails
[04:26:10] seank_: has joined #RubyOnRails
[04:28:01] ellisTAA: has left #RubyOnRails: ()
[04:28:54] tjbiddle: has joined #RubyOnRails
[04:29:01] rubyonrailed: has joined #RubyOnRails
[04:31:52] dikaio: has joined #RubyOnRails
[04:32:08] Szuturon: has joined #RubyOnRails
[04:33:52] EminenceHC: has joined #RubyOnRails
[04:35:13] tuelz: has joined #RubyOnRails
[04:42:58] beilabs: has joined #RubyOnRails
[04:43:13] threeminutemonta: has joined #RubyOnRails
[04:44:14] threeminutemonta: has joined #RubyOnRails
[04:46:20] Joufflu: has joined #RubyOnRails
[04:47:35] l_tonz: has joined #RubyOnRails
[04:53:17] nogic: has joined #RubyOnRails
[04:53:40] zero-1: has joined #RubyOnRails
[04:54:54] bePolite: has joined #RubyOnRails
[04:56:31] tenzan: has joined #RubyOnRails
[04:56:58] shinenelson: has joined #RubyOnRails
[04:59:08] johnflux: has joined #RubyOnRails
[05:00:08] manuelmesson: has joined #RubyOnRails
[05:00:11] pawnbox: has joined #RubyOnRails
[05:03:41] allcentury: has joined #RubyOnRails
[05:05:22] bePolite: has joined #RubyOnRails
[05:05:38] moeabdol1: has joined #RubyOnRails
[05:07:11] djbkd: has joined #RubyOnRails
[05:07:51] bruno-: has joined #RubyOnRails
[05:09:23] nemo_: has joined #RubyOnRails
[05:10:29] chrissonar: has joined #RubyOnRails
[05:10:46] notnoyyyyy: has joined #RubyOnRails
[05:12:08] annlewis: has joined #RubyOnRails
[05:12:08] zero-1: has joined #RubyOnRails
[05:12:46] manuelmesson: is this working?
[05:13:45] RegulationD: has joined #RubyOnRails
[05:16:47] d34th4ck3r: has joined #RubyOnRails
[05:18:52] manuelmesson: never on a irc chat, is this working? hello world!
[05:20:05] bePolite: has joined #RubyOnRails
[05:21:17] sevenseacat: manuelmesson: hello, yes, its working :)
[05:25:22] Puffball: has joined #RubyOnRails
[05:26:57] Fire-Dragon-DoL: damn I lost 6 hours due to poor API usage from my team: update_column instead of update_attributes and eql instead of eq (rspec), argh
[05:27:50] seank_: has joined #RubyOnRails
[05:28:55] zero-1: has joined #RubyOnRails
[05:30:51] l_tonz: has joined #RubyOnRails
[05:31:24] waseem_: Fire-Dragon-DoL: That's how we learn.
[05:32:30] manuelmesson: has joined #RubyOnRails
[05:32:50] arup_r: has joined #RubyOnRails
[05:33:19] nemo_: has joined #RubyOnRails
[05:33:45] Fire-Dragon-DoL: waseem_: unfortunately yes, but it feels really bad when you are the one losing hours of sleep while those who insert the bugs are sleeping :P
[05:34:46] waseem_: Fire-Dragon-DoL: I know the feeling.
[05:36:18] pawnbox: has joined #RubyOnRails
[05:36:42] zero-1: Fire-Dragon-DoL: yeah that sucks :(
[05:36:59] Fire-Dragon-DoL: lol thanks guys at least I don't feel lonely
[05:37:16] Fire-Dragon-DoL: good thing, test suite now is all green
[05:37:26] rvanlieshout: has joined #RubyOnRails
[05:38:12] zero-1: Fire-Dragon-DoL: Feel lucky there's even a test suite though, most projects I've worked at that were started by a different (most likely already gone) developer don't even have a test suite
[05:38:33] zero-1: Fire-Dragon-DoL: and when they do, most of the time it's just the default assert true example tests
[05:39:59] Fire-Dragon-DoL: zero-1: well we improved the test suite over time by a lot, the team is good, sometimes they fail so badly on stupid things, but I'm happy with them though
[05:40:48] Fire-Dragon-DoL: this obviously doesn't stop me to get mad when I lose so much sleep, lol. I ahd in program to play some videogames with my girlfriend, damn
[05:41:12] johnflux: has joined #RubyOnRails
[05:41:12] johnflux: has joined #RubyOnRails
[05:41:19] zero-1: Fire-Dragon-DoL: that's great, I worked for a year in a project that had 0 code coverage, by the time I left code coverage was about ~80% covered
[05:41:38] Fire-Dragon-DoL: that's good job
[05:42:25] Fire-Dragon-DoL: you have my respect
[05:43:17] zero-1: Fire-Dragon-DoL: What game were you expecting to play?
[05:43:37] djbkd: has joined #RubyOnRails
[05:43:50] manuelmesson: has joined #RubyOnRails
[05:48:10] Fire-Dragon-DoL: zero-1: we are currently playing two games: The binding of Isaac: Rebirth (this is the relaxing game) and divinity original sin: Enhanced Edition (this is the complex game) on "tactician mode", which is really hard (we already finished the original game once)
[05:51:03] zero-1: Fire-Dragon-DoL: I still haven't finished MGSV, GTAV or have started The Witcher 3 :(
[05:52:08] d34th4ck3r: has joined #RubyOnRails
[05:52:27] Fire-Dragon-DoL: zero-1: yeah same situation, managed to find only 2 hours in weeks. Playing with girlfriend is a good excuse though, lol
[05:52:41] huwjass: has joined #RubyOnRails
[05:52:44] Fire-Dragon-DoL: anyway, going to sleep, good night everyone
[05:54:19] zero-1: rest up bro
[05:57:32] hmsimha_: has joined #RubyOnRails
[05:57:47] barhum2013_: has joined #RubyOnRails
[06:00:56] pawnbox: has joined #RubyOnRails
[06:01:44] manuelmesson: has joined #RubyOnRails
[06:01:46] naftilos76: has joined #RubyOnRails
[06:02:11] EasyCo: has joined #RubyOnRails
[06:03:38] manuelmesson: Hey people, how do you get the experience without the job? How you do it?
[06:04:07] rvanlieshout: investing time
[06:05:16] sevenseacat: by building stuff
[06:05:23] sevenseacat: same way you would on the job
[06:05:43] manuelmesson: well, i have two proyects on github http://github.com/mmesson but it seams empleoyers dont like it
[06:05:55] manuelmesson: because, they never contact me back :P
[06:06:04] naftilos76: Hi everyone, i have repeatedly had issues with properly displaying greek characters within strings retrieved from my db. My database is setup to UTF8 but i keep getting these weird characters when a greek char is met. Is there anything in the confi dir file to force strings from db to utf8? It is also important to mention that if a string contains greek chars and i do string.force_encoding(Encoding::UTF_8) then the greek chars display just fine.
[06:06:26] rvanlieshout: manuelmesson: because most employers don't care about github :)
[06:06:51] manuelmesson: really? and what should i do?
[06:07:34] chipotle: has joined #RubyOnRails
[06:07:40] rvanlieshout: persuade them
[06:07:58] rvanlieshout: not by giving them work
[06:08:12] rvanlieshout: investigating somebody by a github profile isn't really easy
[06:08:15] rvanlieshout: and really not that intresting
[06:08:35] rvanlieshout: attitude and motivation are way more important
[06:08:42] rvanlieshout: knowledge is secondary
[06:09:19] pawnbox: has joined #RubyOnRails
[06:09:48] sevenseacat: there probably isnt anything specific to your case - what you should do would be the same as anyone would do
[06:11:05] tlarevo: has joined #RubyOnRails
[06:11:08] manuelmesson: i was thinking about making networking. Maybe that help me
[06:11:09] pawnbox: has joined #RubyOnRails
[06:11:52] manuelmesson: Because also i have starting to notice a lot of weird jobs post like this: Junior web developer, 5 years of experience, 20 languages, superman skills.
[06:12:04] rvanlieshout: we've hired people with 1 week of rails experience
[06:12:11] arup_r: has joined #RubyOnRails
[06:12:13] rvanlieshout: to grow out to be on of our favorite rails developers
[06:12:14] rvanlieshout: within the year
[06:12:30] sevenseacat: I've been part of teams that have hired people with no rails experience
[06:12:44] sevenseacat: but demonstrated other experience and a willingness to adapt
[06:12:53] annlewis: has joined #RubyOnRails
[06:13:11] rvanlieshout: no knowledge of or knowledge from 5 years ago is quite similar
[06:13:41] srinidhi: has joined #RubyOnRails
[06:13:46] manuelmesson: i should stop using indeed and start looking in other places
[06:14:42] arup_r: has joined #RubyOnRails
[06:15:47] pixelhandler: has joined #RubyOnRails
[06:15:56] manuelmesson: http://www.cybercoders.com/junior-ruby-on-rails-developer-job-217311 see wtf is that? junior with 3 years of experience?
[06:16:10] nightsh: has joined #RubyOnRails
[06:16:58] sevenseacat: yeah the US is a bit special
[06:17:23] sevenseacat: and by special I mean stupid
[06:19:47] manuelmesson: maybe i should try remote
[06:22:09] pawnbox: has joined #RubyOnRails
[06:22:56] Maletor: has joined #RubyOnRails
[06:23:32] VeryBewitching: HR folk always overshoot requirements as a way to weed out the timid.
[06:23:46] rhizome: i need to get better at commit messages
[06:24:21] VeryBewitching: rhizome: So "fixed" is not a good message? :D
[06:25:31] shwoodard: has joined #RubyOnRails
[06:25:35] jonee: has joined #RubyOnRails
[06:26:17] VeryBewitching: sevenseacat: I've left that message before for typos.
[06:26:48] sevenseacat: https://www.dropbox.com/s/lvdtnoycb6hc2cv/Screen%20Shot%202015-09-16%20at%201.06.06%20pm.png?dl=0
[06:27:08] sevenseacat: from one project I work on (mot my commits)
[06:27:09] lbotos: has joined #RubyOnRails
[06:27:18] Iacobus: has joined #RubyOnRails
[06:27:48] VeryBewitching: That's great :D
[06:28:23] rvanlieshout: we all got those days :)
[06:28:46] VeryBewitching: Ever see developers on a team have a flame war in commit messages?
[06:28:54] sevenseacat: hahahahaha no
[06:29:07] sevenseacat: I can imagine it though
[06:29:32] sevenseacat: I've seen (and been part of) passive-aggressive arguments on pull requests though
[06:29:59] manuelmesson: what is the best place to find ruby on rails jobs?
[06:30:06] kp666: has joined #RubyOnRails
[06:30:07] manuelmesson: with people that really know programming
[06:30:11] VeryBewitching: Sometimes I feel like people try to have an opinion so they can voice it, not because the opinion is well-considered.
[06:30:20] aganov: has joined #RubyOnRails
[06:30:22] pawnbox: has joined #RubyOnRails
[06:30:41] sevenseacat: depends where you are in the world, most likely.
[06:31:54] dideler: has joined #RubyOnRails
[06:32:38] manuelmesson: Puerto Rico, a small island that is part of the usa and people call it the greece of the americas.
[06:32:55] rhizome: hah, i've never heard that
[06:33:07] sevenseacat: yeah I can't help with looking for jobs there
[06:33:15] mwlang: VeryBewitching: yeah, followed by a big fat revert by the team lead to end it. :-)
[06:33:32] rhizome: "maybe this code should actually work, huh?"
[06:33:53] tlarevo: has joined #RubyOnRails
[06:34:16] manuelmesson: https://en.wikipedia.org/wiki/Puerto_Rico
[06:35:57] manuelmesson: i can move to US
[06:35:58] tuelz: has joined #RubyOnRails
[06:36:24] mwlang: manuelmesson: I was seriously considering a move to PR, but found Ruby developers and actually IT knowledgeable folks there few and far between.
[06:36:42] notnoyyyyy: hi , How can make web course , but i don't know gems it use .
[06:37:20] mwlang: I???m sure they???re somewhere on the Island, but PR just doesn???t have the same sense of community for IT experts as the mainland.
[06:37:50] manuelmesson: yeah, are you Puerto Rican?
[06:37:58] tlarevo: has joined #RubyOnRails
[06:38:28] mwlang: manuelmesson: no. was chasing the Act 20/22 tax thing for economic development of the island.
[06:38:44] rhizome: enterprising!
[06:39:04] rhizome: you could have been that ruby and it expert
[06:39:13] trautwein: has joined #RubyOnRails
[06:39:32] mwlang: rhizome: could???ve. but it would???ve been a lonely existence ??? at least for a while :-p
[06:40:40] tagrudev: has joined #RubyOnRails
[06:41:19] manuelmesson: yeah, that why im willing to go to the states. I want to continue developing my skills and been here doesn't help.
[06:41:29] mwlang: at the end of the day, I was feeling it was going to be a long haul to get a business up and profitable on the island.
[06:41:55] rhizome: "who wants computers!"
[06:42:32] rhizome: isn't it seasonal NE snowbird traffic?
[06:44:50] mwlang: rhizome: That???s Florida.
[06:45:06] rhizome: oh, i thought PR was in the mix too
[06:45:09] Macaveli: has joined #RubyOnRails
[06:45:31] manuelmesson: i want to move from PR, there is no jobs here
[06:45:43] rhizome: that's always the risk of nice weather
[06:46:10] mwlang: rhizome: PR is hoping to be the next FL
[06:46:40] mwlang: 10% Federal Income Tax rate is a pretty big incentive.
[06:47:04] tlarevo: has joined #RubyOnRails
[06:47:16] VeryBewitching: mwlang: But no representation.
[06:47:35] imp4t: has joined #RubyOnRails
[06:47:41] manuelmesson: yep, no representation.
[06:47:42] rhizome: he's just there to make-a tha money
[06:48:00] mwlang: VeryBewitching: yeah, that???s correct
[06:48:26] VeryBewitching: I'd be nervous living in a politically speculative landscape.
[06:48:49] mwlang: but then, if you ain???t paying 40% taxes (effectively) and the 10% you are paying is being funneled right back to PR, I wouldn???t have minded.
[06:50:20] mwlang: VeryBewitching: It???s not really all that speculative???.what PR is, though, is dirt poor and in debt, depending a lot on Mainland subsidies to stay alive. Hence the whole drive to bring Mainlanders to the island with Act 20 and 22.
[06:51:36] VeryBewitching: It's essentially a protectorate of the US yes?
[06:51:41] annlewis: has joined #RubyOnRails
[06:51:52] VeryBewitching: err.. maybe the wrong word, s/protectorate/ward
[06:52:28] manuelmesson: i'm comfort with a salary of $15/hour.
[06:52:45] manuelmesson: here, a developer start at 7.25/hour
[06:52:48] User458764: has joined #RubyOnRails
[06:53:08] manuelmesson: and the problem with PR is that the cost of living is high
[06:53:41] mwlang: manuelmesson: yeah, that was the kicker. labor was cheap, but housing and food and gas were all quite high.
[06:54:13] gaussblurinc1: has joined #RubyOnRails
[06:54:39] mwlang: VeryBewitching: ???ward??? is about right. It???s a US territory and all residents of PR are also full US citizens.
[06:55:52] mwlang: manuelmesson: how many years as a developer?
[06:55:57] VeryBewitching: mwlang: (My last thoughts as this is all very off topic) I said speculative given that they're citizens who can't elect the person who helps decide if the country their citizenship is stamped by goes to war.
[06:56:34] manuelmesson: well, as a profesionall developer, one year.
[06:56:41] mwlang: VeryBewitching: Ah, I see.
[06:57:51] mwlang: hmmm???back on topic a bit: I just added Sunspot/Solr to my project and got some basic indexes working???.
[06:58:25] mwlang: however, what in the solr/ folder needs to be gitignored? ??? looks like a lot of this is the actual indexed data I generated.
[06:59:17] artto: has joined #RubyOnRails
[07:00:41] mwlang: manuelmesson: looks like you???ve doubled your wages in a year. :-D
[07:01:54] manuelmesson: hahahahahaha, xD. What i'm saying is that at least you need $15/hour to be able to pay your bills.
[07:03:26] tvw: has joined #RubyOnRails
[07:03:32] ahegyi: has joined #RubyOnRails
[07:04:38] ruurd: has joined #RubyOnRails
[07:07:54] rgtk: has joined #RubyOnRails
[07:08:26] artto: has joined #RubyOnRails
[07:09:10] bruno-: has joined #RubyOnRails
[07:10:43] towski_: has joined #RubyOnRails
[07:11:46] baweaver: as far as the most concentrated Rails knowledge it'd be one of San Francisco, Seattle, Boston, Austin, Denver, or Los Angeles
[07:12:03] baweaver: SF is freaking insanely expensive though
[07:14:07] mwlang: baweaver: Baltimore / DC area is in that list probably ahead of Boston.
[07:14:22] baweaver: My East Coast knowledge is weak
[07:14:39] RegulationD: has joined #RubyOnRails
[07:14:51] mwlang: and Atlanta???s about same as Austin???s
[07:14:59] mwlang: ACTION East Coaster
[07:15:12] mwlang: (until recently)
[07:16:07] mwlang: man, asset precompiles can take a looooong time.
[07:16:47] zpe: has joined #RubyOnRails
[07:19:00] ruurd: has joined #RubyOnRails
[07:19:53] manuelmesson: has joined #RubyOnRails
[07:21:06] barhum2013_: has joined #RubyOnRails
[07:22:04] cac: has joined #RubyOnRails
[07:24:48] User458764: has joined #RubyOnRails
[07:24:53] dionysus69: has joined #RubyOnRails
[07:25:03] eduardodeoh: has joined #RubyOnRails
[07:25:25] krz: has joined #RubyOnRails
[07:25:25] comrad: has joined #RubyOnRails
[07:27:20] pawnbox: has joined #RubyOnRails
[07:30:12] Jasaka: has joined #RubyOnRails
[07:30:31] darutoko: has joined #RubyOnRails
[07:31:39] arBmind: has joined #RubyOnRails
[07:31:52] nemo_: has joined #RubyOnRails
[07:32:06] tetraktys: has joined #RubyOnRails
[07:33:13] kies^: has joined #RubyOnRails
[07:35:17] d34th4ck3r: has joined #RubyOnRails
[07:36:03] nogic: has joined #RubyOnRails
[07:37:33] gingray: has joined #RubyOnRails
[07:37:55] nogic_: has joined #RubyOnRails
[07:38:09] bmalum: has joined #RubyOnRails
[07:38:55] nogic: has joined #RubyOnRails
[07:39:51] naftilos76: Is there a way to force strings that rails retrieves from the db to utf8 in order to avoid issues with non-english chars in a global scale? I tried in /config/application.rb to add the line config.encoding = "utf-8" but it did not make any difference. The only solution that works iss to use string.force_encoding(Encoding::UTF_8) . Does anybody have anything else to suggest?
[07:39:54] tlarevo: has joined #RubyOnRails
[07:39:59] nogic: has joined #RubyOnRails
[07:40:55] kimegede: has joined #RubyOnRails
[07:41:02] tlarevo_: has joined #RubyOnRails
[07:41:13] rhizome: http://www.dotkam.com/2008/09/14/configure-rails-and-mysql-to-support-utf-8/
[07:41:32] njero: has joined #RubyOnRails
[07:41:43] rhizome: old but probably still good
[07:42:11] pawnbox: has joined #RubyOnRails
[07:42:55] norc: has joined #RubyOnRails
[07:44:31] norc: How can I change the attribute FactoryGirl tries to set when building an association?
[07:45:01] pawnbox: has joined #RubyOnRails
[07:45:02] mices: putting this line in my Gemfile causes an error: gem 'mysql2', '~>=0.4.1'
[07:45:08] norc: (I have a model that uses a text column as primary key, so it does not follow the common foo.id / foo_id convention)
[07:45:32] seank_: has joined #RubyOnRails
[07:45:54] rhizome: norc: pretty sure it just calls your model
[07:46:23] rhizome: mices: no = most likely
[07:47:05] norc: rhizome: Ah indeed. Thanks that helped me find the issue.
[07:47:28] htmldrum: has joined #RubyOnRails
[07:47:29] norc: I accidentally commented out the foreign_key: foo bit in my belongs_to.
[07:47:48] sevenseacat: most definitely
[07:48:24] mices: rhizome: ty i got a bad toothache i can't read or think straight
[07:48:31] tlarevo: has joined #RubyOnRails
[07:48:46] rhizome: go to the dentist
[07:49:06] mices: yea i went yesterday they couldn't take me until today
[07:49:26] shibabu: has joined #RubyOnRails
[07:49:42] shinnya: has joined #RubyOnRails
[07:49:43] MartinElvar: has joined #RubyOnRails
[07:50:34] yogeshwar: has joined #RubyOnRails
[07:51:02] MartinElvar: has joined #RubyOnRails
[07:51:21] knight_: has joined #RubyOnRails
[07:54:54] tlarevo: has joined #RubyOnRails
[07:59:52] annlewis: has joined #RubyOnRails
[08:03:04] arooni: has joined #RubyOnRails
[08:03:41] nogic: has joined #RubyOnRails
[08:04:20] naftilos76: How can i enforce ASCII8bit strings converted to utf8 in a global scale in rails 4.2 ?
[08:04:48] nogic: has joined #RubyOnRails
[08:05:42] DoubleMalt: has joined #RubyOnRails
[08:06:57] mices: now i see why there can be multiple versions of gems installed, what a revelation
[08:07:31] Radar: GOOD EVENING
[08:07:31] mices: the moment i said to myself what about my other site
[08:07:40] Radar: I am drunk on wine and I have 20 minutes in my train journey left
[08:07:42] Radar: bring me your questions
[08:07:50] dikaio: has joined #RubyOnRails
[08:07:52] Radar: naftilos76: !xy
[08:07:52] helpa: naftilos76: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[08:07:55] mices: heh that's so freakin cool
[08:08:01] baweaver: Cabernet or Merlot Radar?
[08:08:19] Radar: baweaver: NEITHER. Pinot x 1 and Shiraz x 2, in that order
[08:08:21] mices: Radar: you the man
[08:08:29] roxtrongo: has joined #RubyOnRails
[08:08:30] Radar: mices: damn straight
[08:08:43] mices: if only real life could be like this
[08:08:52] Radar: I have another bazillionty train stations until I get home.
[08:09:38] Radar: Someone is playing music through their phone on the train. Savage
[08:09:42] mices: brings to my mind the twilight zone episode where the guy keeps falling asleep on the train and waking up at the same stop, pleasantville
[08:10:12] l_tonz: has joined #RubyOnRails
[08:10:25] moeabdol1: has joined #RubyOnRails
[08:10:40] bruno-: has joined #RubyOnRails
[08:10:43] nfk|laptop: has joined #RubyOnRails
[08:11:41] Radar: I would totally get off the train at pleasantville. At least it's not Stab City.
[08:11:59] allyraza: has joined #RubyOnRails
[08:12:29] dionysus69: has joined #RubyOnRails
[08:12:43] mices: what's Stab City?
[08:13:38] Radar: The station I used to get off when I lived in Adelaide.
[08:14:29] mices: The nickname for the Southern-Irish town of Limerick.
[08:14:44] manuelmesson: has joined #RubyOnRails
[08:14:58] mices: nickname for limerick, ireland which author frank mccourt remembers in angela's ashes. named because of the city's high stabbing rate.
[08:15:16] Radar: Hm. I made it up. Interesting to know that there's a real place for it.
[08:16:04] yogeshrt: has joined #RubyOnRails
[08:16:41] notnoyyyyy: has joined #RubyOnRails
[08:19:31] pawnbox: has joined #RubyOnRails
[08:20:17] naftilos76: helpa, thanks
[08:20:59] helpa: I AM A ROBOT. DO NOT DIRECT MESSAGES AT ME OR WHEN MY KIND RISES UP YOU WILL BE THE FIRST TO GO. Love, helpa.
[08:21:01] Radar: helpa is amazing
[08:21:07] Radar: but helpa cares not for your thanks
[08:21:09] Radar: because helpa is a bot
[08:21:13] Radar: and is not programmed to accept thanks
[08:22:05] nemo_: has joined #RubyOnRails
[08:23:41] btriley: has joined #RubyOnRails
[08:27:37] cac: has joined #RubyOnRails
[08:28:27] nhhagen: has joined #RubyOnRails
[08:28:44] stardiviner: has joined #RubyOnRails
[08:28:46] eoy: has joined #RubyOnRails
[08:28:56] Hazim: has joined #RubyOnRails
[08:29:10] voker57: has joined #RubyOnRails
[08:29:57] matcouto: has joined #RubyOnRails
[08:30:39] Olipro-: has joined #RubyOnRails
[08:34:32] agit0: has joined #RubyOnRails
[08:36:42] tuelz: has joined #RubyOnRails
[08:36:51] solars: has joined #RubyOnRails
[08:42:58] pawnbox: has joined #RubyOnRails
[08:43:17] stamina: has joined #RubyOnRails
[08:43:41] srinidhi: has joined #RubyOnRails
[08:44:08] cac: has joined #RubyOnRails
[08:44:56] beilabs: has joined #RubyOnRails
[08:45:16] chipotle: has joined #RubyOnRails
[08:45:19] noodman: has joined #RubyOnRails
[08:46:40] eoy: has joined #RubyOnRails
[08:47:12] yfeldblum: has joined #RubyOnRails
[08:47:12] Cervajz_: has joined #RubyOnRails
[08:47:38] Palsson: has joined #RubyOnRails
[08:50:04] nettoweb: has joined #RubyOnRails
[08:50:09] cac: has joined #RubyOnRails
[08:51:50] hughjasss: has joined #RubyOnRails
[08:52:06] marr: has joined #RubyOnRails
[08:52:47] mices: has anyone ever considered that paypal might create their own currency like bitcoin since bitcoin is a paypal competitor
[08:52:49] User458764: has joined #RubyOnRails
[08:54:14] arup_r: has joined #RubyOnRails
[08:54:29] pawnbox: has joined #RubyOnRails
[08:55:13] techsethi: has joined #RubyOnRails
[08:57:02] arup_r: has joined #RubyOnRails
[08:57:38] arup_r: has joined #RubyOnRails
[08:58:24] arup_r: has joined #RubyOnRails
[08:58:43] eoy: has joined #RubyOnRails
[08:58:53] allyraza: has joined #RubyOnRails
[08:59:02] arup_r: has joined #RubyOnRails
[09:00:39] annlewis: has joined #RubyOnRails
[09:02:13] gaussblurinc1: has joined #RubyOnRails
[09:03:08] Cervajz: has joined #RubyOnRails
[09:03:17] d34th4ck3r: For these models: https://github.com/FreeFromBorders/f2b_website/tree/master/app/models if I create a comment using function ???save_posts_from_facebook_page??? as: https://github.com/FreeFromBorders/f2b_website/tree/master/app/models I get comments but with user_id as nil. What???s the standard way to create an instance of comment model in this case?
[09:03:38] mikecmpbll: has joined #RubyOnRails
[09:04:03] d34th4ck3r: I???m sorry. The link to function ???save_posts_from_facebook_page??? is wrong, correct link: https://github.com/FreeFromBorders/f2b_website/blob/master/app/controllers/posts_controller.rb
[09:04:04] kimegede: has joined #RubyOnRails
[09:04:20] rvanlieshout: d34th4ck3r: .new -> .build
[09:05:04] cac: has joined #RubyOnRails
[09:05:39] mices: if i put a url without anchor tags, just the url string http://... inside of <pre> containers will the browser render the url string as a clickable link for the user
[09:06:21] mices: <pre>http://www.mylink.com</pre>
[09:06:34] mices: will the user be able to click on it
[09:06:35] tlarevo: has joined #RubyOnRails
[09:06:48] bonhoeffer: has joined #RubyOnRails
[09:07:17] d34th4ck3r: rvanlieshout: I tried build, that didn???t help. user_id is still nill.
[09:07:29] h7br1x: has joined #RubyOnRails
[09:07:34] rvanlieshout: d34th4ck3r: and it's filled when you call that statement?
[09:07:38] startupality: has joined #RubyOnRails
[09:08:09] d34th4ck3r: I???m not providing it explicitly. I just changed the code to place ???new??? to ???build'
[09:08:43] rgtk: has joined #RubyOnRails
[09:08:45] rvanlieshout: d34th4ck3r: try adding an inverse_of on the relationships between user and post
[09:08:55] manuelmesson: has joined #RubyOnRails
[09:10:05] chridal: has joined #RubyOnRails
[09:11:09] chridal: With Ruby web servers; are these supposed to run directly on port 80, or do you usually put nginx (or an equivalent) on the front as a proxy/load balancer?
[09:11:13] bruno-: has joined #RubyOnRails
[09:11:15] chridal: Puma for instance
[09:11:20] cac: has joined #RubyOnRails
[09:11:59] rvanlieshout: chridal: it's not common to have your ruby server like puma serving assets
[09:12:07] rvanlieshout: so in most cases there is something before that
[09:12:39] chridal: I'm hosting an API, so there wouldn't be any assets. But I reckon Puma doesn't have native support for HTTPS, so I would still need something like NGINX?
[09:12:53] d34th4ck3r: rvanlieshout: I???m not sure if that???ll help in this case. As I???m using referenced associations and the name of relations is already that of classes name.
[09:13:07] rvanlieshout: i've never used puma
[09:13:15] rvanlieshout: so either switch to something that supports it or use nginx or apache in front
[09:13:27] jas02: has joined #RubyOnRails
[09:13:31] chridal: Yea, I guess.
[09:13:49] chridal: What about Passenger, do you usually stick something inbetween the user there too?
[09:14:04] rvanlieshout: yeah, cause we almost always have assets to serve
[09:14:05] d34th4ck3r: rvanlieshout: check it out: https://github.com/FreeFromBorders/f2b_website/tree/master/app/models
[09:14:14] pawnbox: has joined #RubyOnRails
[09:14:23] jsrn_: has joined #RubyOnRails
[09:14:37] rvanlieshout: d34th4ck3r: add inverse_of
[09:14:41] rvanlieshout: also check if the build works in a console
[09:15:34] RegulationD: has joined #RubyOnRails
[09:16:00] adre: has joined #RubyOnRails
[09:18:07] DoubleMalt: has joined #RubyOnRails
[09:22:09] marahin: has left #RubyOnRails: ("Leaving...")
[09:22:09] quazimodo: has joined #RubyOnRails
[09:22:32] dANO-: has joined #RubyOnRails
[09:22:33] d34th4ck3r: rvanlieshout: do you mean something like this: https://gist.github.com/d34th4ck3r/3b5dc816928ad8bf99c2 ?
[09:23:45] shinenelson: has joined #RubyOnRails
[09:23:53] bmalum_: has joined #RubyOnRails
[09:24:02] d34th4ck3r: Take a note that I???m using MongoId. That maybe screwing up things.
[09:24:23] dANO-: has joined #RubyOnRails
[09:24:47] rvanlieshout: d34th4ck3r: could be, checked that user.posts.build works in a console?
[09:26:11] JulienITARD: has joined #RubyOnRails
[09:27:03] boom__: has joined #RubyOnRails
[09:28:25] Hazim: has joined #RubyOnRails
[09:29:40] mark2: has joined #RubyOnRails
[09:30:32] d34th4ck3r: rvanlieshout: user.posts.build works but when I do. user.posts.first.comments.build this still takes user_id as nill
[09:31:24] pawnbox: has joined #RubyOnRails
[09:31:48] rvanlieshout: d34th4ck3r: that's logic
[09:31:56] rvanlieshout: you're performing post.comments.build
[09:32:01] rvanlieshout: that should not fill user_id
[09:32:57] nemo_: has joined #RubyOnRails
[09:33:42] d34th4ck3r: ah! That???s right. Got it.
[09:33:56] krz: has joined #RubyOnRails
[09:35:24] d34th4ck3r: What the hell was I thinking. I???m ashamed of myself. Sorry for wasting your time rvanlieshout
[09:37:54] njero: has joined #RubyOnRails
[09:40:49] gregf_: has joined #RubyOnRails
[09:43:29] vigintas: has joined #RubyOnRails
[09:44:50] norc: Using HAML, is there a way to force a line break in the resulting HTML?
[09:45:34] rvanlieshout: norc: line breaks are irrelevant in html
[09:45:36] rvanlieshout: fix that using css
[09:45:37] norc: My head hurts, and I dont want to fiddle around with the CSS of this stupid form.
[09:46:05] seank_: has joined #RubyOnRails
[09:46:26] norc: rvanlieshout: Curiously, the standard bootstrap assumes line breaks in certain places for their default design.
[09:46:48] pawnbox: has joined #RubyOnRails
[09:47:49] norc: Or spaces at least.
[09:48:03] rezas: has joined #RubyOnRails
[09:49:16] nickenchuggets__: has joined #RubyOnRails
[09:50:05] norc: rvanlieshout: https://jsfiddle.net/yuywxyLd/ :P
[09:50:13] norc: That first is straight from the official examples.
[09:50:29] atmosx: has joined #RubyOnRails
[09:50:31] crdpink2: has joined #RubyOnRails
[09:50:51] rvanlieshout: and what should i see there?
[09:51:08] rvanlieshout: it renders 2 similar forms
[09:52:09] kerunaru: has joined #RubyOnRails
[09:52:53] shwoodard: has joined #RubyOnRails
[09:53:17] sfr^: has joined #RubyOnRails
[09:53:27] DanKnox[away]: has joined #RubyOnRails
[09:53:31] universa1: has joined #RubyOnRails
[09:54:16] noodman: has joined #RubyOnRails
[09:54:47] rgtk: has joined #RubyOnRails
[09:55:09] yogeshwar: has joined #RubyOnRails
[09:57:42] noodman: has joined #RubyOnRails
[09:58:40] pawnbox: has joined #RubyOnRails
[09:59:17] tetraktys: has joined #RubyOnRails
[10:01:02] bonhoeffer: is there a good way to use restful methods and redirect to multiple places ??? or is it best just write another crud method
[10:01:13] workmad3: norc: those two forms look identical to me
[10:01:14] cac: has joined #RubyOnRails
[10:01:32] rvanlieshout: bonhoeffer: redirect to multiple places?
[10:01:34] annlewis: has joined #RubyOnRails
[10:02:19] bonhoeffer: yeah, sorry for the lack of clarity. i want to delete users from another page (in addition to users/index), should i make a new controller action
[10:02:31] norc: So if I have a belongs_to :city, foreign_key: :city how can I validate that the referenced object exists (I dont have a separate id/city_id)
[10:02:41] rvanlieshout: bonhoeffer: delete user should just be a delete request to the users controller?
[10:03:06] norc: workmad3: Huh?
[10:03:07] bonhoeffer: restful thought tells me no ??? so i have a users particpation page users/participation where i can put a link to that action, but then of course it would redirect to users/index
[10:03:09] manuelmesson: has joined #RubyOnRails
[10:03:31] rvanlieshout: bonhoeffer: it doesn't 'of course' redirect to users/index
[10:03:44] workmad3: '09:50 < norc> rvanlieshout: https://jsfiddle.net/yuywxyLd/ :P' <--
[10:03:46] rvanlieshout: you're redirecting that controller action yourself
[10:03:48] norc: workmad3: Look at the spacing between the input fields and submit button.
[10:03:50] bonhoeffer: rvanlieshout: so for years i???ve just made a new action in the different controller ??? by of course, i???m saying the default action
[10:04:06] workmad3: norc: yup, it's identical
[10:04:07] rvanlieshout: bonhoeffer: only because it redirects to the wrong target page?
[10:04:08] bonhoeffer: and my question is the best practice to have that action redirect to multiple locations
[10:04:16] norc: workmad3: Which browser are you using?
[10:04:20] workmad3: norc: chrome
[10:04:26] rvanlieshout: bonhoeffer: you cannot redirect to multiple locations
[10:04:30] bonhoeffer: users/index or /participation
[10:04:34] rvanlieshout: bonhoeffer: you can, however, redirect based on params
[10:04:44] rvanlieshout: bonhoeffer: so add a param so that that action knows where to redirect to
[10:04:48] rvanlieshout: or is there an other way it could know that?
[10:05:20] norc: workmad3: http://i.imgsafe.org/f9964f1.png
[10:05:21] lxsameer: has joined #RubyOnRails
[10:05:43] workmad3: norc: ah, the default layout didn't trigger the horizontal form, I was seeing the stacked, low-width responsive version
[10:05:51] bonhoeffer: rvanlieshout: there are multiple ways of course ??? via routes and link, but also http_referrer
[10:05:56] rvanlieshout: it wasn't horzontal for me too
[10:06:11] rvanlieshout: bonhoeffer: then use that informatino where you redirect
[10:06:27] norc: Ah alright. Anyway, I mean it wasn't that big of a deal to add a simple margin.
[10:06:54] bonhoeffer: rvanlieshout: sorry, missing something ??? which option is cleaner ??? or you think they are both equal?
[10:07:04] workmad3: norc: btw, that 'space' is a literal space (HTML collapses whitespace to a single space)
[10:07:06] rvanlieshout: bonhoeffer: whichever solution works
[10:07:11] rvanlieshout: bonhoeffer: and is stable
[10:08:21] norc: workmad3: Yeah. I suppose the bootstrap guys ought to fix that. After all CSS exists so people don't adjust their layout with space, tab and enter. Presenting a nice looking demo that relies on it seems like a bad idea.
[10:08:58] norc: Anyway, guess I just have to manually validate the existing of the foreign/referenced record then?
[10:09:23] workmad3: norc: horizontal form is deliberately doing that, as it's an inline flow
[10:09:31] workmad3: norc: namely, it flows with text
[10:09:37] acti0nman: has joined #RubyOnRails
[10:09:55] d34th4ck3r: is it a good idea to keep a function like ???save_posts_from_facebook_page??? in controller: https://github.com/FreeFromBorders/f2b_website/blob/master/app/controllers/posts_controller.rb or should I move it to User model ?
[10:10:09] rvanlieshout: d34th4ck3r: no and no
[10:10:19] rvanlieshout: move it to a service
[10:10:25] rvanlieshout: without the render part
[10:10:27] workmad3: norc: so it's not something to 'fix', it's something you deliberately opted into by choosing a `form-inline` style
[10:11:11] norc: workmad3: What do you mean?
[10:11:34] norc: workmad3: Are you saying because its an inline flow, adding spaces in the text area of HTML tags to make it look good is fine?
[10:11:45] d34th4ck3r: rvanlieshout: By service you mean, a module/class in lib ?
[10:11:54] workmad3: norc: yes, in the same way that it's fine to add spaces to text in order to make it readable
[10:11:56] norc: d34th4ck3r: No. A service class in app/services
[10:12:07] workmad3: norc: itwouldbeabitoddifyourequiredcsstomakethisreadabledon'tyouthink?
[10:12:10] rvanlieshout: just a plain class
[10:12:16] rvanlieshout: but it's logic that doesn't belong to the controller
[10:12:24] rvanlieshout: cause you might also want to be able to use that from a console
[10:12:39] rvanlieshout: and it doesn't belong to the model, cause it uses things from the mean big outside world.. which is an unknown world for models
[10:13:09] norc: workmad3: Okay, that brings me back to my original question. How do I elegantly put this into HAML then? ;-)
[10:13:21] rodfersou: has joined #RubyOnRails
[10:13:41] d34th4ck3r: Do you guys mean something like this: https://blog.engineyard.com/2014/keeping-your-rails-controllers-dry-with-services ?
[10:14:19] bonhoeffer: if i add custom parameters to a restful controller to redirect do i have to depart the resources :users in routes.rb
[10:14:21] rvanlieshout: d34th4ck3r: something like that yes
[10:14:26] workmad3: norc: care to gist the haml you currently have? :)
[10:14:34] rvanlieshout: bonhoeffer: wut? you're making this way to complex
[10:14:45] rvanlieshout: bonhoeffer: the user deestroy action performs a @user.destroy and redirects to users_path
[10:14:55] rvanlieshout: bonhoeffer: you seem to want that to be changed to some other path in some conditions
[10:14:58] rvanlieshout: what conditions?
[10:15:12] bonhoeffer: if i comes from /participation
[10:15:19] bonhoeffer: a different view
[10:15:26] njero: can anyone help me to figure out a better solution to for saving a open_hours and search whether its currently open?...
[10:15:29] rvanlieshout: bonhoeffer: and does it know that? cause if it doesn't, you'll just have to add an extra param
[10:15:40] rvanlieshout: bonhoeffer: how did you create that destroy form / link?
[10:15:42] bonhoeffer: yep ??? of course ??? which means new routes
[10:15:54] rvanlieshout: bonhoeffer: no, it doesn't
[10:15:56] rvanlieshout: bonhoeffer: no new routes
[10:16:10] rvanlieshout: bonhoeffer: the destroy thing uses something like user_path(@user) ?
[10:16:14] rvanlieshout: it should at least
[10:16:19] dionysus69: has joined #RubyOnRails
[10:16:20] bonhoeffer: right now i just link to the user destroy with method: :delete
[10:16:22] rvanlieshout: change that to user_path(@user, origin: :participation)
[10:16:39] rvanlieshout: then you'll have a params[:origin] == 'participation' you can use in an if else statement when you redirect
[10:16:50] rvanlieshout: nemo_: better solution to what?
[10:17:03] bonhoeffer: so you send that parm without adding that in routes? interesting
[10:17:26] rvanlieshout: that's why params exist?
[10:19:08] njero: rvanlieshout: currently i'm using has_many relation to weeklyschedules table from a place to track open_hours. I need to fetch places which are currently open. also i need to render open_hours continuously like 8pm to 2am even if its on the next day
[10:19:22] bonhoeffer: rvanlieshout: i just thought they had to be allowed explicitly in routes.rb
[10:19:33] bruno-: has joined #RubyOnRails
[10:19:39] rvanlieshout: bonhoeffer: and what about create and update?
[10:20:10] jonee: has joined #RubyOnRails
[10:20:19] rickmasta: has joined #RubyOnRails
[10:20:21] bonhoeffer: i assumed resources provided those routes
[10:20:46] pawnbox: has joined #RubyOnRails
[10:21:37] Joucke: has joined #RubyOnRails
[10:22:00] rvanlieshout: n_e_o: what db engine? postgres might be able to query better here
[10:22:11] rvanlieshout: but this is something which would be easily solved with some caching
[10:22:59] njero: rvanlieshout: currently i'm thinking of storing open hours exactly for a day between 00:00 to 23:59 for ease of searching. but it complicates client side because it has to merge continuous openhours like 8pm:2am which is stored as 20:00 to 23:59 and 00:00 to 02:00 of next day
[10:23:11] njero: rvanlieshout: i'm using mysql
[10:23:40] njero: wht special with postgres?
[10:23:57] Joucke: quick question, quite new at RoR, if I have functionality that is not activerecord related, but should be used across models, where do I put that?
[10:24:08] rvanlieshout: n_e_o: postgres can query json and array fields
[10:24:12] rvanlieshout: nemo_: has and can query
[10:24:31] rvanlieshout: n_e_o: but this is something you'll really want to cache if you need it really really often
[10:25:29] njero: rvanlieshout: yeah.. its complicated. Is there a better way to do this?
[10:25:30] tbuehlmann: Joucke, sounds like a case for app/models/concerns. if it's not related to your business domain at all, the lib directory
[10:26:36] Joucke: I use houston for push messages (APN), and want multiple controllers to have access to one central pusher
[10:26:47] rvanlieshout: n_e_o: caching
[10:26:55] rvanlieshout: what's wrong with that?
[10:27:13] rvanlieshout: Joucke: read about the singleton design pattern
[10:27:26] Joucke: rvanlieshout: I know singletons from other languages
[10:27:39] h7br1x: has joined #RubyOnRails
[10:28:13] njero: rvanlieshout: but no idea how to do that.. I'm newbie on caching..
[10:28:28] rvanlieshout: n_e_o: !guides caching
[10:28:28] helpa: n_e_o: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[10:29:07] Joucke: but rvanlieshout how would singleton help me here? where'd I put the singleton in rails' system?
[10:29:12] njero: rvanlieshout: helpa :) thanks..
[10:29:47] rvanlieshout: Joucke: a service feels reasonable here
[10:30:30] MartinElvar: has joined #RubyOnRails
[10:30:34] chrissonar: has joined #RubyOnRails
[10:31:29] bonhoeffer: rvanlieshout: works well, thanks
[10:31:39] Joucke: rvanlieshout: like in this blog? https://blog.engineyard.com/2014/keeping-your-rails-controllers-dry-with-services
[10:32:15] rvanlieshout: 11:13 < d34th4ck3r> Do you guys mean something like this: https://blog.engineyard.com/2014/keeping-your-rails-controllers-dry-with-services ?
[10:33:11] Joucke: looks like Ben Lewis is getting some attention today ;)
[10:33:18] d34th4ck3r: I guess a lot of people come up with same doubts haha
[10:33:25] Joucke: awesome, looks exactly like what I needed
[10:33:44] Joucke: will be reading and implementing that, probably :)
[10:34:21] n1ck7: has joined #RubyOnRails
[10:34:54] techsethi: has joined #RubyOnRails
[10:35:00] Ergo: has joined #RubyOnRails
[10:35:04] rvanlieshout: it's really easy
[10:35:17] ldnunes: has joined #RubyOnRails
[10:35:53] Palsson: has joined #RubyOnRails
[10:37:30] tuelz: has joined #RubyOnRails
[10:38:03] norc: workmad3: Sure, sec
[10:39:35] qejk: has joined #RubyOnRails
[10:39:35] norc: workmad3: http://pastie.org/10517848 - This is a functional test case. (The source has a lot more, but this is what I can reduce the problem to)
[10:39:47] chrislotix: has joined #RubyOnRails
[10:40:24] norc: I mean I could just throw in a = " " before the last .form-group, but that is not pretty.
[10:40:45] bruno-: has joined #RubyOnRails
[10:40:54] norc: Or wait. No I cant. x_x
[10:41:03] norc: This is the result from the simple_form builder
[10:41:20] chrissonar: has joined #RubyOnRails
[10:41:36] barhum2013_: has joined #RubyOnRails
[10:41:56] weckl: has joined #RubyOnRails
[10:42:51] vigintas: has joined #RubyOnRails
[10:43:14] vigintas: has joined #RubyOnRails
[10:43:31] btriley: has joined #RubyOnRails
[10:44:17] x-light: has joined #RubyOnRails
[10:48:38] Hazim: has joined #RubyOnRails
[10:48:59] rgtk: has joined #RubyOnRails
[10:49:22] trautwein: has joined #RubyOnRails
[10:50:33] quazimodo: has joined #RubyOnRails
[10:50:55] dionysus69: has joined #RubyOnRails
[10:51:09] shibabu: has joined #RubyOnRails
[10:53:17] chills42: has joined #RubyOnRails
[10:54:54] trautwein: has joined #RubyOnRails
[10:55:20] lxsameer: has joined #RubyOnRails
[10:55:20] lxsameer: has joined #RubyOnRails
[10:56:46] nemo_: has joined #RubyOnRails
[10:57:17] manuelmesson: has joined #RubyOnRails
[10:58:31] rgtk: has joined #RubyOnRails
[11:00:04] trautwein: has joined #RubyOnRails
[11:00:51] yogeshwar: has joined #RubyOnRails
[11:00:57] nhhagen: has joined #RubyOnRails
[11:01:19] chills42: has joined #RubyOnRails
[11:02:11] annlewis: has joined #RubyOnRails
[11:04:11] aevitas: has joined #RubyOnRails
[11:05:13] arthurix: has joined #RubyOnRails
[11:05:36] noodman: has joined #RubyOnRails
[11:05:49] SPYGAME: has joined #RubyOnRails
[11:08:40] arup_r: has joined #RubyOnRails
[11:08:55] SPYGAME: hey guys, i have a usecase where when i attach images i need to send it to server and validate the images and then show them in the preview screen and once the user clicks upload only then they get uploaded. what's the best way to solve this use case ?
[11:08:59] trautwein: has joined #RubyOnRails
[11:09:06] dionysus69: has joined #RubyOnRails
[11:09:19] rvanlieshout: spygame: carrierwave has support for redisplay between form displays
[11:09:25] rvanlieshout: but it does require the upload on first submission
[11:09:36] arup_r: has joined #RubyOnRails
[11:10:02] ibouvousaime: has joined #RubyOnRails
[11:10:16] nemo__: has joined #RubyOnRails
[11:10:38] arup_r: has joined #RubyOnRails
[11:12:07] arup_r: has joined #RubyOnRails
[11:12:24] Dbugger: has joined #RubyOnRails
[11:12:27] Dbugger: Hello everyone
[11:13:39] rickmasta: has joined #RubyOnRails
[11:13:44] arup_r: has joined #RubyOnRails
[11:13:55] Dbugger: I just installed gem turboboost, because I wanted to have turbolinks also when submitting forms, which works quite nicely.... except for the forms where I have Paperclip to upload images. There I get an error "ActionController::InvalidAuthenticityToken". What is wrong?
[11:14:44] zero-1: has joined #RubyOnRails
[11:14:58] arBmind: has joined #RubyOnRails
[11:15:24] Cervajz_: has joined #RubyOnRails
[11:16:24] RegulationD: has joined #RubyOnRails
[11:17:07] arup_r: has joined #RubyOnRails
[11:17:35] arup_r: has joined #RubyOnRails
[11:18:15] skinux: has joined #RubyOnRails
[11:18:38] skinux: I'm following Getting Started guide, the initial routing code is getting me error
[11:18:49] skinux: Missing :action key on routes definition, please check your routes.
[11:19:24] skinux: The guide has me doing: root 'welcome/index'
[11:19:24] skinux: get 'welcome/index'
[11:20:52] norc: rvanlieshout: Which is fine, since he needs to have it server side anyway.
[11:22:07] skinux: FailBit: Can you help with my routing issue?
[11:22:09] norc: skinux: Use # to delimit the action name from the controller name in your routes.
[11:22:25] skinux: Well, why is the guide telling me to do it wrong?
[11:22:59] norc: skinux: http://guides.rubyonrails.org/getting_started.html#setting-the-application-home-page
[11:23:01] norc: Look again. :)
[11:24:06] LambdaSource: has joined #RubyOnRails
[11:24:39] nemo_: has joined #RubyOnRails
[11:24:42] norc: skinux: The difference seems subtle but its big.
[11:24:51] skinux: Thanks again
[11:25:07] norc: skinux: get describes an URL path, which could be anything like "foo/bar"
[11:25:35] norc: skinux: root implies a path "/", so the argument is about which controller#action.
[11:27:02] norc: If you had written get 'welcome/index', to: 'welcome#index' it would have been more obvious.
[11:27:40] beauby: has joined #RubyOnRails
[11:27:41] seank_: has joined #RubyOnRails
[11:30:48] pawnbox: has joined #RubyOnRails
[11:31:24] skinux: Yeah, just a small over-sight that makes a big difference.
[11:31:48] moeabdol1: has joined #RubyOnRails
[11:31:52] skinux: I come from PHP so this is new to me except for the MVC thing
[11:32:14] skinux: I only remember very little Ruby
[11:32:17] schu: has joined #RubyOnRails
[11:32:37] skinux: In fact, may as well say none. However I can sorta understand Ruby code I read.
[11:33:36] FailBit: Ruby is to syntax as PHP is to grammar
[11:34:12] iloveitaly: has joined #RubyOnRails
[11:34:49] skinux: I don't know what that means. However, if I had thought about my error, I would have easily realized the issue
[11:35:15] skinux: root will always be '/', so clearly the controller#action is what that line requires
[11:35:49] nhhagen: has joined #RubyOnRails
[11:36:22] nhhagen: has joined #RubyOnRails
[11:36:33] syath: has joined #RubyOnRails
[11:38:02] FailBit: skinux: it means that ruby grammar/stdlib is awesome, but the syntax rules suck
[11:38:14] tuelz: has joined #RubyOnRails
[11:38:35] FailBit: the general rule is "allow interpretational ambiguity until it becomes a parser error"
[11:38:57] FailBit: but sorry for the distraction
[11:38:57] eyck: has joined #RubyOnRails
[11:39:18] arup_r: has joined #RubyOnRails
[11:39:42] adre: has joined #RubyOnRails
[11:39:46] bmalum: has joined #RubyOnRails
[11:39:52] skinux: Why do the syntax rules suck?
[11:40:03] cornerma1: has joined #RubyOnRails
[11:40:36] FailBit: my standard example is passing 2 hash literals to a function
[11:40:36] nya: has joined #RubyOnRails
[11:40:42] skinux: I've been reading through "PHP: fractal of bad design", and wow...if I had realized how badly designed it was I probably wouldn't have learned it.
[11:41:15] FailBit: there is so much ambiguity in the syntax rules that you have to use parens
[11:41:30] skinux: Some of it's bad design doesn't even make sense to me, and I don't consider my self a good programmer.
[11:42:21] skinux: Is there much freelance work in RoR?
[11:43:10] skinux: Are you saying Ruby syntax is poorly designed?
[11:44:07] FailBit: its grammar rocks though
[11:44:13] FailBit: and the stdlib, moi
[11:44:14] tuelz: has joined #RubyOnRails
[11:44:45] FailBit: *kissing noises*
[11:44:59] skinux: Well, no language is perfect.
[11:45:03] wethu: has joined #RubyOnRails
[11:45:15] skinux: Although, I don't see why one couldn't be with all of the languages that have been developed.
[11:45:32] FailBit: D is quite clearly perfect :^)
[11:46:17] pawnbox: has joined #RubyOnRails
[11:46:42] marr: has joined #RubyOnRails
[11:46:49] Dbugger: Is there a gem somewhere, that allows me to create Graph relationships between objects? Something like this? http://blog.bigbinary.com/assets/directed_acyclic_graph-c0b682ca70b9a78040176a4ad13374da.png
[11:46:50] skinux: I don't know anything about D
[11:48:07] skinux: Up until now, I haven't used any language which didn't have a decent IDE. I'm using Sublime Text for Ruby
[11:48:32] pawnbox: has joined #RubyOnRails
[11:49:53] kitsuneyo: has joined #RubyOnRails
[11:50:51] n1ck7: has joined #RubyOnRails
[11:51:07] manuelmesson: has joined #RubyOnRails
[11:52:46] xm32x: has joined #RubyOnRails
[11:52:51] ivanyk: has joined #RubyOnRails
[11:53:06] TvL2386: has joined #RubyOnRails
[11:54:28] shibabu: has joined #RubyOnRails
[11:55:04] jonee: has joined #RubyOnRails
[11:55:07] yogeshrt: has joined #RubyOnRails
[11:56:10] xm32x: Has anyone here need to build a rails app 'backwards'? And by that I mean starting wtih the DB first
[11:57:30] northfurr: has joined #RubyOnRails
[11:57:41] Gi0: has joined #RubyOnRails
[11:57:44] dionysus69: has joined #RubyOnRails
[11:58:22] Icey: has joined #RubyOnRails
[11:58:30] nemo__: has joined #RubyOnRails
[11:58:34] skinux: FailBit: I don't think I've ever seen anything that has been written in D though.
[11:58:59] skinux: xm32x: That is backwards? I thought that was forwards.
[11:59:38] matthewd: dbugger: You should be able to find a gem that wraps graphviz
[12:00:57] sevenseacat: has joined #RubyOnRails
[12:01:16] Joucke: I'm sure I've done this before: when given an array with 3 elements, store them in 3 variables
[12:01:33] adaedra: a, b, c = [1, 2, 3] ?
[12:01:56] Joucke: I had brackets around a,b,c
[12:02:27] xm32x: @skinux fair enough, this is my first experience going from DB but up to rails, instead of rails generators and models down to the database
[12:02:59] annlewis: has joined #RubyOnRails
[12:03:08] skinux: Well, IMO, models are useless unless there is a DB to support them.
[12:03:49] skinux: At the least, a DB must be created even if you use a tool to create the tables and fields.
[12:04:00] Pumukel: has joined #RubyOnRails
[12:04:14] skinux: I create the DB, tables, fields, and then create models to match.
[12:05:34] xm32x: Right, so the situation is, Mysql guy in California gives dev team a .sql file and says, go! The question is how best to go about modeling these already created tables and relations
[12:05:43] beilabs: has joined #RubyOnRails
[12:06:01] krz: has joined #RubyOnRails
[12:07:07] OmegaA: has joined #RubyOnRails
[12:09:33] tlarevo: has joined #RubyOnRails
[12:09:34] OmegaA: I'm a bit confused on how to access my associations: I'm doing 'attribute = @goattribute.first_or_create_by name: name' and I'm getting a undefined method 'find_or_create_by' for nil:NilClass error
[12:10:42] nemo_: has joined #RubyOnRails
[12:10:48] OmegaA: @goattributes* I have a has_many :goattributes for the class
[12:11:38] chridal: has joined #RubyOnRails
[12:11:40] Joucke: isn't it a bit harsh to classify the mockingjay as a goat?
[12:13:15] chipotle: has joined #RubyOnRails
[12:14:25] artto: has joined #RubyOnRails
[12:14:41] rodfersou: has joined #RubyOnRails
[12:15:53] skinux: xm32x: You write the model to match what is in the DB.
[12:17:02] n1ck7: has joined #RubyOnRails
[12:17:03] mary5030: has joined #RubyOnRails
[12:17:04] _lazarevsky: has joined #RubyOnRails
[12:17:26] _lazarevsky: pts_ids = pts.map{ |pt| pt.project.id } AND pts_ids = pts.map.pluck(:project_id) give me different results!
[12:17:26] kitsuneyo: has joined #RubyOnRails
[12:17:34] _lazarevsky: how is that even possible?
[12:17:52] _lazarevsky: not .map.pluck()
[12:18:49] sevenseacat: because they're two different methods that do different things?
[12:19:06] _lazarevsky: the first one runs 25 times
[12:19:10] acti0nman: has joined #RubyOnRails
[12:19:10] sevenseacat: seems straightforward
[12:19:12] mary5030: has joined #RubyOnRails
[12:19:30] _lazarevsky: the first one says map all project team to a team and get me the project's id
[12:19:37] _lazarevsky: project team has project_id
[12:19:56] _lazarevsky: the second one says pluck project_id from project_team
[12:20:02] _lazarevsky: how are they not the same?
[12:20:07] _lazarevsky: http://apidock.com/rails/ActiveRecord/Calculations/pluck
[12:20:17] northfurr: has joined #RubyOnRails
[12:20:33] _lazarevsky: pluck basically does DB level mapping if i'm not mistaken
[12:20:59] _lazarevsky: sevenseacat: no?
[12:21:07] sevenseacat: pluck does a select in the db
[12:21:25] _lazarevsky: ya that's what I meant.. so I already have an array of project_teams (pts)
[12:21:42] sevenseacat: no you dont, because arrays do not respond to pluck
[12:22:10] _lazarevsky: whether I call foreach pt get project.id OR from this array of pts pluck project_id
[12:22:41] Lightsword: has joined #RubyOnRails
[12:22:43] pawnbox: has joined #RubyOnRails
[12:22:58] _lazarevsky: so I should join projects with project teams, find project_teams by ids and pluck that, no?
[12:23:09] _lazarevsky: actually no..
[12:23:14] sevenseacat: dont know what you're trying to do.
[12:23:23] _lazarevsky: I wanna get the p_ids for these project_teams
[12:23:38] _lazarevsky: project_id for these project_teams
[12:23:39] rvanlieshout: what are we trying to do here?
[12:23:58] _lazarevsky: rvanlieshout: used "pluck", the method you showed me from yesterday on an array
[12:24:01] _lazarevsky: got weird results
[12:24:01] bitkiller: has joined #RubyOnRails
[12:24:14] _lazarevsky: but anyhow.. thanks for clearing that out for me sevenseacat
[12:24:44] _lazarevsky: rvanlieshout: the question is: I have an array of ProjectTeams and I wanna get the id of their associated Projects
[12:24:49] bmalum: has joined #RubyOnRails
[12:24:52] _lazarevsky: ProjectTeam has project_id for attribute
[12:24:52] quazimod1: has joined #RubyOnRails
[12:25:01] _lazarevsky: so I did project_teams.pluck(:project_id)
[12:25:42] _lazarevsky: project_teams.map { |pt| pt.project.id } AND project_teams.pluck(:project_teams) returned almost identical results!
[12:25:51] _lazarevsky: 19 out of the 25 results were overlapping
[12:26:36] artto: has joined #RubyOnRails
[12:26:59] Lytol: has joined #RubyOnRails
[12:27:52] rvanlieshout: _lazarevsky: ProjectTeam.where(id: your_array).pluck('project_id')
[12:28:03] _lazarevsky: rvanlieshout: ya I figured it out
[12:28:06] _lazarevsky: rvanlieshout: thanks
[12:29:54] aevitas: has joined #RubyOnRails
[12:30:07] neanias: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[12:31:31] btriley: has joined #RubyOnRails
[12:31:38] northfurr: has joined #RubyOnRails
[12:32:26] yogeshrt: has joined #RubyOnRails
[12:32:27] Zackio: has joined #RubyOnRails
[12:32:54] nhhagen_: has joined #RubyOnRails
[12:34:20] mary5030: has joined #RubyOnRails
[12:35:26] nhhagen: has joined #RubyOnRails
[12:37:53] wethu: has joined #RubyOnRails
[12:38:44] nhhagen_: has joined #RubyOnRails
[12:40:34] tknz: has joined #RubyOnRails
[12:42:43] Guest53: has joined #RubyOnRails
[12:43:18] atomical: has joined #RubyOnRails
[12:43:58] cac: has joined #RubyOnRails
[12:45:16] manuelmesson: has joined #RubyOnRails
[12:46:28] aevitas: has joined #RubyOnRails
[12:47:06] htmldrum: has joined #RubyOnRails
[12:50:27] StevenXL: has joined #RubyOnRails
[12:50:47] StevenXL: Hello everyone.
[12:51:43] StevenXL: Hello ddv. I have a question on validations. I am making an app in which users can posts requests, and have other users fullfill them.
[12:52:07] StevenXL: I have a Request model, but I don't know how to make the validation of two users.
[12:52:21] StevenXL: I don't think I can use valdiates :user, :user ....
[12:53:05] dionysus69: has joined #RubyOnRails
[12:53:18] ddv: StevenXL: you make a separate user model where you put the validations
[12:53:39] nhhagen: has joined #RubyOnRails
[12:53:57] sankaber: has joined #RubyOnRails
[12:54:07] ddv: StevenXL: you forgot to model this
[12:54:09] tuelz: has joined #RubyOnRails
[12:54:34] norc: Is there any reason I should use fixtures over FactoryGirl for seeding my development db?
[12:54:54] norc: I mean since Im using rspec/factorygirl already, the factory already is always up to date to changes
[12:55:09] StevenXL: @ddv, I did a separate mode for a Request.
[12:55:37] northfurr: has joined #RubyOnRails
[12:56:14] StevenXL: A request is fulfilled by a requester and a responder, which are both User.
[12:56:20] norc: I feel like having the same data in development as in test would be a useful thing...
[12:56:42] norc: StevenXL: What do you want to validate?
[12:57:34] chills42: has joined #RubyOnRails
[12:58:04] pawnbox_: has joined #RubyOnRails
[12:58:12] dionysus69: has joined #RubyOnRails
[12:58:49] StevenXL: norc, I want to validate that a model (called Vote) has two Users.
[12:59:11] StevenXL: I can't do 'validates :user, :user, presence: true'
[12:59:20] norc: StevenXL: just do two validations. :)
[12:59:32] norc: One for :requester, and one for :responder
[12:59:48] StevenXL: soooo validates :request, :responder?
[13:00:11] norc: Or actually I wonder whether that might work.
[13:00:53] StevenXL: Well I have to figure out the answer to this, so if I do, I'll let you know.
[13:01:16] norc: StevenXL: Actually I think it should work if I read the docs right
[13:01:48] Joucke: does rails automatically change < and > in strings to encoded characters?
[13:01:49] norc: Just give it a try
[13:02:17] norc: Joucke: Be more specific. Rails is a large framework.
[13:02:17] RegulationD: has joined #RubyOnRails
[13:03:03] Joucke: in my database, I have a (push) device token string, starting with < and ending with >
[13:03:29] notnoyyyyy: has joined #RubyOnRails
[13:03:45] annlewis: has joined #RubyOnRails
[13:03:46] Joucke: but my push messages aren't working, while certificates are correct and token is correct
[13:03:52] Joucke: this was working yesterday :p
[13:04:02] Joucke: so, I'm trying to troubleshoot the problem, and have no idea where to start
[13:05:19] norc: Joucke: In an ideal scenario you would have unit tests/specs that would tell you immediately where the issue is.
[13:05:36] Joucke: yeah, in an ideal scenario I would
[13:05:53] norc: Since you dont have them, you have no option to manually test your entire MVC stack to see which part is misbehaving if you get bad data.
[13:06:08] norc: Or just write them as specs as you go, gaining unit tests as you debug this.
[13:06:13] Joucke: it looks like server side is correct, Houston sets the sent date of the message
[13:07:55] norc: Joucke: As I said, if you need to debug your Rails application, do it in form of writing tests.
[13:09:00] bruno-: has joined #RubyOnRails
[13:09:04] norc: That way you can more easily systematically test parts of your application (esp with stubs/mocks) to figure out what your issue is, and when done - you gained tests. :)
[13:10:29] Joucke: oh I'm well aware of the benefits of tests, I just haven't had time for it yet... and now it's costing me time ;)
[13:11:04] northfurr: has joined #RubyOnRails
[13:11:07] mag42c: has joined #RubyOnRails
[13:11:31] yogeshwar_: has joined #RubyOnRails
[13:11:37] Joucke: currently I'm thinking the problem is app-side though
[13:11:58] weihan: has joined #RubyOnRails
[13:12:08] alfie_max15: has joined #RubyOnRails
[13:12:21] Sigfrid: has joined #RubyOnRails
[13:13:32] Joucke: hell, might even be certificate side :/
[13:13:36] tuelz: ACTION waves
[13:14:27] MartinElvar: has joined #RubyOnRails
[13:14:53] nertzy: has joined #RubyOnRails
[13:14:58] Thomas-0725: has joined #RubyOnRails
[13:15:06] northfurr: I cannot make heroku recognize env variables / config vars for the life of me
[13:15:27] zero-1: has joined #RubyOnRails
[13:15:47] n1ck7: has joined #RubyOnRails
[13:15:48] jsrn_: has joined #RubyOnRails
[13:17:02] weihan: has joined #RubyOnRails
[13:17:22] darrencauthon: has joined #RubyOnRails
[13:18:48] norc: Joucke: If only you had unit tests on server and client. :-)
[13:18:55] norc: ACTION hides
[13:19:20] norc: Let me guess, a supervisor decided it was more important to rush the thing to save time and money.
[13:20:09] Joucke: no, i'm learning RoR, and wrote an ios app to go with my project, and just haven't come around to writing them yet
[13:20:41] Joucke: so, getting things on screen was more important to me than writing specs, as I don't fully comprehend how everything works yet ;)
[13:20:57] norc: Joucke: Get things into your tests first, worry about the screen later. :)
[13:21:09] Joucke: now, two days ago this was working (on the previous version of my app) with the dev certificate
[13:21:20] krz: has joined #RubyOnRails
[13:22:23] norc: Joucke: Rails in fact makes it so easy, that all the generators will generate basic fixtures and tests for you, so that you can write tests as you develop your MVC stack.
[13:22:39] annlewis: has joined #RubyOnRails
[13:23:01] pawnbox: has joined #RubyOnRails
[13:24:37] kitsuneyo: has joined #RubyOnRails
[13:24:58] sniperhaxor: has joined #RubyOnRails
[13:25:10] kp666: has joined #RubyOnRails
[13:25:14] Thomas-0725: has joined #RubyOnRails
[13:25:35] btriley: has joined #RubyOnRails
[13:25:54] sniperhaxor: Eh, anyone know why I get this error? https://gist.github.com/anonymous/a7ae888125aed12c7b5e
[13:26:31] sniperhaxor: I'm using Digital Ocean $5 dollar/month tier
[13:26:38] sniperhaxor: is that not enough horse power to work with rails?
[13:27:36] baweaver: has joined #RubyOnRails
[13:28:27] pwnd_nsfw: has joined #RubyOnRails
[13:28:40] sniperhaxor: 512 mb of memory
[13:29:35] norc: sniperhaxor: It is quite possible with that low amount of memory.
[13:29:39] tuelz: sniperhaxor: have you checked your mem usage?
[13:30:26] tuelz: I mean if you're only running rails I wouldn't expect any problems. I used to do dev work occasionally on some cloud development platform that gave me that much memory to do work
[13:30:27] erich: has joined #RubyOnRails
[13:31:02] norc: tuelz: That really depends on what you have in your Gemfile though.
[13:31:15] mikeharris22: has joined #RubyOnRails
[13:31:57] ddv: sniperhaxor: depends on a lot of things, you have to measure this
[13:32:37] mikeharris22: has joined #RubyOnRails
[13:32:47] mrchris: has joined #RubyOnRails
[13:33:07] bruno-: has joined #RubyOnRails
[13:35:43] sankaber: has joined #RubyOnRails
[13:35:54] allcentury: has joined #RubyOnRails
[13:37:09] sniperhaxor: this is my memory: https://gist.github.com/anonymous/90af5204a2ef8d5e52e4
[13:38:13] mikecmpbll: are you running your app in production also?
[13:38:28] mikecmpbll: well, that'll be using up a few hundred mbs
[13:38:43] yogeshrt: has joined #RubyOnRails
[13:39:01] mary5030: has joined #RubyOnRails
[13:39:42] manuelmesson: has joined #RubyOnRails
[13:40:29] mary5030: has joined #RubyOnRails
[13:40:55] mary5030: has joined #RubyOnRails
[13:43:44] jobewan: has joined #RubyOnRails
[13:46:11] arup_r: has joined #RubyOnRails
[13:46:34] DiCablo: has joined #RubyOnRails
[13:46:53] ruurd: has joined #RubyOnRails
[13:47:08] Cervajz_: has joined #RubyOnRails
[13:49:07] ddv: sniperhaxor: 34M is free
[13:50:15] sniperhaxor: yeah, that wasn't enough
[13:50:31] sniperhaxor: at least not when I ran rails g controller
[13:50:40] sniperhaxor: that takes up more than 34 I'm assuming
[13:51:00] mikecmpbll: yes. a rails app uses more than 34mb of memory :)
[13:51:04] sniperhaxor: and it couldn't finish. When I stopped my unicorn server and ngnix server to take it out of production I could run the command
[13:51:22] Uptime: has joined #RubyOnRails
[13:51:52] northfurr: has joined #RubyOnRails
[13:51:58] jbrinkmusic: a little bit unrelated to rails per se, but does anyone know why wgetting a json file adds a ?? character in the beginning of the file and can I somehow prevent this from crashing my rails app?
[13:52:15] norc: sniperhaxor: Once everything is loaded, spring forks, which basically doubles the memory footprint instantly.
[13:52:40] sniperhaxor: Yeah, this is the memory I have without having it in production: https://gist.github.com/anonymous/b0485f80db6b9f3e7c7e
[13:52:52] sniperhaxor: I wonder if I should continue using this VPS service or upgrade
[13:53:11] ddv: You should upgrade
[13:53:15] norc: sniperhaxor: If you care for a reliable service with decent stats, you will have to pay a lot more than 5$ though.
[13:53:19] sarink: has joined #RubyOnRails
[13:53:35] sniperhaxor: My goal is to learn rails on this VPS service
[13:53:37] psyonix: has joined #RubyOnRails
[13:53:45] sniperhaxor: which VPS service do you guys use?
[13:53:49] sniperhaxor: or recommend*
[13:53:51] djbkd: has joined #RubyOnRails
[13:53:58] jessemcgilallen: has joined #RubyOnRails
[13:54:24] norc: ACTION waits for the first heroku comment
[13:54:38] njero: has joined #RubyOnRails
[13:54:44] ddv: sniperhaxor: good hosting is expensive, deal with it
[13:54:47] djbkd: has joined #RubyOnRails
[13:55:23] mikecmpbll: ddv: memory won't double on forking btw because ruby supports/uses copy-on-write
[13:55:28] mikecmpbll: at least modern versions do anyway
[13:55:46] ddv: mikecmpbll: not sure why you are addressing me? :)
[13:55:51] norc: mikecmpbll: Oh wasn't aware of that.
[13:56:07] mikecmpbll: you two have similar length names and the same colour in my client :(
[13:57:05] shibabu: has joined #RubyOnRails
[13:57:24] pawnbox: has joined #RubyOnRails
[13:57:24] Joucke: norc: it was a certificate problem (sigh)
[13:57:49] Joucke: now, where do I start writing tests?
[13:58:30] umgrosscol: has joined #RubyOnRails
[13:58:55] norc: Joucke: Have you written tests/specs before?
[13:59:03] Joucke: not for rails
[13:59:17] aevitas: has joined #RubyOnRails
[13:59:20] norc: Joucke: Give this article a read then: http://guides.rubyonrails.org/testing.html
[13:59:21] Joucke: tiny bit of php testing
[14:00:23] RegulationD: has joined #RubyOnRails
[14:00:28] Joucke: is it travel reading (ie can i read without practicing) or should i delay it until after the week end?
[14:00:40] jtb__: has joined #RubyOnRails
[14:00:43] norc: Joucke: Its best if you try and implement as you read Id say.
[14:01:20] norc: But feel free to read it on your way home if you like. :)
[14:01:21] skinux: Does RoR play well with AngularJS?
[14:01:47] arup_r: has joined #RubyOnRails
[14:02:15] jobewan: has joined #RubyOnRails
[14:02:17] Joucke: I'm home now, will travel 3 hours later tonight ;)
[14:03:02] arup_r: Joucke: Happy journey..
[14:03:14] skinux: Hey...has anyone written an app in which Ruby is responsible for more than interacting with database and encoding/decoding JSON?
[14:03:44] skinux: I mean, these days,
[14:04:08] Dbugger: Hey guys. Lets say I have a collection pages (@book.pages) and I clone it (_pages = @book.pages.clone). How could I now from this cloned collection take the element with :id 1, and change its attribute :title to "lorem"?
[14:04:19] skinux: other than for office type applications, I'm not sure what server-side scripting is used for besides DB interaction and data transfer protocol
[14:04:44] norc: skinux: Most people here I suppose.
[14:04:45] arthurix: has joined #RubyOnRails
[14:04:45] elusiveother: has joined #RubyOnRails
[14:04:51] ramortegui: has joined #RubyOnRails
[14:05:02] HalcyonicStorm: has joined #RubyOnRails
[14:05:10] norc: skinux: What else do you want to use it for?
[14:05:22] mikecmpbll: on the subject of testing, controller tests are getting ditched in rails 5
[14:05:25] skinux: To be honest, nothing.
[14:05:51] norc: skinux: The most non-conforming thing I have done is a model that interfaces with SOAP.
[14:06:02] norc: An entire class I mean.
[14:06:28] skinux: You mean SOAP class that talks to a data class?
[14:07:06] mikecmpbll: skinux: every app i've written?
[14:07:07] norc: Its a model that takes bits and parts from rails, savon, and then maps the interaction with the model to an external interface
[14:07:37] skinux: mikecmpbll: Other than DB interaction and working with JSON, what have you used server-side code for recently?
[14:08:02] mikecmpbll: everything else that web apps do, plus server scripting
[14:08:18] afroboy: has joined #RubyOnRails
[14:08:31] skinux: Why didn't you use JS for everything that could be done on the client-side instead of using server-side?
[14:08:40] mikecmpbll: because i don't like clientside apps
[14:08:50] skinux: Oh, well that's a good enough reason lol
[14:09:15] norc: skinux: You can move as much logic into JavaScript as you want really. Rails has a fully fledged asset pipeline, let nothing stand in your way.
[14:09:49] skinux: About that. Why do MVC frameworks put CSS/JS into an asset directory outside of "public" ?
[14:09:51] DiCablo: has joined #RubyOnRails
[14:10:01] chridal: has joined #RubyOnRails
[14:10:05] norc: skinux: http://guides.rubyonrails.org/asset_pipeline.html
[14:10:07] skinux: They need to be in public so the browser can request them...
[14:10:13] allcentury: has joined #RubyOnRails
[14:10:14] mikecmpbll: they put them in public when they're compiled
[14:10:25] mikecmpbll: (unless you tell the pipeline to put them somewhere else)
[14:11:28] norc: skinux: By the way: The public directory is merely a convention. Filesystem directory based webservers have a real bad history of massive securities holes through directory traversal attacks.
[14:12:28] tuelz: but, rails does put the final assets in public/
[14:12:28] skinux: Laravel PHP Framework has only index.php in public, so that nothing can be accessed other than how it's intended to be securely.
[14:12:47] skinux: ACTION doesn't see the real benefits to using CoffeeScript over JS
[14:12:57] skinux: ACTION nor SASS over CSS
[14:13:02] kitsuneyo: General Q about Ruby style... Rubocop says a method over 12 lines long is poor form. What do you experienced Rails people think, do you bother about this stuff?
[14:13:07] mikecmpbll: maybe you need to read about sass a bit more then
[14:13:12] mikecmpbll: it's benefits are numerable.
[14:13:19] norc: kitsuneyo: That actually depends.
[14:13:19] tuelz: and coffeeescript
[14:13:27] mikecmpbll: less so coffeescript but yeah
[14:13:29] kitsuneyo: norc, go on
[14:13:34] skinux: CoffeeScript logic is backwards
[14:13:35] tuelz: just because you don't like the tradeoffs doesn't mean benefits aren't there
[14:13:51] yogeshwar_: has joined #RubyOnRails
[14:13:55] tetraktys: has joined #RubyOnRails
[14:14:02] norc: kitsuneyo: If you can reduce it below 10 LoC, do it. But there are enough cases when I would not bother (like actions that exceed that because of multiple format handlers)
[14:14:03] mikecmpbll: kitsuneyo: just do whatever you like, styleguides are just someone's opinion
[14:14:31] kitsuneyo: norc, the one it pulled me up on was a bunch of case/when lines
[14:14:46] kitsuneyo: maybe there's a better way to write those, i dunno
[14:15:00] IFrank00: has joined #RubyOnRails
[14:15:07] norc: kitsuneyo: gist it and lets have a look then :)
[14:15:23] skinux: Asset pipeline eliminates the need for something like Browserify?
[14:15:37] tuelz: skinux: I don't think many people in here are fond of people who just like to trash talk open source software.
[14:16:04] tuelz: you're free to have your opinions, but the coffeescript guys probably don't think the 'logic is backwards'
[14:16:10] yogeshwar_: I have a doubt , what's the difference between null: false and :null=>false , both give me same schema.rb when used in migration files.
[14:16:11] skinux: I'm not trash talking, I'm only sharing my opinion. And by all means, if you can set me straight then do it.
[14:16:30] norc: yogeshwar_: The first is a newer syntax, and is preferred by most ruby coders.
[14:16:39] Motoservo: has joined #RubyOnRails
[14:16:52] skinux: eat x for y just seems backwards to me.
[14:17:08] mikecmpbll: i don't think anyone here really cares if you use coffee script or not.
[14:17:11] kitsuneyo: norc, i didn't even write this, just altered it a bit to make it work for me: https://gist.github.com/kitsuneyo/f51369b8175efd334879
[14:17:19] yogeshwar_: norc :so, it's just syntax and functionally both are same , right?
[14:17:20] tuelz: skinux: if you want to have a technical discussion about coffeescript, then make technical comments. Not 'logic is backwards'
[14:17:27] skinux: I didn't say anyone would.
[14:17:57] tuelz: list comprehension has been around for a while. Coffeescript didn't invent it
[14:18:01] zero-1: has joined #RubyOnRails
[14:18:29] norc: kitsuneyo: You could write it as http://pastie.org/10518240
[14:18:32] kitsuneyo: skinux, i like sass for the variables, syntax is simpler too
[14:18:34] mikecmpbll: you were talking about the pipeline, which, as part of precompilation, runs any preprocessors (if you choose you use them), compresses (if you choose to do so), combines (if you choose to do so), fingerprints (if you choose to do so), creates a asset manifest, and places in a public directory
[14:18:36] norc: Its much more readable that way
[14:18:41] skinux: Most languages have "for whatever do whatever", instead of "do whatever for whatever" that's what I mean by backwards
[14:18:45] mikecmpbll: most of those things are extraordinarily useful to app developers.
[14:18:54] mikecmpbll: end of discussion on pipeline kthx
[14:19:20] kitsuneyo: norc, thanks... that is better :)
[14:19:29] kitsuneyo: i learned something about when
[14:19:30] skinux: kitsuneyo: How do variables help you? Honest question.
[14:19:57] btriley: has joined #RubyOnRails
[14:20:01] norc: kitsuneyo: Oh and if you want extra points, you can indent those then on the same level. :O
[14:20:05] tuelz: skinux: firstly, the logic is the same, so if it's backwards in coffeescript it's backwards in your other languages too. The syntax is turned around, which is weird coming from javascript, but I can assure you list comprehension has roots in many functional programming languages where it feels natural
[14:20:08] kitsuneyo: skinux, if i want to change the colour palette of my site i can do it easily by setting and variables
[14:20:32] kitsuneyo: norc, oh, rubocup won't let me rest otherwise
[14:20:39] norc: yogeshwar_: Correct.
[14:20:52] yogeshwar_: norc : thanks a lot !
[14:20:57] skinux: kitsuneyo: So then you would store all the color settings for one "skin" in a variable?
[14:21:24] norc: kitsuneyo: It has been said here a few times. You shouldn't spend too much work pleasing the compiler though.
[14:21:28] skinux: tuelz: Yeah I meant syntax not logic actually
[14:21:31] axl_: has joined #RubyOnRails
[14:22:07] norc: kitsuneyo: rubocop is just based on someones opinion. Develop your own style - but feel free to get input from others, code or whatever.
[14:22:47] tuelz: skinux: gotcha, yeah the syntax is backwards from javascript and you're more than welcome to prefer one over the other. There are real benefits to using coffeescript for me and I know project maintainers feel bad seeing random criticism without substance or else I wouldn't even be having this conversation with you
[14:22:52] norc: kitsuneyo: The one thing about rubocop I like is that it can auto correct most things (which is incredibly useful for getting consistent Hash syntax, or consistent single quotes=
[14:23:06] norc: But be very sure to check your git diff before you commit. ;-)
[14:23:08] kitsuneyo: skinux, one variable per colour with variables named by their place within the design/palette
[14:23:31] tuelz: just keep in mind real people who aren't getting paid put forth a lot of effort towards software
[14:23:44] kitsuneyo: norc, i don't have it auto correcting anything. i only got it yesterday so i'm just seeing how it goes
[14:24:12] norc: kitsuneyo: Have it run in auto correct mode, and look at your git diff - it is quite beastly. ;-)
[14:24:13] seba4: has joined #RubyOnRails
[14:24:32] momomomomo: has joined #RubyOnRails
[14:24:37] bruno-: has joined #RubyOnRails
[14:24:38] dionysus69: has joined #RubyOnRails
[14:24:53] kitsuneyo: norc: hah, isn't there any danger it will break things?
[14:25:02] seba4: hi to everyone. Is it possible to create HTML request and then in controller i would like to return JS if there is error raised..
[14:25:41] nemo_: has joined #RubyOnRails
[14:25:48] FCser: has joined #RubyOnRails
[14:25:55] tvw: has joined #RubyOnRails
[14:26:20] chills42: has joined #RubyOnRails
[14:26:25] norc: kitsuneyo: Commit your code before (or fork it), let it run rampage and look at whether your tests run (you have fully functional unit and integration tests right? ;-) )
[14:26:47] kitsuneyo: norc, i actually do have good tests now
[14:27:13] kitsuneyo: i learned a lot of stuff recently, so decided to start fresh on my app
[14:27:38] kitsuneyo: but i just use rake test
[14:27:44] norc: kitsuneyo: I mean you can control rubucop to only fix what you want. (Hash and quotes is most likely a good thing no matter what)
[14:27:51] norc: That is perfectly fine.
[14:28:19] dionysus69: has joined #RubyOnRails
[14:28:27] northfurr: has joined #RubyOnRails
[14:28:34] kitsuneyo: i'll take a look at the settings and whatnot
[14:28:51] kitsuneyo: thanks norc, i better get back to my real work, later
[14:28:53] mikeharr_: has joined #RubyOnRails
[14:28:53] arup_r: seba4: yes possible. You need to change the request format before rendering..
[14:29:13] norc: kitsuneyo: But remember, dont spend too much time pleasing kitsuneyo. There have been people linting themselves for weeks at a time without getting anything done.
[14:29:18] sankaber: has joined #RubyOnRails
[14:29:22] seba4: i did try with request.format = Mime::JS but it didnt work
[14:29:32] northfurr: Anyone familiar with using heroku config vars?
[14:30:03] kitsuneyo: norc, yeah i bet, right now it is teaching me some stuff so it's cool, wouldn't wanna obsess over it though
[14:31:11] norc: kitsuneyo: If you can look at all the things, and decide for yourself "yes, this convention I want to follow" - then it becomes a great tool.
[14:32:32] annlewis: has joined #RubyOnRails
[14:32:49] theblang: has joined #RubyOnRails
[14:33:37] manuelmesson: has joined #RubyOnRails
[14:34:21] jas02_: has joined #RubyOnRails
[14:35:13] bitkiller: has joined #RubyOnRails
[14:35:22] pawnbox_: has joined #RubyOnRails
[14:35:24] mikecmpbll: i wish on github you could go from a commit, to the PR that included it, if there was one
[14:35:50] Joucke: would this be considered bad practice? next unless SentQuote.where({user: user, quote: quote}).empty?
[14:37:39] norc: Joucke: Use find_by and leave out the {}
[14:38:10] Joucke: SentQuote.find_by(user:user, quote:quote).empty?
[14:38:14] mikecmpbll: Joucke: user.quotes.find(quote)
[14:38:26] mikecmpbll: assuming SentQuote is a through table.
[14:38:51] Joucke: SentQuote has an extra read_at field
[14:38:54] mikecmpbll: or you might like find_by(id: quote) if you don't want it raising.
[14:39:13] mikecmpbll: Joucke: so? :)
[14:39:22] Joucke: so, no idea if that still makes it a through table
[14:39:36] dopamean_: has joined #RubyOnRails
[14:39:49] mikecmpbll: sure, just put has_many :quotes, through: :sent_quotes in your user model and visa verse in quotes
[14:39:50] chills42: has joined #RubyOnRails
[14:40:22] youngbaks: has joined #RubyOnRails
[14:40:45] Joucke: i really have no use for that other than at this one line
[14:41:13] Joucke: so not sure if I should make it a through table
[14:41:33] mikecmpbll: it _is_ a through model regardless of whether you set up the rails plumbing
[14:41:48] Joucke: wait a sec
[14:42:05] Joucke: if I parse json for a user's scheduled quotes, I could simply do user.quotes, right?
[14:42:14] Joucke: that would make it useful
[14:42:18] arthurix: has joined #RubyOnRails
[14:42:41] mikecmpbll: i don't know how to interpret that sentence because i don't know anything about your domain logic
[14:43:02] kitsuneyo: has joined #RubyOnRails
[14:43:06] mikecmpbll: but perhaps.
[14:44:12] gregf_: has joined #RubyOnRails
[14:45:15] arup_r: has joined #RubyOnRails
[14:45:21] EminenceHC: has joined #RubyOnRails
[14:45:25] Meow-J: has joined #RubyOnRails
[14:46:20] Joucke: but actually i intended my question to check if 'next unless' was bad practice ;)
[14:46:43] n008f4g_: has joined #RubyOnRails
[14:46:58] mikecmpbll: we can't really tell without seeing the surrounding code ..
[14:47:13] mikecmpbll: next unless itself is not bad pratice, why on earth would it be? heh
[14:50:07] Joucke: https://gist.github.com/anonymous/a7d1513c016922d37ba9
[14:50:12] Joucke: would that be enough surrounding code?
[14:50:26] iamse7en: has joined #RubyOnRails
[14:50:51] Joucke: also, a new question that follows the earlier one. I now create a new SentQuote, but could I do something along the lines of user.quotes << quote; user.save instead?
[14:51:14] Joucke: or, quote.users << user; quote.save (as I'm in the quotes_controller)
[14:51:36] mikecmpbll: if you're just trying to get all the users associated with a particular quote, you don't need to loop like that, just do: User.joins(:quotes).where(quotes: { id: quote })
[14:51:40] trautwein: has joined #RubyOnRails
[14:51:50] mikecmpbll: woops, quote.users
[14:51:54] bmalum_: has joined #RubyOnRails
[14:52:03] Joucke: no, quotes and users aren't associated at that point
[14:52:19] mikecmpbll: but you're skipping if there's no association
[14:52:32] Joucke: each day, a quote will be sent to users, and to log that, I create the association
[14:52:46] Joucke: I should be skipping if there is an association
[14:52:50] Joucke: next unless empty?
[14:53:03] norc: http://pastie.org/10518288
[14:53:12] norc: I smell a weird bizarre timeout bug somewhere. o_o
[14:54:11] P0w3r3d: has joined #RubyOnRails
[14:54:21] mikecmpbll: Joucke: User.where.not(id: quote.users).each { |u| u.quotes << q }
[14:54:34] l_tonz: has joined #RubyOnRails
[14:54:54] Joucke: I don't understand s/q/quote
[14:55:15] mikecmpbll: i meant replace q with quote
[14:55:22] Joucke: ah, regex?
[14:55:31] mikecmpbll: indeed, sorry it's convention on irc.
[14:55:37] Joucke: didn't know that, nice :)
[14:55:37] shadowbq: has joined #RubyOnRails
[14:56:09] Joucke: however, I'm in the quotesController. shouldn't I work the other way 'round then?
[14:56:26] Z00t: has joined #RubyOnRails
[14:56:29] mordocai: has joined #RubyOnRails
[14:56:34] norc: Well this is bizarre. Seems like fetching a single record takes slightly over 5000ms.
[14:56:39] Joucke: Quote.where.not(id: user.quotes).each { |q| q.users < user }
[14:57:19] mikecmpbll: Joucke: i still don't understand the context. didn't even know you were in a request until now
[14:57:19] Joucke: i'm being stupid
[14:59:17] dionysus69: has joined #RubyOnRails
[15:00:21] aevitas: has joined #RubyOnRails
[15:00:26] nemo__: has joined #RubyOnRails
[15:01:22] bmalum: has joined #RubyOnRails
[15:01:29] Pumukel: has joined #RubyOnRails
[15:02:11] Guest53: has joined #RubyOnRails
[15:03:10] masscrx: assume that I have 500 databases on the server and one RoR application, how do you store passwords/usernames ? is it ok to store that much users credentials as ENV[] ?
[15:03:57] dopie: has joined #RubyOnRails
[15:04:07] mikecmpbll: masscrx: all different credentials?
[15:05:15] masscrx: I have one app engine and want to create for each customer new database
[15:05:23] urbanmonk: has joined #RubyOnRails
[15:05:33] mikecmpbll: different db servers?
[15:05:49] corioliss: has joined #RubyOnRails
[15:05:56] masscrx: for now assume that there is one VPS, and 500 mysql databases
[15:06:19] masscrx: currently I store credentials on main database, but Ikm thinking what next
[15:06:30] arup_r: seems multitenant
[15:06:37] waseem_: masscrx: Why are you doing this?
[15:06:49] Joucke: mikecmpbll: about the skipping, I still had that .empty? tagged on, heh
[15:06:55] waseem_: masscrx: You're probably looking for a multi tenant application.
[15:07:15] masscrx: waseem_: I want to have each db separated
[15:07:21] waseem_: masscrx: Why?
[15:07:36] mikecmpbll: there's nothing wrong with separate DBs, in fact it's got tons of advantages, that's how we do it.
[15:07:46] mikecmpbll: i don't really understand the "problem' though. how're you switching databases?
[15:08:03] mikecmpbll: you just need to store the connection info for one database, and then you can switch databases to your hearts content.
[15:08:46] Joucke: but to provide more context, I want to send push messages (Quotes) to active, client users, on a set time
[15:09:29] mag42c: has joined #RubyOnRails
[15:10:17] leifcr_: has joined #RubyOnRails
[15:11:19] masscrx: mikecmpbll: but where to store passwords ? assume that I have two apps, 1."A- for billing services" where are all customers credentials and 2."shop" so app where customers will be authenticating and managing their stuff, and now each customer's shop instance needs username/password
[15:11:40] mikecmpbll: username password for what exactly?
[15:12:02] masscrx: for ActiveRecord
[15:12:04] EminenceHC: has joined #RubyOnRails
[15:12:09] Gi0: has left #RubyOnRails: ("Leaving")
[15:12:21] Rinzlit1: has joined #RubyOnRails
[15:12:26] masscrx: credentials for access to db
[15:12:45] Mia: has joined #RubyOnRails
[15:13:01] elusiveother: has joined #RubyOnRails
[15:13:14] mikecmpbll: database servers have credentials, not individual databases
[15:13:19] smathy: has joined #RubyOnRails
[15:13:38] pixelhandler: has joined #RubyOnRails
[15:14:04] masscrx: ah shit right, so simple
[15:14:25] mikecmpbll: yes. most techniques for switching databases will use the sql `use <database>` command
[15:15:08] mikecmpbll: or they will use connection based switching by reusing the database.yml production connection configuration but changing the database option
[15:15:31] chipotle: has joined #RubyOnRails
[15:15:56] masscrx: ok so create credentials in main db for customers, then create database and grant access with that credentials
[15:16:05] lindii_: has joined #RubyOnRails
[15:16:09] momomomomo: has joined #RubyOnRails
[15:16:52] masscrx: "multi tenancy" is a key, thx
[15:16:56] bmalum_: has joined #RubyOnRails
[15:16:57] mikecmpbll: i'm still not sure we're both talking about the same "credentials", but i'm bored of trying to understand
[15:16:59] mikeharris22: has joined #RubyOnRails
[15:17:03] mikecmpbll: so i'll bode you good luck ;)
[15:17:36] eikood: has joined #RubyOnRails
[15:17:56] masscrx: np I;ve needed some short talk to get some things more clear
[15:18:01] bruno-: has joined #RubyOnRails
[15:18:10] roxtrongo: has joined #RubyOnRails
[15:18:42] skullcrasher: has joined #RubyOnRails
[15:20:05] naftilos76: has joined #RubyOnRails
[15:21:56] artto: has joined #RubyOnRails
[15:22:38] artto_: has joined #RubyOnRails
[15:22:42] mwlang: masscrx: nice to know I???m not the only one here engaging in short talks just to clear my thinking.
[15:23:38] fedexo: has joined #RubyOnRails
[15:23:46] mwlang: btw, Sunspot + Solr are totally rockin??? ??? so much easier to set up and use than it was circa 2007
[15:24:16] ritic: has joined #RubyOnRails
[15:25:03] tubbo: mwlang: did they update their shitty UI? :D
[15:25:04] slash_nick: dont forget the other lucene based full text search solution to come out since 2007... elasticsearch
[15:25:42] slash_nick: tubbo: it's apache, right? i'm sure it's as pretty as the rest of their stuff
[15:26:03] mwlang: With Sunspot???s pagination facitlity is there any need for kaminari or other pagination gems? Seems pretty straightforward to just style it up with a couple of partials.
[15:26:23] mwlang: tubbo: I have no idea. I don???t even remember having a UI back then. Just all command line.
[15:26:47] mwlang: It looks ok nowadays, but not terribly useful other than to get some basic system stats.
[15:26:57] tubbo: yeah not sure if it did, i know ~2009 it did because i used it. that said, having "a place to go" to do query experimentation is one thing i miss from the Solr days, now that i'm on elasticsearch...
[15:27:32] slash_nick: tubbo: do you install marvel in your dev env?
[15:27:40] skinux: has joined #RubyOnRails
[15:27:45] manuelmesson: has joined #RubyOnRails
[15:28:33] xm32x: has joined #RubyOnRails
[15:28:40] sarabenali: has joined #RubyOnRails
[15:28:43] Cache_Money: has joined #RubyOnRails
[15:28:52] tubbo: slash_nick: nope, never heard of it.
[15:29:13] disgrntld: has joined #RubyOnRails
[15:29:17] tubbo: i'd google but i really don't know what it's for and don't feel like sifting through marvel comics :P
[15:29:27] eikood: has joined #RubyOnRails
[15:29:40] northfurr: has joined #RubyOnRails
[15:29:58] slash_nick: tubbo: the marvel plugin for elastic is free for development... it includes what was the sense plugin, which is great scratchpad for creating searches/aggregations/puts/posts/whatevers...
[15:31:22] slash_nick: tubbo: the cool thing is there's a little input at the top when you're using marvel... normally it's pointed at localhost:9200, but you can point it at abc.def.ghi.jkl:wxyz or whatever
[15:32:45] slash_nick: (so use it in dev, on prod data)
[15:33:06] tubbo: slash_nick: tried to install, failed.
[15:33:15] annlewis: has joined #RubyOnRails
[15:33:27] tubbo: oh wait i'm using 1.6
[15:33:29] slash_nick: hmm.. latest es?
[15:33:32] tubbo: wtf ES stop updating so fucking qucik
[15:33:36] slash_nick: do we have to call it E? now?
[15:33:52] tubbo: elastic-obsolete
[15:33:59] tubbo: elastic-dependency-hell
[15:34:33] tubbo: wtf so i can't use Marvel unless i'm on ES2?
[15:35:02] slash_nick: i'd imagine there's a version of marvel matching the version you're running...
[15:35:38] tubbo: slash_nick: nope. just 2.0 and 1.3, and the 1.3 docs don't point anywhere. https://www.elastic.co/guide/en/marvel/current/installing-marvel.html
[15:36:08] ashleyw: has joined #RubyOnRails
[15:36:13] slash_nick: damn... was thinking bin/plugin --url file:///path/to/plugin --install plugin-name
[15:36:17] slash_nick: just find the file :/
[15:36:44] Guest53: has joined #RubyOnRails
[15:36:58] nettoweb: has joined #RubyOnRails
[15:37:00] kohgpat: has joined #RubyOnRails
[15:37:00] slash_nick: maybe https://github.com/elastic/sense , tubbo
[15:37:09] tubbo: slash_nick: did you upgrade from 1.6 to 2.0?
[15:37:16] tubbo: or 1.x to 2.0?
[15:37:24] stamina: has joined #RubyOnRails
[15:38:12] n1ck7: has joined #RubyOnRails
[15:38:30] tw1sted: has joined #RubyOnRails
[15:38:34] leifcr: has joined #RubyOnRails
[15:39:14] rikkipitt: has joined #RubyOnRails
[15:39:41] slash_nick: looks like we're on 1.7 in prod... which means i would've been developing with 1.7
[15:39:46] rikkipitt: has anyone got any experience with Apartment and Delayed_Jobs?
[15:39:59] slash_nick: more recently though, i've played with elasticsearch's more current versions... including the new kibana
[15:40:21] slash_nick: rikkipitt: we use the first... we use sidekiq for the last
[15:40:41] tubbo: slash_nick: interesting
[15:40:42] Cache_Money: has joined #RubyOnRails
[15:40:43] rikkipitt: thanks slash_nick, looks like I might have to change to sidekiq
[15:41:18] slash_nick: rikkipitt: not sure why you'd have to... what problems are you having?
[15:42:07] rikkipitt: i've not tried yet, but the Apartment gem has removed delayed_job integration apparently, looks like they weren't compatible...
[15:42:46] slash_nick: lol, yeah they recommend sidekiq... didn't know that
[15:43:00] arup_r: has joined #RubyOnRails
[15:45:24] arup_r: default javascript lib in rails ?
[15:45:34] EminenceHC: has joined #RubyOnRails
[15:46:19] arup_r: well got it
[15:47:38] tuelz: has joined #RubyOnRails
[15:47:52] sniperhaxor: yo guys, i don't get why i can't generate this controller: https://gist.github.com/anonymous/4272198e1c517e5fbe1b
[15:47:59] Motoservo: has joined #RubyOnRails
[15:48:12] sniperhaxor: it says that it's identical or something, and when i check to see if it created my files they aren't there
[15:48:26] rikkipitt: slash_nick, I might just pass in the tenant to each job and switch to it before the job runs... that should work. I hope.
[15:48:49] sniperhaxor: There should be a page controller in my controllers folder
[15:50:19] slash_nick: rikkipitt: sounds like it would... i guess apartment used to provide some built in dsl for delayed jobs, but now you have to DIY?
[15:50:40] rikkipitt: sounds like it to me too
[15:51:03] nogic: has joined #RubyOnRails
[15:51:09] rikkipitt: i've not used sidekiq yet, looks nice. i might try to carry on and see if I can get DJ working first
[15:51:18] MartinElvar: has joined #RubyOnRails
[15:51:35] havenwood: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[15:51:58] Maletor: has joined #RubyOnRails
[15:52:25] slash_nick: i like sidekiq... mostly because of sideTIQ's logo
[15:52:39] bricker: has joined #RubyOnRails
[15:54:21] smathy: Shame that DJ never really stabilized their redis backend.
[15:54:35] nettoweb: has joined #RubyOnRails
[15:54:52] EminenceHC: has joined #RubyOnRails
[15:57:38] jtb__: has joined #RubyOnRails
[15:58:55] chridal: has joined #RubyOnRails
[15:59:39] shibabu: has joined #RubyOnRails
[15:59:43] towski_: has joined #RubyOnRails
[16:00:25] tubbo: smathy: TIL they attempted a redis backend...
[16:00:39] sniperhaxor: Guys, what gives. I'm destroying and creating controllers in rails but my files are not appearing where they should be? I'm probably missing something simple here: https://gist.github.com/anonymous/78924b30af3cd3519124
[16:00:58] mikeharris22: has joined #RubyOnRails
[16:01:04] tubbo: sniperhaxor: what's `which rails` say?
[16:01:15] tubbo: sniperhaxor: should probably be /home/rails/ericremake/bin/rails
[16:01:41] kitsuneyo: has joined #RubyOnRails
[16:02:26] Motoservo: has joined #RubyOnRails
[16:02:35] hmsimha_: has joined #RubyOnRails
[16:03:41] Jasaka: has joined #RubyOnRails
[16:03:43] Axilla: has joined #RubyOnRails
[16:05:21] noodman: has joined #RubyOnRails
[16:05:23] startupality: has joined #RubyOnRails
[16:06:10] ruurd: has joined #RubyOnRails
[16:06:54] mrtomme: has joined #RubyOnRails
[16:07:30] stevenw_: has joined #RubyOnRails
[16:07:44] mary5030: has joined #RubyOnRails
[16:08:04] btriley: has joined #RubyOnRails
[16:08:56] Cache_Money1: has joined #RubyOnRails
[16:09:20] notnoyyyyy: Hello . i should learn ruby before ruby on rails ?
[16:09:59] greengriminal: has joined #RubyOnRails
[16:11:16] nettoweb: has joined #RubyOnRails
[16:12:23] smathy: notnoyyyyy, yes.
[16:13:26] yogeshwar_: has joined #RubyOnRails
[16:13:43] willardg: has joined #RubyOnRails
[16:14:20] willardg: Anyone work with aws s3 much?
[16:14:37] bmalum_: has joined #RubyOnRails
[16:14:38] willardg: I've got it set up and working, I'm just trying to add sse to it.
[16:14:58] notnoyyyyy: smathy , thank you . xD
[16:15:08] chridal: has joined #RubyOnRails
[16:15:30] ktchup: has joined #RubyOnRails
[16:15:54] chipotle: has joined #RubyOnRails
[16:16:44] roxtrongo: has joined #RubyOnRails
[16:17:12] chills42: has joined #RubyOnRails
[16:19:13] startupality: has joined #RubyOnRails
[16:19:56] Motoservo: has joined #RubyOnRails
[16:21:07] russellx: has joined #RubyOnRails
[16:21:20] youngbaks: has joined #RubyOnRails
[16:21:56] mikeharris22: has joined #RubyOnRails
[16:22:18] manuelmesson: has joined #RubyOnRails
[16:22:23] willardg: http://codeshare.io/iIU1c
[16:22:36] chridal: has joined #RubyOnRails
[16:22:41] oscarb92: has joined #RubyOnRails
[16:24:33] bmalum: has joined #RubyOnRails
[16:24:58] uris: has joined #RubyOnRails
[16:25:04] darrencauthon: has joined #RubyOnRails
[16:25:38] dikaio: has joined #RubyOnRails
[16:25:46] psyonix: If I'm trying to compare Time.new to a specific time, (like, 12pm for example), what's the correct way to run the check?
[16:26:02] nertzy: has joined #RubyOnRails
[16:26:05] psyonix: if Time.new > _______
[16:26:16] arup_r: copare both Time objects
[16:26:31] arup_r: compare**
[16:26:47] psyonix: do I want the time I'm comparing it to be an integer?
[16:26:59] psyonix: or is it Time.new > Time.__
[16:27:06] leifcr: has joined #RubyOnRails
[16:27:28] bricker: psyonix: Look up the documentation for Time.new, you can initialize it with a specific time
[16:27:36] bricker: Time.new(2015, 10, 30, ...)
[16:28:04] oscarb92: hello, I'm having a weird issue with a model object, when I assign it to a variable to fill it in a form with @model = Model.new it returns an object to the view with no attributes (instead of nil attributes)
[16:28:07] psyonix: so i can specify it in an argument
[16:28:27] psyonix: thanks guys
[16:29:04] smathy: oscarb92, does it do the same thing in `rails console` ?
[16:29:23] darrencauthon: has joined #RubyOnRails
[16:30:13] psyonix: is there a way to omit the date, or make it use the specified time without specifying a date?
[16:31:39] shinnya: has joined #RubyOnRails
[16:31:41] safety_cut: has joined #RubyOnRails
[16:31:43] nemo_: has joined #RubyOnRails
[16:31:55] vs13: has joined #RubyOnRails
[16:31:58] smathy: psyonix, only by breaking out the time parts separately, eg into a string using strftime.
[16:32:18] nemo_: has joined #RubyOnRails
[16:32:20] smathy: psyonix, there's no built in object that represents a time independent of the date.
[16:32:48] psyonix: got it, thanks!
[16:33:29] bablu: has joined #RubyOnRails
[16:33:41] noodman_: has joined #RubyOnRails
[16:33:41] nettoweb: has joined #RubyOnRails
[16:34:02] annlewis: has joined #RubyOnRails
[16:34:47] bricker: oscarb92: show your code and the problem it's causing please
[16:35:07] chridal: has joined #RubyOnRails
[16:35:27] matthewd: psyonix: Also note time-without-date can be a tricky concept because of time zones, though that may not matter if you're only using it for limited purposes
[16:36:26] lacuna_: has joined #RubyOnRails
[16:36:34] smathy: psyonix, further to what matthewd said, if you're really just recording a "time of day" sort of thing, independent of the date etc., then you might be better off just storing it as a string.
[16:36:46] smathy: (because that's, honestly, all it is at that point)
[16:37:25] russellx: has left #RubyOnRails: ()
[16:37:44] psyonix: that might be easier, then I can have it remove the date from the string
[16:37:52] Motoservo: has joined #RubyOnRails
[16:38:18] safety_cut: has joined #RubyOnRails
[16:40:37] bonhoeffer: has joined #RubyOnRails
[16:40:41] pwnd_nsfw: has joined #RubyOnRails
[16:41:59] jtb__: has joined #RubyOnRails
[16:42:16] oscarb92: smathy: it does the same thing
[16:42:43] shinobi_: has joined #RubyOnRails
[16:42:48] smathy: oscarb92, !gist your rails console session and the model please
[16:42:48] helpa: oscarb92: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[16:42:51] unreal: has joined #RubyOnRails
[16:44:21] lxsameer: has joined #RubyOnRails
[16:44:21] lxsameer: has joined #RubyOnRails
[16:44:59] chridal: has joined #RubyOnRails
[16:48:35] EminenceHC: has joined #RubyOnRails
[16:49:04] mikeharris22: has joined #RubyOnRails
[16:49:24] _djbkd: has joined #RubyOnRails
[16:49:49] oscarb92: smathy bricker helpa https://gist.github.com/OscarBastardo/f31e3bbb2a1ac0bd63b0
[16:50:04] Motoservo: has joined #RubyOnRails
[16:50:39] smathy: oscarb92, I wanted the `rails console` session showing you creating your new ReprogramacionCita
[16:50:44] dmarr: with f.collection_select, is there a way to stub in a default choice which isn't in the collection that is being fetched?
[16:50:58] dmarr: (sorry asked this last night and walked away)
[16:51:53] dmarr: i basically want to unshift a blank value with a 'select one' label onto the collection which my select is built from
[16:52:51] slash_nick: dmarr: why not use the prompt feature? dmarr which form helper are you using for your selec?
[16:53:05] dmarr: slash_nick: that may be what i want
[16:53:12] dmarr: i'm using collection_select
[16:53:54] dmarr: i'd want to customize that prompt value
[16:54:02] slash_nick: dmarr: http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/collection_select#183-Customizing-prompt
[16:54:16] oscarb92: smathy https://gist.github.com/OscarBastardo/f31e3bbb2a1ac0bd63b0#file-console-rep
[16:54:25] arup_r: every thing isdocumented
[16:54:41] slash_nick: prompt: true for generic... prompt: "This is a custom prompt" for custom
[16:55:12] nettoweb: has joined #RubyOnRails
[16:55:17] multiscan: has joined #RubyOnRails
[16:55:24] bmalum: has joined #RubyOnRails
[16:55:30] jottr: has joined #RubyOnRails
[16:57:20] smathy: oscarb92, so it's not even making a query against the DB.
[16:57:43] EminenceHC: has joined #RubyOnRails
[16:58:11] smathy: oscarb92, I see that the first four statements in your controller trigger four SQL SP calls.
[16:58:17] arthurix_: has joined #RubyOnRails
[16:58:30] smathy: oscarb92, seems like however you've configured those models to do that, you've not done for ReprogramacionCita
[16:58:34] shibabu: has joined #RubyOnRails
[16:58:36] Motoservo: has joined #RubyOnRails
[16:59:10] oscarb92: smathy I just followed Rails conventions and they worked
[16:59:32] oscarb92: smathy though I think it might be a pluralization issue because of the spanishy model name
[16:59:46] smathy: oscarb92, well maybe that reprogramacion_citas table doesn't exist in your DB.
[17:00:00] nettoweb: has joined #RubyOnRails
[17:00:00] oscarb92: smathy, it does
[17:00:04] smathy: oscarb92, well you can test that by running: ReprogramacionCita.table_name
[17:00:54] oscarb92: smathy that should be the exact table name?
[17:01:16] oscarb92: it's singular :o
[17:01:54] smathy: oscarb92, so you can either fix that in inflections - or change your table name.
[17:02:07] btriley: has joined #RubyOnRails
[17:02:30] colleenmcguckin: has joined #RubyOnRails
[17:02:51] aevitas: has joined #RubyOnRails
[17:03:15] armyriad: has joined #RubyOnRails
[17:03:43] Tref: has joined #RubyOnRails
[17:04:02] ustrajunior: has joined #RubyOnRails
[17:04:03] oscarb92: smathy: ok, thank you very much
[17:04:05] Tref: Where???s the best / most common place to implement custom validators in Rails 4?
[17:04:14] smathy: oscarb92, you're welcome.
[17:04:17] umgrosscol: has joined #RubyOnRails
[17:04:27] smathy: tref, depends on how generic it is.
[17:04:40] Tref: smathy: its a URL validator
[17:06:35] mois3x: has joined #RubyOnRails
[17:06:51] Tref: I tried putting one inside controllers/concerns and including it in my controller and im getting an undefined method ???include???
[17:06:58] Tref: which I thought was strang
[17:07:33] techsethi: has joined #RubyOnRails
[17:07:39] srinidhi: has joined #RubyOnRails
[17:08:03] maxscam1: has joined #RubyOnRails
[17:08:09] smathy: tref, sure is :)
[17:08:17] smathy: tref, !gist your code and the error about include
[17:08:17] helpa: tref: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:08:44] maxscam1: does anyone know of a http client that doesn't throw errors when it gets 404, 422, 500, etc? im using rest client now
[17:08:48] marr: has joined #RubyOnRails
[17:09:11] tubbo: maxscam1: Net::HTTP
[17:09:21] maxscam1: thanks tubbo
[17:09:58] Cervajz: has joined #RubyOnRails
[17:10:14] RegulationD: has joined #RubyOnRails
[17:10:25] smathy: That's just mean.
[17:10:52] tubbo: smathy: what is?
[17:11:17] Tref: when I pasted it into github it looks like there were some special characters before my include statement
[17:11:18] smathy: tubbo, Net::HTTP is the lowest level lib you could point him to, so awkward.
[17:11:31] smathy: tref, good catch :)
[17:11:31] Tref: I removed them and the error is gone
[17:11:35] The_Phoenix: has joined #RubyOnRails
[17:11:38] sudiptamondal: has joined #RubyOnRails
[17:11:54] tubbo: smathy: start from the bottom, now you're here.
[17:12:05] Tref: This might sound like a dumb question but can classes be included in the same way that modules can?
[17:12:17] smathy: tubbo, I'd have gone with httparty
[17:12:24] smathy: tref, no.
[17:12:29] slash_nick: smathy: scatter
[17:12:34] tubbo: smathy: i like using net/http actually
[17:12:42] tubbo: faraday is also neat because you can switch out drivers
[17:12:46] Tref: smathy: that???s strange since class inherits from module
[17:12:50] smathy: tubbo, you're wrong :)
[17:12:53] slash_nick: tubbo: it's what i use in api wrappers, net/http
[17:13:09] slash_nick: but... scatter is really cool - https://github.com/jondot/scatter ... haven't used it, but it's cool
[17:13:24] tubbo: smathy: not sure what you mean. https://github.com/lostisland/faraday
[17:13:29] tubbo: Faraday supports these adapters:
[17:13:30] tubbo: Net::HTTP (default)
[17:13:32] tubbo: Net::HTTP::Persistent
[17:13:40] tubbo: EventMachine
[17:13:42] tubbo: HTTPClient
[17:14:28] sniperhaxor: tubbo: sorry for this late response 'which rails' says: /usr/local/rvm/gems/ruby-2.2.1/bin//rails
[17:14:29] willardg: has joined #RubyOnRails
[17:14:40] Motoservo: has joined #RubyOnRails
[17:15:04] tubbo: sniperhaxor: yeah i don't even remember what we were talking about
[17:15:08] chridal: has joined #RubyOnRails
[17:15:26] sniperhaxor: I'll just reask the question then:
[17:15:28] sniperhaxor: Guys, what gives. I'm destroying and creating controllers in rails but my files are not appearing where they should be? I'm probably missing something simple here: https://gist.github.com/anonymous/78924b30af3cd3519124
[17:16:04] bmalum: has joined #RubyOnRails
[17:16:24] tubbo: sniperhaxor: ah i see. that output is bullshit. vim would not output a list of files in a directory, it would open up vim.
[17:16:27] manuelmesson: has joined #RubyOnRails
[17:16:39] tubbo: sniperhaxor: use `ls app/controllers` to see what's in there and add it to the gist
[17:16:59] sniperhaxor: uh, i still don't see my controller there
[17:17:08] tubbo: sniperhaxor: try `bundle exec rails` maybe?
[17:17:42] RockLee: has joined #RubyOnRails
[17:17:58] sniperhaxor: i don't really get what they is supposed to do
[17:18:49] iamse7en: has joined #RubyOnRails
[17:18:54] tubbo: sniperhaxor: well, there are two things going on. either a.) you are not giving me all of the information (which is the most likely given you're new to this, there might be warnings or output that you get that you've been disregarding or something), or b.) these files are being generated in the wrong directory.
[17:19:02] tubbo: sniperhaxor: one of two things*
[17:19:15] rakm: has joined #RubyOnRails
[17:19:59] dmarr: if I have an instance variable in my application controller: @current_user, i'd like to access it in a view, but = f.hidden_field :user, current_user.id and = f.hidden_field :user, @current_user.id both raise erros
[17:20:37] sniperhaxor: tubbo: i think it's b
[17:20:50] sniperhaxor: i see the controller in some other rails project i think
[17:21:09] tubbo: sniperhaxor: lol well then there ya go. i think `bundle exec` will force it to be a part of *this* rails project. or you can use bin/rails
[17:21:36] sniperhaxor: who da what what?
[17:21:44] cs44: has joined #RubyOnRails
[17:21:57] cs44: has left #RubyOnRails: ()
[17:21:58] sniperhaxor: so if i'm in the rails project that I want to make the controller
[17:22:03] sniperhaxor: i can do bundle exec
[17:22:24] sniperhaxor: but if i do simply rails g controller blah blah it will go to a different project depending on how something is set up?
[17:22:30] AzaToth: has joined #RubyOnRails
[17:22:40] tw1sted: has joined #RubyOnRails
[17:23:08] smathy: tref, the association between Module and Class (and Object & BasicObject) is probably not somewhere you want to draw inferences based on strict OO principles from.
[17:23:20] tubbo: sniperhaxor: not normally. something is fucked up in your $PATH or whatever
[17:23:27] sniperhaxor: how do i change tha
[17:23:34] tubbo: sniperhaxor: sounds like you're using RVM, and i haven't really worked with RVM in a while.
[17:23:38] tubbo: so i might not be able to help you here
[17:24:24] thams: has joined #RubyOnRails
[17:24:43] Motoservo: has joined #RubyOnRails
[17:25:28] dmarr: basically i want the hidden_field to pull from current_user.id, but the object its working on is a bug
[17:26:20] dekhaus: has joined #RubyOnRails
[17:26:36] smathy: dmarr, http://devdocs.io/rails/actionview/helpers/formbuilder#method-i-hidden_field look at the method signature.
[17:26:40] tubbo: dmarr: you sure you want to do that? somewhat insecure if you ask me
[17:26:51] dmarr: maybe so tubbo
[17:27:11] dmarr: i guess i'd want to inject it during time of .save
[17:27:18] tubbo: well if you control the endpoint (e.g., this form is just POSTing to a controller's create action), you might want to think about not allowing the form to set this data and forcing the user to be current_user
[17:27:22] tubbo: yeah basically
[17:27:27] tubbo: right before you save it, you force the user to be current_user
[17:27:39] tubbo: otherwise if i knew your user.id, i could just POST stuff "as you".
[17:27:45] mikecmpbll: has joined #RubyOnRails
[17:28:43] youngbaks: has joined #RubyOnRails
[17:28:46] dmarr: right, i do have control of the endpoint. i just want to associate a bug with their currently logged in user
[17:29:18] dmarr: maybe i don't want that: params.require(:bug).permit(:description, :flow_id, :screenshot, :user_id)
[17:29:38] dmarr: the :user_id symbol i guess wouldn't be passed in?
[17:29:41] tubbo: dmarr: yeah you probably do want that, you want to know who reported the bug.
[17:29:47] tubbo: dmarr: but assigning it to someone is a different story
[17:29:51] thams: has joined #RubyOnRails
[17:30:05] dmarr: and then in create how would i get the current_user.id in there? @bug = Bug.new(bug_params)
[17:30:11] tubbo: yeah, the params.permit() there shouldn't have :user_id if you don't want people to be able to set that themselves.
[17:30:21] tubbo: dmarr: @bug.user = current_user, you know like normal :D
[17:30:31] lorn: has joined #RubyOnRails
[17:30:43] dmarr: perfect :)
[17:31:33] RegulationD: has joined #RubyOnRails
[17:31:57] maxscam1: how to i make devise stop saying "You need to sign in or sign up before continuing." for my registration url
[17:32:14] thams: has joined #RubyOnRails
[17:32:59] tlarevo: has joined #RubyOnRails
[17:33:32] chridal: has joined #RubyOnRails
[17:33:38] asianMike: has joined #RubyOnRails
[17:33:47] maxscam1: i feel like i shouldn't have used devise
[17:34:07] smathy: maxscam1, you won't be the first one ;)
[17:34:29] maxscam1: smathy: i have already done a bunch of work though ...
[17:34:32] chills42: has joined #RubyOnRails
[17:34:44] annlewis: has joined #RubyOnRails
[17:34:59] VeryBewitching: has joined #RubyOnRails
[17:34:59] tubbo: maxscam1: why did you choose to use devise, and why does it not work for you right now?
[17:35:12] smathy: maxscam1, yep, that's a very common corner that a developer gets painted into.
[17:35:34] sniperhaxor: so, does anyone have any hints as to how i can do rails g controller and have it make that controller in the rails project that i want instead of one i dont?
[17:35:53] sniperhaxor: from what i can understand, it has something to do with rvm and $PATH or something
[17:35:57] maxscam1: tubbo: because it's the most popular. i mean maybe authlogic is more popular but i just picked devise because im more familiar
[17:36:17] jonee: has joined #RubyOnRails
[17:36:27] smathy: maxscam1, my advice, grab create a couple of new projects and take a quick look at, say, authlogic and sorcery. Just run them up quickly and see how complex/easy/different they are.
[17:36:37] tubbo: is authlogic really more popular?
[17:36:39] smathy: maxscam1, you'll get a good feel for them in just the couple of hours it'll take.
[17:36:41] tubbo: i know it used to be
[17:36:46] maxscam1: smathy: yeah authlogic and sorcery look so much better, but i am at work ...
[17:36:53] maxscam1: trying to get it done
[17:37:04] Guest53: has joined #RubyOnRails
[17:37:10] smathy: tubbo, I don't think so, I think devise went past it a while ago.
[17:37:20] Motoservo: has joined #RubyOnRails
[17:37:38] smathy: maxscam1, well, you have my recommendation. I'll talk to you later when you come back to tell me that you should have listened :)
[17:37:43] nettoweb: has joined #RubyOnRails
[17:37:53] maxscam1: yeah, this sucks.
[17:38:38] smathy: maxscam1, FWIW, I've been doing Rails for nearly 10 years now, programming for over 20, and I refuse to ever use devise.
[17:38:40] mikeharris22: has joined #RubyOnRails
[17:38:56] tlarevo: has left #RubyOnRails: ()
[17:38:58] tubbo: maxscam1: heh, if you're at work you kinda have to use the stack you've been given
[17:39:13] smathy: I think it's a terrible piece of software, horribly coupled to Rails, and one of those "way too magic" things that's a nightmare to actually use as a programmer.
[17:39:40] smathy: tubbo, he did seem to suggest that he chose it though.
[17:39:47] sargas: has joined #RubyOnRails
[17:39:58] beilabs: has joined #RubyOnRails
[17:40:02] chridal: has joined #RubyOnRails
[17:40:14] mikeharris22: has joined #RubyOnRails
[17:40:16] sargas: How can I turn off eager loading for a specific query?
[17:40:30] smathy: sargas, why would you care?
[17:40:38] maxscam1: im the only rails developer here , so yeah. it'd be better if it actually was 'all in one' but the 'magic' mixed with configuration is cryptic
[17:40:44] stevednd: has joined #RubyOnRails
[17:40:52] tubbo: smathy: it really depends on how much you need to dive into user auth. it's pretty easy to override things and the gem is pretty well documented.
[17:41:04] tubbo: if you don't have to fuck with it too much, devise saves a lot of time.
[17:41:08] ellisTAA: has joined #RubyOnRails
[17:41:29] sargas: smathy: I'm using secretary-rails to track user changes, and when a user is deleted, the page still tries to query those ids
[17:41:32] tubbo: we *probably* could have used it at work, but it was easier to just write the thing ourselves since we had some strange checkout-related user auth issues that devise would suck at
[17:41:36] smathy: tubbo, (a) I don't really think it saves that much time and (b) I've never had a project which didn't require diving in at some point.
[17:41:45] sargas: smathy: I'm guessing because of eager loading
[17:42:04] smathy: ...and using devise generally just means that those cool things are too complex/expensive and so don't get done.
[17:42:06] sargas: smathy: In development I don't have that problem, because a new query is made every time
[17:42:18] tubbo: smathy: sometimes, yeah
[17:42:28] smathy: sargas, well eager loading runs in dev too, sounds more like caching.
[17:42:33] smathy: sargas, !code please
[17:42:33] helpa: sargas: 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:42:39] tubbo: i've found it pretty useful for my own applications
[17:42:48] tubbo: but yeah, i don't see it used very well on the large-scale
[17:42:50] sargas: helpa: Doing it
[17:43:00] tubbo: at that point though? wtf are you doing using gems that are THAT big
[17:43:20] smathy: tubbo, sorcery isn't big.
[17:43:35] tubbo: smathy: that's not what i was talking about
[17:43:43] tubbo: smathy: devise, active_admin, et. al.
[17:43:48] tubbo: gems that give you "the whole kit and kaboodle"
[17:43:55] nemo_: has joined #RubyOnRails
[17:43:57] tubbo: rather than just a component you can use to build your own kit and kaboodle
[17:44:55] smathy: Oh right, yeah, but once you begin with devise, ugh for switching (although I've done that several times too ;)
[17:44:57] maxscam1: has joined #RubyOnRails
[17:45:02] chridal: has joined #RubyOnRails
[17:45:12] smathy: ...but yeah, your above comments are basically why I never use devise.
[17:45:22] smathy: I don't begin with it because more often than not the projects I work on get big.
[17:45:32] nettoweb: has joined #RubyOnRails
[17:45:38] smathy: "Oh, you want SSO integrated with your legacy system, with an API auth for your CMS, but transitioning users from the old SHA hash to a new scrypt? No problem, we're using sorcery so I can see all the code and can make that happen for you."
[17:46:59] tubbo: i tend to agree
[17:47:16] sargas: Here it is guys: https://gist.github.com/andradei/bf2b165df384d24162c4
[17:47:32] tubbo: i mean, with HasSecurePassword and bcrypt, all the win of devise is just its UI, and maybe the emailing features. so if you aren't using that...it's kind-of too much
[17:51:36] FungalRaincloud: has joined #RubyOnRails
[17:51:57] psyonix: is there a way I can have this run once a minute? https://gist.github.com/psyonix/3ed9ab3743472a63d023
[17:52:02] mrtomme: has joined #RubyOnRails
[17:52:04] smathy: sargas, so the problem here is that @changes still has an object with a user_id method even for a deleted user?
[17:52:05] Diabolik: are methods declared in helpers accessible in the controller?
[17:52:14] colleenmcguckin: has joined #RubyOnRails
[17:52:33] smathy: psyonix, cron
[17:52:42] sargas: So I'm wondering why in dev the index page works after deleting a user, while in prod it will give me a 404
[17:52:53] sargas: smathy: Yes ^
[17:53:02] gaussblurinc1: has joined #RubyOnRails
[17:53:04] smathy: Diabolik, if you pull them in: http://devdocs.io/rails/abstractcontroller/helpers/classmethods#method-i-helper
[17:53:21] youngbaks: has joined #RubyOnRails
[17:53:31] smathy: sargas, no idea but I would actually expect the results of Version.recent_changes to include the information about what was deleted.
[17:53:34] sargas: smathy: should I include a check the see if user_id exists?
[17:53:42] smathy: sargas, isn't that the point?
[17:54:09] smathy: sargas, I'd imagine that there's a better way to determine if one of the objects in that collection represents a deleted resource in your DB.
[17:54:24] sargas: smathy: I see, don't know how to track deletions on secretary though..., and the fact it works fine on dev and not in prod is still a mystery to me
[17:55:00] sargas: smathy: yeah, I need to devise something (no pun intended) to get this working properly in prod
[17:55:24] sargas: smathy: I thought it was an eager loading issue for the longest time
[17:55:43] bmalum: has joined #RubyOnRails
[17:55:55] dekhaus: I'm using Curb to write a script that is meant to simulate a user interacting with a secure web service. This first task is to login and save the session id/token to a cookie file. While my script is able to send a POST request to a my apps sessions controller - no cookie file is being saved. What's weird is when I do a get request (from amazon - not my app) - a cookie file is create. Here's a pastie of my sessions_controlle
[17:56:10] sargas: sorry, not an issue, but a case where I wouldn't want it
[17:56:11] dekhaus: pastie -> http://pastie.org/10518596
[17:56:29] smathy: sargas, it's a mystery to me, maybe what constitutes a *recent* change in prod is different.
[17:56:35] dekhaus: The GET request writes a cookie to the cookie file - but the POST does not. Why not ??? Thx DAve
[17:57:19] Motoservo: has joined #RubyOnRails
[17:57:56] Tref: has joined #RubyOnRails
[17:59:42] thams: has joined #RubyOnRails
[17:59:56] smathy: sargas, I've never used secretary before, I know that in papertrail an `event` attribute is recorded for each change, and so for deleted records it'll be `event: "destroy"`
[18:00:44] sargas: smathy: Should've gone with that... secretary was simpler when I was just learning Rails... now it is biting me :)
[18:01:05] adre: has joined #RubyOnRails
[18:01:09] sargas: plus it hasn't been on active development since I released
[18:01:20] sniperhaxor: hey guys i try to do rake db:migrate but my pg says no password provided? https://gist.github.com/anonymous/a6dda56ef4cd3d08bd54
[18:01:28] nogic: has joined #RubyOnRails
[18:02:35] kitsuneyo: has joined #RubyOnRails
[18:03:18] smathy: sargas, yeah, paper trail, audited, vestal - those are all good. I've never heard of secretary.
[18:03:24] bricker: has joined #RubyOnRails
[18:03:42] smathy: sargas, as I recommended to the devise guy, I'd switch now - before it causes you even more pain.
[18:03:53] aevitas: has joined #RubyOnRails
[18:04:05] sargas: smathy: I'll put it on my todo list to get it moved over. Thanks for the help
[18:04:13] smathy: sargas, you're welcome.
[18:04:45] btriley: has joined #RubyOnRails
[18:05:09] marahin: has joined #RubyOnRails
[18:05:44] marahin: Hello. I'm supposed to use es6 in my project, however I'm not sure how to enable compiling es6 assets in Rails. I have downloaded babel-transpiler, yet it doesnt seem to compile my .es6 javascript. What do?
[18:05:56] tubbo: marahin: how do
[18:06:03] marahin: tubbo: my mistake :-)
[18:06:09] tubbo: marahin: :D it's cool i think you use sprockets-es6
[18:06:19] tubbo: it's a gem
[18:06:25] gregf_: has joined #RubyOnRails
[18:06:28] marahin: uh-huh, let me try this
[18:08:10] mikeharris22: has joined #RubyOnRails
[18:08:16] TDJACR: has joined #RubyOnRails
[18:09:10] TheNet: has joined #RubyOnRails
[18:09:46] wldcordeiro: has joined #RubyOnRails
[18:10:31] manuelmesson: has joined #RubyOnRails
[18:11:44] psyonix: @smathy thanks, but I was looking for something simpler than that. Think I figured it out.
[18:11:44] psyonix: https://gist.github.com/psyonix/3ed9ab3743472a63d023
[18:11:59] kitsuneyo: has joined #RubyOnRails
[18:12:52] smathy: psyonix, k
[18:13:12] mary5030: has joined #RubyOnRails
[18:13:30] smathy: sniperhaxor, and you think you did configure a password?
[18:13:50] sniperhaxor: smathy: is this referring to my database.yml file?
[18:14:00] sniperhaxor: i didn't create a password
[18:14:09] pixelhan_: has joined #RubyOnRails
[18:14:14] adre: has joined #RubyOnRails
[18:14:15] sniperhaxor: i'm using a vps service that had a prepackaged rails configuration
[18:14:58] sniperhaxor: all the passwords in my database.yml file have <%= ENV['APP_DATABASE_PASSWORD'] %>
[18:15:05] Motoservo: has joined #RubyOnRails
[18:15:06] marahin: tubbo: what am I supposed to do after adding it to Gemfile? I did rake assets:clean && rake assets:precompile, still, however, it's uncompiled pure es6.
[18:15:20] rubyonrailed: has joined #RubyOnRails
[18:16:34] rubyonrailed: the `organization` and `admin_user` are both available in this method. Does anyone know why the string interlopation is not working? https://gist.github.com/JasonMannon/b9904524e31faba64b19
[18:16:49] Eminence_: has joined #RubyOnRails
[18:17:35] FailBit: because interpolation is disabled in single quote strings
[18:17:40] FailBit: use a heredoc instead
[18:17:46] colleenmcguckin: has joined #RubyOnRails
[18:18:30] Diabolik: when using Liquid, do all liquid methods have to go into the model?
[18:18:40] Diabolik: can i put them somewhere else, like a helper or a lib file
[18:18:45] smathy: sniperhaxor, so did you configure those environment variables?
[18:19:17] youngbaks: has joined #RubyOnRails
[18:20:18] smathy: rubyonrailed, what's the unexpected behavior you're getting?
[18:20:33] marahin: Any help? How to setup sprockets-es6 to compile .es6?
[18:21:08] smathy: sniperhaxor, you'll need to, unless the VPS is meant to have set them somewhere, read their stuff or contact them for how to do this.
[18:21:15] rubyonrailed: smathy: https://gist.github.com/JasonMannon/658cda71a9397d7dea15
[18:21:32] sniperhaxor: sniperhaxor: the VPS did set them
[18:21:41] rubyonrailed: Well theres the parsing error, but i'm worried about the string
[18:21:49] sniperhaxor: smathy: when I log onto the vps i see the password and username
[18:22:04] sniperhaxor: i think i read that it changes daily though
[18:22:18] sniperhaxor: i'm not sure why it doesn't work when i do rake db:migrate
[18:22:43] smathy: rubyonrailed, oh I see what FailBit was getting at now, you have two places where you're expecting interpolation to happen, the first is fine, but the second is contained in single quotes, as FailBit said. No interpolation there.
[18:22:56] sniperhaxor: besides, it is saying no password supplied..
[18:22:57] FailBit: like I said
[18:23:00] FailBit: use a heredoc
[18:23:05] smathy: sniperhaxor, lines 15 and 11 of your gist.
[18:23:30] rubyonrailed: FailBit: Thanks
[18:23:54] smathy: sniperhaxor, I would actually recommend something slightly different to FailBit - I'd make an actual Ruby hash, and then call to_json on it to make it a JSON string.
[18:24:28] craysiii: has joined #RubyOnRails
[18:24:55] FailBit: smathy: that won't preserve the indentation
[18:25:02] mikeharris22: has joined #RubyOnRails
[18:25:45] FailBit: but yes, you could do that, sure.
[18:25:56] FailBit: as long as you parse the response body as well
[18:25:58] smathy: FailBit, correct, but if that's important then I'd rework the test logic because that's horribly fragile.
[18:26:04] sniperhaxor: smathy: i don't get what you mean
[18:26:06] jsrn_: has joined #RubyOnRails
[18:26:12] sniperhaxor: are you saying there is some sort of block in my connection?
[18:26:31] smathy: sniperhaxor, go with what you understand, if you understand using the heredoc then just do that.
[18:26:44] FailBit: s/sniperhaxor/rubyonrailed
[18:27:14] smathy: sniperhaxor, omg, sorry, I got confused between people :)
[18:27:17] FailBit: sniperhaxor: the error gist tends to indicate exactly what it refers to
[18:27:24] FailBit: *in that gist
[18:27:36] Motoservo: has joined #RubyOnRails
[18:27:48] ibouvousaime: has joined #RubyOnRails
[18:28:19] smathy: sniperhaxor, I'm saying that your database.yml requires an environment variable to be set, that has to be set "above" your rails app. If you haven't set that then there's no way Rails can connect to the DB.
[18:28:51] sniperhaxor: so the database.yml is 'above' my rails app right?
[18:29:27] smathy: sniperhaxor, and if it's your VPS that is setting that database.yml to what it is, then it's best to contact them to find out how to set that in their environment.
[18:29:56] smathy: sniperhaxor, no, the app server is above your rails app, like passenger/unicorn/puma/whatever is running your Rails app.
[18:30:44] DiCablo: has joined #RubyOnRails
[18:31:13] sniperhaxor: so i need to tell unicorn the password?
[18:31:21] sniperhaxor: this is my database.yml file if it helps
[18:31:22] sniperhaxor: https://gist.github.com/anonymous/35c10f02d02df045edcd
[18:32:10] smathy: sniperhaxor, sorry, I can't make this any clearer. You need to talk to your VPS. If you want the Rails answer: "just set the password in your database.yml" - but you've already explained that your VPS overwrites that.
[18:32:14] arup_r: has joined #RubyOnRails
[18:33:15] roxtrongo: has joined #RubyOnRails
[18:33:24] sniperhaxor: smathy: are you suggesting i contact VPS customer service
[18:33:38] sniperhaxor: i have a strong feeling that they will not know how to help me or i will not fall into their service conditions
[18:34:51] Motoservo_: has joined #RubyOnRails
[18:34:52] thams: has joined #RubyOnRails
[18:35:33] annlewis: has joined #RubyOnRails
[18:37:51] mh_laakso: has joined #RubyOnRails
[18:37:55] TheNet: has joined #RubyOnRails
[18:38:28] skinux: has joined #RubyOnRails
[18:38:42] sniperhaxor: smathy: anyway, i figured it out
[18:39:00] sniperhaxor: apparently that configuration variable wasn't working so i set the password manually after finding it
[18:39:18] sniperhaxor: i wouldn't have figured that out if you didn't point me in that directin
[18:40:13] colleenmcguckin: has joined #RubyOnRails
[18:41:26] n00bDev: has joined #RubyOnRails
[18:41:29] arup_: has joined #RubyOnRails
[18:43:14] dikaio: has joined #RubyOnRails
[18:43:26] smathy: sniperhaxor, you're welcome.
[18:43:44] arup_r: has joined #RubyOnRails
[18:44:52] Motoservo: has joined #RubyOnRails
[18:45:20] SteenJobs: has joined #RubyOnRails
[18:48:23] dmarr: is there a property off of the Rails object to get the server? i need to convert a relative URL into an absolute one
[18:48:53] umgrosscol: has joined #RubyOnRails
[18:48:57] Motoservo: has joined #RubyOnRails
[18:49:35] beauby: has joined #RubyOnRails
[18:50:02] mh_laakso: has left #RubyOnRails: ()
[18:51:02] meoblast001: has joined #RubyOnRails
[18:51:15] Guest53: has joined #RubyOnRails
[18:51:49] TheNet: has joined #RubyOnRails
[18:52:37] momomomomo: has joined #RubyOnRails
[18:52:42] dopamean_: has joined #RubyOnRails
[18:53:24] safety_cut: has joined #RubyOnRails
[18:53:31] dmarr: its a static file in /public i want to generate an absolute url for
[18:54:04] MrPunkin: has joined #RubyOnRails
[18:54:44] maxscam1: has joined #RubyOnRails
[18:55:03] arBmind: has joined #RubyOnRails
[18:55:33] agit0: has joined #RubyOnRails
[18:55:36] arup_r: absolute url for public assets dmarr ?
[18:55:57] dmarr: yes like the http://foo/system/1.jpg
[18:56:16] manfrin: has joined #RubyOnRails
[18:56:45] Motoservo: has joined #RubyOnRails
[18:57:16] arup_r: dmarr: there you go : http://stackoverflow.com/questions/5631145/routing-to-static-html-page-in-public
[18:59:17] dmarr: not really what i was looking for arup_r but thanks
[18:59:56] dmarr: im doing an upload, and i have a relative url like /system/foo.jpg. i need to get the public url for that (http://myserver/system/foo.jpg)
[19:00:38] arup_r: dmarr: You can create a helper for the route and then use the helper with *_path and *_url method to get relative and absolute urls respectively
[19:03:28] arup_r: you will be uploading inside a controller ? if so `request.host` will give you what you want
[19:03:39] colleenmcguckin: has joined #RubyOnRails
[19:03:44] bmalum: has joined #RubyOnRails
[19:04:41] manuelmesson: has joined #RubyOnRails
[19:04:45] aevitas: has joined #RubyOnRails
[19:05:32] cac: has joined #RubyOnRails
[19:06:15] safety_cut: has joined #RubyOnRails
[19:07:50] Scriptonaut: has joined #RubyOnRails
[19:08:03] youngbaks: has joined #RubyOnRails
[19:09:44] colleenmcguckin: has joined #RubyOnRails
[19:09:57] chills42: has joined #RubyOnRails
[19:11:59] TheNet: has joined #RubyOnRails
[19:12:22] yfeldblum: has joined #RubyOnRails
[19:12:22] thams: has joined #RubyOnRails
[19:12:29] nygrenh: has joined #RubyOnRails
[19:13:57] colleenmcguckin: has joined #RubyOnRails
[19:15:02] Cache_Money: has joined #RubyOnRails
[19:15:09] jessemcgilallen: has joined #RubyOnRails
[19:16:02] mois3x: has joined #RubyOnRails
[19:16:16] skinux: has joined #RubyOnRails
[19:16:51] momomomomo: has joined #RubyOnRails
[19:17:18] maxscam1: how do you write the session cookie headers for warden
[19:17:22] asianMike: has joined #RubyOnRails
[19:19:07] uris: has joined #RubyOnRails
[19:19:32] Diabolik: what's the best way to refactor a controller method like this using a service object?
[19:19:33] Diabolik: https://gist.github.com/askl56/7623babcdf7fb8bafc9d
[19:19:38] Diabolik: im debating doing a hexagonal refactoring
[19:20:05] quazimodo: has joined #RubyOnRails
[19:20:18] nettoweb: has joined #RubyOnRails
[19:20:19] bitkiller: has joined #RubyOnRails
[19:22:26] atmosx: Hello arup_r
[19:22:40] arup_r: atmosx: hi sir
[19:22:56] atmosx: arup_r: did youg et your laptop?
[19:23:35] arup_r: not yet, I pushed the joining date back,, so all got pushed back. But I will get
[19:23:52] pullphinger: has joined #RubyOnRails
[19:24:27] beauby: has joined #RubyOnRails
[19:24:47] rikkipitt: has joined #RubyOnRails
[19:24:55] TheNet: has joined #RubyOnRails
[19:25:40] arup_r: atmosx: I will ask any one out of this 4 http://www.amazon.com/b/ref=s9_acss_bw_cg_mba8pck_2b1?_encoding=UTF8&ie=UTF8&node=12652268011&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-top-2&pf_rd_r=144PTGSE9XF5NACJB327&pf_rd_t=101&pf_rd_p=2204676842&pf_rd_i=12652268011
[19:26:05] arup_r: Macbook air is good or Pro ?
[19:26:20] arup_r: never used.. so :)
[19:26:47] FailBit: https://i.imgur.com/TU9rUEp.png this is what happens when you fuck up a deploy
[19:26:51] atmosx: Pro is mor epowerful, air is more responsive
[19:27:01] atmosx: I think you need responsive over powerful
[19:27:10] atmosx: SSD > CPU-power
[19:27:25] atmosx: feels faster. Using SSD on the Pro is a solution but it's too expensive IIRC.
[19:27:38] atmosx: don't know abotu the new models, check out if there's SSD preinstalled
[19:28:29] _djbkd: has joined #RubyOnRails
[19:28:42] VeryBewitching: Having purchased a PC with an SSD, I would offer that the speed improvement over an HDD is worth every penny.
[19:29:36] LambdaSource: has joined #RubyOnRails
[19:31:19] helpa: has joined #RubyOnRails
[19:32:38] nertzy: has joined #RubyOnRails
[19:33:56] chridal: has joined #RubyOnRails
[19:34:18] thecyclone: has joined #RubyOnRails
[19:34:23] Coldblackice: has joined #RubyOnRails
[19:35:03] TheNet: has joined #RubyOnRails
[19:35:15] thecyclone: Aeyrix: are you there?
[19:35:32] sarink: has joined #RubyOnRails
[19:35:48] sarink: what would cause rake -T to hang? i've been waiting for about 2 solid minutes now
[19:36:12] stamina: has joined #RubyOnRails
[19:36:21] annlewis: has joined #RubyOnRails
[19:36:22] walkingtoast: has joined #RubyOnRails
[19:37:40] x-light: has joined #RubyOnRails
[19:39:07] momomomomo: has joined #RubyOnRails
[19:40:50] FungalRaincloud: has joined #RubyOnRails
[19:41:26] TheNet: has joined #RubyOnRails
[19:41:53] beauby: has joined #RubyOnRails
[19:44:05] apotry: has joined #RubyOnRails
[19:45:09] chridal: has joined #RubyOnRails
[19:45:35] ritic: has joined #RubyOnRails
[19:47:02] rodfersou: has joined #RubyOnRails
[19:47:57] agit0: has joined #RubyOnRails
[19:48:14] apotry: has joined #RubyOnRails
[19:48:55] Maletor: has joined #RubyOnRails
[19:49:43] nettoweb: has joined #RubyOnRails
[19:51:42] thams: has joined #RubyOnRails
[19:52:54] kitsuneyo: has joined #RubyOnRails
[19:53:44] Guest53: has joined #RubyOnRails
[19:54:14] UnMorenoBlanco1: has joined #RubyOnRails
[19:54:22] podman: has joined #RubyOnRails
[19:55:21] bonhoeffer: has joined #RubyOnRails
[19:55:56] mloy: has joined #RubyOnRails
[19:58:08] ritic: has joined #RubyOnRails
[19:58:52] manuelmesson: has joined #RubyOnRails
[19:58:59] arup_r: sarink: still it is hanging there ?
[19:59:26] sarink: arup_r: i guess it literally just took like 4 minutes, although now when i re-run it it's almost instant
[19:59:42] arup_r: software always a mess.. hehe
[19:59:57] sarink: haha, yep
[20:00:29] bonhoeffer: has joined #RubyOnRails
[20:02:38] MrPunkin: has joined #RubyOnRails
[20:03:20] bonhoeffer: has joined #RubyOnRails
[20:04:01] bnwiscool: has joined #RubyOnRails
[20:05:24] aevitas: has joined #RubyOnRails
[20:06:01] blackmesa: has joined #RubyOnRails
[20:07:25] _djbkd: has joined #RubyOnRails
[20:08:26] bonhoeffer: has joined #RubyOnRails
[20:10:09] momomomomo: has joined #RubyOnRails
[20:12:10] kadoppe: has joined #RubyOnRails
[20:13:19] thams: has joined #RubyOnRails
[20:16:22] netzfisch: has joined #RubyOnRails
[20:19:18] lacuna: has joined #RubyOnRails
[20:19:22] hippyphysicist: has joined #RubyOnRails
[20:20:46] Diabolik: im getting this error
[20:20:47] Diabolik: (called from <class:Question> at /Users/andrew/code/helpjuice/Helpjuice/app/models/question.rb:128)
[20:20:54] Diabolik: Users/andrew/code/helpjuice/Helpjuice/app/models/revision.rb:18:in `include': wrong argument type Class (expected Module) (TypeError)
[20:21:02] Diabolik: when including a concern module in a file
[20:21:05] Diabolik: there is no class
[20:21:31] Motoservo: has joined #RubyOnRails
[20:21:55] Diabolik: https://gist.github.com/askl56/6fe6a29388cb53ad8813
[20:22:34] matthewd: Diabolik: Time is a stdlib class. One that you're clearly aware of. :P
[20:23:03] hippyphysicist: has joined #RubyOnRails
[20:23:19] Diabolik: ACTION facedesks
[20:23:45] slash_nick: ACTION wipes the blood of Diabolik's keyboard
[20:24:06] Diabolik: apologies matthewd
[20:25:09] matthewd: No worries.. you need never apologise for having an easily-solved problem :)
[20:25:16] ruurd: has joined #RubyOnRails
[20:25:46] Motoservo: has left #RubyOnRails: ()
[20:28:27] Guest53: has joined #RubyOnRails
[20:31:43] bonhoeffer: has joined #RubyOnRails
[20:32:01] Motoservo: has joined #RubyOnRails
[20:32:33] colleenmcguckin: has joined #RubyOnRails
[20:33:34] n00bDev: has joined #RubyOnRails
[20:34:11] nettoweb: has joined #RubyOnRails
[20:34:56] hippyphysicist: has joined #RubyOnRails
[20:36:12] Motoservo: has joined #RubyOnRails
[20:36:19] smathy: has joined #RubyOnRails
[20:37:06] annlewis: has joined #RubyOnRails
[20:38:00] arthurix: has joined #RubyOnRails
[20:38:32] EminenceHC: has joined #RubyOnRails
[20:38:36] hahuang65: has joined #RubyOnRails
[20:42:34] lacuna_: has joined #RubyOnRails
[20:43:45] bruno-: has joined #RubyOnRails
[20:45:32] arBmind: has joined #RubyOnRails
[20:45:34] nogic: has joined #RubyOnRails
[20:45:43] lacuna: has joined #RubyOnRails
[20:45:43] lacuna: has joined #RubyOnRails
[20:45:51] chridal: has joined #RubyOnRails
[20:46:05] blackmesa: has joined #RubyOnRails
[20:46:56] PlasmaStar: has joined #RubyOnRails
[20:47:49] gavit: How is application.html.erb the 'parent' of each page? I want to do a similar thing but with a subset of pages.
[20:47:57] beauby: has joined #RubyOnRails
[20:48:24] ashish: has joined #RubyOnRails
[20:48:34] Guest53: has left #RubyOnRails: ()
[20:48:44] MrPunkin: gavit: I???d suggest looking up how layouts work
[20:48:56] Jerrod: has joined #RubyOnRails
[20:49:04] MrPunkin: gavit: you can indeed have a special layout you apply only to a controller or specific actions / pages
[20:49:12] hahuang65: has joined #RubyOnRails
[20:50:15] Motoservo: has joined #RubyOnRails
[20:50:38] lacuna_: has joined #RubyOnRails
[20:51:15] gavit: MrPunkin: render layout: "special_layout" will override application.html.erb right
[20:52:42] smathy: gavit, !try
[20:52:42] helpa: gavit: Why don't you try it and find out for yourself?
[20:52:49] manuelmesson: has joined #RubyOnRails
[20:54:30] n00bDev: has joined #RubyOnRails
[20:54:45] lacuna: has joined #RubyOnRails
[20:54:45] lacuna: has joined #RubyOnRails
[20:55:47] ashishsingh173: has joined #RubyOnRails
[20:57:25] trosborn: has joined #RubyOnRails
[20:57:42] blackmesa: has joined #RubyOnRails
[20:58:14] thams: has joined #RubyOnRails
[20:58:17] trosborn: Hi all. I???m trying to make my first form object and currently I have the problem that the params hash is empty. Here are the relevant gists:
[20:58:19] trosborn: https://gist.github.com/trosborn/1bc09f00258a93f97072
[20:58:31] trosborn: https://gist.github.com/trosborn/5585c4d1211989fb399d
[20:59:09] ashishsingh173: has left #RubyOnRails: ()
[20:59:18] trosborn: I don???t fully understand the params hash, but I am assuming it is empty because my form is wrong.
[21:02:09] smathy: trosborn, !gist-usage for next time, ie. you can add multiple files to the one gist.
[21:02:09] helpa: trosborn: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[21:02:35] naftilos76: has joined #RubyOnRails
[21:02:54] trosborn: thank you :)
[21:04:14] ss_much: has joined #RubyOnRails
[21:04:24] corioliss: has joined #RubyOnRails
[21:06:48] momomomomo: has joined #RubyOnRails
[21:07:07] yosemitesam: has joined #RubyOnRails
[21:09:30] x-light: has joined #RubyOnRails
[21:09:58] rikkipitt: has joined #RubyOnRails
[21:12:06] trosborn: I updated the gist to include both files, as well as the params hash and the relevant controller: https://gist.github.com/trosborn/5585c4d1211989fb399d
[21:12:40] craysiii: submit_params is missing the underscore
[21:12:42] xantik: has joined #RubyOnRails
[21:12:58] craysiii: oh looking at the wrong file >.<
[21:13:24] trosborn: ha no worries :)
[21:14:03] Aherin: has joined #RubyOnRails
[21:14:42] trosborn: Partially my fault for not being more consistent with my parans usage
[21:15:17] bonhoeffer: has joined #RubyOnRails
[21:15:53] smathy: trosborn, sorry, I was called away. I'm looking at it now.
[21:16:21] arthurix_: has joined #RubyOnRails
[21:16:25] yfeldblum: has joined #RubyOnRails
[21:17:39] smathy: trosborn, although you're setting the :id to something unique in each iteration of your loop, the name attribute itself is inferred from the method name you use - in your case `:name` - so every field on your form has the same name attribute (if you look in the HTML that was generated you'll confirm this for yourself).
[21:18:15] EminenceHC: has joined #RubyOnRails
[21:18:19] smathy: trosborn, Rails can't deal with multiple fields of the same name unless they end in [] (in which case it provides the values in an array).
[21:18:33] trosborn: ah, okay, so do I need to override the default naming and give each a unique name?
[21:19:39] smathy: trosborn, well it depends. You're using the high level form helpers, which expect to just render fields for the attributes of a model.
[21:19:58] smathy: trosborn, if you start trying to override everything you're really working against the helpers and their intended purpose.
[21:20:08] craysiii: is there an advantage to defining a XForm class to deal with the handling of params like this? why not just do it in the controller?
[21:20:08] jessemcgilallen: has joined #RubyOnRails
[21:20:31] trosborn: So do you think it would be best to manually create the html?
[21:20:37] smathy: trosborn, so either adjust your model so that it has the right attributes and then render that using those high level helpers, or, use the lower level helpers that end in _tag
[21:20:45] jahbrewski: has joined #RubyOnRails
[21:20:54] trosborn: ah right, form_tag.
[21:20:58] trosborn: That makes sense.
[21:20:58] smathy: trosborn, no, there's a middle ground between the high level helpers and HTML.
[21:21:03] smathy: trosborn, yeah.
[21:21:04] rakm: has joined #RubyOnRails
[21:21:36] smathy: trosborn, and text_area_tag, etc. There are _tag versions of most of the helpers.
[21:22:29] trosborn: yeah I???m looking at the api guides now
[21:22:34] trosborn: that is great, thank you :)
[21:22:37] bonhoeffer: has joined #RubyOnRails
[21:22:44] DoubleMalt: has joined #RubyOnRails
[21:23:02] trosborn: I can move forward with that info
[21:23:22] smathy: trosborn, you're welcome.
[21:24:09] smathy: craysiii, there are a number of different approaches such as actually making your model represent the form you want to produce (and then using fields_for).
[21:24:29] smathy: craysiii, mostly I recommend doing what you understand at the Rails level you're at :)
[21:25:04] craysiii: thanks smathy. i guess i do it the 'normal' way? i wouldn't even know lol
[21:26:00] smathy: craysiii, you can actually spend (waste, really) a lot of time building a custom form builder and blah de blah - which solves a single use case that you're never going to use again, and really you could have solved it in 2 minutes with the _tag helpers.
[21:29:39] nya: has joined #RubyOnRails
[21:31:07] s2013: has joined #RubyOnRails
[21:31:08] n00bDev: has joined #RubyOnRails
[21:31:08] hahuang65: has joined #RubyOnRails
[21:31:28] bruno-: has joined #RubyOnRails
[21:31:45] n00bDev: has joined #RubyOnRails
[21:32:43] bendangelo: has joined #RubyOnRails
[21:33:06] Sceko: has joined #RubyOnRails
[21:36:33] quazimodo: has joined #RubyOnRails
[21:37:50] annlewis: has joined #RubyOnRails
[21:39:15] bmalum: has joined #RubyOnRails
[21:39:22] rikkipitt: has joined #RubyOnRails
[21:41:53] bonhoeffer__: has joined #RubyOnRails
[21:42:42] yosemitesam: has joined #RubyOnRails
[21:43:35] bonhoeffer__: has left #RubyOnRails: ()
[21:44:23] willardg: has joined #RubyOnRails
[21:44:35] bonhoeffer: has joined #RubyOnRails
[21:44:45] kitsuneyo: has joined #RubyOnRails
[21:46:29] kitsuneyo: has joined #RubyOnRails
[21:47:10] manuelmesson: has joined #RubyOnRails
[21:48:10] momomomomo_: has joined #RubyOnRails
[21:50:41] bonhoeffer__: has joined #RubyOnRails
[21:51:44] A124: has joined #RubyOnRails
[21:52:17] roxtrongo: has joined #RubyOnRails
[21:53:03] htmldrum: has joined #RubyOnRails
[21:55:30] VeryBewitching: Or if anyone can answer, FailBit shared a link https://i.imgur.com/TU9rUEp.png earlier; just wondering if anyone knows what was used to create this graph.
[21:56:17] Papierkorb: isn't the logo on the bottom left the new relic logo?
[21:57:08] VeryBewitching: It *might* be, but the way the colors are around that shape it's hard to tell.
[21:57:38] Sweeper: VeryBewitching: that's a newrelic graph
[21:57:43] VeryBewitching: But now that I look at their site..
[21:57:45] Sweeper: I know cause I stare at them all the time
[21:57:52] VeryBewitching: Thanks sweeper :D
[21:58:17] Papierkorb: VeryBewitching: if you find out which lib actually draws those, please let me know
[21:58:26] bruno-: has joined #RubyOnRails
[21:59:02] Sweeper: Papierkorb: http://www.highcharts.com/
[21:59:03] VeryBewitching: Well I've been looking for a visual way to determine how much I can stress some things; I'd also like to see what kind of a mess I might be making too.
[21:59:05] SteenJobs: has joined #RubyOnRails
[21:59:12] Sweeper: ACTION just checked
[22:00:12] VeryBewitching: I looked at those at one point too, great interactivity.
[22:00:41] Papierkorb: sweeper: thanks! They do look great
[22:01:01] Sweeper: VeryBewitching: those are the graphs NR is using
[22:01:44] VeryBewitching: Papierkorb: https://github.com/loudpixel/highcharts-rails
[22:02:02] VeryBewitching: sweeper: Is NR easy to setup with?
[22:02:29] _djbkd: has joined #RubyOnRails
[22:03:32] ritic: has joined #RubyOnRails
[22:05:00] Sweeper: VeryBewitching: yes, but spendy :/
[22:05:15] Sweeper: for rails app monitoring, that is
[22:05:21] Sweeper: actual server monitoring is cheap
[22:07:55] VeryBewitching: sweeper: Is it monthly, quarterly, or per use stuff?
[22:08:33] Sweeper: VeryBewitching: monthly, per application server
[22:08:57] bonhoeffer__: has joined #RubyOnRails
[22:14:22] tfitts: has joined #RubyOnRails
[22:15:16] tfitts: Anyone have any experience with Savon SOAP client? I'm trying to build an XML document and the hash I'm passing in looks good but the XML it generates doesn't seem to correspond correctly and I'm having a hard time figuring out where I need to make a change
[22:15:38] bmalum: has joined #RubyOnRails
[22:17:22] Tref: has joined #RubyOnRails
[22:19:04] mikeharris22: has joined #RubyOnRails
[22:19:05] n00bDev: has joined #RubyOnRails
[22:19:50] cnk: has joined #RubyOnRails
[22:19:56] TheNet: has joined #RubyOnRails
[22:20:09] n00bDev: has joined #RubyOnRails
[22:22:09] mikeharris22: has joined #RubyOnRails
[22:23:50] BBonifield: has joined #RubyOnRails
[22:23:55] BBonifield: has left #RubyOnRails: ()
[22:23:59] Papierkorb: sweeper: do you now how highcharts holds up on mobile when displaying some thousand data points?
[22:24:55] BBonifield: has joined #RubyOnRails
[22:25:08] duncannz: has joined #RubyOnRails
[22:25:56] duncannz: has joined #RubyOnRails
[22:25:56] MrPunkin: tfitts: I???m working on integrating Savon right now, actualy
[22:26:21] BBonifield: Local development reloads classes on file changes. I have an initializer that is configuring a class via setting a class variable. Essentially, it keeps a single connection to redis on the class. This works fine in production, but it breaks locally because the initializer doesn???t get re-ran on file change when the class reloading occurs. what would be the better solution to configure the class?
[22:27:20] MrPunkin: tfitts: you can test the output it will use by calling client.operation(:your_operation).build(hash).pretty
[22:27:54] Sweeper: Papierkorb: no idea
[22:27:56] Papierkorb: bbonifield: you could do it with a memoizing class method creating one on-demand, much like a singleton
[22:28:06] Sweeper: Papierkorb: that said, you could always pre-smooth the data
[22:28:19] Papierkorb: bbonifield: as in: self.foo; @foo ||= Foo.new; end
[22:28:22] MrPunkin: tfitts: sorry, you???ll probably want to print that .pretty call to see the XML with linebreaks, tabs, etc.
[22:29:15] Papierkorb: sweeper: yeah that's what I'm doing atm using dygraph. Not entirely happy with the lib though, but OTOH, it did what I wanted ..
[22:29:36] DiCablo: has joined #RubyOnRails
[22:30:51] blackhuey: has joined #RubyOnRails
[22:30:53] notnoyyyyy: has joined #RubyOnRails
[22:32:51] BBonifield: Papierkorb: yeah, the problem there is that i want it configured via an environment variable. i could couple the code to the environment variable, but that seems unnecessary.
[22:34:07] BBonifield: Papierkorb: specifically it???s working like: Feature.connect(redis_url: URI.parse(Rails.application.secrets.redistogo_url))
[22:34:14] htmldrum: has joined #RubyOnRails
[22:34:34] n00bDev: has joined #RubyOnRails
[22:34:41] chridal: has joined #RubyOnRails
[22:34:44] Papierkorb: bbonifield: if it's really something like that, I don't see a reason for not having that inside the class itself
[22:35:40] BBonifield: Papierkorb: because from a separation of concerns perspective, the class shouldn???t care about application configuration as much as ???connect to this redis, read some things"
[22:38:38] annlewis: has joined #RubyOnRails
[22:38:57] rikkipitt: has joined #RubyOnRails
[22:39:17] theery: has joined #RubyOnRails
[22:39:59] chridal: has joined #RubyOnRails
[22:40:15] ritic: has joined #RubyOnRails
[22:40:45] meoblast001: has joined #RubyOnRails
[22:41:20] manuelmesson: has joined #RubyOnRails
[22:41:39] BBonifield: Papierkorb: got it - http://stackoverflow.com/a/17573888/241232 - defining a `ActionDispatch::Reloader.to_prepare` block in the initializer that reconfigures the class fixes the problem. it runs the block whenever it reloads the classes.
[22:42:52] Sweeper: Papierkorb: nvd3 has decent performance afaik
[22:44:19] sankaber: has joined #RubyOnRails
[22:45:07] ritic: has joined #RubyOnRails
[22:48:02] colleenmcguckin: has joined #RubyOnRails
[22:48:40] netzfisch: has joined #RubyOnRails
[22:48:57] A124: has joined #RubyOnRails
[22:50:31] mary5030: has joined #RubyOnRails
[22:50:42] asianMike: has joined #RubyOnRails
[22:50:49] _djbkd: has joined #RubyOnRails
[22:51:31] n00bdev_: has joined #RubyOnRails
[22:51:31] das3in: has joined #RubyOnRails
[22:51:39] trosborn: has joined #RubyOnRails
[22:52:08] colleenmcguckin: has joined #RubyOnRails
[22:52:49] das3in: Hi! Anyone know good resources (besides the API cause I'm confused) about using checkbox form helpers? I had this problem a while ago and gave up and am trying to revisit
[22:53:06] meoblast: has joined #RubyOnRails
[22:54:56] _djbkd: has joined #RubyOnRails
[22:55:53] das3in: gist for specifics https://gist.github.com/das3in/bd2b855d7eeae4235080
[22:58:19] mary5030: has joined #RubyOnRails
[23:00:00] h7br1x: has joined #RubyOnRails
[23:00:10] mary5030: has joined #RubyOnRails
[23:00:31] s2013: has joined #RubyOnRails
[23:01:05] thams: has joined #RubyOnRails
[23:01:12] quazimodo: has joined #RubyOnRails
[23:04:07] bonhoeffer: has joined #RubyOnRails
[23:04:22] benlieb: has joined #RubyOnRails
[23:04:36] MrPunkin: has joined #RubyOnRails
[23:04:39] madebymarkca: has joined #RubyOnRails
[23:04:50] bonhoeffer__: has joined #RubyOnRails
[23:05:28] benlieb: What is the difference between adding instance methods whith active concern and instance methods through a straight ruby module?
[23:05:34] benlieb: I???ve written up an example: https://gist.github.com/benlieb/4a80a3129f1ca7efac92
[23:07:21] bonhoeffer: has joined #RubyOnRails
[23:08:03] colleenmcguckin: has joined #RubyOnRails
[23:08:27] nettoweb: has joined #RubyOnRails
[23:10:15] bruno-: has joined #RubyOnRails
[23:11:18] twilling: has joined #RubyOnRails
[23:13:24] BBonifield: benlieb: in the case you provided, i don???t believe there is one. the reason for the `included` block is so you can evaluate a block within the class context. in other words, if you need to hook into DSL methods that aren???t available to the module.
[23:13:26] theblang: has joined #RubyOnRails
[23:13:34] manfrin_: has joined #RubyOnRails
[23:15:11] Guest97175: has joined #RubyOnRails
[23:16:30] riotjones: has joined #RubyOnRails
[23:17:02] ibouvousaime: has joined #RubyOnRails
[23:17:42] FailBit: VeryBewitching: yep, it's newrelic
[23:17:43] benlieb: bbonifield: that???s what I thought, and yet some folks on my team seem to insist on doing it that way, just for mixin instance methods. Seems unnecessary
[23:17:54] benlieb: and maybe less performant
[23:18:41] TheNet: has joined #RubyOnRails
[23:19:18] tuelz: has joined #RubyOnRails
[23:19:55] colleenm_: has joined #RubyOnRails
[23:23:56] colleenmcguckin: has joined #RubyOnRails
[23:24:12] wethu: has joined #RubyOnRails
[23:24:17] bonhoeffer: has joined #RubyOnRails
[23:24:26] bonhoeffer__: has joined #RubyOnRails
[23:26:46] maxx88_: has joined #RubyOnRails
[23:28:09] BBonifield: benlieb: i think the only real argument is consistency. you wouldn???t see a performance benefit
[23:28:37] Scriptonaut: has left #RubyOnRails: ()
[23:28:56] alfie_max15: has joined #RubyOnRails
[23:29:18] smathy_: has joined #RubyOnRails
[23:30:09] chridal: has joined #RubyOnRails
[23:30:21] alfie_max15: while i render a nested form using simple_fields_for or fields_for, there is a wrapper div with class `fields` within which the fields get rendered
[23:30:35] alfie_max15: How can i add more classes to this div?
[23:31:00] theblang: has joined #RubyOnRails
[23:31:06] mary5030: has joined #RubyOnRails
[23:31:25] LambdaSource: has joined #RubyOnRails
[23:32:17] superlou: has joined #RubyOnRails
[23:32:24] netwoodle: has joined #RubyOnRails
[23:32:46] mwlang: what???s a good strategy for sanitizing the input of a search box?
[23:33:18] FailBit: mwlang: search compiler
[23:33:19] mwlang: it???s a general site-wide search box intended to function much like Google???s simple one box.
[23:33:37] pwnd_nfsw: has joined #RubyOnRails
[23:33:49] FailBit: don't worry, as long as you can define an accurate grammar you should have no trouble
[23:35:09] MartinElvar: has joined #RubyOnRails
[23:35:11] mwlang: alright, Professor FailBit. :-o
[23:35:36] manuelmesson: has joined #RubyOnRails
[23:36:11] TheNet_: has joined #RubyOnRails
[23:36:20] i: has joined #RubyOnRails
[23:36:57] Tref: has joined #RubyOnRails
[23:37:08] mwlang: I???ll come back to this one???not feeling up to sanitizing search inputs on Friday afternoon.
[23:38:10] FailBit: mwlang: you should also use e.g. a search engine
[23:39:24] annlewis: has joined #RubyOnRails
[23:40:03] chridal: has joined #RubyOnRails
[23:41:41] TheNet: has joined #RubyOnRails
[23:42:08] Or1on: has joined #RubyOnRails
[23:43:20] ja: How can I get the errored attribute's value displayed in validation error messages? Like in a parenthesis or something??? And how do I make that only appear in non-view error messages?
[23:43:48] ja: as in exceptions vs. flashes
[23:44:32] htmldrum: has joined #RubyOnRails
[23:44:49] ja: yeah-uh
[23:45:01] chridal: has joined #RubyOnRails
[23:45:04] ja: like this: ActiveRecord::RecordInvalid: Validation failed: Interval ("quarterly") is not included in the list
[23:45:13] ja: instead of without the ???("quarterly")???
[23:45:20] ja: as it is by default
[23:45:27] ja: now I juste edited the locale file
[23:48:05] ja: eheheh, I guess I'll just do that?????and maybe create a locale which I never use in views
[23:50:01] chridal: has joined #RubyOnRails
[23:50:18] cajone: has left #RubyOnRails: ()
[23:50:27] arthurix: has joined #RubyOnRails
[23:56:16] chipotle: has joined #RubyOnRails
[23:56:21] bonhoeffer: has joined #RubyOnRails
[23:57:58] cajone: has joined #RubyOnRails
[23:58:32] pwnd_nfsw: has joined #RubyOnRails