« Back to channel list

#RubyOnRails - 05 November 2015

« Back 1 day Forward 1 day »
[00:00:21] lemur: has joined #RubyOnRails
[00:00:50] Balllkenende: has joined #RubyOnRails
[00:02:59] bonhoeffer: has joined #RubyOnRails
[00:04:12] oded_: has joined #RubyOnRails
[00:04:46] rickmasta: has joined #RubyOnRails
[00:07:39] benlieb: has joined #RubyOnRails
[00:09:10] CanTonic: has joined #RubyOnRails
[00:10:43] Pupeno: has joined #RubyOnRails
[00:11:03] Fire-Dragon-DoL: tubbo: p.s. I noticed the table contains 4M rows, must be careful :P
[00:12:52] tubbo: Fire-Dragon-DoL: yeah definitely. the real way to break that apart is to determine how it's being used. i mean, is anyone ever doing SELECT * FROM customer_emails? do they ever need to see the entire table with all X00 columns in it?
[00:13:24] Fire-Dragon-DoL: tubbo: no god, that would kill the db server immediately
[00:13:54] tubbo: Fire-Dragon-DoL: yeah that's definitely a red flag
[00:13:56] Fire-Dragon-DoL: tubbo: we get only a small part of emails (based on date)
[00:14:12] Fire-Dragon-DoL: and only specific to each customer
[00:14:25] tubbo: Fire-Dragon-DoL: i'm talking more about the kinds of fields you're getting out of the table, not so much the amount of data. know what i mean?
[00:15:46] Fire-Dragon-DoL: tubbo: mhhhh, there are various fields that are there for state purposing like "email message read" or such, I think we can start by moving those fields to separate table and possibly keep only the real "email data" on the email model (subject, address body and such)
[00:16:20] Fire-Dragon-DoL: tubbo: someone also revealed that probably there could have been a delayed job still running on that table, that would explain the entire issue
[00:16:55] Axsuul: has joined #RubyOnRails
[00:17:40] mynamepickle: has joined #RubyOnRails
[00:19:27] jahbrewski: has joined #RubyOnRails
[00:19:52] TheNet: has joined #RubyOnRails
[00:20:28] crdpink: has joined #RubyOnRails
[00:21:02] cac: has joined #RubyOnRails
[00:21:57] CanTonic: has joined #RubyOnRails
[00:23:57] mordocai: has joined #RubyOnRails
[00:24:01] rakm: has joined #RubyOnRails
[00:25:05] jottr: has joined #RubyOnRails
[00:27:08] okdas: has joined #RubyOnRails
[00:27:08] okdas: has joined #RubyOnRails
[00:27:44] njero: has joined #RubyOnRails
[00:27:54] DEA7TH: has joined #RubyOnRails
[00:27:59] infamos: has joined #RubyOnRails
[00:28:01] bonhoeffer: has joined #RubyOnRails
[00:28:11] tuelz1: has joined #RubyOnRails
[00:28:59] RegulationD: has joined #RubyOnRails
[00:29:49] Cache_Money: has joined #RubyOnRails
[00:30:12] annlewis: has joined #RubyOnRails
[00:31:36] riotjones: has joined #RubyOnRails
[00:33:07] rickmasta: has joined #RubyOnRails
[00:34:51] rickmasta: has joined #RubyOnRails
[00:35:11] rickmasta: has joined #RubyOnRails
[00:35:39] antgel: has joined #RubyOnRails
[00:36:40] htmldrum: has joined #RubyOnRails
[00:36:48] tuelz1: has joined #RubyOnRails
[00:37:46] sankaber: has joined #RubyOnRails
[00:38:36] SteenJobs: has joined #RubyOnRails
[00:40:23] atomical: has joined #RubyOnRails
[00:41:00] elton: has joined #RubyOnRails
[00:43:17] Balllkenende: has joined #RubyOnRails
[00:45:54] treaki: has joined #RubyOnRails
[00:48:00] Joufflu: has joined #RubyOnRails
[00:49:07] Balllkenende: has joined #RubyOnRails
[00:51:33] DLSteve: has joined #RubyOnRails
[00:52:27] ewilliam: y'all i have a data modeling ? regarding addresses. addresses table has polymorphic relations via addressable_id and addressable_type columns.
[00:52:27] ewilliam: orders, shipments, chargecards, bankaccounts all have addresses. however i want each user to set own shipping and billing addresses for future use.
[00:52:27] ewilliam: any best practices in mind? prima facie i would setup address and user relations and then set shipping_addy_id and billing_addy_id in a settings or profiles table row with user_id.
[00:52:27] ewilliam: other ways - use a settings library that handles global and per-user settings, or add a type column in the addresses table.
[00:52:27] vdmo: has joined #RubyOnRails
[00:53:44] twilling: has joined #RubyOnRails
[00:55:28] cac: has joined #RubyOnRails
[00:55:35] jahbrewski: has joined #RubyOnRails
[00:57:08] nettoweb: has joined #RubyOnRails
[00:57:30] platzhirsch: has joined #RubyOnRails
[00:57:54] platzhirsch: How to stub a controller method from a capybara test when you're stuck with RSpec 1.3 and there's no any_instance ...waahhh
[00:57:57] aiwaz: has joined #RubyOnRails
[00:59:20] Radar: platzhirsch: work around it
[00:59:23] Radar: platzhirsch: What controller method
[01:00:34] rgtk: has joined #RubyOnRails
[01:00:36] s2013: has joined #RubyOnRails
[01:00:41] platzhirsch: ah maybe SslRequirement.disable_ssl_check = true works here
[01:01:05] lemur: has joined #RubyOnRails
[01:02:40] rgtk: has joined #RubyOnRails
[01:03:10] platzhirsch: aha! it seem to have worked. Good shout Radar
[01:03:20] FCser: has joined #RubyOnRails
[01:04:35] rgtk: has joined #RubyOnRails
[01:05:48] chibs: has joined #RubyOnRails
[01:05:51] bricker: has joined #RubyOnRails
[01:05:58] nya: has joined #RubyOnRails
[01:06:25] rgtk: has joined #RubyOnRails
[01:07:40] djellemah_: has joined #RubyOnRails
[01:08:23] rgtk: has joined #RubyOnRails
[01:10:12] rgtk: has joined #RubyOnRails
[01:10:12] purplexed-: has joined #RubyOnRails
[01:10:12] purplexed-: has joined #RubyOnRails
[01:12:06] rgtk: has joined #RubyOnRails
[01:13:10] TheNet: has joined #RubyOnRails
[01:13:59] rgtk: has joined #RubyOnRails
[01:15:18] TheNet: has joined #RubyOnRails
[01:15:53] rgtk: has joined #RubyOnRails
[01:17:07] tuelz1: has joined #RubyOnRails
[01:17:17] infamos: has joined #RubyOnRails
[01:17:49] rgtk: has joined #RubyOnRails
[01:19:54] rgtk: has joined #RubyOnRails
[01:21:17] TheNet: has joined #RubyOnRails
[01:21:39] rgtk: has joined #RubyOnRails
[01:21:51] s2013: has joined #RubyOnRails
[01:22:09] d34th4ck3r: has joined #RubyOnRails
[01:23:00] one_zero: has joined #RubyOnRails
[01:23:29] rgtk: has joined #RubyOnRails
[01:24:14] chridal: has joined #RubyOnRails
[01:25:26] rgtk: has joined #RubyOnRails
[01:26:06] jahbrewski: has joined #RubyOnRails
[01:26:39] hmsimha_: has joined #RubyOnRails
[01:27:18] rgtk: has joined #RubyOnRails
[01:27:28] seank_: has joined #RubyOnRails
[01:29:10] rgtk: has joined #RubyOnRails
[01:30:14] elton: has joined #RubyOnRails
[01:30:29] RegulationD: has joined #RubyOnRails
[01:30:59] annlewis: has joined #RubyOnRails
[01:31:07] rgtk: has joined #RubyOnRails
[01:31:39] yogeshrt: has joined #RubyOnRails
[01:32:22] riotjones: has joined #RubyOnRails
[01:32:40] willardg: has joined #RubyOnRails
[01:32:59] rgtk: has joined #RubyOnRails
[01:34:10] crdpink2: has joined #RubyOnRails
[01:34:52] rgtk: has joined #RubyOnRails
[01:35:54] chills42: has joined #RubyOnRails
[01:36:50] rgtk: has joined #RubyOnRails
[01:38:43] rgtk: has joined #RubyOnRails
[01:40:25] chridal: has joined #RubyOnRails
[01:40:36] rgtk: has joined #RubyOnRails
[01:41:41] roshanavand: has joined #RubyOnRails
[01:42:18] VeryBewitching: has joined #RubyOnRails
[01:42:30] rgtk: has joined #RubyOnRails
[01:42:49] jottr_: has joined #RubyOnRails
[01:43:49] rickmasta: has joined #RubyOnRails
[01:44:03] vigintas: has joined #RubyOnRails
[01:44:23] rgtk: has joined #RubyOnRails
[01:44:58] sankaber: has joined #RubyOnRails
[01:45:50] sankaber: has joined #RubyOnRails
[01:46:19] rgtk: has joined #RubyOnRails
[01:47:02] reaVer: has joined #RubyOnRails
[01:48:05] qejk: has joined #RubyOnRails
[01:48:13] rgtk: has joined #RubyOnRails
[01:48:30] ewilliam: https://www.irccloud.com/pastebin/bA89pLsI/
[01:48:42] ewilliam: can anyone help me?
[01:50:05] rgtk: has joined #RubyOnRails
[01:51:05] willardg: has joined #RubyOnRails
[01:51:55] elton: has joined #RubyOnRails
[01:52:00] rgtk: has joined #RubyOnRails
[01:53:51] rgtk: has joined #RubyOnRails
[01:54:24] dopamean_: has joined #RubyOnRails
[01:54:48] qwertme: has joined #RubyOnRails
[01:55:12] Radar: ewilliam: my goodness what a mess you've created.
[01:55:16] chridal: has joined #RubyOnRails
[01:55:45] rgtk: has joined #RubyOnRails
[01:57:05] nickenchuggets: has joined #RubyOnRails
[01:57:36] Cache_Money: has joined #RubyOnRails
[01:57:41] rgtk: has joined #RubyOnRails
[01:58:34] rgrmatt: has joined #RubyOnRails
[01:59:33] rgtk: has joined #RubyOnRails
[01:59:45] maxz: has joined #RubyOnRails
[02:01:17] rgtk: has joined #RubyOnRails
[02:01:48] baweaver: has joined #RubyOnRails
[02:03:05] jahbrewski: has joined #RubyOnRails
[02:03:34] rgtk: has joined #RubyOnRails
[02:05:06] CanTonic: has joined #RubyOnRails
[02:05:14] rgtk: has joined #RubyOnRails
[02:07:08] rgtk: has joined #RubyOnRails
[02:07:21] Radar: ewilliam: Ok, now that I've had some lunch. Let me take another look.
[02:07:29] Radar: addresses should be their own records, linked to only users.
[02:07:33] Radar: A user can have many addresses.
[02:07:43] Radar: orders have two addresses: a billing address and a shipping addres
[02:07:53] Radar: belongs_to :billing_address, class_name: "Address"
[02:08:02] Radar: shipments have an address, which is just a standard belongs_to association.
[02:08:10] Radar: chargecards...? Dunno what those are.
[02:08:14] Radar: bankaccounts? Why?
[02:08:20] bruno-: has joined #RubyOnRails
[02:08:27] Radar: User has a default shipping and billing address and can change it when they wish.
[02:08:30] Radar: ewilliam: All good now?
[02:09:01] rgtk: has joined #RubyOnRails
[02:09:56] ellisTAA: has joined #RubyOnRails
[02:09:59] sevenseacat: Radar, solving the world's problems one at a time
[02:10:12] Radar: I've played this game before.
[02:10:50] sevenseacat: knifey spoony?
[02:10:58] rgtk: has joined #RubyOnRails
[02:12:50] rgtk: has joined #RubyOnRails
[02:13:29] glaksmono: has joined #RubyOnRails
[02:14:46] rgtk: has joined #RubyOnRails
[02:15:29] willardg: has joined #RubyOnRails
[02:16:39] rgtk: has joined #RubyOnRails
[02:16:48] pyemkey: has joined #RubyOnRails
[02:16:52] platzhirsch: has left #RubyOnRails: ()
[02:18:34] rgtk: has joined #RubyOnRails
[02:20:28] rgtk: has joined #RubyOnRails
[02:21:27] mostlybadfly: any thoughts on my messed up models ? :D
[02:26:46] rgtk: has joined #RubyOnRails
[02:26:59] SteenJobs: has joined #RubyOnRails
[02:31:43] Sweeper: mostlybadfly: rewrite in go
[02:31:51] annlewis: has joined #RubyOnRails
[02:32:29] willardg: has joined #RubyOnRails
[02:33:09] riotjones: has joined #RubyOnRails
[02:34:21] blackmesa: has joined #RubyOnRails
[02:39:57] rgtk: has joined #RubyOnRails
[02:40:59] kies^: has joined #RubyOnRails
[02:41:57] rgtk: has joined #RubyOnRails
[02:42:20] SteenJobs: has joined #RubyOnRails
[02:44:44] qejk: has joined #RubyOnRails
[02:45:18] s2013: has joined #RubyOnRails
[02:45:56] rgtk: has joined #RubyOnRails
[02:46:13] RegulationD: has joined #RubyOnRails
[02:48:02] rgtk: has joined #RubyOnRails
[02:49:23] drbayer: has joined #RubyOnRails
[02:50:31] Bloomer: has joined #RubyOnRails
[02:50:43] jahbrewski: has joined #RubyOnRails
[02:52:27] s2013: has joined #RubyOnRails
[02:52:28] Axsuul: has joined #RubyOnRails
[02:53:29] Axsuul: has joined #RubyOnRails
[02:53:41] moeabdol: has joined #RubyOnRails
[02:53:49] baweaver: has joined #RubyOnRails
[02:54:50] Axsuul: has joined #RubyOnRails
[02:55:02] glaksmono: has joined #RubyOnRails
[02:55:26] koprom: has joined #RubyOnRails
[02:55:59] rgrmatt: has joined #RubyOnRails
[02:56:06] chridal: has joined #RubyOnRails
[02:56:15] qejk: has joined #RubyOnRails
[02:56:29] rgtk: has joined #RubyOnRails
[02:56:50] willardg: has joined #RubyOnRails
[02:57:02] nya: has joined #RubyOnRails
[02:58:51] roxtrongo: has joined #RubyOnRails
[03:00:33] Pupeno: has joined #RubyOnRails
[03:03:47] simplyia_: has joined #RubyOnRails
[03:04:56] aiwaz: has left #RubyOnRails: ()
[03:06:10] rgrmatt: has joined #RubyOnRails
[03:09:04] bruno-: has joined #RubyOnRails
[03:09:11] krz: has joined #RubyOnRails
[03:09:44] rgtk: has joined #RubyOnRails
[03:11:16] qejk: has joined #RubyOnRails
[03:12:08] Axsuul: has joined #RubyOnRails
[03:13:45] c0dedead: has joined #RubyOnRails
[03:13:53] rgtk_: has joined #RubyOnRails
[03:15:25] EminenceHC: has joined #RubyOnRails
[03:16:31] rgrmatt: has joined #RubyOnRails
[03:17:56] nya: has joined #RubyOnRails
[03:18:28] qejk: has joined #RubyOnRails
[03:20:03] qejk: has joined #RubyOnRails
[03:21:09] dopamean_: has joined #RubyOnRails
[03:22:30] tjbiddle: has joined #RubyOnRails
[03:22:38] rgtk: has joined #RubyOnRails
[03:29:47] DiCablo: has joined #RubyOnRails
[03:31:14] rgtk: has joined #RubyOnRails
[03:31:31] kp666_: has joined #RubyOnRails
[03:32:31] annlewis: has joined #RubyOnRails
[03:33:59] riotjones: has joined #RubyOnRails
[03:34:57] axsuul_: has joined #RubyOnRails
[03:36:20] blackmesa: has joined #RubyOnRails
[03:36:22] axsuul_: has joined #RubyOnRails
[03:36:52] Cache_Money: has joined #RubyOnRails
[03:40:36] yfeldblum: has joined #RubyOnRails
[03:41:00] annlewis: has joined #RubyOnRails
[03:41:41] Axsuul: has joined #RubyOnRails
[03:42:39] purplexed-: has joined #RubyOnRails
[03:42:39] purplexed-: has joined #RubyOnRails
[03:42:44] tuelz1: has joined #RubyOnRails
[03:44:26] luckymeerza: has joined #RubyOnRails
[03:54:03] mloy: has left #RubyOnRails: ("Leaving")
[03:56:10] baweaver: has joined #RubyOnRails
[03:58:55] yfeldblum: has joined #RubyOnRails
[03:59:09] arup_r: has joined #RubyOnRails
[04:04:42] neanderslob__: has joined #RubyOnRails
[04:05:52] rickmasta: has joined #RubyOnRails
[04:06:06] ellisTAA: has joined #RubyOnRails
[04:07:37] pwnd_nsfw: Second time I've run into "can't write unknown attribute" error. Forgot how I fixed it the first time heh
[04:08:47] ewilliam: Radar: you misunderstood me, addresses are definitely their own records. they are associated with various records via addressable_type and addressable_id. polymorphic relations. however, if a user wanted to add another credit card, s/he should have the option of using the saved billing_address or just create a new one. was wondering whether to put that
[04:08:47] ewilliam: information in the addresses table with type column (ie shipping or business), or specifying the id of address record in a separate table like Settings
[04:09:04] ewilliam: adding type column to addresses table seemed the simplest solution but i was afraid that would be bad for normalization
[04:09:12] Radar: Settings and Profiles tables are almost always a bad idea.
[04:09:12] ewilliam: but i consulted with a friend, its not that big of a deal
[04:09:19] chibs: has joined #RubyOnRails
[04:09:22] ewilliam: Radar: oh? why is that?
[04:09:30] Radar: Because they bloat.
[04:09:39] Radar: profiles is useless because the info should go in the users table
[04:09:44] Radar: settings table for this kind of thing? Na.
[04:10:09] bruno-: has joined #RubyOnRails
[04:10:11] ewilliam: okay, what settings table for other things like notifications? Radar
[04:10:23] Radar: no time for 20 questions today. glhf.
[04:10:36] ewilliam: heh well thanks anyway Radar
[04:12:55] elcontrastador: Opinions on Mina vs Capistrano for potentially deploying same rails app to multiple machines at different sites?
[04:13:34] elcontrastador: I've been out of rails for a few years, many things have changed.
[04:13:50] tubbo: i personally have never used mina
[04:15:03] rhizome: i almost checked it out some time ago. seemed interesting.
[04:16:14] pwnd_nsfw: not interesting enough
[04:17:36] elcontrastador: so, capistrano is still the typical choice I take it.
[04:17:52] braincrash: has joined #RubyOnRails
[04:18:49] SteenJobs: has joined #RubyOnRails
[04:19:59] ss_much: has joined #RubyOnRails
[04:20:42] fedexo: has joined #RubyOnRails
[04:22:09] rhizome: it's as good as anything to start with
[04:22:40] harishreddy: has joined #RubyOnRails
[04:23:22] treaki_: has joined #RubyOnRails
[04:23:24] glaksmono: has joined #RubyOnRails
[04:26:35] ashishsingh173: has joined #RubyOnRails
[04:28:50] dopamean_: has joined #RubyOnRails
[04:31:11] glaksmono: has joined #RubyOnRails
[04:31:40] shinenelson: has joined #RubyOnRails
[04:33:45] yfeldblum: has joined #RubyOnRails
[04:34:46] riotjones: has joined #RubyOnRails
[04:37:08] blackmesa: has joined #RubyOnRails
[04:37:11] infamos: has joined #RubyOnRails
[04:40:52] s2013: has joined #RubyOnRails
[04:41:48] annlewis: has joined #RubyOnRails
[04:42:03] glaksmono: has joined #RubyOnRails
[04:42:55] _djbkd: has joined #RubyOnRails
[04:44:53] chridal: has joined #RubyOnRails
[04:47:02] RegulationD: has joined #RubyOnRails
[04:47:34] pawnbox: has joined #RubyOnRails
[04:50:31] rakm: has joined #RubyOnRails
[04:50:53] moeabdol: has joined #RubyOnRails
[04:51:50] glaksmono: has joined #RubyOnRails
[04:51:56] pwnd_nsfw: db:test:prepare fixed my issue
[04:52:02] pwnd_nsfw: I thoguht I didn't have to do this anymore...
[04:55:55] dopamean_: has joined #RubyOnRails
[04:55:55] twilling: has joined #RubyOnRails
[04:56:03] sunny36: has joined #RubyOnRails
[04:59:27] macs1: has joined #RubyOnRails
[05:00:57] Pupeno: has joined #RubyOnRails
[05:01:22] d34th4ck3r: has joined #RubyOnRails
[05:02:29] qwertme: has joined #RubyOnRails
[05:05:29] rhizome: what version rails
[05:07:36] glaksmono: has joined #RubyOnRails
[05:10:27] chibs: has joined #RubyOnRails
[05:11:16] bruno-: has joined #RubyOnRails
[05:11:57] newmanships: has joined #RubyOnRails
[05:16:58] baweaver: has joined #RubyOnRails
[05:17:26] iateadonut: has joined #RubyOnRails
[05:18:45] youngbaks: has joined #RubyOnRails
[05:19:35] asianMike: has joined #RubyOnRails
[05:20:27] vigintas: has joined #RubyOnRails
[05:22:07] johnflux: has joined #RubyOnRails
[05:22:08] johnflux: has joined #RubyOnRails
[05:26:20] RockLee: has joined #RubyOnRails
[05:26:26] sadaf2606: has joined #RubyOnRails
[05:26:38] baweaver: has joined #RubyOnRails
[05:27:02] Rinzlit: has joined #RubyOnRails
[05:27:08] localredhead: has joined #RubyOnRails
[05:28:22] s2013: has joined #RubyOnRails
[05:28:29] chridal: has joined #RubyOnRails
[05:32:22] Or1on: has joined #RubyOnRails
[05:32:22] Or1on: has joined #RubyOnRails
[05:33:13] moeabdol: has joined #RubyOnRails
[05:33:34] harishreddy: has joined #RubyOnRails
[05:35:03] Tarellel: has joined #RubyOnRails
[05:35:16] chridal: has joined #RubyOnRails
[05:35:34] riotjones: has joined #RubyOnRails
[05:36:48] youngbaks: has joined #RubyOnRails
[05:37:53] blackmesa: has joined #RubyOnRails
[05:38:01] Helheim: has joined #RubyOnRails
[05:38:13] Axsuul: has joined #RubyOnRails
[05:39:04] Axsuul: has joined #RubyOnRails
[05:42:32] annlewis: has joined #RubyOnRails
[05:42:43] purplexed-: has joined #RubyOnRails
[05:43:30] benlieb: has joined #RubyOnRails
[05:44:09] d34th4ck3r: has joined #RubyOnRails
[05:49:54] glaksmono: has joined #RubyOnRails
[05:51:25] voltagex: has left #RubyOnRails: ("WeeChat 1.3")
[05:51:26] sadaf2605: has joined #RubyOnRails
[05:53:21] pydave6367: has joined #RubyOnRails
[05:53:29] pawnbox: has joined #RubyOnRails
[05:55:17] Axsuul: has joined #RubyOnRails
[05:55:51] glaksmono: has joined #RubyOnRails
[06:01:21] chrissonar: has joined #RubyOnRails
[06:01:38] roxtrongo: has joined #RubyOnRails
[06:03:05] nya: has joined #RubyOnRails
[06:04:01] DanielN: has joined #RubyOnRails
[06:04:33] htmldrum: has joined #RubyOnRails
[06:05:13] glaksmono: has joined #RubyOnRails
[06:07:34] infamos: has joined #RubyOnRails
[06:07:56] c0dedead: How do I combine an ActiveRecord_Relation and an ActiveRecord_AssociationRelation so that I end up with a single relation which holds all of data from both relations?
[06:09:31] dionysus69: has joined #RubyOnRails
[06:10:05] glaksmono: has joined #RubyOnRails
[06:11:14] doctorly: has joined #RubyOnRails
[06:12:51] bruno-: has joined #RubyOnRails
[06:13:50] krz: has joined #RubyOnRails
[06:15:29] glaksmono: has joined #RubyOnRails
[06:15:43] c0dedead: has left #RubyOnRails: ()
[06:15:45] fre: has joined #RubyOnRails
[06:15:59] fre: howdy, having trouble with auth to a mongolab database.
[06:16:23] fre: The credentials are valid, and I can use the mongo cli to verify this.
[06:17:01] fre: but I'm getting auth errors in my app, specifically: Moped::Protocol::Commands::Authenticate (Moped::Errors::AuthenticationFailure)
[06:17:33] fre: a bit of noob question, but how can I verify what yml config is getting pulled in at runtime?
[06:19:53] rhizome: config/database.yml
[06:20:03] neanderslob: has joined #RubyOnRails
[06:20:13] newmanships: has joined #RubyOnRails
[06:22:41] chibs: has joined #RubyOnRails
[06:23:17] fre: yep, I believe the values/structure in there are correct. When is that parsed/used?
[06:23:35] rhizome: application startup
[06:23:53] rhizome: if you've changed anything, restart the app
[06:25:32] fre: app crashes currently due to the AuthenticationFailure, do you know which rails class grabs the yml?
[06:26:09] rhizome: i don't, but also i don't think that will help you.
[06:26:39] rhizome: looking further into the auth failure is what i'd do
[06:26:39] fre: hmm. thanks all the same
[06:27:20] moeabdol: has joined #RubyOnRails
[06:27:26] fre: ahhh. ffs.
[06:27:27] fre: https://github.com/mongoid/moped/issues/387
[06:27:32] fre: I think that might be the issue
[06:27:49] yogeshrt: has joined #RubyOnRails
[06:27:54] rvanlieshout: has joined #RubyOnRails
[06:28:18] rhizome: at least there appears to be a fix
[06:28:29] tenderlo_: has joined #RubyOnRails
[06:28:58] kitsuneyo: has joined #RubyOnRails
[06:32:22] User458764: has joined #RubyOnRails
[06:34:13] harishreddy: has joined #RubyOnRails
[06:35:32] dopamean_: has joined #RubyOnRails
[06:35:35] ruurd: has joined #RubyOnRails
[06:36:20] srinidhi: has joined #RubyOnRails
[06:36:23] riotjones: has joined #RubyOnRails
[06:37:28] chridal: has joined #RubyOnRails
[06:37:38] yardenbar: has joined #RubyOnRails
[06:38:41] blackmesa: has joined #RubyOnRails
[06:38:42] tagrudev: has joined #RubyOnRails
[06:38:52] dhjondoh: has joined #RubyOnRails
[06:39:59] pawnbox: has joined #RubyOnRails
[06:43:31] annlewis: has joined #RubyOnRails
[06:43:52] moeabdol: has joined #RubyOnRails
[06:44:13] agit0: has joined #RubyOnRails
[06:47:50] trosborn: has joined #RubyOnRails
[06:50:37] dionysus69: are these required? or is this an old rails version? config.assets.enabled = true config.assets.digest = true, config/application.rb
[06:51:14] pawnbox: has joined #RubyOnRails
[06:54:33] glaksmono: has joined #RubyOnRails
[06:54:56] jahbrewski: has joined #RubyOnRails
[06:57:02] kiddorails: has joined #RubyOnRails
[06:57:31] yogeshrt: has joined #RubyOnRails
[06:57:41] build22: has joined #RubyOnRails
[06:58:18] njero: has joined #RubyOnRails
[06:58:48] dhjondoh: has joined #RubyOnRails
[07:01:20] infamos: has joined #RubyOnRails
[07:03:36] glaksmono: has joined #RubyOnRails
[07:05:34] dionysus69: I guess the reason I don't have it is that it is enabled by default :)
[07:08:17] baweaver: has joined #RubyOnRails
[07:08:33] vigintas: has joined #RubyOnRails
[07:09:09] kitsuneyo: has joined #RubyOnRails
[07:10:03] trosborn: I???m having a hard time selecting an input of a dynamically created form with Capybara. If anyone feels like helping me out, here is a gist complete with error: https://gist.github.com/trosborn/dcd7cbb124b7332526b5
[07:11:09] sevenseacat: trosborn: the dynamic form is nothing to do with it - you have no inputs with id name
[07:11:15] sevenseacat: or price, for that matter
[07:12:50] glaksmono: has joined #RubyOnRails
[07:12:57] User458764: has joined #RubyOnRails
[07:14:06] trosborn: oh I see. I should have realized. I thought input#name would select something else??? thanks :)
[07:14:21] sevenseacat: # is the CSS selector for IDs
[07:14:36] sevenseacat: so input#name is trying to find the input tag with the ID of name
[07:16:48] trosborn: Yeah I was jst over thinking it. For whatever weird reason I thought if the ID selector followed the input it would instead grab ???name=??? within input
[07:17:42] simplyianm: has joined #RubyOnRails
[07:18:41] GeissT: has joined #RubyOnRails
[07:20:28] Pazician: has joined #RubyOnRails
[07:21:07] zpe: has joined #RubyOnRails
[07:21:58] glaksmono: has joined #RubyOnRails
[07:22:25] ashishsi_: has joined #RubyOnRails
[07:22:43] jas02: has joined #RubyOnRails
[07:24:19] ur5us: has joined #RubyOnRails
[07:26:01] GeissT_: has joined #RubyOnRails
[07:26:35] nya: has joined #RubyOnRails
[07:26:58] ashishsingh173: has joined #RubyOnRails
[07:29:23] darutoko: has joined #RubyOnRails
[07:30:12] tvw: has joined #RubyOnRails
[07:32:20] defsdoor: has joined #RubyOnRails
[07:32:34] pawnbox: has joined #RubyOnRails
[07:34:05] cac: has joined #RubyOnRails
[07:36:26] nya: has joined #RubyOnRails
[07:37:13] riotjones: has joined #RubyOnRails
[07:38:10] trosborn: So I tried selecting it with find('#sizes .nested-fields:last-child input.string').set('Small???), but I am getting the same error. (simple_form gives the inputs class=???string optional???, btw)
[07:38:24] glaksmono: has joined #RubyOnRails
[07:39:09] ur5us: has joined #RubyOnRails
[07:39:21] blackmesa: has joined #RubyOnRails
[07:39:54] DoubleMalt: has joined #RubyOnRails
[07:40:31] njero: has joined #RubyOnRails
[07:41:24] smathy: has joined #RubyOnRails
[07:41:43] pyemkey: has joined #RubyOnRails
[07:41:45] joeytwiddle: has joined #RubyOnRails
[07:44:12] annlewis: has joined #RubyOnRails
[07:45:09] GeissT: has joined #RubyOnRails
[07:45:46] lacuna: has joined #RubyOnRails
[07:46:30] bricker: has joined #RubyOnRails
[07:47:16] ruurd: has joined #RubyOnRails
[07:47:36] glaksmono: has joined #RubyOnRails
[07:49:54] tuelz1: has joined #RubyOnRails
[07:52:07] ashishsingh173: has joined #RubyOnRails
[07:54:28] Spami: has joined #RubyOnRails
[07:56:07] glaksmono: has joined #RubyOnRails
[07:57:10] kitsuneyo: has joined #RubyOnRails
[07:57:41] fre: has joined #RubyOnRails
[07:58:23] kitsuneyo: suppose i want to do render 'layout', but not raise any exception if the file isn't there, how do i do that
[07:59:13] kitsuneyo: do i need to put an empty file in app/views/application ?
[07:59:36] blackhuey: has joined #RubyOnRails
[08:00:03] kitsuneyo: i mean render 'partial' actually
[08:02:05] futilegames: has joined #RubyOnRails
[08:02:36] oded_: has left #RubyOnRails: ()
[08:03:16] roxtrongo: has joined #RubyOnRails
[08:03:44] oded: has joined #RubyOnRails
[08:04:23] glaksmono: has joined #RubyOnRails
[08:04:35] neanderslob: has joined #RubyOnRails
[08:08:06] chridal: has joined #RubyOnRails
[08:08:59] rubyonrails097: has joined #RubyOnRails
[08:09:12] MartinElvar: has joined #RubyOnRails
[08:09:16] baweaver: has joined #RubyOnRails
[08:09:38] sevenseacat: has joined #RubyOnRails
[08:10:28] ibouvousaime: has joined #RubyOnRails
[08:11:03] dionysus69: #{ENV['FOG_DIRECTORY']}.s3.amazonaws.com will this do the job or #{ENV['FOG_DIRECTORY']}.{ENV['FOG_REGION']}.s3.amazonaws.com ? in production rb
[08:12:54] glaksmono: has joined #RubyOnRails
[08:16:31] krzkrz: has joined #RubyOnRails
[08:20:05] rattatmatt: has joined #RubyOnRails
[08:20:20] chridal: has joined #RubyOnRails
[08:21:35] freezeve1: has joined #RubyOnRails
[08:21:52] dideler: has joined #RubyOnRails
[08:22:20] d34th4ck3r: has joined #RubyOnRails
[08:22:39] Polysics: has joined #RubyOnRails
[08:22:57] harishreddy: has joined #RubyOnRails
[08:24:01] Polysics: I have the correct route in routes.rb, the action WORKS from the browser, but using it in Rspec says No route matches {:action=>"ws_auth", :controller=>"events"}
[08:24:06] ibouvousaime: has joined #RubyOnRails
[08:24:15] rvanlieshout: polysics: using what method?
[08:24:23] Polysics: post "/events/ws_auth", to: "events#ws_auth" is in my routes, and POSTing to the action actually works
[08:24:29] rvanlieshout: polysics: and prove that it exists using rake routes
[08:24:57] Polysics: rvanlieshout: I call 'post :ws_auth' in specs inside a 'describe EventsController do' block
[08:25:06] oded: is it a controller spec or request spec?
[08:25:26] Polysics: events_ws_auth POST /events/ws_auth(.:format) events#ws_auth
[08:25:29] Polysics: is in rake routes
[08:25:36] Polysics: controller spec
[08:25:41] oded: Is the controller called EventsController?
[08:25:43] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[08:25:50] sevenseacat: let's put it all together
[08:26:04] sevenseacat: starting with the full error
[08:26:27] Polysics: gisting up all the things
[08:27:40] artto: has joined #RubyOnRails
[08:28:39] Polysics: https://gist.github.com/polysics/bcc9da4693f625bf6de8
[08:28:50] dionysus69: do I need to use asset_path on every image that is being precompiled? because right now names don't match
[08:29:01] solars: has joined #RubyOnRails
[08:29:51] Pupeno: has joined #RubyOnRails
[08:30:34] oded: polysics: can you send the relevant parts of the controller?
[08:30:38] sevenseacat: or image_path, or whatever the better-named helper method is for the file type.
[08:30:57] sevenseacat: polysics: whats on https://gist.github.com/polysics/bcc9da4693f625bf6de8#file-rspec-output-L18 ?
[08:31:14] dionysus69: actually I just checked, names didn't match only in production, md5 sums get generated in development though and I am using image_tag
[08:31:16] kalusn: has joined #RubyOnRails
[08:31:31] dionysus69: so precompile doesnt work in productions and the reason could be?
[08:31:40] sevenseacat: dionysus69: !debug
[08:31:40] helpa: dionysus69: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[08:31:47] rgtk: has joined #RubyOnRails
[08:33:05] Polysics: oded, sevenseacat, rvanlieshout: sorry for wasting your time. I have someone in the team who is not careful with details :)
[08:33:07] bmalum: has joined #RubyOnRails
[08:33:12] ruurd: has joined #RubyOnRails
[08:33:25] Polysics: this route is part of a group we call "development" and it was disabled in a config change that I merged this morning.
[08:33:33] Polysics: disabled in test, that is
[08:33:48] oded: cool, glad you found the problem
[08:34:14] nettoweb: has joined #RubyOnRails
[08:34:22] lipoqil: has joined #RubyOnRails
[08:37:35] raunicolae: has joined #RubyOnRails
[08:38:01] riotjones: has joined #RubyOnRails
[08:38:33] pawnbox: has joined #RubyOnRails
[08:40:14] blackmesa: has joined #RubyOnRails
[08:41:21] vigintas: has joined #RubyOnRails
[08:42:16] sebstrax: has joined #RubyOnRails
[08:44:50] annlewis: has joined #RubyOnRails
[08:48:07] neanderslob: has joined #RubyOnRails
[08:49:18] bruno-: has joined #RubyOnRails
[08:51:14] kimegede: has joined #RubyOnRails
[08:51:20] roshanavand: has joined #RubyOnRails
[08:52:37] roshanav_: has joined #RubyOnRails
[08:54:58] yfeldblum: has joined #RubyOnRails
[08:55:06] camilasan: has joined #RubyOnRails
[08:55:21] chridal: has joined #RubyOnRails
[08:56:53] relix: has joined #RubyOnRails
[08:58:56] krzkrz: has joined #RubyOnRails
[09:00:08] mikecmpbll: has joined #RubyOnRails
[09:00:18] dionysus69: can anyone please take a look at this? https://gist.github.com/webzorg/27582e19fe7a2fa25c31 the files don't get opened and I can't get the url right to open files for paperclip :\
[09:00:31] cac: has joined #RubyOnRails
[09:02:18] startupality: has joined #RubyOnRails
[09:02:32] xardion: has joined #RubyOnRails
[09:02:32] Caius: has joined #RubyOnRails
[09:02:37] pusewicz: has joined #RubyOnRails
[09:02:46] Caius: has joined #RubyOnRails
[09:03:15] marr: has joined #RubyOnRails
[09:04:06] jsrn_: has joined #RubyOnRails
[09:04:38] purplexed-: has joined #RubyOnRails
[09:04:38] purplexed-: has joined #RubyOnRails
[09:04:54] oded: dionysus69: you use File.open and not aws sdk?
[09:05:30] chridal: has joined #RubyOnRails
[09:08:22] bePolite: has joined #RubyOnRails
[09:08:22] bePolite: has joined #RubyOnRails
[09:08:39] alaing: has joined #RubyOnRails
[09:09:47] alaing: good morning all. I wondered if you could help me with an issue I'm having with rspec. from my terminal when i run rspec ./spec/controllers/report_bug_controller_spec.rb:47 it seems to be running all the tests instead of just one the specific test that I'm referring to
[09:10:08] alaing: it seems to be a local machine issue as other develops on my team can run individual tests
[09:10:12] baweaver: has joined #RubyOnRails
[09:10:34] glaksmono: has joined #RubyOnRails
[09:11:29] dionysus69: oded: I use file open to insert it in paperclip, I wouldn't know how sdk way works but besides that worked when I had tobeuploadedimages dir on local dev
[09:11:42] oded: alaing: could line 47 be a shared example?
[09:11:48] mark3: has joined #RubyOnRails
[09:12:26] oded: dionysus69: not sure I understand, are you using S3 or a local filesystem?
[09:12:35] alaing: no its not a shared example
[09:12:45] dionysus69: s3 as I am migrating local public to s3
[09:13:02] alaing: this is the test it should be running:
[09:13:09] alaing: context 'and no user signed in' do
[09:13:09] alaing: it "redirects to the sign in page" do
[09:13:09] alaing: post :create, report_bug: params
[09:13:11] alaing: expect(response).to redirect_to(new_user_session_url)
[09:13:25] oded: you should use gists for that https://gist.github.com/
[09:13:33] freezevee1: has joined #RubyOnRails
[09:14:18] oded: dionysus69: so what fails, accessing your local filesystem or S3?
[09:14:27] rgtk: has joined #RubyOnRails
[09:15:37] dionysus69: accessing s3 tobeuploadedimages dir to open files from it :)
[09:15:51] alaing: oded: https://gist.github.com/aliuk2012/cbfdf727477667b50988
[09:16:17] alaing: is is one of the test specs for one of my controllers
[09:16:49] oded: dionysus69: did you try this: http://docs.aws.amazon.com/sdkforruby/api/index.html?
[09:17:26] oded: alaing: seems like like 47 doesn't point to anything, it's outside a test
[09:17:55] oded: which would probably run the entire describe "POST #create"
[09:18:18] nettoweb: guys, Im getting this error just on production (log level=info): https://gist.github.com/osnysantos/21adbb6e4d95ff37a91c
[09:18:52] cac: has joined #RubyOnRails
[09:19:20] oded: nettoweb: does the controller have def index?
[09:19:29] oded: VisitorsController
[09:19:40] alaing: oded: changed it to line 48 but its still running all the tests. When I exit rspec it had run 353 examples
[09:19:48] alaing: and a couple pending
[09:19:56] nettoweb: it was suppose to work withou I think because locally work, but I even add this DEF there ans still appear this error
[09:20:00] alaing: which isn't in that controller
[09:20:06] dionysus69: this is another thing, I had trouble making version 2 of aws work either ...
[09:20:22] kitsuneyo: has joined #RubyOnRails
[09:20:23] pawnbox: has joined #RubyOnRails
[09:20:43] agit0: has joined #RubyOnRails
[09:22:11] nfk|laptop: has joined #RubyOnRails
[09:22:18] oded: nettoweb: it wouldn't work without, you need a function defined (even an empty one)
[09:22:38] oded: dionysus69: well that's not much to go on...
[09:22:47] alaing: oded: when i format my test output it starts with API::V1::Admin::Claim
[09:23:06] chibs: has joined #RubyOnRails
[09:23:34] dionysus69: oded I wanted to avoid it but I will just go with uploading files everytime, luckily will only have to do it once every couple weeks
[09:23:34] oded: alaing: are you sure you are writing the correct file name?
[09:23:36] nettoweb: oded actually on localhost host it works with no problem. I set root to: 'visitors#index' on routes.rb and it's working with no 'def index' at VisitorsController
[09:24:18] nettoweb: oded but as I mentioned, I put there and event thne it not worked
[09:24:23] oded: nettoweb: that's the weird part really (for me), what rails version?
[09:24:57] alaing: oded: yes, I ran rspec on its own it then returned two errors and I copied the rspec ./spec/controllers/report_bug_controller_spec.rb:47 # ReportBugController POST #create when valid and no user signed in redirects to the sign in page
[09:25:07] defsdoor: defined index in application controller ?
[09:25:12] alaing: and also tried rspec ./spec/controllers/report_bug_controller_spec.rb:40 # ReportBugController POST #create when valid and user signed in redirects to the users home
[09:25:59] Peg-leg: has joined #RubyOnRails
[09:26:32] teclator: has joined #RubyOnRails
[09:27:59] voker57: has joined #RubyOnRails
[09:28:06] alaing: oded: its starting from the very first spec in the folder structure and working its why through all of them
[09:28:36] raunicolae: has joined #RubyOnRails
[09:29:04] luckymee_: has joined #RubyOnRails
[09:29:43] oded: hmm that's weird. What do you have on spec_helper.rb and .rspec?
[09:31:47] Cervajz: has joined #RubyOnRails
[09:31:53] roshanavand: has joined #RubyOnRails
[09:32:16] Cervajz_: has joined #RubyOnRails
[09:34:09] nettoweb: oded maybe something related to unicorn? that's a small app but rinnung in a $5 Digital ocean droplet
[09:34:14] lacuna: has joined #RubyOnRails
[09:35:47] adre: has joined #RubyOnRails
[09:36:12] oded: I don't think so. Maybe an old VisitorsController is loaded on your development system (maybe try to restart the server, etc)
[09:36:25] diegobiavati: has joined #RubyOnRails
[09:36:50] jgt1: has joined #RubyOnRails
[09:36:52] glaksmono: has joined #RubyOnRails
[09:37:27] gaussblurinc1: has joined #RubyOnRails
[09:37:34] weckl: has joined #RubyOnRails
[09:37:44] tvw: has joined #RubyOnRails
[09:38:48] riotjones: has joined #RubyOnRails
[09:39:06] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[09:39:17] oded: For example if you open irb and define a class with a method, and then redefine the class without the method, the method will not disapear. This could have happened in development (in some weird loading scenario) if you had that method defined in the past
[09:39:25] jgt1: has joined #RubyOnRails
[09:40:47] arup_r: has joined #RubyOnRails
[09:41:00] blackmesa: has joined #RubyOnRails
[09:43:31] alaing: oded: this is the .rspec https://gist.github.com/aliuk2012/0b3e8c5fad4b88019182
[09:43:41] alaing: oded its only an issue on my machine
[09:43:54] Palsson: has joined #RubyOnRails
[09:44:48] quazimodo: has joined #RubyOnRails
[09:45:38] annlewis: has joined #RubyOnRails
[09:45:40] alaing: oded: https://gist.github.com/aliuk2012/bf201f9acb8b7cd47b2b heres my rails_helper
[09:47:14] lxsameer: has joined #RubyOnRails
[09:48:35] htmldrum: has joined #RubyOnRails
[09:49:19] cac: has joined #RubyOnRails
[09:50:20] bruno-: has joined #RubyOnRails
[09:50:47] Cervajz: has joined #RubyOnRails
[09:55:33] waka: has joined #RubyOnRails
[10:00:53] kramsee_: has joined #RubyOnRails
[10:03:46] freezeve1: has joined #RubyOnRails
[10:05:56] blackmesa: has joined #RubyOnRails
[10:07:21] Palsson: has joined #RubyOnRails
[10:08:09] bruno-_: has joined #RubyOnRails
[10:11:02] Balllkenende: has joined #RubyOnRails
[10:11:42] harishreddy: has joined #RubyOnRails
[10:11:45] yutu: has joined #RubyOnRails
[10:12:05] quazimodo: has joined #RubyOnRails
[10:12:51] yutu: has left #RubyOnRails: ("Leaving")
[10:13:12] rails670: has joined #RubyOnRails
[10:13:14] bruno-_: has joined #RubyOnRails
[10:13:32] glaksmono: has joined #RubyOnRails
[10:13:36] kitsuneyo: has joined #RubyOnRails
[10:13:44] oded: ataing: sry, was afk. can you try to comment out SimpleCov and require "codeclimate-test-reporter"?
[10:14:04] oded: unless it's important
[10:14:05] nfk|laptop: has joined #RubyOnRails
[10:15:53] curses: has joined #RubyOnRails
[10:16:02] agit0: has joined #RubyOnRails
[10:17:38] gregf_: has joined #RubyOnRails
[10:17:50] oded: actually I'm just trying random stuff, you should check everything you required and try to comment out stuff until you get to whatever is causing all the tests to run. Also if there is a filter (like -t) that filters everything you could end up running everything
[10:18:03] rodfersou: has joined #RubyOnRails
[10:18:37] agoldboi: has joined #RubyOnRails
[10:18:40] kitsuneyo: has joined #RubyOnRails
[10:19:14] agoldboi: Hey guys, how can i defrenciate in code between server running on production and assets:precompile?
[10:19:38] rails670: has joined #RubyOnRails
[10:19:56] agoldboi: I want to specify something just for server run and not for precompiling process
[10:20:27] oded: agoldboi: an initializer?
[10:20:28] Palsson: has joined #RubyOnRails
[10:21:15] sonOfRa: has joined #RubyOnRails
[10:21:16] krzkrz: has joined #RubyOnRails
[10:21:28] DEA7TH: has joined #RubyOnRails
[10:22:27] rails690: has joined #RubyOnRails
[10:23:15] dionysus69: can anyone please check this out? as I precompile assets, the image tag within html.erb works but not within scss, heres the gist with all links necessary https://gist.github.com/webzorg/ab70da90a71e7d43173a
[10:25:50] oded: dionysus69: what's not working? it seems fine (two different hashes, two different files)
[10:25:53] dionysus69: basically if you paste one link in browser it returns an image and another says permission denied... based on what? I don't see difference
[10:26:24] jgt1: has joined #RubyOnRails
[10:27:07] oded: check the S3 permissions for this file
[10:27:11] dionysus69: oded: the arrow cannot be fetched from the server but the slide can be, the only difference between those is that one is called from scss and another from html.erb... the other tag I have in scss is a custom font, that also fails to be fetched
[10:27:49] oded: it's not a difference, since S3 doesn't know if it's from a CSS or HTML. like you said you can try it in the browser and you get the response
[10:28:11] rails690: ive got a question: what happens if you have so many search params that you can no longer use GET, you have to use POST, but you want to preserve the params so that your table can correctly sort, paginate, delete and maintain the current page & view?
[10:28:15] dionysus69: same permissions for everything in s3, read/open for public
[10:28:29] rails690: so how can you do that?
[10:28:35] ibouvousaime: has joined #RubyOnRails
[10:28:40] oded: for that file specifically? can you ensure the file is there?
[10:29:20] oded: rails690: how many params do you have? why do you have so many?
[10:29:38] rails690: because for example if you're searching for 30 different people
[10:29:41] oded: rails690: could some of them not belong in params, but in a cookie for instance (session cookie)
[10:30:08] dionysus69: oded yes I can see its there but when I enter arrow url for example, it says permission denied even though permission for it is setup to be allowed. thats why rails app cant open it, everything else opens strangely the coincidence is that both tags cant be opened which are called from scss file. so I am weirded out
[10:30:14] oded: rails690: you have a sort of a filter that you choose multiple choices?
[10:30:33] rails690: yeah, like multi-term search
[10:31:19] oded: rails690: maybe a different format? use commas to separate them or something? I'm not sure never had this problem
[10:31:46] rails690: im using ransack
[10:31:59] oded: rails690: you can use POST to create a "search resource", get an ID and use get with that ID (and different pagination parameters)
[10:32:20] roshanavand: has joined #RubyOnRails
[10:32:21] oded: so the server remembers the search term for a while maybe, not sure
[10:32:33] rails690: and so you can imagine, itll do q[:name_cont]='name1'&q[:name_cont]='name2' for each name
[10:32:45] oded: Yes rails690 I get that
[10:32:55] roshanavand: has joined #RubyOnRails
[10:33:29] oded: dionysus69: it seems to not be related to CSS/HTML since you can't access it from your browser. Maybe S3 has some weird feature to permit only specific extensions (they have different extensions)
[10:33:39] rails690: hmm... search resource.. get an id, use get with the id
[10:33:54] rails690: thatll also allow me to save searches
[10:34:23] rails690: interesting
[10:34:46] oded: I mean if the search parameters are to large, maybe you don't really want to send it every time, you could save it once at the server and use it multiple times. (could even help with caching)
[10:35:13] oded: but it's just one solution I can think of
[10:35:38] roshanavand: has joined #RubyOnRails
[10:36:51] rails690: im just a little confused on how to use get with the ID... ok so submitting the search creates a search object, which has an ID, query, & what else?
[10:37:14] ldnunes: has joined #RubyOnRails
[10:37:24] rails690: and then how do i use that when paginating, etc... itll call the pagination param from within the search object?
[10:37:30] bePolite: has joined #RubyOnRails
[10:37:43] rails690: no actually the pagination param must be outside
[10:37:50] rails690: of the search object
[10:37:59] bePolite: has joined #RubyOnRails
[10:37:59] bePolite: has joined #RubyOnRails
[10:38:33] wethu: has joined #RubyOnRails
[10:38:41] bePolite: has joined #RubyOnRails
[10:38:42] bePolite: has joined #RubyOnRails
[10:39:36] riotjones: has joined #RubyOnRails
[10:40:12] oded: you might want to try first separating the people with commas :)
[10:40:22] oded: but let's say:
[10:40:26] dionysus69: oded: ye I am investigating atm. nothing gets loaded except of jpg and png good observation.
[10:40:40] rails690: they're already separated with commas
[10:40:50] oded: POST /searches -> creates a search object
[10:40:50] rails690: then ransack parses the array and searches for each term
[10:41:02] oded: GET /searches/5?page=5 -> returns the results
[10:42:21] rails690: ohh okk lemme see if i can implement this, good idea
[10:43:28] DoubleMalt: has joined #RubyOnRails
[10:45:12] jahbrewski: has joined #RubyOnRails
[10:45:50] roshanavand: has joined #RubyOnRails
[10:46:27] annlewis: has joined #RubyOnRails
[10:48:49] kramsee: has joined #RubyOnRails
[10:49:17] RegulationD: has joined #RubyOnRails
[10:49:38] blackmesa: has joined #RubyOnRails
[10:51:54] glaksmono: has joined #RubyOnRails
[10:53:22] yogeshrt: has joined #RubyOnRails
[10:56:25] krzkrz: has joined #RubyOnRails
[10:57:16] njero: has joined #RubyOnRails
[10:58:53] pawnbox: has joined #RubyOnRails
[10:59:33] freight: has joined #RubyOnRails
[11:01:53] agoldboi: has joined #RubyOnRails
[11:03:12] darrencauthon: has joined #RubyOnRails
[11:03:43] marr: has joined #RubyOnRails
[11:06:23] tuelz1: has joined #RubyOnRails
[11:07:16] kitsuneyo: has joined #RubyOnRails
[11:07:45] ErhardtMundt: has joined #RubyOnRails
[11:08:11] ErhardtMundt: I have a problem with a JSON being deserialized in a wrong (unexpected) way
[11:08:30] ErhardtMundt: why do arrays become hashes with the index value as key?
[11:09:20] ErhardtMundt: I expect [1, 2, 3] to be deserialized as [1, 2, 3], not {"0" => 1, "1" => 2, "2" => 3}
[11:10:00] yuujinlee: has joined #RubyOnRails
[11:11:17] stamina: has joined #RubyOnRails
[11:11:46] ErhardtMundt: that's driving me nuts
[11:12:31] lipoqil: has joined #RubyOnRails
[11:12:59] baweaver: has joined #RubyOnRails
[11:13:47] tbuehlmann: ErhardtMundt, where is this deserialization happening?
[11:15:08] dionysus69: no one experiences problem with svg or ttf files on s3? modiefied CORS??
[11:16:50] wethu: has joined #RubyOnRails
[11:20:27] rickmasta: has joined #RubyOnRails
[11:20:40] ErhardtMundt: tbuehlmann: I just have params structured that way
[11:21:04] tbuehlmann: so, in a controller?
[11:21:11] ErhardtMundt: yes, in a controller
[11:21:48] annlewis: has joined #RubyOnRails
[11:21:49] tbuehlmann: great, good to know. so, how do you get the data? a form?
[11:21:56] freezevee1: has joined #RubyOnRails
[11:22:17] lacuna: has joined #RubyOnRails
[11:22:42] annlewis_: has joined #RubyOnRails
[11:22:45] ErhardtMundt: tbuehlmann: an ajax call
[11:23:18] chrissonar: since the "scoped" method of ActiveRecord::NamedScope::ClassMethods was removed in rails4, what to return instead, when the named scope decides to do nothing?
[11:24:12] tbuehlmann: chrissonar, what do you mean, "to do nothing"?
[11:24:19] chibs: has joined #RubyOnRails
[11:24:20] tbuehlmann: ErhardtMundt, so, what are you sending from the client?
[11:24:57] chrissonar: tbuehlmann, like e.g. if the passed argument is nil, then do not append a condition.
[11:25:00] ErhardtMundt: tbuehlmann: I use ajax to make a post call, dataType is set to 'json' and data is set to an object which contains arrays
[11:25:37] ErhardtMundt: I have the data object in the inspector, no doubt it contains arrays
[11:25:42] tbuehlmann: chrissonar, it will return the relation, then
[11:25:47] chills42: has joined #RubyOnRails
[11:25:47] chrissonar: tbuehlmann, e.g. in former times id did: def self.foo(tag_ids=[]); return scoped if tag_ids.empty?; where.not id: tag_ids; end
[11:26:00] chrissonar: tbuehlmann, but scoped is removed from rails4
[11:26:07] tbuehlmann: chrissonar, there's a difference between a scope and a class method
[11:26:24] tbuehlmann: when using the scope class method and doing "nothing", it will return the relation
[11:26:51] chrissonar: aah. I#ll try that
[11:28:35] tbuehlmann: ErhardtMundt, can you check the params incoming in your server terminal output?
[11:29:04] ErhardtMundt: tbuehlmann: yes, and they are in the object format
[11:29:34] ErhardtMundt: I mean, {"0" => value, ???
[11:29:40] User458764: has joined #RubyOnRails
[11:30:10] chrissonar: tbuehlmann, thanks a lot! it works like a charm.
[11:30:19] chridal: has joined #RubyOnRails
[11:30:35] tbuehlmann: ErhardtMundt, hard to tell with that much information
[11:30:40] tbuehlmann: chrissonar, great!
[11:32:42] ErhardtMundt: tbuehlmann: what do you mean?
[11:32:57] tbuehlmann: provide some more information, the objects you provide, the exact params you see
[11:33:07] ErhardtMundt: ok, see you later
[11:33:09] sadaf2605: has joined #RubyOnRails
[11:40:04] dionysus69: omg this is killing me already why is this returning http://smugglers.s3.amazonaws.com/production/assets/Carnevalee-Freakshow-13fd3ec162392fa0e3da972f8f69d348dec5f765bfdba0b773d61f074d942dd8.ttf access denied
[11:40:20] riotjones: has joined #RubyOnRails
[11:40:29] dionysus69: I tried modifying everything starting from cors policy, bucket policy... still nothing
[11:41:21] riotjones: has joined #RubyOnRails
[11:49:39] krzkrz: has joined #RubyOnRails
[11:51:19] chrislotix: has joined #RubyOnRails
[11:51:27] Cervajz: has joined #RubyOnRails
[11:53:35] Cervajz_: has joined #RubyOnRails
[11:53:39] wethu: has joined #RubyOnRails
[11:55:15] roshanavand: has joined #RubyOnRails
[11:55:17] Pazician: has joined #RubyOnRails
[11:57:20] apg: has joined #RubyOnRails
[11:57:41] broman: has joined #RubyOnRails
[11:58:14] Yomero3: has joined #RubyOnRails
[11:58:15] broman: can anyone please help me??? when in not marking the checkbox on the post i would like to do a params[:param] = 0... how can i do that?
[11:59:06] dionysus69: broman: you can set a default value to be 0 I dont know syntax by-heart
[12:00:30] harishreddy: has joined #RubyOnRails
[12:00:46] broman: dionysus69, ? when the checkbox is unchecked it just sends nothing
[12:01:36] bruno-: has joined #RubyOnRails
[12:03:54] dionysus69: http://stackoverflow.com/questions/1809494/post-the-checkboxes-that-are-unchecked this is one ugly solution I guess
[12:03:59] dionysus69: google for better
[12:04:19] oded: dionysus69: wanna gist the policies of the bucket?
[12:04:43] dionysus69: oded I just deleted them since I dont think they matter
[12:05:07] oded: now, can you access anything?
[12:05:15] broman: i tried to do this but couldn't: unless defined?(params[:correcao][:crivo]) then params[:correcao][:crivo]=0 end
[12:05:24] dionysus69: yes everything except two formats, svg and ttf
[12:05:41] broman: how can i define something from the params? like params[:ok]=1
[12:06:01] oded: can you maybe try to rename the file and see if it works after?
[12:06:21] oded: broman: use value: params[...] || 0
[12:06:28] oded: you don't need to change the params
[12:06:31] dionysus69: will try manually rename worth a shot
[12:06:46] dhjondoh: has joined #RubyOnRails
[12:07:27] broman: if i change the params, the logics are the same.. otherwise i will have to alter a few things...
[12:07:35] oded: broman: if params[:correcao] doesn't always exist you can use https://rubygems.org/gems/nil_or (params[:correcao].nil_or[:crivo] || 0)
[12:08:01] dionysus69: oded actually renaming won't work since I cant access the url itself ok I ll make an example one second
[12:08:06] oded: hmm well I'm not a fan of changing params, but it's possible
[12:08:26] oded: You can't do it in S3 UI?
[12:08:38] broman: params[:correcao] always exists
[12:09:28] dionysus69: smugglers.s3.amazonaws.com/assets/slide1-d1cbd01cef861f0a7eff26c51541f786d4729d2c48c583b42e652da2df63daa3.jpg *********** this works
[12:09:29] dionysus69: smugglers.s3.amazonaws.com/production/assets/arrows-0428a2713d359fcb08557eca1f85a3a12f429d170d55e02be9488131b634d7d8.svg **** doesnt work
[12:09:40] dionysus69: just paste those in browser
[12:10:19] oded: ahhhh got your answer
[12:10:29] oded: why does it have production/ infront of it? it works without
[12:11:01] dionysus69: one second lol
[12:11:15] dionysus69: omg ye why does it have production
[12:11:46] dionysus69: how come, this is rail's fault lmfo it precompiles it like that
[12:12:39] oded: I can't believe it took us so long to see that difference
[12:12:52] dionysus69: I understand why that might have happened
[12:13:09] dionysus69: I added asset prefix to be production/assets before
[12:13:09] oded: grep production -r config
[12:13:34] oded: oh yeah, so in production (when you precompile) it has a different prefix than development
[12:13:35] dionysus69: but since then 2 hours passed and I removed it and it still wont get away for svg and ttf which both are in scss at last maybe scss part makes sense ? :D
[12:13:44] oded: restart the server
[12:13:55] WillAmes: has joined #RubyOnRails
[12:13:56] oded: after changing files under config/ you have to restart
[12:14:06] dionysus69: I did restart the server and deleted/precompiled assets for 3 times already
[12:14:08] oded: (if production, touch tmp/restart.txt or whatever)
[12:14:10] baweaver: has joined #RubyOnRails
[12:14:42] oded: try `grep production -r config` to check if there are any more like this
[12:14:44] dionysus69: all I have in config.action_controller.asset_host = "//#{ENV['FOG_DIRECTORY']}.s3.amazonaws.com"
[12:14:44] dionysus69: config.assets.initialize_on_precompile = true
[12:14:49] dionysus69: production.rb
[12:15:05] nya: has joined #RubyOnRails
[12:15:07] skullcrasher: is there a simple method that "clears" a hash from keys with nil value?
[12:15:25] bmalum: has joined #RubyOnRails
[12:15:39] dionysus69: since i dont understand the output oded https://gist.github.com/webzorg/c1a71266b5bd2f0e045b
[12:15:53] arup_r: has joined #RubyOnRails
[12:16:18] oded: hash.reject! { |k, v| v.nil? }
[12:16:53] oded: dionysus69: try on app/
[12:16:57] skullcrasher: nvm, found it: Hash.compact
[12:17:24] arup_r: Hash#compact in Rails not in Ruby though :/
[12:17:27] dionysus69: nothing on app
[12:17:48] oded: skullcrasher: oops I was testing in IRB and not rails console so I thought this method doesn't exist, it's from ActiveSupport
[12:18:09] skullcrasher: oded, np thx anyway ;)
[12:18:17] mooru: has joined #RubyOnRails
[12:18:22] oded: dionysus69: when I said restart the server I meant recompile again :)
[12:20:08] darrencauthon: has joined #RubyOnRails
[12:20:12] dionysus69: I am doing RAILS_ENV=production bin/rake assets:precompile, maybe I should precompile with without specifying env?
[12:21:00] oded: that's how I compile it too. can you remove public/assets before you do?
[12:21:04] jahbrewski: has joined #RubyOnRails
[12:21:14] dionysus69: i tried that already :\
[12:21:22] dionysus69: can this be a problem ? config.assets.initialize_on_precompile = true
[12:21:40] oded: is that on the same server you ran the grep command?
[12:22:24] tuelz1: has joined #RubyOnRails
[12:22:40] oded: not sure what initialize_on_precompile does, but https://github.com/railsware/js-routes/issues/79
[12:22:42] dionysus69: I dont really know what exactly its for, something to do with initializers being initialized at precompile as I understood
[12:22:44] solars: has joined #RubyOnRails
[12:23:06] dionysus69: ok nvm i guess its an old thing
[12:23:12] dionysus69: i ll remove and retry full stack
[12:23:18] CVirus: has joined #RubyOnRails
[12:23:33] oded: oh I know what it does, it runs the rails initializations... stupid me
[12:23:39] CVirus: has left #RubyOnRails: ("Leaving")
[12:23:52] dionysus69: so is it needed?
[12:23:58] dionysus69: doesnt it do it by default?
[12:24:03] oded: rails 4?
[12:24:37] oded: I don't have it
[12:24:56] dionysus69: ye I added it cause some guide had it
[12:25:00] oded: can you gist your config/environments/production.rb and config/application.rb?
[12:25:06] dionysus69: i guess it was old guide ...
[12:25:55] dionysus69: https://gist.github.com/webzorg/24aaca6c568110df78a3
[12:26:08] mikecmpb_: has joined #RubyOnRails
[12:28:43] seank_: has joined #RubyOnRails
[12:29:04] avril14th: has joined #RubyOnRails
[12:29:42] avril14th: Hello, is there any way to have some code executed when a rails console is launched in test mode (and some code executed when it is executed)
[12:29:55] avril14th: -executed + terminated
[12:31:05] roshanavand: has joined #RubyOnRails
[12:31:38] annlewis: has joined #RubyOnRails
[12:32:36] darrencauthon: has joined #RubyOnRails
[12:32:39] oded: dionysus69: what's in here: ENV['FOG_DIRECTORY']
[12:33:28] jgt1: has joined #RubyOnRails
[12:33:30] dionysus69: now it got generated correctly background-image: url(/assets/arrows-0428a2713d359fcb08557eca1f85a3a12f429d170d55e02be9488131b634d7d8.svg);
[12:33:36] dionysus69: fog dir is just smugglers
[12:33:40] dionysus69: that one is good
[12:33:54] oded: avril14th: you can change spec/spec_helper.rb if you use RSpec, or you can add a ruby file in config/initializers and check RAILS_ENV in it.
[12:34:22] oded: dionysus69: so the difference is initialize_on_precompile?
[12:34:33] dionysus69: it seems its been correct all this time but wrong css file gets servered
[12:34:46] dionysus69: no difference is cloudflare cache maybe...
[12:34:50] oded: oh you were looking at the old css file...
[12:35:04] dionysus69: because I just checked production scss file is correct but site shows up old version
[12:35:15] avril14th: oded: I already use spec_helper. my trouble is that I also want to wrap every rails console session in DatabaseCleaner.start / stop. I guess start an initilializer would do, but I would still need to catch the session termination
[12:35:28] oded: each time you precompile new files with new hashes gets generated, it doesn't remove the old files. You need to look at the new HTML and go to the relevant CSS file
[12:35:29] dionysus69: ok i ll go purge the hell out of cache
[12:36:04] oded: avril14th: no that doesn't belong in an initializer, that belongs to spec_helper
[12:36:23] oded: or a file spec_helper requires, sec I'll show you what I do
[12:36:45] avril14th: oded: before / after I already do in spec_helper
[12:37:06] avril14th: but I'm looking for a rails console wrap
[12:37:11] avril14th: in dev, test, whatever
[12:37:15] avril14th: not a wrap around tests
[12:37:19] stamina: has joined #RubyOnRails
[12:38:24] oded: avril14th: https://gist.github.com/odedniv/c9a24466713ce5fa4f33
[12:38:51] oded: Just require 'database_cleaner' from console and run DatabaseCleaner.start
[12:38:56] avril14th: oded: thx for the link, I got the same at home :)
[12:38:57] oded: I mean clean
[12:39:06] dionysus69: oded ok now it got me how do I make it update html files so they point to the new css
[12:39:08] bbrowning: has joined #RubyOnRails
[12:39:17] dionysus69: it loads old html with pointer to old css
[12:39:19] oded: they should do it automatically
[12:39:20] avril14th: oded: yes, that's the point I don't want to call it by hand. I want to have it called automatically. both start and clen :D
[12:39:27] dionysus69: but its still old :S
[12:39:51] dionysus69: it seems this damn application.scss file is the whole problem
[12:40:02] oded: hmm you can add an initializer, use config/environments/development.rb, or use .irbrc though I doubt it will work there
[12:40:08] dionysus69: i am at the point where I manually change url
[12:40:34] blackmesa: has joined #RubyOnRails
[12:41:19] oded: dionysus69: I think it uses the manifest file in public/assets to decide what file to use. is you HTML an asset or app/views?
[12:42:06] dionysus69: html is app views
[12:42:08] riotjones: has joined #RubyOnRails
[12:42:15] dionysus69: i am trying rake tmp:clear
[12:42:58] oded: is it all on your development machine?
[12:43:09] build22_: has joined #RubyOnRails
[12:43:46] dionysus69: on both production and dev
[12:43:46] moeabdol: has joined #RubyOnRails
[12:44:46] dionysus69: finally it worked....
[12:45:01] dionysus69: I deleted cloudflare cache tmp:clear and 2 hours wasted
[12:45:10] dionysus69: thanks for support allot :D
[12:48:12] AltaUni: has joined #RubyOnRails
[12:48:29] njero: gd eve fellas.. got a doubt. if i'm creating more than one resource in one controller action (through association), shouldn't i check if association is created successfully and rollback everything to original state(so that user can request again). I read it's a bad practice to wrap controller action in transaction. How to approach this issue? should i manually check each and rollback if necessary?
[12:48:55] Aswebb_: has joined #RubyOnRails
[12:48:57] AltaUni: has left #RubyOnRails: ()
[12:49:25] Altazimuth: has joined #RubyOnRails
[12:49:32] Altazimuth: I'm having a really strange bug. Whenever I try going on the edit page it throws ' undefined method `actuallistelement_path' for #<#<Class:0x007fe619dd8310>' at me for the line '<%= form_for(@actuallistelement) do |f| %>'. The code for routes is here: http://pastebin.com/HfQnDa3u . Any ideas? I've tried all sorts of things but nothing ever ends up without some sort of error somewhere down the road. Any advice would be much a
[12:49:49] Icey: has joined #RubyOnRails
[12:49:53] roshanavand: has joined #RubyOnRails
[12:50:57] Altazimuth: http://pastie.org/private/kzddi3qlynsjrffkxjeka There we go, on pastie.
[12:51:49] Altazimuth: I tried making actuallistelements a resource but then it kept looking for templates in the wrong places and I can't afford to move the templates.
[12:51:50] Icey: has joined #RubyOnRails
[12:53:34] Sigfrid: has joined #RubyOnRails
[12:53:54] Balllkenende: has joined #RubyOnRails
[12:54:27] bruno-: has joined #RubyOnRails
[12:54:32] chridal: has joined #RubyOnRails
[12:54:36] Altazimuth: i.e. error: "Missing template actuallistelements/edit" If it could point to todolost/edit instead that would be wonderful.
[12:55:00] arup_r: Altazimuth: Because you didn't define helper for POST route
[12:55:25] arup_r: Altazimuth: do use resources helper to create those routes. No manual at least your example
[12:56:48] arup_r: Altazimuth: use the method `resources` .. to define those routes
[12:57:58] CanTonic: has joined #RubyOnRails
[12:58:02] Altazimuth: Okay, how can I change where a resource looks for templates, though?
[12:59:57] artto: has joined #RubyOnRails
[13:00:02] renews: has joined #RubyOnRails
[13:00:16] arup_r: I don't know what you asked..
[13:00:40] brenop: has joined #RubyOnRails
[13:02:16] arup_r: fix the route first, so that you can reach to the correct controller action and then handle rendering view
[13:02:39] chridal: has joined #RubyOnRails
[13:03:27] njero: gd eve fellas.. got a doubt. if i'm creating more than one resource in one controller action (through association), shouldn't i check if association is created successfully and rollback everything to original state(so that user can request again). I read it's a bad practice to wrap controller action in transaction. How to approach this issue? should i manually check each and rollback if necessary?
[13:03:43] rvanlieshout: n_e_o: why not have rails do that?
[13:03:50] rvanlieshout: if you save the parent object, it'll save all children
[13:03:53] rvanlieshout: and rollback if needed
[13:04:17] roshanavand: has joined #RubyOnRails
[13:05:36] njero: rvanlieshout: hw to do that..My use case is generate api_key for user after saving user
[13:06:40] rvanlieshout: n_e_o: explain that
[13:07:10] sevenseacat: has joined #RubyOnRails
[13:07:46] njero: like,.. apikey model provides token for devices. So after user is created, it will generate token and return it in response
[13:07:50] Altazimuth: Ok so it works to a degree now, but after I update it still leaves me in .com/actuallistelements/id, though i want to go to .com/actuallistelements/id/edit straight back to .com
[13:07:58] njero: user to api_key has_many assoc
[13:08:19] rvanlieshout: n_e_o: so build an api_key instance with .user filled
[13:08:22] rvanlieshout: then just save .api_key
[13:09:13] njero: rvanlieshout: so i shouldn't call create user.create before rt?
[13:09:33] jkamenik: has joined #RubyOnRails
[13:10:24] lacuna: has joined #RubyOnRails
[13:10:25] lacuna: has joined #RubyOnRails
[13:11:42] njero: rvanlieshout: can u clarify? if i already created user, then failing to save apikey won't rollback user rt?
[13:11:59] arup_r: Altazimuth: Show your update controller action ..
[13:13:17] hardtail: has joined #RubyOnRails
[13:14:08] rvanlieshout: n_e_o: try it
[13:14:10] rvanlieshout: in a rails console
[13:14:23] rvanlieshout: and if you want both to fail wrap it in a transaction
[13:14:27] rvanlieshout: not manually save things first
[13:15:01] dANO-: has joined #RubyOnRails
[13:15:33] Balllkenende: has joined #RubyOnRails
[13:17:33] BradenBraden: has joined #RubyOnRails
[13:18:12] walidvb: has joined #RubyOnRails
[13:18:52] walidvb: i'm trying to write rspecs for my controllers, but would like to post '/users' rather than post :create. as in, use the path rather than the action name
[13:18:59] walidvb: can't really find how to do that, though?
[13:19:08] Altazimuth: Fixed it. Thanks for the help.
[13:19:35] bvbrandon: has joined #RubyOnRails
[13:20:18] rvanlieshout: walidvb: and you want that because?
[13:21:32] walidvb: right this very moment, for convenience. i'm writing an API for a colleague that knows little RoR, don't really have time to come up with a proper documentation generator, so this way i can simply point him to the test files, and have him see what params to post where.
[13:21:47] walidvb: i can obviously have that in the comments, or in the test description
[13:22:05] rvanlieshout: or just include the output of rake routes
[13:23:19] atomical: has joined #RubyOnRails
[13:23:47] walidvb: rvanlieshout: of course. just trying to make his life easy, but obv you're right. many ways around this.
[13:23:51] walidvb: sry to bother ^^
[13:24:13] Icey: has joined #RubyOnRails
[13:24:57] Icey: has joined #RubyOnRails
[13:24:59] chibs: has joined #RubyOnRails
[13:25:48] momomomomo: has joined #RubyOnRails
[13:25:49] rvanlieshout: walidvb: learning that simle thing will make his live easier :)
[13:25:49] treehug88: has joined #RubyOnRails
[13:26:25] walidvb: totally agree. last he told me, was 'i'm one of these developers who tries to avoid the terminal as much as possible :/'
[13:26:54] elaptics: walidvb: sounds like you want request specs rather than controller specs
[13:27:43] walidvb: elaptics: hmm. fair point, but this way i'm combining both, no?
[13:28:08] cbetta: has joined #RubyOnRails
[13:29:48] Icey: has left #RubyOnRails: ()
[13:30:05] njero: rvanlieshout: i got it.. need to save parent last rt..
[13:30:47] dionysus69: just now I understood visually that app/controllers/application_controller.rb is the base of a ruby application, just the way to look at it
[13:31:01] BradenBraden: i have been looking into testing my engines and from what i can tell, the spec files want to be in the main_app directory (correct me if im wrong) so this lead me to the gem combustion which apparently makes it easy to test engines and allows all the tests to be inside of the engine itself. now I doubt gems like devise and such have done this for their tests so question, what is the best way to write tests for an engine in an engine?
[13:31:05] njero: rvanlieshout: got some useful info from http://api.rubyonrails.org/classes/ActiveRecord/AutosaveAssociation.html
[13:31:28] rboyd: has joined #RubyOnRails
[13:31:40] kitsuneyo: has joined #RubyOnRails
[13:32:26] annlewis: has joined #RubyOnRails
[13:32:27] herpless: has joined #RubyOnRails
[13:33:27] antgel: has joined #RubyOnRails
[13:34:11] quazimodo: has joined #RubyOnRails
[13:37:15] Ergo: has joined #RubyOnRails
[13:40:16] mary5030: has joined #RubyOnRails
[13:40:41] youngbaks: has joined #RubyOnRails
[13:42:34] Balllkenende: has joined #RubyOnRails
[13:42:55] riotjones: has joined #RubyOnRails
[13:44:07] mary5030: has joined #RubyOnRails
[13:44:53] theblang: has joined #RubyOnRails
[13:45:04] Pazician: has joined #RubyOnRails
[13:46:51] roshanavand: has joined #RubyOnRails
[13:49:14] harishreddy: has joined #RubyOnRails
[13:50:21] erbesharat: has joined #RubyOnRails
[13:50:31] dstarh: has joined #RubyOnRails
[13:50:49] markfletcher: has joined #RubyOnRails
[13:51:20] n1ck7: has joined #RubyOnRails
[13:52:17] Fire-Dragon-DoL: has joined #RubyOnRails
[13:53:22] funkylaundry: has joined #RubyOnRails
[13:55:53] maxz: has joined #RubyOnRails
[13:56:11] MuffinPimp: has joined #RubyOnRails
[13:58:16] georges: has joined #RubyOnRails
[13:58:38] dionysus69: has joined #RubyOnRails
[13:59:46] norc: has joined #RubyOnRails
[14:00:01] Isthar: has joined #RubyOnRails
[14:00:06] norc: Hi. Is there some decent gem that allows me to set up paginated tables with sortable columns easily?
[14:00:28] bvbrandon: has joined #RubyOnRails
[14:00:42] roshanavand: has joined #RubyOnRails
[14:00:47] rvanlieshout: there are many, you find out which one has the least amount of flaws
[14:00:52] Guest53: has joined #RubyOnRails
[14:01:14] solars: has joined #RubyOnRails
[14:03:11] norc: rvanlieshout: Guess I should be taking a look at ransack at least then?
[14:04:21] njero: hey... will active record return false even if db connection fails while saving record?
[14:05:26] norc: n_e_o: I would expect AR to throw an exception into your face if the connection fails.
[14:06:35] njero: norc: i like that, if I'm not handling the exception from where the response is rendered?
[14:06:44] constantinexvi: has joined #RubyOnRails
[14:07:02] rickmasta: has joined #RubyOnRails
[14:07:15] norc: n_e_o: There is default handlers in your ApplicationController.
[14:07:17] sankaber: has joined #RubyOnRails
[14:07:43] njero: norc: can u give link where i can find more details?
[14:08:04] norc: n_e_o: http://guides.rubyonrails.org/action_controller_overview.html#rescue
[14:08:23] njero: norc: thank you so much :)
[14:08:27] sankaber: has joined #RubyOnRails
[14:08:53] agit0: has joined #RubyOnRails
[14:12:36] darrencauthon: has joined #RubyOnRails
[14:15:05] drbayer: has joined #RubyOnRails
[14:15:23] momomomomo: has joined #RubyOnRails
[14:15:45] umgrosscol: has joined #RubyOnRails
[14:16:26] quazimod1: has joined #RubyOnRails
[14:17:00] ramortegui: has joined #RubyOnRails
[14:21:13] blackmesa: has joined #RubyOnRails
[14:24:49] yogeshrt: has joined #RubyOnRails
[14:25:24] antgel: has joined #RubyOnRails
[14:25:48] chibs: has joined #RubyOnRails
[14:26:03] bvbrandon: has joined #RubyOnRails
[14:28:07] lacrymol1gy: has joined #RubyOnRails
[14:29:03] platzhirsch: has joined #RubyOnRails
[14:31:24] rubyonrails618: has joined #RubyOnRails
[14:32:27] mag42c: has joined #RubyOnRails
[14:33:11] annlewis: has joined #RubyOnRails
[14:34:37] yogeshrt: has joined #RubyOnRails
[14:34:39] kitsuneyo: do tables paginate ok without a special gem?
[14:35:07] roshanavand: has joined #RubyOnRails
[14:35:08] glaksmono: has joined #RubyOnRails
[14:36:04] njero: kitsuneyo: depends,.. if u code it well with pagination functionality, it'll do. But reinventing the wheel is just absurd sometimes..
[14:36:24] kitsuneyo: i'm gonna test it out now
[14:37:10] qwertme: has joined #RubyOnRails
[14:37:58] mag42c: kitsuneyo: there???s a tutorial on richonrails that walks through pagination without a gem. It???s a very good overview of how to implement a simple version
[14:38:18] mag42c: I used it in my project and it worked like a charm
[14:38:42] kitsuneyo: thanks mag42c... i have the will_paginate gem, gonna see what happens if i add a load of data to a table
[14:40:20] m712: has joined #RubyOnRails
[14:41:00] Guest53: has joined #RubyOnRails
[14:42:35] bronson: has joined #RubyOnRails
[14:42:53] kitsuneyo: seems to work fine with will_paginate
[14:43:21] sikachu: has joined #RubyOnRails
[14:43:57] riotjones: has joined #RubyOnRails
[14:44:46] roshanavand: has joined #RubyOnRails
[14:45:14] maxx88: has joined #RubyOnRails
[14:45:15] user083: has joined #RubyOnRails
[14:45:40] DiCablo: has joined #RubyOnRails
[14:45:47] raenk: has joined #RubyOnRails
[14:45:51] shawnacscott: has joined #RubyOnRails
[14:45:52] Peteykun: has joined #RubyOnRails
[14:46:13] RichiH: has joined #RubyOnRails
[14:46:13] Depili: has joined #RubyOnRails
[14:46:30] build22: has joined #RubyOnRails
[14:46:46] banister: has joined #RubyOnRails
[14:46:46] skyjumper: has joined #RubyOnRails
[14:46:47] chrisarcand: has joined #RubyOnRails
[14:47:10] LiamW: has joined #RubyOnRails
[14:47:12] Dreamer3: has joined #RubyOnRails
[14:47:26] joeytwiddle: has joined #RubyOnRails
[14:47:32] ibouvousaime: has joined #RubyOnRails
[14:47:38] execute: has joined #RubyOnRails
[14:47:39] dionysus69: is this file supposed to be xml or xml.erb or totally something else?
[14:47:40] dionysus69: https://gist.github.com/
[14:47:48] dionysus69: https://gist.github.com/webzorg/2dd877fa42c0b9599630
[14:47:48] agoldboi: has joined #RubyOnRails
[14:47:49] brendan-: has joined #RubyOnRails
[14:48:36] teegee543: has joined #RubyOnRails
[14:48:40] bruno-: has joined #RubyOnRails
[14:48:49] ekem: has joined #RubyOnRails
[14:49:38] RTG`: has joined #RubyOnRails
[14:50:05] cschneid: has joined #RubyOnRails
[14:50:10] nertzy: has joined #RubyOnRails
[14:50:22] Guest24643: has joined #RubyOnRails
[14:51:19] purplexed-: has left #RubyOnRails: ("Leaving")
[14:51:39] pavelz: has joined #RubyOnRails
[14:51:50] bartj3: has joined #RubyOnRails
[14:52:00] pawnbox: has joined #RubyOnRails
[14:52:23] parus: has joined #RubyOnRails
[14:52:27] roshanavand: has joined #RubyOnRails
[14:52:36] atomical: has joined #RubyOnRails
[14:53:52] griffindy: has joined #RubyOnRails
[14:54:43] Cervajz: has joined #RubyOnRails
[14:55:27] shinnya: has joined #RubyOnRails
[14:58:19] srinidhi: has joined #RubyOnRails
[14:58:30] lacuna: has joined #RubyOnRails
[14:58:48] peitera: has joined #RubyOnRails
[14:59:35] jgt1: has joined #RubyOnRails
[15:00:03] mary5030: has joined #RubyOnRails
[15:00:29] bruno-_: has joined #RubyOnRails
[15:01:03] Cervajz_: has joined #RubyOnRails
[15:02:58] sarink: has joined #RubyOnRails
[15:04:05] RegulationD: has joined #RubyOnRails
[15:05:12] The_Phoenix: has joined #RubyOnRails
[15:05:29] HalcyonicStorm: has joined #RubyOnRails
[15:05:42] execute: has joined #RubyOnRails
[15:07:20] polishdub: has joined #RubyOnRails
[15:08:00] DanielN: has joined #RubyOnRails
[15:08:14] kp666_: has joined #RubyOnRails
[15:09:03] andywww: has joined #RubyOnRails
[15:09:11] bvbrandon: has joined #RubyOnRails
[15:09:25] andywww: hi, housekeeping question
[15:10:04] andywww: i have a couple of classes in lib that i want to test with rspec
[15:10:42] bratsche: has joined #RubyOnRails
[15:10:44] andywww: but the spec folder only has factories, controllers, models and support
[15:11:00] tbuehlmann: andywww, just add a lib directory
[15:11:23] andywww: in the spec folder?!
[15:12:01] vsakharov: has joined #RubyOnRails
[15:12:14] Jasaka: has joined #RubyOnRails
[15:12:27] andywww: hmm, its not picked it up
[15:13:17] andywww: i???m wondering if i need to add some config entry to tell it to look somewhere other than the defaults?
[15:13:47] andywww: there are a couple of stack overflow topics but neither seem to come to run to a completion
[15:14:39] tbuehlmann: andywww, what rails version do you use?
[15:14:46] momomomomo: has joined #RubyOnRails
[15:16:15] andywww: https://www.dropbox.com/s/cyqvjatk78l9dys/Screen%20Shot%202015-11-05%20at%2015.15.37.png?dl=0
[15:16:19] andywww: is this correct?
[15:16:33] dionysus69: what is best for sitemaps?
[15:16:36] rgtk: has joined #RubyOnRails
[15:16:49] infamos: has joined #RubyOnRails
[15:17:25] andywww: the class is in (config.root)/lib/classes/tweet_parser.rb
[15:17:30] tbuehlmann: andywww, looks good. did you add lib/ to the auto_loads or eager_load_paths? also, do you require rails_helper in the tweet_parser_spec.rb?
[15:17:49] andywww: yeah it can load it okay but running rspec gives me:
[15:18:07] kitsuneyo: dionysus69, ruby with some weird xml gem installed? http://apidock.com/rails/Builder/XmlMarkup/instruct!
[15:18:31] dionysus69: kitsuneyo: hmm thanks :)
[15:18:42] oded: has joined #RubyOnRails
[15:19:14] andywww: https://www.dropbox.com/s/ykoyck51zauz2z1/Screen%20Shot%202015-11-05%20at%2015.18.39.png?dl=0
[15:19:18] tbuehlmann: andywww, so it's namespaced?
[15:19:32] andywww: so it???s picking up the specs in the model and controller directories
[15:20:06] goodcodeguy: has joined #RubyOnRails
[15:20:22] jgt1: has joined #RubyOnRails
[15:20:23] andywww: no its just a bare class sat in the lib/classes
[15:20:35] tbuehlmann: I bet when you namespace it correctly it'll work
[15:20:46] andywww: pulled in with config.autoload_paths += %W( #{config.root}/lib/classes )
[15:20:54] daivyk: has joined #RubyOnRails
[15:21:03] lacrymol1gy: is it possible to use StrongParameters for query params?
[15:21:18] tbuehlmann: andywww, ah, lib/classes. then it should work right away
[15:21:19] mordocai: has joined #RubyOnRails
[15:22:01] MartinElvar: has joined #RubyOnRails
[15:22:02] tbuehlmann: andywww, could you add `DISABLE_SPRING=1` in front of your rspec command, just for a test?
[15:22:10] andywww: good point
[15:22:13] axl_: has joined #RubyOnRails
[15:23:13] mercerist: has joined #RubyOnRails
[15:23:21] andywww: hmm, no, its still not picking it up
[15:23:59] tbuehlmann: "works for me" :)
[15:24:11] dopamean_: has joined #RubyOnRails
[15:24:15] tbuehlmann: and you require rails_helper, right?
[15:24:29] tbuehlmann: mh, well, you would get an error otherwise..
[15:24:38] andywww: what does your RSPec.describe line look like?
[15:24:48] MartinEl_: has joined #RubyOnRails
[15:24:53] njero: has joined #RubyOnRails
[15:24:59] annlewis: has joined #RubyOnRails
[15:25:10] andywww: ah, i???ve found TFM to R
[15:25:13] andywww: https://www.relishapp.com/rspec/rspec-rails/docs/directory-structure
[15:25:14] tuelz1: has joined #RubyOnRails
[15:25:44] andywww: this is if its just a class you want to test
[15:25:48] andywww: and not of any of those types
[15:25:51] tbuehlmann: https://gist.github.com/tbuehlmann/3c18e13997c08d224ecf
[15:26:16] andywww: no no i can load the class okay
[15:26:39] tbuehlmann: that's all I got
[15:26:40] andywww: just when i run rspec, its not pucking up the spec file for it
[15:26:58] andywww: oh no sorry, theres 3
[15:27:06] andywww: i thought that was just your app file
[15:27:08] solars: has joined #RubyOnRails
[15:29:33] jwaldrip: has joined #RubyOnRails
[15:29:33] andywww: well, thats annoying, its working now
[15:29:41] andywww: now the actual test tests somerhing
[15:29:50] andywww: thanks very much for that, appreciated
[15:31:00] beauby: has joined #RubyOnRails
[15:31:11] andywww: has left #RubyOnRails: ()
[15:32:03] bvbrandon: hey everyone
[15:32:09] hashpuppy: has joined #RubyOnRails
[15:32:50] bvbrandon: I have a list of objects I need to create, roughly 300, the way the class is tructured I would be fine just creating them based on a single field, whats the fastest way to do that?
[15:33:23] User458764: has joined #RubyOnRails
[15:34:31] waseem_: bvbrandon: Is it just a one time operation?
[15:34:41] Sadama: has joined #RubyOnRails
[15:34:47] chridal: has joined #RubyOnRails
[15:34:56] harishreddy: has joined #RubyOnRails
[15:34:59] bvbrandon: I found this
[15:35:00] bvbrandon: new_records = [
[15:35:01] bvbrandon: {:column => 'value', :column2 => 'value'},
[15:35:02] waseem_: bvbrandon: Look out for database seeds.
[15:35:02] bvbrandon: {:column => 'value', :column2 => 'value'}
[15:35:04] bvbrandon: MyModel.create(new_records)
[15:35:25] bvbrandon: makes perfect sense lmao, use the tool that was built for that
[15:36:13] bvbrandon: THANNKS A TON!
[15:36:43] smathy: has joined #RubyOnRails
[15:37:34] Fire-Dragon-DoL: has joined #RubyOnRails
[15:37:57] agit0: has joined #RubyOnRails
[15:39:31] adamaN: has joined #RubyOnRails
[15:40:12] beingjohnm: I think I'm missing something totally obvious in regards to translation. I loop through accounts and want to look up the translation of each account type. <%= t 'views.accounts.account_types.type' %> but with type being a variable. I understand how to pass a variable to the language file but not how to use a variable in the lookup.
[15:40:15] chridal: has joined #RubyOnRails
[15:40:29] adamaN: has left #RubyOnRails: ()
[15:40:44] adamaN: has joined #RubyOnRails
[15:40:46] dopamean_: has joined #RubyOnRails
[15:40:58] tbuehlmann: beingjohnm, it's just a string, so you could interpolate it like "views.accounts.account_types.#{type}"
[15:41:22] tbuehlmann: or use it like this: t(type, scope: [:views, :accounts, :account_types])
[15:41:44] adamaN: has left #RubyOnRails: ()
[15:41:44] bricker: has joined #RubyOnRails
[15:42:08] adamaN: has joined #RubyOnRails
[15:42:28] adamaN: has left #RubyOnRails: ()
[15:42:30] glaksmono: has joined #RubyOnRails
[15:42:47] adamaN: has joined #RubyOnRails
[15:44:45] riotjones: has joined #RubyOnRails
[15:45:08] sarink: has joined #RubyOnRails
[15:45:35] panzi: has joined #RubyOnRails
[15:45:47] gavit: I have an AccountModel and a UserModel, I want to associate many users to many accounts with a 'role'. How can I guarantee that every Account has at least one role and I need every account to have at least one 'manager/owner'-role
[15:46:01] build22_: has joined #RubyOnRails
[15:46:26] tbuehlmann: gavit, sounds like validations to me
[15:46:52] dsimon: has joined #RubyOnRails
[15:46:57] panzi: is there a way to define a method for all Relation objects of a certain model? so that I could write something like user.items.complex_reoccuring_condition(args).where(more_conditions)
[15:47:13] teclator: has joined #RubyOnRails
[15:47:51] tbuehlmann: panzi, yeah, that'd be a scope: http://guides.rubyonrails.org/active_record_querying.html#scopes
[15:47:59] tbuehlmann: panzi, class methods will do as well
[15:48:32] dici: has joined #RubyOnRails
[15:48:39] User458764: has joined #RubyOnRails
[15:50:01] panzi: well, that'S not exactly what I want (see user.items_with_complex_condition Vs. user.items.complex_condition) and you can't pass parameters (my parameter would be currentuser)
[15:51:20] panzi: its possible to add params as I see when I scroll down
[15:51:25] panzi: didnt know that
[15:52:25] dopamean_: has joined #RubyOnRails
[15:53:57] Guest53: has joined #RubyOnRails
[15:54:06] mary5030_: has joined #RubyOnRails
[15:55:07] bvbrandon: what would be the best way to add a default value to a column on a subclass?
[15:55:32] tbuehlmann: bvbrandon, talking about single table inheritance?
[15:56:02] tbuehlmann: either via your schema/migration or an after_initialize callback in your subclass
[15:56:50] tbuehlmann: like this: https://gist.github.com/tbuehlmann/299361640d04171f49dc
[15:57:01] bvbrandon: hell yea man!
[15:57:10] bvbrandon: you guys and gals are life saver
[15:57:32] tbuehlmann: maybe add an `if new_record?` if it shall only be applied for new records
[15:57:48] bvbrandon: ok cool, will do!
[15:57:55] bvbrandon: would that work well though?
[15:57:58] bvbrandon: that last bit?
[15:58:53] gavit: tbuehlmann: validation in the modelsis a start I guess
[15:58:53] beingjohnm: tbuehlmann: thanks. I think I was also having an issue using numbers in the translaction file. e.g (views.accounts.account_type.1)
[15:59:02] mary5030: has joined #RubyOnRails
[16:00:36] wldcordeiro: has joined #RubyOnRails
[16:00:46] bvbrandon_: has joined #RubyOnRails
[16:01:02] jgt1: has joined #RubyOnRails
[16:01:12] Cache_Money: has joined #RubyOnRails
[16:01:25] dionysus69: anyone knows what is SitemapGenerator::Sitemap.sitemaps_host = ENV['SITEMAPS_HOST'] ?
[16:03:07] startupality: has joined #RubyOnRails
[16:04:12] hron84: has joined #RubyOnRails
[16:04:15] robbyoconnor: has joined #RubyOnRails
[16:04:43] hron84: Hi! With inherited_resources how can I pass begin_of_association_chain (I mean not modify the default behavior) if some conditions aren't met?
[16:06:30] adavia: has joined #RubyOnRails
[16:06:33] momomomomo: has joined #RubyOnRails
[16:06:38] messine: has joined #RubyOnRails
[16:08:39] glaksmono: has joined #RubyOnRails
[16:09:15] build22: has joined #RubyOnRails
[16:10:23] fields: has joined #RubyOnRails
[16:11:22] BradenBraden: has joined #RubyOnRails
[16:11:48] messine: I'm writing front end validations for my user sign up form, http://pastebin.com/jW59LL76. I suppose I could have the form submit remotely but the pastebin code was the easiest way for me. As it stands I would create a shoddy validations controller with a weird actions to check whether or not a username/email was unique. The event handler from a "blur" event on those fields would send an ajax...
[16:11:50] messine: ...to those actions. Thoughts? Is there a better more rails-y way to do this?
[16:12:04] platzhirsch: That's weird, in a spec/features Capybara test I've created a test user, save!'ed... I see the user with User.all. If I connect to my Postgres with psql, the user isn't there! Though I verified it's the same db connection through ActiveRecord::Base.connection ??? how can that be? Savepoints? Transactions? Any idea how to debug this?
[16:12:29] bruno-: has joined #RubyOnRails
[16:12:39] messine: http://pastie.org/10532263
[16:12:45] BradenBraden: using haml as my template rendering engine. when running my rspec with capybara tests, it fails to visit a page because it cant find the template and its only looking for ERB. how do I tell my dummy app to use haml? (i have it as a dependency in my gemspec already)
[16:12:47] treehug88: has joined #RubyOnRails
[16:13:22] tubbo: BradenBraden: you're not so brazen anymore
[16:13:32] tubbo: what happened? did you get jaded?
[16:13:38] BradenBraden: tubbo, trying to put those days behind me
[16:13:51] BradenBraden: YOLO dev had its place.. time to move forwards
[16:14:04] tbuehlmann: BradenBraden, what do you have in your Gemfile, haml or haml-rails?
[16:14:05] tubbo: BradenBraden: haha...this is in a gem right?
[16:14:13] lacuna: has joined #RubyOnRails
[16:14:27] BradenBraden: tubbo, "yea"... a mountable engine
[16:14:35] tubbo: so yes :)
[16:14:38] BradenBraden: guess that is a gem
[16:14:47] tubbo: alright i think you might need to put gem 'haml-rails' in the Gemfile within your dummy app
[16:15:12] tubbo: oh wait never mind there is none
[16:15:18] BradenBraden: tubbo, the dummy app by default doesnt have a Gemfile
[16:15:48] tubbo: BradenBraden: try requiring haml-rails in your spec/dummy/config/application.rb, it really just needs the railtie to be required in order to trigger all the integrations
[16:16:03] BradenBraden: will give that a go
[16:16:13] raunicolae: has joined #RubyOnRails
[16:16:34] BradenBraden: tubbo, that seems to have done the job :)
[16:17:13] BradenBraden: heres a minor question.. whats better, doing all the 'require "active_record/railties"' etc etc or just 'require "rails/all"' ?
[16:18:18] Cervajz_: has joined #RubyOnRails
[16:18:54] dopie: has joined #RubyOnRails
[16:19:00] roshanavand: has joined #RubyOnRails
[16:19:02] youngbaks: has joined #RubyOnRails
[16:19:03] bmalum_: has joined #RubyOnRails
[16:19:12] messine: Would it be alright to replicate my back end validations on the front end using a controller whose sole purpose was to check uniqueness on different attributes, for a user sign up form?
[16:19:21] rgtk: has joined #RubyOnRails
[16:19:32] Cervajz__: has joined #RubyOnRails
[16:20:09] arthurix: has joined #RubyOnRails
[16:20:15] Yomero3: has joined #RubyOnRails
[16:20:46] dopamean_: has joined #RubyOnRails
[16:21:24] messine: Here's my js so far, http://pastie.org/10532263
[16:21:49] BradenBraden: so tubbo, how things been? (i've been absent for quite a while)
[16:22:00] tubbo: pretty much the same
[16:22:11] youngbaks: has joined #RubyOnRails
[16:22:17] BradenBraden: then im glad i havent missed anything :P
[16:23:30] funkylaundry: has joined #RubyOnRails
[16:23:35] tubbo: to answer your question...check out the source of rails/all...sometimes you need to not load certain frameworks
[16:23:45] tubbo: for example, i never load rails/test_help so the rake test tasks go away and i can write my own with rspec
[16:23:54] kitsuneyo: has joined #RubyOnRails
[16:24:13] BradenBraden: messine, shouldnt you just leave that up to your model? thats what its their for
[16:25:03] BradenBraden: tubbo, yea i figured that was the only difference. i was just lazy and had rails/all instead of the 5 other lines of code to require the shitz needed
[16:25:37] tubbo: BradenBraden: that's how rails apps are generated by default, so no worries haha
[16:26:30] chibs: has joined #RubyOnRails
[16:26:51] m712: has joined #RubyOnRails
[16:27:17] syath: has joined #RubyOnRails
[16:27:27] BradenBraden: ah its nice to be weekend
[16:27:31] andywww: has joined #RubyOnRails
[16:27:33] bruno-_: has joined #RubyOnRails
[16:28:31] messine: BradenBraden, I guess. Would that mean I would have to submit my form on every keyup though?
[16:28:55] bvbrandon: has joined #RubyOnRails
[16:29:19] atomical_: has joined #RubyOnRails
[16:29:52] kitsuneyo: has joined #RubyOnRails
[16:30:25] darrencauthon: has joined #RubyOnRails
[16:30:28] disgrntld: has joined #RubyOnRails
[16:30:38] BradenBraden: messine, submission only happens once at the end. you looking for javascript validations?
[16:30:40] fedexo: has joined #RubyOnRails
[16:31:49] bmalum: has joined #RubyOnRails
[16:32:00] messine: http://pastie.org/10532263
[16:32:02] arup_r: Hi, will https://github.com/mina-deploy/mina make life easier than to use Capistrano ? Looking for some opinions.. I used once Capistrano and it gave me a lot of pain
[16:32:22] annlewis: has joined #RubyOnRails
[16:32:29] BradenBraden: controllers (unless you talking angular) are server-side. javascript client side. if you want one of those things like password strength that auto updates on typing, then javascript. upon submitting to your controller, that will pass along to the model and ensure the input validates
[16:32:34] dionysus69: has joined #RubyOnRails
[16:32:36] tubbo: never used mina
[16:32:45] tubbo: but we use capistrano here and it's pretty painless
[16:32:51] tubbo: arup_r: when was the last time yo uused capistrano?
[16:33:10] arup_r: 4 months back
[16:34:02] tubbo: what problems did you have with it?
[16:35:11] BradenBraden: messine, you can obviously replicate your validation in JS if you want dynamic updates based on a users input, and then rely on the model to re-validate before saving but that seems a bit excessive imo. i'd just allow them to do whatever, submit the form, and if it fails, respond with the error of why it failed. but each to their own eh
[16:35:23] atmosx: arup_r: do you have to restart the server? if not. you can set a simple rails tasks. If you need to restart servers (puma, nginx for caching assets, etc.) then better setup cap properly... or use docker.
[16:35:23] tfitts: has joined #RubyOnRails
[16:35:54] arup_r: No, I am looking for automatic deployment as Cap does..
[16:36:19] nfk: has joined #RubyOnRails
[16:36:38] tubbo: atmosx: lol who doesn't have to restart the server? :P
[16:36:39] arup_r: tubbo: I only remember the feelings I had so worst... Lot of pains.. So someone asked me to look at mina it is very easy
[16:36:53] messine: BradenBraden, Don't we want responsive sites though? I thought rails without js was something antique
[16:36:56] tubbo: arup_r: you probably just didn't read the documentation
[16:37:21] arup_r: nah, I did. May be didn't get it properly.. :)
[16:37:22] op84: has joined #RubyOnRails
[16:37:24] atmosx: tubbo: I don't.
[16:37:46] op84: hey there - is a way to throw this error without the whole traceback? raise ActionController::RoutingError.new('Not Found')
[16:37:46] arup_r: tubbo: ^^ he is a DevOps
[16:37:54] TheNet: has joined #RubyOnRails
[16:37:55] arup_r: so he is great on that part
[16:38:17] atmosx: see? I'm great (at serving static websites without restarting the server)
[16:38:37] atmosx: j/k if we're talking rails obviously you have to restart the rack-server
[16:38:49] tfitts: I have an app that is primarily used on our local intranet using nginx/unicorn. All of the requests come up in nginx from the right address but in the rails log from 127.0.0.1. I've tried http://stackoverflow.com/questions/19871264/rails-shows-ip-as-127-0-0-1-when-accessed-from-private-nic-but-nginx-shows-the which says to put config.action_dispatch.trusted_proxies = /^127\.0\.0\.1$/
[16:38:49] tfitts: # localhost in my config/application.rb which I tried doing, but requests are still coming up from the same 127.0.0.1. Rails 4.1.6
[16:38:52] messine: BradenBraden, so I guess my Q is the only way to check uniqueness would be to hit the server. Would I create a one-off controller for this? Or is that just bad
[16:39:46] arup_r: atmosx: you write blogposts I know. anytime anything on Cap deployment..
[16:40:02] freezevee: has joined #RubyOnRails
[16:40:14] arup_r: tubbo: I had a hard time to restrat puma using Capistrano ... It never worked
[16:40:20] arup_r: for me :/
[16:40:48] arup_r: after deployment puma was not restarted.. I need to do it manually :/
[16:41:07] chridal: has joined #RubyOnRails
[16:41:13] BradenBraden: messine, rails (php, java, python) all operate upon the same ideas. you show your users a view. they do something and send the info to the server. the server works on it and sends it back. general flow. adding javascript doesnt bring your app into the 23rd centuary. JS is powerful but is mostly used for eye-candy (things like jQuery UI).
[16:42:01] BradenBraden: messine, its not the only way. you can do it via JS but that is not robust. JS is available to the user. they can just Inspect Element and change your validations making them null and void. The core validations happen on the server
[16:42:27] bruno-_: has joined #RubyOnRails
[16:43:05] messine: BradenBraden, yeah I understand it's not meant to be secure, I was just adding some user experience
[16:43:16] atmosx: tfitts: aren't nginx logs not enough?
[16:43:50] BradenBraden: messine, fair enough.
[16:44:16] tfitts: atmosx: I need a different behavior for certain actions that take place inside the building.
[16:44:35] atmosx: tfitts: can you gist your nginx?
[16:44:49] messine: BradenBraden, thanks, it helps just to talk about it :)
[16:45:03] BradenBraden: messine, no probs :)
[16:45:22] riotjones: has joined #RubyOnRails
[16:46:00] tfitts: atmosx: it seems like it's a default configuration for rails.
[16:48:06] mag42c_: has joined #RubyOnRails
[16:49:51] hippyphysicist: has joined #RubyOnRails
[16:50:05] tercenya_: has joined #RubyOnRails
[16:50:08] rromanch_: has joined #RubyOnRails
[16:50:15] djbkd_: has joined #RubyOnRails
[16:50:36] pyemkey_: has joined #RubyOnRails
[16:51:00] targaf_: has joined #RubyOnRails
[16:51:00] Cervajz: has joined #RubyOnRails
[16:51:14] gregf_: has joined #RubyOnRails
[16:51:22] Maletor: has joined #RubyOnRails
[16:51:47] noah256: has joined #RubyOnRails
[16:51:48] Cervajz: has joined #RubyOnRails
[16:51:49] barttenbrinke_: has joined #RubyOnRails
[16:52:13] Spami_: has joined #RubyOnRails
[16:52:13] halcyonicstorm1: has joined #RubyOnRails
[16:52:14] quazimodo: has joined #RubyOnRails
[16:52:19] atmosx: tfitts: can you switch to puma?
[16:52:26] hippyphysicist: has joined #RubyOnRails
[16:52:29] Killerkeksdose: has joined #RubyOnRails
[16:52:59] ELCALOR_: has joined #RubyOnRails
[16:52:59] kumavis_: has joined #RubyOnRails
[16:53:06] marcoceppi_: has joined #RubyOnRails
[16:53:18] dionysus69: whats the point of including aws s3 into sitemap?
[16:53:37] andywww: has left #RubyOnRails: ()
[16:53:41] Wingar_: has joined #RubyOnRails
[16:53:54] skyjumpe1: has joined #RubyOnRails
[16:54:00] Grag_Harker: has joined #RubyOnRails
[16:54:06] roshanavand: has joined #RubyOnRails
[16:54:06] hippyphysicist: has joined #RubyOnRails
[16:54:12] siksi: has joined #RubyOnRails
[16:54:15] hive-mind: has joined #RubyOnRails
[16:54:17] badeball_: has joined #RubyOnRails
[16:54:23] fryguy9: has joined #RubyOnRails
[16:54:30] lagweezl1: has joined #RubyOnRails
[16:54:59] Lorn_: has joined #RubyOnRails
[16:55:13] jschoolcraft: has joined #RubyOnRails
[16:55:16] dlitz: has joined #RubyOnRails
[16:55:32] netwoodle: has joined #RubyOnRails
[16:55:45] hippyphysicist: has joined #RubyOnRails
[16:55:54] rhinon_: has joined #RubyOnRails
[16:55:55] htmldrum: has joined #RubyOnRails
[16:56:25] lagweezl1: has joined #RubyOnRails
[16:56:25] EminenceHC: has joined #RubyOnRails
[16:56:35] lord4163_: has joined #RubyOnRails
[16:56:41] crankhar1er: has joined #RubyOnRails
[16:56:45] null__: has joined #RubyOnRails
[16:56:57] atmosx: tfitts: https://gist.github.com/atmosx/3b333981d2903ac9651a check this out, see if it works. I can assure you that puma logs 10.x addresses, might log 192.x too. Tested a VPN just now.
[16:56:59] alexblom: has joined #RubyOnRails
[16:57:08] aujt74_: has joined #RubyOnRails
[16:57:09] Maletor: has joined #RubyOnRails
[16:57:18] janno_: has joined #RubyOnRails
[16:57:44] AlHafoudh_: has joined #RubyOnRails
[16:57:47] Meow-J: has joined #RubyOnRails
[16:57:48] uranther_: has joined #RubyOnRails
[16:57:57] Maletor: has joined #RubyOnRails
[16:58:04] null__: has joined #RubyOnRails
[16:58:09] Cervajz_: has joined #RubyOnRails
[16:58:12] KorriX: has joined #RubyOnRails
[16:58:20] Diabolik: has joined #RubyOnRails
[16:58:26] simplyianm: has joined #RubyOnRails
[16:58:50] Diabolik: has joined #RubyOnRails
[16:59:20] Diabolik: has joined #RubyOnRails
[16:59:27] gavit: current_user.accounts.orders
[16:59:44] exchgr`: has joined #RubyOnRails
[17:00:07] rclanan_: has joined #RubyOnRails
[17:00:08] dionysus69: config.action_controller.asset_host ***** if I set this, is local public folder still functional or public root becomes whatever I set as a value of this parameters?
[17:00:11] polishdub_: has joined #RubyOnRails
[17:00:40] Edward123: has joined #RubyOnRails
[17:00:54] harishreddy: has joined #RubyOnRails
[17:01:10] cbetta_: has joined #RubyOnRails
[17:01:18] Isthar_: has joined #RubyOnRails
[17:01:22] [Butch]: has joined #RubyOnRails
[17:01:24] hfp__work: has joined #RubyOnRails
[17:02:32] roshanavand: has joined #RubyOnRails
[17:03:06] cjk101010: has joined #RubyOnRails
[17:03:07] lacuna: has joined #RubyOnRails
[17:03:10] lacuna: has joined #RubyOnRails
[17:03:25] glaksmono: has joined #RubyOnRails
[17:03:46] AzaToth: has joined #RubyOnRails
[17:04:03] Aeyrix_: has joined #RubyOnRails
[17:04:58] darrencauthon: has joined #RubyOnRails
[17:05:00] constantinexvi: has joined #RubyOnRails
[17:05:01] existensil: has joined #RubyOnRails
[17:05:50] royvandermeij: has joined #RubyOnRails
[17:05:51] doge__: has joined #RubyOnRails
[17:06:01] stevednd: has joined #RubyOnRails
[17:07:17] oded: has joined #RubyOnRails
[17:07:30] wldcordeiro: has joined #RubyOnRails
[17:07:41] cornerma1: has joined #RubyOnRails
[17:08:30] nibbo: has joined #RubyOnRails
[17:08:43] vigintas: has joined #RubyOnRails
[17:08:49] sunny36: has joined #RubyOnRails
[17:08:53] harishreddy: has joined #RubyOnRails
[17:08:55] GnuYawk: has joined #RubyOnRails
[17:09:20] nogic: has joined #RubyOnRails
[17:09:22] jahbrewski: has joined #RubyOnRails
[17:10:14] cbetta_: has left #RubyOnRails: ()
[17:10:36] towski_: has joined #RubyOnRails
[17:10:37] CanTonic: has joined #RubyOnRails
[17:10:43] safety_cut: has joined #RubyOnRails
[17:11:01] daivyk: has joined #RubyOnRails
[17:11:34] TheNet: has joined #RubyOnRails
[17:11:46] kitsuneyo: has joined #RubyOnRails
[17:12:31] bruno-: has joined #RubyOnRails
[17:12:35] towski__: has joined #RubyOnRails
[17:14:43] bricker: has joined #RubyOnRails
[17:16:38] pixelhandler: has joined #RubyOnRails
[17:16:45] roshanavand: has joined #RubyOnRails
[17:19:45] MissionCritical: has joined #RubyOnRails
[17:19:53] rails690: has joined #RubyOnRails
[17:20:30] drbayer: has joined #RubyOnRails
[17:21:30] ascarter: has joined #RubyOnRails
[17:21:42] rails690: ive got a question: I have params that are too large for a GET request, therefore a POST must be used, but I want to keep GET params like pagination, current view, etc. because Im using AJAX. How do I handle this?
[17:21:59] atomical: has joined #RubyOnRails
[17:22:06] rails690: a member here suggested me to use "POST /searches -> creates a search object"
[17:22:13] rails690: "GET /searches/5?page=5 -> returns the results"
[17:23:01] avril14th: Hello, I'm having trouble turn a SQL query into an AR/Arel query, any help is appreciated https://gist.github.com/muichkine/1a2695e5ac521ae62475
[17:23:12] rhizome: rails690: you have over 8K in params?
[17:23:16] rails690: this is good in that it allows me to use saved searches, but I tried implementing this and got stuck because I don't know how it works exactly. I have variables in my people controller that are not available in the searches controller and how does the whole rendering workout from using the searches object query
[17:23:29] max1: has joined #RubyOnRails
[17:23:40] jscheel: has joined #RubyOnRails
[17:23:41] d5sx43: has joined #RubyOnRails
[17:23:44] rails690: lets say im searching for 30 different people in a multi-termed search
[17:24:44] blackmesa: has joined #RubyOnRails
[17:25:38] rubyonrailed: has joined #RubyOnRails
[17:25:39] krzkrz: has joined #RubyOnRails
[17:26:43] glennfu: has joined #RubyOnRails
[17:27:21] glennfu: has joined #RubyOnRails
[17:30:55] A124: has joined #RubyOnRails
[17:31:19] chibs: has joined #RubyOnRails
[17:31:27] maxz: has joined #RubyOnRails
[17:31:37] kitsuneyo: has joined #RubyOnRails
[17:33:08] annlewis: has joined #RubyOnRails
[17:34:12] freezevee1: has joined #RubyOnRails
[17:34:28] elcontrastador: Is Passenger with Apache/Nginx still a preferred deployment foundation? I've been out for a couple years.
[17:36:09] EminenceHC: has joined #RubyOnRails
[17:36:09] Guest53: has joined #RubyOnRails
[17:38:05] benlieb: has joined #RubyOnRails
[17:39:40] djbkd: has joined #RubyOnRails
[17:40:59] slash_nick: elcontrastador: but if you're looking for alternatives... there's puma and unicorn (and others)
[17:41:22] goodcodeguy: has joined #RubyOnRails
[17:41:24] Cache_Money: has joined #RubyOnRails
[17:41:57] chridal: has joined #RubyOnRails
[17:41:58] elcontrastador: rails seems to always have current favortite...what's most popular today?
[17:42:05] TheNet: has joined #RubyOnRails
[17:42:13] lacuna: has joined #RubyOnRails
[17:42:14] lacuna: has joined #RubyOnRails
[17:45:23] rhizome: i'm not sure you're going to find the consensus you're looking for. they're all fine
[17:45:41] maxscam1: has joined #RubyOnRails
[17:45:42] kitsuneyo: has joined #RubyOnRails
[17:47:36] maxscam1: anyone have a guess why request.headers is not updated by the incoming request? im using devise and warden
[17:47:57] maxscam1: or how to trigger the devise/warden login method using headers
[17:48:23] maxscam1: the only header parsing that works is authenticate_with_http_token
[17:48:34] maxscam1: and the source for that is mazelike
[17:48:58] jahbrewski: has joined #RubyOnRails
[17:49:35] zpe: has joined #RubyOnRails
[17:50:15] SteenJobs: has joined #RubyOnRails
[17:51:54] tubbo: maxscam1: i think request.env is the headers for the request
[17:52:04] tubbo: maxscam1: but doesn't devise ship with basic http auth support?
[17:52:29] safety_cut: has joined #RubyOnRails
[17:52:38] maxscam1: tubbo: it works for a token header using authenticate_with_http_token, but I'm trying to use session headers as well. I'm not sure how to set or parse them
[17:52:43] mrtomme: has joined #RubyOnRails
[17:52:54] Bloomer: has joined #RubyOnRails
[17:53:17] tubbo: maxscam1: "session headers"?
[17:53:32] maxscam1: tubbo: tubbo: yes, passing in session token
[17:53:51] tubbo: maxscam1: oh, you want token authentication.
[17:54:03] tubbo: maxscam1: what do you mean by "session token"?
[17:54:03] maxscam1: tubbo: yeah, there are multiple tokens
[17:54:30] tubbo: maxscam1: assuming you read this? https://github.com/plataformatec/devise/wiki/How-To:-Use-HTTP-Basic-Authentication
[17:54:40] tubbo: there's also https://github.com/plataformatec/devise/wiki/How-To:-Simple-Token-Authentication-Example
[17:55:23] chridal: has joined #RubyOnRails
[17:56:21] maxscam1: tubbo: the snippet in the devise wiki uses authenticate_with_http_token, which only works with 1 token.
[17:56:27] gaussblurinc1: has joined #RubyOnRails
[17:56:44] tubbo: maxscam1: so alter the snippet :P
[17:57:34] maxscam1: tubbo: i don't know how. how could i get the headers if request.headers and request.env don't include my custom key-vals? `
[17:57:56] tubbo: maxscam1: where are your custom key-vals stored? if they're not in request.env, then they didn't come through with the request.
[17:58:05] arup_r: has joined #RubyOnRails
[17:58:14] tubbo: maxscam1: if they're in the actual session, then you have to use session[:token_or_whatever] to get them out
[17:58:23] dionysus69: what is a best practice for meta keyword and generally seo ? I came accross this is it good ? gem 'metamagic'
[17:59:23] maxscam1: tubbo, well, i am able to pass a value for "Authentication token token=<>"
[17:59:29] tubbo: dionysus69: i typically just write the meta tags out myself, or write helper methods to generate them for me. you can use `content_for` to inject html into your <head> from a partial or template.
[17:59:48] maxscam1: tubbo: i don't how how to pass them into session, i guess I should mention I'm using mechanize
[18:00:23] Cervajz: has joined #RubyOnRails
[18:01:36] Guest53: has joined #RubyOnRails
[18:02:48] bePolite: has joined #RubyOnRails
[18:02:49] Emily_: has left #RubyOnRails: ()
[18:02:51] cfloare: has joined #RubyOnRails
[18:03:02] Emily: has joined #RubyOnRails
[18:04:11] beauby: has joined #RubyOnRails
[18:05:00] zpe: has joined #RubyOnRails
[18:10:13] simplyianm: has joined #RubyOnRails
[18:10:40] RegulationD: has joined #RubyOnRails
[18:12:45] mostlybadfly: has joined #RubyOnRails
[18:13:04] jessemcgilallen: has joined #RubyOnRails
[18:15:44] yogeshrt: has joined #RubyOnRails
[18:15:55] shinnya: has joined #RubyOnRails
[18:17:21] romdi: has joined #RubyOnRails
[18:17:43] mikecmpbll: has joined #RubyOnRails
[18:17:58] rubyonra_: has joined #RubyOnRails
[18:19:05] ahegyi: has joined #RubyOnRails
[18:21:24] pwnd_nsfw: has joined #RubyOnRails
[18:21:42] kitsuneyo: has joined #RubyOnRails
[18:23:53] nettoweb: has joined #RubyOnRails
[18:24:04] baweaver: has joined #RubyOnRails
[18:25:07] cac: has joined #RubyOnRails
[18:26:14] TheNet: has joined #RubyOnRails
[18:30:04] TheNet: has joined #RubyOnRails
[18:30:13] defsdoor: has joined #RubyOnRails
[18:32:23] jwaldrip: has joined #RubyOnRails
[18:32:55] jwaldrip_: has joined #RubyOnRails
[18:33:06] RegulationD: has joined #RubyOnRails
[18:33:16] momomomomo: has joined #RubyOnRails
[18:33:53] annlewis: has joined #RubyOnRails
[18:35:28] lacuna: has joined #RubyOnRails
[18:35:33] beauby: has joined #RubyOnRails
[18:37:57] qejk: has joined #RubyOnRails
[18:39:27] creyes: has joined #RubyOnRails
[18:39:38] tuelz1: has joined #RubyOnRails
[18:40:44] kerunaru: has joined #RubyOnRails
[18:42:18] creyes: If I want to track user login info, (#of logins, login locations etc) should I store that stuff in a separate table? user has_one :login_info ?
[18:42:36] lemur: has joined #RubyOnRails
[18:43:07] dstarh: has joined #RubyOnRails
[18:43:11] tbuehlmann: do you only want to store one login event?
[18:43:27] Guest53: has joined #RubyOnRails
[18:44:23] vigintas1: has joined #RubyOnRails
[18:44:35] andrew-l`: has joined #RubyOnRails
[18:44:41] TheNet: has joined #RubyOnRails
[18:44:41] tenderlove: has joined #RubyOnRails
[18:46:08] cac: has joined #RubyOnRails
[18:46:16] hackeron: has joined #RubyOnRails
[18:46:40] creyes: tbuehlmann: Well I want to store everytime they log in. I want to be able to do plot all their logins on a graph
[18:47:05] humd1ng3r: has joined #RubyOnRails
[18:47:15] tbuehlmann: creyes, then it's rather a has_many than a has_one. and yes, you likely want to have a table for that
[18:47:17] gopz: has joined #RubyOnRails
[18:47:28] maxz: has joined #RubyOnRails
[18:47:36] Prira: has joined #RubyOnRails
[18:47:59] creyes: Ok cool. I'm using pg so I was thinking I could maybe just store lon/lat coords in a json field in the profile table
[18:48:21] creyes: but a separate LoginInfo table seems better
[18:48:23] FailBit: why locations?
[18:48:28] FailBit: are they telling you?
[18:48:28] User458764: has joined #RubyOnRails
[18:48:43] creyes: Was just going to grab them from the browser
[18:49:34] rakm: has joined #RubyOnRails
[18:49:43] dopamean_: has joined #RubyOnRails
[18:50:31] creyes: or use something like this https://github.com/alexreisner/geocoder
[18:50:47] SteenJobs: has joined #RubyOnRails
[18:51:20] bvbrandon: hey everyone, super dumb question, when I visit an object the url is determined by the id, where do I change that?
[18:51:32] bvbrandon: I would prefer object.name
[18:52:08] tbuehlmann: bvbrandon, in the model by overriding #to_param
[18:52:21] creyes: In the routes.rb bvbrandon
[18:52:26] creyes: oh or that
[18:52:40] jkamenik1: has joined #RubyOnRails
[18:52:58] creyes: http://stackoverflow.com/questions/6592038/change-the-name-of-the-id-parameter-in-routing-resources-for-rails
[18:53:25] User458764: has joined #RubyOnRails
[18:54:06] tuelz1: has joined #RubyOnRails
[18:54:08] tbuehlmann: was just about to add the routes stuff, agree
[18:54:50] startupality: has joined #RubyOnRails
[18:55:17] creyes: isn't it even easier than that SO post? resources :posts, param: :post_name should work I think
[18:55:32] tubbo: on rails 4
[18:56:07] creyes: oh lol. I'm still pretty new I've only worked with rails 4. :p
[18:56:19] FailBit: I much prefer the to_param method
[18:58:30] roshanavand: has joined #RubyOnRails
[18:58:55] smathy: All the :param option in routes does is change the *name* of the params[] identifier.
[18:59:14] smathy: ...so you can use params[:name] in your controller instead of params[:id]
[18:59:46] lacuna: has joined #RubyOnRails
[18:59:47] smathy: creyes mainly ^
[19:00:00] tbuehlmann: was about to say that, those are two different things
[19:00:47] FailBit: I am wrong again
[19:00:55] Pazician: has joined #RubyOnRails
[19:01:00] adavia: has joined #RubyOnRails
[19:01:06] tubbo: FailBit: not really, it depends on what you want to do
[19:01:29] tubbo: FailBit: overriding to_param lets you do `link_to 'whatever', some_model`
[19:01:31] smathy: tubbo, well for what was asked for, he was wrong.
[19:01:38] tubbo: oh yeah that's true :D
[19:01:45] startupality: has joined #RubyOnRails
[19:01:47] tubbo: it's the opposite side
[19:02:08] smathy: Hey wait, FailBit wasn't the wrong one. creyes was.
[19:02:54] smathy: FailBit was wrong-ish I suppose by suggesting to_param and :param were options for doing the same thing. I dunno ;)
[19:03:06] th0m_: has joined #RubyOnRails
[19:03:27] bePolite: has joined #RubyOnRails
[19:04:55] maxscam1: has joined #RubyOnRails
[19:06:29] bePolite: has joined #RubyOnRails
[19:06:52] lacuna: has joined #RubyOnRails
[19:07:38] maxscam1: tubbo: i figured it out,\
[19:07:47] Obi_obi: has joined #RubyOnRails
[19:08:19] maxscam1: tubbo: multiple auth tokens can be specified like "Authorization: Token token=123',other_token='3,4,5'"
[19:08:39] hive-mind: has joined #RubyOnRails
[19:10:18] kitsuneyo: how do i use current_sign_in in Devise to determine if someone is online? is the value null if the user is offline?
[19:10:34] simplyia_: has joined #RubyOnRails
[19:10:40] hardtail: hey guys, I am trying to validate the size of my images with the file_validators gem. I am receiving unpermitted parameters in the console but the image still uploads and the size is well over the limit. could someone take a look please and thanks :D http://stackoverflow.com/questions/33536350/file-size-validation-with-file-validators-gem-unpermitt
[19:10:41] hardtail: ed-parameter?noredirect=1#comment54854123_33536350
[19:12:03] ur5us: has joined #RubyOnRails
[19:15:36] FailBit: id limit it in nginx as well as the app
[19:16:19] FailBit: kitsuneyo: doesn't work like that
[19:16:20] baweaver: has joined #RubyOnRails
[19:16:53] kitsuneyo: FailBit, how does it work? it has last_sign_in and current_sign_in columns
[19:17:15] FailBit: yeah but they have nothing to do with whether they are online
[19:18:39] roshanavand: has joined #RubyOnRails
[19:20:20] tubbo: Hardtail: please re-submit the link so it appears on one line
[19:20:36] gavit: a company has_many employees, I want to show all the employees of a list of companies. How do you do that?
[19:20:39] messine: has joined #RubyOnRails
[19:20:45] tubbo: gavit: !associations
[19:20:45] helpa: gavit: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[19:20:50] tubbo: gavit: !querying
[19:20:50] helpa: gavit: http://guides.rubyonrails.org/active_record_querying.html - ActiveRecord Querying Guide by Ryan Bigg
[19:21:00] bvbrandon: has joined #RubyOnRails
[19:21:49] kadoppe: has joined #RubyOnRails
[19:24:39] hardtail: tubbo: http://stackoverflow.com/questions/33536350/file-size-validation-with-file-validators-gem-unpermitted-parameter?noredirect=1#comment54854123_33536350
[19:24:42] lxsameer: has joined #RubyOnRails
[19:24:43] lxsameer: has joined #RubyOnRails
[19:24:43] hardtail: is this acceptable?
[19:24:57] tubbo: there ya go
[19:26:29] gasbakid: has joined #RubyOnRails
[19:27:50] djbkd: has joined #RubyOnRails
[19:29:17] Breno_p: has joined #RubyOnRails
[19:29:19] alex88: has joined #RubyOnRails
[19:29:42] moeabdol: has joined #RubyOnRails
[19:30:48] bvbrandon: has joined #RubyOnRails
[19:31:12] rubyonrailed: has joined #RubyOnRails
[19:31:32] EminenceHC: has joined #RubyOnRails
[19:34:39] annlewis: has joined #RubyOnRails
[19:35:08] recurrence: has joined #RubyOnRails
[19:35:45] recurrence: Regarding Rails 4???s enums. Is there a way to lazy load them? I want them to load from a table in the database but that???s not available in the tests on init
[19:36:02] smathy: Hardtail, you've added vehicle_images_attributes to your strong params, but the param is coming in as vehicle_images. Either you don't have anaf in your Vehicle model or you've created your form incorrectly.
[19:36:06] smathy: Hardtail, !gist both
[19:36:06] helpa: Hardtail: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:36:13] Guest53: has joined #RubyOnRails
[19:36:26] symbol: has joined #RubyOnRails
[19:37:08] smathy: recurrence, not clear what your problem is.
[19:37:14] hardtail: smathy: Ok. You want me to create a gist of both my vehicle model and the form if I follow your suggestion correctly?
[19:37:24] smathy: Hardtail, correct.
[19:37:32] hardtail: Ok one moment, thanks a lot for assisting me.
[19:38:15] recurrence: Hi smathy. If I set enum to a hash loaded from the database, it is empty when the tests start (as fixtures are not loaded yet). So enum doesn???t instantiate properly.
[19:38:19] roxtrongo: has joined #RubyOnRails
[19:38:37] stamina: has joined #RubyOnRails
[19:38:46] recurrence: I want enum to initialize when I first use it rather than when the system comes up
[19:40:27] hardtail: smathy: https://gist.github.com/jonathanmusso/8e0d7c4d86152a1312d1
[19:42:46] smathy: recurrence, the phrases you're using like "enum doesn't instantiate properly" and "when the system comes up" aren't technical and so it's hard to understand what problem you're actually having. An enum is just a map of values in your model to integers in your DB, the enum itself is initialized as soon as the class (not the instance of the class) is loaded.
[19:43:01] recurrence: Hi smathy, yeah that???s the issue
[19:43:11] recurrence: When the class is loaded, fixtures are not loaded yet
[19:43:20] smathy: recurrence, so?
[19:43:26] lemur: has joined #RubyOnRails
[19:43:37] recurrence: so if I have an enum set to a model for example: enum stuff: Stuff.get_as_hash
[19:43:49] srinidhi: has joined #RubyOnRails
[19:43:50] recurrence: the database is empty, so an empty hash comes back
[19:43:53] Radar: recurrence: !ncnh
[19:43:53] helpa: recurrence: 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.
[19:43:56] helpa: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[19:43:57] smathy: Hardtail, you have your anaf commented out: https://gist.github.com/jonathanmusso/8e0d7c4d86152a1312d1#file-vehicle-rb-L7
[19:44:27] darrencauthon: has joined #RubyOnRails
[19:44:31] smathy: Hardtail, which is why `f.fields_for :vehicle_images` is producing fields called `vehicle_images` instead of `vehicle_images_attributes`
[19:44:33] syath: has joined #RubyOnRails
[19:44:50] rubyonrailed: I'm having a weird problem testing `.from_omniauth`. I'm passing in a hash, and inside the `from_omniauth` method the hash is showing as a int. https://gist.github.com/JasonMannon/28084a46ec07a093d810
[19:44:56] smathy: Hardtail, so if you want it as it is then change your strong parameters to expect `vehicle_images` instead of `vehicle_images_attributes`, or if you want to use anaf then uncomment the anaf line.
[19:45:45] baweaver: has joined #RubyOnRails
[19:46:06] smathy: rubyonrailed, no, you're passing in an instance of OmniAuth::AuthHash
[19:46:31] rubyonrailed: smathy: Sorry, I get the same result when I pass in a hash as well.
[19:47:40] recurrence: Radar, smathy Thanks, I was helping to get feedback on GitHub with my problem. Rails does not support my use case today but it???s in consideration for the future :)
[19:48:06] Radar: I would hope you would know those two things I used tips for.
[19:48:08] rubyonrailed: smathy: This gives me the same result: https://gist.github.com/JasonMannon/de7a941d2db7c3d6892e
[19:48:40] smathy: rubyonrailed, 404
[19:48:43] rubyonrailed: wrong link: https://gist.github.com/JasonMannon/58901e8559f69327c555
[19:49:56] monq: has joined #RubyOnRails
[19:50:16] hardtail: Smithy, thank you. I will attempt this now.
[19:50:21] maxz: has joined #RubyOnRails
[19:50:26] creyes: I'm struggling A LOT with auth design. I like this answer http://stackoverflow.com/questions/24479839/multiple-types-of-users-on-ruby-on-rails but I need each different type of user to also have a different type of profile that asks for different things.
[19:51:36] smathy: rubyonrailed, sorry, I can't help you with your fake code.
[19:51:42] smathy: Hardtail, you're welcome.
[19:51:44] bruno-: has joined #RubyOnRails
[19:51:45] helpa: NO FAKE CODE. If you're under an NDA, we cannot help you with your problem. Go hire a consultant.
[19:51:49] defsdoor: has joined #RubyOnRails
[19:52:22] Radar: rubyonrailed: 1) show the error inside the gist 2) show the from_omniauth method in there too
[19:53:28] dcoy: has joined #RubyOnRails
[19:53:46] smathy: recurrence, Stuff.get_as_hash is a class method, if you define that in your model to return the array or hash for the enum method then it will work. If you think you can get the enum values for your enum method from the database then no, you're misunderstanding the purpose of enum.
[19:54:35] recurrence: smathy: : Thanks, yeah that???s the feedback I got on the intent for that feature. :)
[19:54:35] smathy: rubyonrailed, !gist-usage too
[19:54:35] helpa: rubyonrailed: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[19:55:13] northfurr: has joined #RubyOnRails
[19:56:11] hardtail: Smathy, after changing the params in my controller I get an undefined method for &, I updated the gist here if you have a moment to look https://gist.github.com/jonathanmusso/8e0d7c4d86152a1312d1
[19:56:29] momomomomo: has joined #RubyOnRails
[19:56:42] smathy: Hardtail, paste the full error in a new file in your gist.
[19:57:31] rubyonrailed: smathy Radar: Sorry, fixed https://gist.github.com/JasonMannon/58901e8559f69327c555
[19:57:36] hardtail: Smathy, done. You can just refresh.
[19:57:52] mwlang: is it possible to instruct simple_form not to wrap control names in the model???s name? I???m doing a search form and would prefer ???q=???ruby???&filter_stock=true?????? instead of ???search[q]=???ruby???&search[filter_stock]=true??????
[19:57:55] nettoweb: has joined #RubyOnRails
[19:58:53] yfeldblum: has joined #RubyOnRails
[19:59:06] VeryBewitching: has joined #RubyOnRails
[20:00:31] jobewan: has joined #RubyOnRails
[20:00:37] jahbrewski: has joined #RubyOnRails
[20:00:43] User458764: has joined #RubyOnRails
[20:00:45] smathy: Hardtail, looks like on line 48 of app/controllers/vehicles_controller.rb in your update method you're calling & on your vehicle_params
[20:01:31] smathy: Hardtail, although I'm sure you can read that error just as well as me, so I'm confused why you needed to ask.
[20:02:07] bvbrandon: has joined #RubyOnRails
[20:02:46] hardtail: Smathy, thanks. I ask because I am a failure at debugging -.- I am not calling & anywhere in my controller so that is why I am confused.
[20:03:34] ellisTAA: has joined #RubyOnRails
[20:04:01] vigintas: has joined #RubyOnRails
[20:04:01] tw1sted: has joined #RubyOnRails
[20:04:28] FailBit: I usually debug by looking at it until my vision blurs, then hitting my head off the desk until the problem pops out at me
[20:05:35] hardtail: FailBit haha sounds great
[20:09:07] jahbrewski: has joined #RubyOnRails
[20:11:24] defsdoor: has joined #RubyOnRails
[20:11:44] andrew-l`: has left #RubyOnRails: ()
[20:13:31] cac: has joined #RubyOnRails
[20:13:39] ellisTAA: i???m thinking of using the rails-api gem https://github.com/rails-api/rails-api to build an api. is there any reason not to use this gem?
[20:14:11] jahbrews1i: has joined #RubyOnRails
[20:15:15] colleenmcguckin: has joined #RubyOnRails
[20:15:16] netzfisch: has joined #RubyOnRails
[20:16:46] griffindy: has joined #RubyOnRails
[20:17:00] tubbo: EllisTAA: !try ;)
[20:17:00] helpa: EllisTAA: Why don't you try it and find out for yourself?
[20:17:38] griffindy: has joined #RubyOnRails
[20:18:00] oded: EllisTAA: I suggest JBuilder
[20:18:34] oded: didn't find much use in rails-api really
[20:18:43] Pazician: has joined #RubyOnRails
[20:19:08] griffindy: has joined #RubyOnRails
[20:19:29] Coldblackice: has joined #RubyOnRails
[20:20:00] blackmesa: has joined #RubyOnRails
[20:20:06] hardtail: Smathy, thank you...I think I got it working.
[20:20:09] oded: you can also use rabl but it has performance issues
[20:21:10] tubbo: oded: completely irrelevant :P
[20:21:16] tubbo: and jbuilder has terrible performance
[20:21:21] tubbo: compared to AMS that is
[20:21:38] ellisTAA: tubbo: what is ams
[20:21:40] [Butch]: has joined #RubyOnRails
[20:21:49] tubbo: EllisTAA: https://github.com/rails-api/active_model_serializers
[20:22:01] ellisTAA: tubbo: are you saying that rails-api is fine?
[20:22:03] tubbo: kind-of a replacement for rails' view layer
[20:22:04] ramortegui: has joined #RubyOnRails
[20:22:08] tubbo: it's fine, just might not be what you ned
[20:22:19] ellisTAA: tubbo: i need an api
[20:22:36] fryguy9: has left #RubyOnRails: ()
[20:22:41] tubbo: EllisTAA: so what kind of homework have YOU done on this? have you read the readme? do you know what rails-api does to your application?
[20:23:01] ellisTAA: tubbo: yeah it is light weight relative to a rails app .. that???s what i got from the readme
[20:23:04] fryguy: has joined #RubyOnRails
[20:23:19] fryguy: anybody have any gem recommendations for managing running multiple external commands and keeping track of stdout for all of them? sshkit run_locally seems fine, but I'd like to not have to bring in all of the remote access stuff if possible
[20:23:26] tubbo: EllisTAA: the readme also tells you why :)
[20:23:40] tubbo: EllisTAA: so it really comes down to whether you'll need any of that middleware. sometimes you do, sometimes you don't
[20:23:41] ellisTAA: tubbo: yeah cuz it doesn???t include a lot of middleware
[20:23:53] tubbo: EllisTAA: that's essentially all rails-api does
[20:24:01] ellisTAA: tubbo: i see ???. ok ???.
[20:24:08] tubbo: fryguy: what about mixlib-shell_out?
[20:24:12] bvbrandon: has joined #RubyOnRails
[20:24:12] tw1sted: has joined #RubyOnRails
[20:24:14] tubbo: made by the chef guys
[20:25:04] fryguy: tubbo: seems reasonable, i'll check it out
[20:25:08] neanderslob: has joined #RubyOnRails
[20:25:43] fryguy: ideally i'd like to be able to redirect stdout to a log file easily too so I can inspect it from another process. looks like it might be able to do that
[20:26:50] markkraemer: has joined #RubyOnRails
[20:27:04] oded: tubbo: ams goes completely the wrong way... this is the responsibility of the view. ofcourse raw ruby would be faster :)
[20:27:56] bruno-_: has joined #RubyOnRails
[20:28:02] safety_cut: has joined #RubyOnRails
[20:28:46] oded: and why irrelevant? I said I'm not using rails-api, I just have controllers with Jbuilder views which together creates an API application
[20:29:25] tubbo: oded: because jbuilder/rabl/AMS and rails-api do different things. it's like if someone were to ask "hey, should i use devise for authentication?" and you went "i suggest you use pundit"
[20:29:41] tubbo: they deal with different aspects of the application
[20:29:52] oded: that is correct, just wanted to let him know it can be done without :)
[20:30:14] tubbo: also, what do you mean "AMS goes completely the wrong way"?
[20:30:29] tubbo: personally i find myself writing the same json.jbuilder file over and over if i don't use it
[20:30:57] oded: also, looking at the readme I see bad suggestions, such as remove protect_from_forgery "because you're not using cookies", or use AMS
[20:31:25] chridal: has joined #RubyOnRails
[20:32:09] tubbo: oded: well, removing protect_from_forgery would make sense on a JSON API because that protects against cross-site request forgery by ensuring all requests from from the same origin, and since that will never be the case, you don't need it.
[20:32:22] oded: generating JSON from the data is equivalent to generating HTML from the data, and so it goes under app/views. Also you find yourself neading params within the view (because they can specify how to generate the view) which also makes sense when it's not just a class outside the application context
[20:32:23] barce: has joined #RubyOnRails
[20:32:41] arthurix_: has joined #RubyOnRails
[20:33:08] oded: well I created an API for use from both clients and angular JS for exmaple, which also makes use of this protection
[20:33:39] tubbo: oded: then you probably wouldn't want to use rails-api, because you use more things that ActionController::Base provides.
[20:34:27] freezevee: has joined #RubyOnRails
[20:34:38] tubbo: oded: i disagree with your architectural opinion. i've never needed "params within the view", the way i design my API code, I wouldn't ever run into that situation
[20:34:46] oded: and I also use cookies to keep the session, even for a non-human client. I don't see a reason to send something like the auth key in the params of every request (that's what the HTTP headers are for)
[20:35:05] tubbo: the way i see it, the controller API is just a controlled interface to my object hierarchy.
[20:35:12] tubbo: err, the HTTP API created by the controllers*
[20:35:24] tubbo: oded: you would if you were making a mobile app ;)
[20:35:27] annlewis: has joined #RubyOnRails
[20:35:42] tubbo: actually i'm not 100% on that, thought i heard some noise that iOS and Android both have sort-of session support
[20:35:50] tubbo: it's been a while though
[20:36:01] oded: tubbo: if you design your api around resources (restful), you sometimes want to send resources with their children because their children might not make sense on their own, or want the resource with some aggregation on its children
[20:36:24] tubbo: oded: yes, and i can do all of that with either service objects or rails' built-in nested params support.
[20:36:45] oded: it's just having a client that keeps a cookie jar... any http client can do it
[20:36:51] Guest53: has joined #RubyOnRails
[20:36:57] EminenceHC: has joined #RubyOnRails
[20:37:35] oded: tubbo: so the problems you will find with that is that you only need it in specific occasions, and the rest of the situation it's just a big waste
[20:37:50] oded: for example you need it in show and not in index, or on specific occasions of show usage
[20:38:07] tubbo: oded: then use an object for just those situations, and a different object for the other situations.
[20:38:50] tubbo: moar classes!1
[20:39:33] oded: I thought you said your API is just an interface to your objects
[20:39:40] tubbo: oded: it is. these are objects.
[20:40:24] oded: but it's random objects you create based on your users, the API should be generic and you shouldn't need to add an action for each scenario
[20:40:33] trosborn: has joined #RubyOnRails
[20:40:48] tubbo: oded: i don't know what you're talking about
[20:41:02] oded: say you have posts, they have comments they have votes. one time you need comments, one time you need votes, one time both and one time none. that's 4 actions/objects
[20:41:31] tubbo: not necessarily, it could be 1 object with configuration passed in the initializer.
[20:41:50] tubbo: or, more accurately, different decorators based on the action.
[20:41:57] tubbo: i mean, it's 4 actions/view files. what's the difference?
[20:42:07] tubbo: you see, you can't win this argument, it's a matter of opinion :)
[20:42:08] oded: so you specify a GET param, and pass it from the controller, which is what I said - the view needs the parameters
[20:42:17] HalcyonicStorm: has joined #RubyOnRails
[20:42:34] ellisTAA: if my api is just an api ???. do i care if it has a database?
[20:42:46] tubbo: EllisTAA: how else are you gonna store stuff?
[20:42:48] HalcyonicStorm: does your api use the database?
[20:43:08] ellisTAA: tubbo: so a client hits my api and my api communicates with another backend ???
[20:43:14] tubbo: then i guess not
[20:43:20] oded: tubbo: what I do is much simpler to implement and to use, I provide the minimum amount of data (basically what comes without any additional queries), and the user can specify an include param that the controller knows and renders the view with them
[20:43:52] tubbo: good for you
[20:44:02] rhizome: surely this is all a delayed reaction to my mentioning HATEOAS yesterday
[20:44:05] ellisTAA: tubbo: i???m thinking to just start it with postgres to be safe in case i need it in the future ???. sound smart?
[20:44:07] baweaver: has joined #RubyOnRails
[20:44:16] cac: has joined #RubyOnRails
[20:44:28] tubbo: EllisTAA: can't hurt
[20:44:31] oded: your controller needs to get from the model what it needs and render something from it, the model can have a MySQL backend or another HTTP API as a backend. The model is basically an interface to your data (SQL is also an API)
[20:44:44] oded: tubbo: don't you like that solution?
[20:44:49] ellisTAA: tubbo: cool
[20:44:52] shathoma: has joined #RubyOnRails
[20:45:04] tubbo: oded: seems like it's reinventing the wheel
[20:45:24] ibouvousaime: has joined #RubyOnRails
[20:45:46] oded: well I couldn't find a proper convention, so I made one up... but it's not that much far fetched, GET params are to specify what you want to receive
[20:45:49] shathoma: I have an audit table I want to have in my rails application, basically when someone quits a job it stores that someones id and their quite date in this table. That is not called a join table is it?
[20:46:00] stamina: has joined #RubyOnRails
[20:46:19] tubbo: oded: what i'm trying to say is that it doesn't really matter. as long as it makes sense to you, your team, and your users, it's fine.
[20:46:26] stannard_: has joined #RubyOnRails
[20:46:28] shathoma: Maybe what I want is a join table, I want to store the employees id the date they quit and the position they quit out of.
[20:46:41] oded: shathoma: how well are you acquainted with relational databases?
[20:46:52] shathoma: I have been building this app and testing my models as I go
[20:47:01] tubbo: like we use jbuilder and a HATEOAS-influenced structure
[20:47:05] shathoma: and I have had some crazy associations,and mostly got it working
[20:47:15] tubbo: but i use AMS at home because i don't feel like building the same stupid jbuilder file every time :P
[20:47:35] ellisTAA: i have 3 endpoints: v1/authenticate, v1/timeslots, and v1/schedule <<< do i put these all in AuthenticationController, TimeslotsController, SchedulesController? or would it be better to put them all in the same controller?
[20:47:42] shathoma: so this latest table i have created has the employee, date they quit. I also need position they quit from so I have to add that in a migration.
[20:47:46] shathoma: (which is an id to another table)
[20:47:48] tubbo: and my APIs don't have param-driven content, so you can't ever pass a param and get entirely different fields/content in the response, it's always gonna use the same structure.
[20:47:50] oded: tubbo: you can have partials or render the same file or use view inheritance (app/application/show.json.jbuilder)
[20:48:13] oded: shathoma: you should learn about foreign keys, maybe use an SQL training tool like sqlzoo
[20:48:22] oded: http://sqlzoo.net/
[20:48:24] lemur: has joined #RubyOnRails
[20:48:28] shathoma: but not sure how my models would look with the relations.
[20:48:41] shathoma: TY oded, I will check that out, I really think I need to have a has_many for my employyee to my employeeterm table
[20:49:24] oded: shathoma: the question you need to ask yourself is this: how many times can an employee quit, and can the same "quit" be done by multiple employee (yeah that doesn't make sense)
[20:49:35] shathoma: and a has_many in my jobdesc table for my employeeterm to end up with a model that when a new employeeterm is created it has the @employee, @jobdesc and the DateTime.now.to_date
[20:49:45] DEA7TH: has joined #RubyOnRails
[20:49:50] shathoma: They can shift positions
[20:50:09] oded: tubbo: you'll either need infinite amount of actions or have severe performance issues this way
[20:50:17] chridal: has joined #RubyOnRails
[20:50:21] tubbo: oded: ok then
[20:50:26] slash_nick: resigned on monday, received an offer of a raise on tuesday, decided on wednesday to stay... changed mind on friday. resignation count == 2
[20:50:55] platzhirsch: has left #RubyOnRails: ()
[20:51:51] oded: tubbo: I guess you don't like discussions :x
[20:52:15] jxs_: has joined #RubyOnRails
[20:52:26] oded: if an employee can quit many times then an employee has_many quits and a quit belongs_to employee
[20:52:31] hnanon: has joined #RubyOnRails
[20:52:46] oded: shathoma: change quit to employeeterm I guess
[20:52:53] hnanon: In my update action, I have this line: @company.create_stripe_customer(params[:company][:stripe_card_token])
[20:53:08] hnanon: In my model, I have: def create_stripe_customer(stripe_card_token)
[20:53:21] hnanon: Error: undefined method `create_stripe_customer' for #<Company:0x007f00e18c0440>
[20:53:35] oded: was this method recently added?
[20:53:41] shathoma: @oded i think that is what I needed.
[20:53:42] Radar: hnanon: !gist the Company model
[20:53:42] helpa: hnanon: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[20:53:58] oded: shathoma: great !
[20:54:01] hnanon: Radar: You're up so early.
[20:54:13] Radar: hnanon: I get up at 6 every day. It's now almost 8.
[20:54:23] Radar: I'm on my way to work, which starts at 8:30.
[20:54:33] oded: sucks for you Radar
[20:54:36] Papierkorb: Six o'clock. Wow.
[20:54:40] Radar: oded: not really :)
[20:54:40] shathoma: nope my test gets an error. Oi.
[20:54:47] Radar: I get my best work done early AM.
[20:54:48] oded: what kind of rails programmer starts work at 8:30 :P
[20:55:04] rhizome: married ones :P
[20:55:12] oded: that is true
[20:55:20] hnanon: Radar: Do you really need the whole model gisted? It's kind of embarassing.
[20:55:21] tubbo: fuck getting up when it's dark ever
[20:55:28] tubbo: i have literally been fired from jobs because i didn't want to do that
[20:55:34] shathoma: @et = EmployeeTerm.create(employee: @emp, termdate: DateTime.now.to_date) says unknown attribute: employee
[20:55:39] tubbo: if you do that you are an evil person
[20:55:39] hnanon: The method exists in the model.
[20:55:40] Radar: hnanon: I want to make sure that the method is being defined in the right context. i.e. you're not defining it as a whole model
[20:55:41] oded: afk. hnanon if this code was just added you might want to restart your server
[20:55:50] ruurd: has joined #RubyOnRails
[20:55:52] Radar: oded: the trick is that I don't really begin truly working until 9:30ish, after standup
[20:56:03] hnanon: oded: Yeah, just added. I'll try that.
[20:56:06] Radar: The first hour is mostly faffing around with emails, reading my notes from the day before, and harrassing people on IRC.
[20:56:21] Radar: tubbo: Hard to do in AU. It's dark until about 7:30am in the winter time.
[20:56:21] tubbo: only evil creatures wake up when it's dark...dracula, the elf king, werewolves, cockroaches, growth hackers
[20:56:31] Radar: haha growth hackers
[20:56:32] tuelz1: different strokes - I would hate that setup, but I imagine radar could land quite a few more jobs than I could :p
[20:56:41] TheNet: has joined #RubyOnRails
[20:57:09] tuelz1: I actually always hate work though. I'm hard wired to learn to hate anything you'll pay me to do.
[20:57:19] tuelz1: If it was fun, why would you pay me and not do it yourself?
[20:57:23] hnanon: Radar:, oded: Strange. Restarting the server got rid of the error.
[20:57:33] MartinElvar: has joined #RubyOnRails
[20:57:35] Radar: tuelz1: I enjoy my work 95% of the time because it's also my hobby.
[20:57:49] tuelz1: Radar: coding was my hobby until it became my work.
[20:57:55] Radar: The other 5% of the time is JavaScript, which is a terrible excuse for a language.
[20:58:03] bruno-: has joined #RubyOnRails
[20:58:08] Radar: And maybe that's just because people always explain it to me as if I knew it already
[20:58:14] hardtail: goodbye arup
[20:58:18] Radar: "Just copy over the .babelrc and it will work"
[20:58:22] Radar: ok, thanks, but why?
[20:58:29] moeabdol: has joined #RubyOnRails
[20:58:32] hardtail: js is that bad Radar?
[20:58:41] Radar: Hardtail: I think so.
[20:58:47] tubbo: Radar: you mean like the way people teach Ruby?
[20:58:48] tuelz1: javascript is easy as long as you're okay with breaking changes in the whole ecosystem every 5 minutes
[20:58:51] Radar: tubbo: :fire:
[20:59:22] tuelz1: people change js frameworks like I change ruby versions.
[20:59:25] tubbo: :iceburn:
[20:59:35] tubbo: the best part is you don't even need a framework with javascript ;)
[20:59:42] tubbo: the DOM is your framework
[20:59:49] tubbo: best viewed on mozilla firefox
[20:59:52] tuelz1: and spaghetti is your code!
[21:00:07] tuelz1: tasty and it's like a new puzzle every day
[21:00:14] tubbo: speaking of babel and ES6, it finally feels like a real programming language nowadays
[21:00:28] Radar: tubbo: yeah, it is getting better
[21:00:28] tubbo: JS was my first language, i learned it around late 1999-2000
[21:00:47] Radar: setting up webpack and babel and npm and... I forget what else. It felt like a series of nasty incantations. Poorly documented.
[21:00:48] tuelz1: c++ was mine - I hear c++11 is actually reasonable
[21:01:00] Radar: [07:55:08] <rhizome> married ones :P
[21:01:04] Radar: Just saw that comment!
[21:01:07] Radar: Need some aloe
[21:01:34] treehug88: has joined #RubyOnRails
[21:01:48] infamos: has joined #RubyOnRails
[21:02:04] tubbo: yeah definitely
[21:02:15] pixelhandler: has joined #RubyOnRails
[21:02:26] Pazician: has joined #RubyOnRails
[21:02:49] tubbo: actually that's part of why i like ember.js so much. you don't need to worry about all that shit. just install ember-cli. it packages the framework, transpiler, generators and dependency management all together
[21:02:52] tuelz1: next low level compiled language I plan on learning is rust though. It almost makes twiddling bits sound fun
[21:03:25] tubbo: rust seems like the language we definitely should be making OS kernels in ;P
[21:03:25] tuelz1: I leanred emberjs way before 1.0 and I still have a bad taste in my mouth :P
[21:03:35] tubbo: haha yeah
[21:03:37] tubbo: StateManager!
[21:03:51] tuelz1: I don't do SPAs anymore.
[21:03:53] tubbo: "sorry how is this better than jQuery?"
[21:04:05] mozzarella: has joined #RubyOnRails
[21:04:28] nogic: has joined #RubyOnRails
[21:04:44] Radar: "I don't do SPAs anymore." sounds too much like "I stopped taking drugs."
[21:04:58] FailBit: the terms of the TPP invalidate the GPL in countries under its jurisdiction
[21:05:05] FailBit: will be interesting to see how this stands in a court of law
[21:05:13] tuelz1: Radar: hah, I hear drug habits are hard to quit - probably the only difference :P
[21:05:18] arthurix: has joined #RubyOnRails
[21:05:33] nogic: has joined #RubyOnRails
[21:05:35] FailBit: 1. No Party shall require the transfer of, or access to, source code of software owned by a person of another Party, as a condition for the import, distribution, sale or use of such software, or of products containing such software, in its territory
[21:05:37] rhizome: picked a bad week to stop writing SPAs
[21:05:59] dethos: has joined #RubyOnRails
[21:05:59] FailBit: that line looks cherry-picked to combat the GPL
[21:06:23] rhizome: doesn't touch modifications
[21:06:26] tuelz1: sounds like huge companies will just start abusing GPL and I'll just not care about them as much as I don't care about them now
[21:06:36] bricker: has joined #RubyOnRails
[21:06:48] infamos: has joined #RubyOnRails
[21:06:56] rhizome: but companies will be able to sue countries for affecting their profits, so maybe it's all a wash in the end
[21:07:11] rubyonrailed: has joined #RubyOnRails
[21:07:32] tuelz1: I'm sure the end result will just be more ways the US government spies on us
[21:07:38] Papierkorb: man, if someone would've told us earlier that TPP is complete non-democratic corporate bullshit!
[21:07:41] Papierkorb: Oh, wait, many did
[21:08:19] tuelz1: who cares anymore, really. It's becomign painfully obvious the answer to these problems will happen outside of government.
[21:08:50] ellisTAA: im getting this error: https://gist.github.com/ellismarte/205376040c1dbb85ed17 does anyone know what that means?
[21:08:52] tuelz1: more movements every day and we're still having to fight sopa/pipa style legislation once every three months.
[21:09:12] FailBit: I'd think that if the GPL was actually invalidated then half the internet would break
[21:09:21] baweaver: has joined #RubyOnRails
[21:10:11] tuelz1: just because GPL becomes invalid doesn't mean the people using GPL will just screw off - they'll probably just fork it to another license that isn't invalidated or something clever since GPL can't stop them
[21:10:24] giantoctopus: has joined #RubyOnRails
[21:11:04] momomomomo: has joined #RubyOnRails
[21:11:31] tuelz1: I think 20 years from now it will become rather easy to boycott countries by simply moving somewhere else cheaply and easily.
[21:11:41] tuelz1: move and tax your tax dollars with you
[21:11:55] tuelz1: s/tax your/take your/
[21:12:43] tuelz1: I imagine we aren't too far off from wearables that translate on the fly
[21:13:02] tuelz1: and if both parties own them communication barriers are gone
[21:13:22] tuelz1: if only one party owns them you'll probably be bothered to speak into a mic and have a computer voice read it back out
[21:14:18] bobbobbins: has joined #RubyOnRails
[21:14:19] petricore: has joined #RubyOnRails
[21:16:03] colleenmcguckin: has joined #RubyOnRails
[21:16:33] jamesrward: has joined #RubyOnRails
[21:18:51] Coldblackice: has joined #RubyOnRails
[21:19:01] beauby: has joined #RubyOnRails
[21:19:18] ruurd: has joined #RubyOnRails
[21:20:59] annlewis: has joined #RubyOnRails
[21:21:08] chipotle: has joined #RubyOnRails
[21:22:05] blackmesa: has joined #RubyOnRails
[21:22:33] roshanavand: has joined #RubyOnRails
[21:23:23] User458764: has joined #RubyOnRails
[21:23:26] andrew-l: has joined #RubyOnRails
[21:23:51] shathoma: Okay thought i had relationships down but having a heck of a time (error is on bottom file) : https://gist.github.com/codejoy/e2b54cf1762e144e88cf
[21:25:20] trosborn: has joined #RubyOnRails
[21:26:03] RegulationD: has joined #RubyOnRails
[21:26:09] chridal: has joined #RubyOnRails
[21:30:06] shathoma: Quiet in here.
[21:30:26] dsimon: shathoma, in ProviderTerm, use singular form for belongs_to
[21:30:30] hardtail: has joined #RubyOnRails
[21:30:43] dsimon: after all, it only belongs to one provider, not to many providers
[21:31:42] chridal: has joined #RubyOnRails
[21:31:49] craysiii: has joined #RubyOnRails
[21:31:50] shathoma: ahhhhh I thought it haddd to be there got it.
[21:32:01] andrew-l: has left #RubyOnRails: ("ERC Version 5.3 (IRC client for Emacs)")
[21:32:03] ruurd: has joined #RubyOnRails
[21:32:16] shathoma: god I want to punch myself. Thanks dsimon
[21:32:30] shathoma: I had another question too on stack overflow about UIs in rails, is stack overflow a good resource for such questions ya think?
[21:32:47] dsimon: if it's "how do i make this usable", you're better off with the UX subsite
[21:32:51] shathoma: I am not up with the lingo so I think the question isn't written well perhaps :( .
[21:32:53] dsimon: if it's "how do i make this work", then that's fine
[21:33:01] shathoma: yah its a how to make this work, mostly can rails have two submits?
[21:33:08] nettoweb: has joined #RubyOnRails
[21:33:22] shathoma: Like one if you want to create an object, but another if you want to create it and keep the ID and pass it into a nother form where something else is created so you can add to the object you just created.
[21:33:36] shathoma: (passing it in as a hidden field or what not)
[21:33:52] dsimon: well, before you ask that, make sure you understand what plain ol' HTML/HTTP does when there are two submit elements
[21:34:28] shathoma: Like with Get/Post etc?
[21:34:57] dsimon: yeah, more specifically: how will the server find out about which submit button was used?
[21:34:59] tubbo: shathoma: you can totally have two submit buttons in the same <form>, they just go to the same place.
[21:35:49] shathoma: yah I figured jquery somehow. and then in the controller is it? It would know which one to route too. Good lord, I got Rails 4 in action just recently, and started to go through it but then the client wanted this software asap. I am playing catchup and trial by fire on my rails 4...
[21:36:04] Balllkenende: has joined #RubyOnRails
[21:36:10] cac: has joined #RubyOnRails
[21:36:17] darrencauthon: has joined #RubyOnRails
[21:36:30] shathoma: If anyone wants to take a gander the stackoverflow question is here: http://stackoverflow.com/questions/33486514/multiple-kinds-of-submit-on-a-rails-form-clarification
[21:36:59] shathoma: mostly the gist is: I want to create something, and i can. but sometimes I want to create that something and ADD something else that might exsist already or itself have to be created.
[21:37:16] shathoma: I did some model testing and am pretty sure I understand how to do this on the back end (through some model tests etc) but the front end im like hmmmm :/
[21:37:31] dsimon: it looks pretty much like the second SO question you linked has a good answer
[21:37:52] shathoma: The passing params when clicking a submit button one?
[21:38:18] ruurd: has joined #RubyOnRails
[21:38:22] shathoma: I will read up on that. Is it Jquery that would do the match on the select options box? Like knowing if i selected an actual data item or selected the 'add new' ?
[21:38:23] User4587_: has joined #RubyOnRails
[21:38:31] shathoma: match=magic
[21:38:41] dsimon: there's only one submit button in that form
[21:38:57] dsimon: it looks like you're asking instead for which thing was chosen in a <select>
[21:39:13] tubbo: shathoma: there's a concept in rails called "nested forms". it's pretty much what you are doing right here v
[21:39:15] tubbo: shathoma: http://railscasts.com/episodes/196-nested-model-form-revised
[21:39:50] dsimon: also, it looks like you probably want to be doing an AJAX thing
[21:40:03] recurrence: has joined #RubyOnRails
[21:40:11] dsimon: creating a new group is a separate sub-action that updates the list of chooseable groups, right?
[21:40:22] tubbo: i also use this to handle the ajax stuff https://github.com/ryanb/nested_form
[21:40:23] recurrence: Thnaks for the feedback earlier smathy
[21:40:39] blackmesa: has joined #RubyOnRails
[21:41:12] shathoma: creating a group (the screens hot had me editing one). Really You can create a group and be done. OR create a group and attach Multiple Providers to the group (I need a nice UI for this, ctrl clicking in that select box would get messy with at on of providers) OR you can create a group and CREATE a provider for that group 'on the fly'
[21:41:32] shathoma: I did get some nested data working, those addresses are nested forms (I tried to make it a normalized database and not repeat anything so there is a table just for addresses)
[21:41:46] nya: has joined #RubyOnRails
[21:44:08] goodcodeguy: has joined #RubyOnRails
[21:44:23] jmo: has joined #RubyOnRails
[21:44:51] jamesrward: Going a little nuts trying to get rspec playing nice with an existing project. Getting uninitialized constant SpecTestHelper (NameError) when running my any specs. I have the module defined in my spec/support folder and the rails_helper.rb DIR settings are uncommented. Not sure where else to look.
[21:44:58] cac: has joined #RubyOnRails
[21:49:02] jamesrward: ugh had my config.include inside spec_helper instead of rails_helper. Thanks for being my rubber ducky everyone :)
[21:49:11] rubyonrails178: has joined #RubyOnRails
[21:49:38] rubyonrails178: has left #RubyOnRails: ()
[21:50:04] rubyonrails608: has joined #RubyOnRails
[21:50:22] andrews: has joined #RubyOnRails
[21:50:52] rubyonrails022: has joined #RubyOnRails
[21:51:11] sarink: has joined #RubyOnRails
[21:51:21] rubyonrails950: has joined #RubyOnRails
[21:51:40] rubyonrails950: needing help with acts as votable
[21:52:14] rubyonrails950: please msg me if you are able to help!
[21:52:15] colleenmcguckin: has joined #RubyOnRails
[21:52:22] nfk: has joined #RubyOnRails
[21:55:04] ruurd: has joined #RubyOnRails
[21:56:40] Aeyrix_: has left #RubyOnRails: ()
[21:56:44] Aeyrix: has joined #RubyOnRails
[21:57:02] vigintas1: has joined #RubyOnRails
[21:57:14] trosborn: has joined #RubyOnRails
[21:58:18] simplyianm: has joined #RubyOnRails
[22:00:48] ruurd: has joined #RubyOnRails
[22:01:01] bvbrandon: So I just namespaced my classes and I can???t render anymore :/ I???m getting undefined method `page_path'
[22:01:31] Aeyrix: Did you namespace them for any particular reason?
[22:02:01] smathy: recurrence, you're welcome.
[22:02:09] bvbrandon: I was told to lol
[22:02:52] smathy: Hardtail, sorry, I had to step out. Glad to hear you got it working.
[22:03:13] thecyclone: has joined #RubyOnRails
[22:04:08] hardtail: Smathy, no worries. I believe it works in form of a Rails Exception. Not sure if that is normal behaviour so I will research the Gem further.
[22:04:15] mwlang: geez, I need to take a break???just read ???acts as votable??? as ???acts as violatable??? and I was like, violate?!?
[22:04:28] Aeyrix: bvbrandon: Yeah that's not really a solid reason.
[22:05:03] bvbrandon: it has to do with keeping admin and client facing logic seperate
[22:05:07] hardtail: I forgot that I need Xcode to install Rails on OS X :D
[22:05:56] Aeyrix: bvbrandon: You only want to namespace admin.
[22:06:24] riotjones: has joined #RubyOnRails
[22:06:46] bvbrandon: That might be the best way to go about it, but I don???t get a say in that choice, I just need it to render :/
[22:07:35] Aeyrix: bvbrandon: That's not a choice
[22:07:45] Aeyrix: "do this, or you're not doing it correctly"
[22:08:05] colleenmcguckin: has joined #RubyOnRails
[22:08:25] bvbrandon: what I mean is, my boss said to do that and theres no wiggle room, thanks for the insight though
[22:08:26] oded: lol Aeyrix
[22:08:46] Aeyrix: Your boss need to read Rails 4 in Action or some other Rails starter book.
[22:08:51] oded: bvbrandon: you can always find a better boss
[22:08:55] Aeyrix: Even the rails guides may be sufficient: http://guides.rubyonrails.org/routing.html#controller-namespaces-and-routing
[22:09:19] mary5030: has joined #RubyOnRails
[22:09:42] bvbrandon: thanks, Ill ask about it tomorrow
[22:09:57] sunny36: has joined #RubyOnRails
[22:10:10] Aeyrix: That guide will help you too, it explains namespacing.
[22:10:13] smathy: Wow. So our production deploys do the DB updates first, and then restart the app. Our staging deploys restart the app and then do the DB updates. I used to think (in previous, team-lead role) that I was a bit pedantic sometimes, getting the envs all exactly the same.
[22:10:24] thecyclone: Aeyrix: The script you gave me to install RoR has become very popular in my peer group. Can't thanks you enough mate!
[22:10:25] Jasaka: has joined #RubyOnRails
[22:10:34] Aeyrix: thecyclone: lol np
[22:11:14] smathy: ACTION meant to send that to OT channel, sorry
[22:11:28] Ropeney: has joined #RubyOnRails
[22:12:19] infamos: has joined #RubyOnRails
[22:13:37] darrencauthon: has joined #RubyOnRails
[22:13:56] defsdoor: has joined #RubyOnRails
[22:14:40] nickenchuggets: has joined #RubyOnRails
[22:14:40] nickenchuggets: has joined #RubyOnRails
[22:14:50] Diabolik: has joined #RubyOnRails
[22:15:03] tris: has joined #RubyOnRails
[22:16:08] colleenmcguckin: has joined #RubyOnRails
[22:16:21] ruurd: has joined #RubyOnRails
[22:18:08] SteenJobs: has joined #RubyOnRails
[22:18:42] TheNet: has joined #RubyOnRails
[22:20:26] Fuzai: has joined #RubyOnRails
[22:20:35] threeminutemonta: has joined #RubyOnRails
[22:21:05] barttenbrinke: has joined #RubyOnRails
[22:21:17] bmalum: has joined #RubyOnRails
[22:21:45] annlewis: has joined #RubyOnRails
[22:23:14] barce_: has joined #RubyOnRails
[22:23:14] epochwolf: has joined #RubyOnRails
[22:23:36] Palsson: has joined #RubyOnRails
[22:24:19] Guest53: has joined #RubyOnRails
[22:24:39] Mia: has joined #RubyOnRails
[22:24:39] Mia: has joined #RubyOnRails
[22:25:31] safety_cut: has joined #RubyOnRails
[22:25:44] ruurd: has joined #RubyOnRails
[22:26:47] cschneid: has joined #RubyOnRails
[22:26:48] DarkBushido: has joined #RubyOnRails
[22:27:05] safety_cut: has joined #RubyOnRails
[22:28:06] eyck: has joined #RubyOnRails
[22:29:53] kerunaru: has joined #RubyOnRails
[22:29:55] maxz: has joined #RubyOnRails
[22:30:41] wcalderipe: has joined #RubyOnRails
[22:31:51] sankaber: has joined #RubyOnRails
[22:33:31] pwnd_nsfw: has joined #RubyOnRails
[22:34:37] alevy: has joined #RubyOnRails
[22:35:17] SeanLazer: has joined #RubyOnRails
[22:35:46] GeissT: has joined #RubyOnRails
[22:36:04] wcalderipe: does anybody knows why i'm facing a "undefined method `validate_presence_of' for" for this code https://gist.github.com/wcalderipe/8503a25122de14e95600 ?
[22:36:17] wethu: has joined #RubyOnRails
[22:36:47] shathoma: cause maybe its called validates_presence_of with an s in validate?
[22:37:28] Dreamer3: has joined #RubyOnRails
[22:37:53] teclator: has joined #RubyOnRails
[22:38:29] jessemcgilallen: has joined #RubyOnRails
[22:38:52] wcalderipe: no it's not :s
[22:39:33] eyck: has joined #RubyOnRails
[22:39:38] wcalderipe: the corporation_signup_form_spec is failing
[22:39:40] htmldrum: has joined #RubyOnRails
[22:40:00] hardtail: has joined #RubyOnRails
[22:40:16] yfeldblum: has joined #RubyOnRails
[22:40:20] rhizome: did the s fix the other thing
[22:41:27] wcalderipe: probably if i remove the S from the form object i'll see the same error
[22:41:48] wcalderipe: the problem happen when i'm running rspec
[22:42:10] wcalderipe: something like shoulda methods being not inject in the spec class
[22:42:22] rhizome: i guess i don't know what the question is anymore
[22:42:37] ellisTAA: has joined #RubyOnRails
[22:43:33] maxz: has joined #RubyOnRails
[22:44:30] wcalderipe: rhizome: https://gist.github.com/wcalderipe/8503a25122de14e95600
[22:44:41] momomomomo: has joined #RubyOnRails
[22:44:43] htmldrum: has joined #RubyOnRails
[22:45:37] lemur: has joined #RubyOnRails
[22:45:56] bobbobbins: has joined #RubyOnRails
[22:46:36] tubbo: wcalderipe: i don't think validates_presence_of is a real method
[22:46:37] moeabdol: has joined #RubyOnRails
[22:47:03] tubbo: on activemodel/model
[22:47:52] xardion: So, making a rails engine that is also usable as a gem in a non-Rails app is actually pretty easy
[22:47:57] wcalderipe: i just changed the rspec describe to pass the type
[22:47:58] wcalderipe: describe CorporationSignupForm, type: :model do
[22:48:13] tubbo: oh wait maybe i'm wrong *shrug*
[22:48:19] ruurd: has joined #RubyOnRails
[22:49:23] wcalderipe: tubbo: http://apidock.com/rails/ActiveRecord/Validations/ClassMethods/validates_presence_of
[22:50:21] DarkBushido: has joined #RubyOnRails
[22:50:51] xardion: there's really only two things you need to do: move the dependency on rails in the gemspec to be a development dependency, then in the main lib/<your engine name>.rb, wrap the "require '<your engine name>/engine.rb'" in an "if defined?(Rails)"
[22:50:59] eyck: has joined #RubyOnRails
[22:51:33] xardion: in the "else" you have it require whatever files you want available for non-rails apps using the gem, like the models
[22:52:17] xardion: in that case, you'd also want to add activerecord as an explicit dependency in the gemspec
[22:53:26] exadeci: has joined #RubyOnRails
[22:54:13] A124: has joined #RubyOnRails
[22:54:13] A124: has joined #RubyOnRails
[22:54:18] xardion: you could conceivably add some elsif's with conditions to check for other frameworks (e.g. Sinatra)
[22:57:35] quazimodo: has joined #RubyOnRails
[22:57:57] jessemcgilallen: has joined #RubyOnRails
[22:59:18] ruurd: has joined #RubyOnRails
[22:59:30] nibbo: has joined #RubyOnRails
[23:01:49] stannard: has joined #RubyOnRails
[23:01:49] djbkd: has joined #RubyOnRails
[23:02:30] chipotle: has joined #RubyOnRails
[23:02:39] eyck: has joined #RubyOnRails
[23:02:56] ellisTAA: i???m thinking about creating a controller called authentication, should i call it authentications?
[23:03:02] Mia: has joined #RubyOnRails
[23:03:14] rhizome: what is it for?
[23:03:31] EminenceHC: has joined #RubyOnRails
[23:03:40] yfeldblum: has joined #RubyOnRails
[23:04:19] ellisTAA: an authenticate endpoint v1/authenticate
[23:04:58] rhizome: what does that endpoint do?
[23:05:27] ellisTAA: takes incoming data and sends it to another server to get authetnicated then returns api_key
[23:05:35] Anubix: has joined #RubyOnRails
[23:05:51] rhizome: what happens to that key?
[23:06:28] tuelz1: has joined #RubyOnRails
[23:06:44] Anubix: Hi, i am using typeahead.js in my app, but when i am trying to load local: (array of my @towns.name), then it is in js show as <%= @towns.name %> and it doesnt execute
[23:06:51] jessemcgilallen: has joined #RubyOnRails
[23:06:54] Anubix: How can i execure Rails code in JS ?
[23:06:56] ellisTAA: rhizome: gets sent to the user that tried to authenticate
[23:07:16] rhizome: EllisTAA: sent?
[23:07:30] ellisTAA: rhizome: it is included in the response
[23:07:38] tubbo: Anubix: you can't
[23:07:57] tubbo: Anubix: you *can* make an ajax request to a json endpoint and load the response data from there into your JS code.
[23:08:14] Anubix: tubbo: Ah :/
[23:08:25] tubbo: Anubix: also, if @towns is an array of Strings, @towns.name is going to fail.
[23:09:04] ellisTAA: rhizome: so should i create a controller called authentications?
[23:09:23] Anubix: tubbo: Ok ty i go try it.
[23:09:34] pydave6367: has joined #RubyOnRails
[23:10:51] kimegede: has joined #RubyOnRails
[23:11:44] northfurr: has joined #RubyOnRails
[23:11:52] rhizome: EllisTAA: sure, i was just exploring names
[23:12:03] drbayer_: has joined #RubyOnRails
[23:12:16] Spami: has joined #RubyOnRails
[23:12:51] ellisTAA: rhizome: cool. it sounds like a weird controller name ??? doesn???t sound very noun like although it is a thing
[23:12:57] SeanLazer: has joined #RubyOnRails
[23:13:55] drbayer__: has joined #RubyOnRails
[23:14:15] kerunaru: has joined #RubyOnRails
[23:15:03] ruurd: has joined #RubyOnRails
[23:16:18] riotjones: has joined #RubyOnRails
[23:17:08] peitera: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[23:17:35] rhizome: it's common to be Sessions or UserSessions or something like that
[23:17:49] rhizome: not sure if that matches the business case here tho
[23:19:40] Anubix: has joined #RubyOnRails
[23:21:29] Anubix: If I do @towns.to_json in controller and then load @towns in javascript, it doesnt still work :/
[23:22:27] Anubix: and i cant find any article about it
[23:22:32] annlewis: has joined #RubyOnRails
[23:22:43] mices: has joined #RubyOnRails
[23:22:54] simplyianm: has joined #RubyOnRails
[23:23:17] tetraktys: has joined #RubyOnRails
[23:23:57] mices: where can i find the devise copy and paste code for my layout
[23:24:18] jahbrewski: has joined #RubyOnRails
[23:24:48] Aeyrix: 10:23 AM <mices> where can i find the devise copy and paste code for my layout
[23:24:54] Aeyrix: [ TRUMPETS SOUND ]
[23:24:58] Aeyrix: [ ORCHESTRA STANDS ]
[23:24:59] slash_nick: tooo-da-doooo
[23:25:07] Aeyrix: [ Frontman gets up on stage ]
[23:25:09] Aeyrix: mices: stop
[23:25:13] Aeyrix: [ Crowd applauds ]
[23:25:18] Aeyrix: [ Lights go dark ]
[23:25:30] mices: like in my layout if the user's not logged in it should have link to sign in and if they're logged in it should have link to logout
[23:25:32] slash_nick: [ glow in the dark stars and planets illuminate ]
[23:25:59] Aeyrix: mices: You should be able to write that yourself.
[23:26:07] Aeyrix: It is, quite literally, one line of code. Three or four if you space it out.
[23:26:15] mices: i know, but they must be somewhere in devise docs
[23:26:26] slash_nick: mices: what does this code do?
[23:26:34] tetraktys: hey guys, i'm trying to create a new rails 5 project with docker-compose, but I get a "The git source git://github.com/rails/rails.git is not yet checked out. Please run `bundle install` before trying to start your application" I followed the steps on "https://docs.docker.com/compose/rails/" (with the exception of using rails (and rack and arel) from github
[23:26:46] mices: i wanna see what suggestion devise had for my layout
[23:26:56] mices: like user control panel or whatever
[23:26:58] Aeyrix: tetraktys: tbh we're not really supporting rails 5 yet
[23:27:08] Aeyrix: mices: There's no suggestions.
[23:27:13] slash_nick: tetraktys: what a weird error... "your source control is weird, better bundle!"
[23:27:13] rhizome: s/really//
[23:27:19] mices: i mean account not control panel
[23:27:25] Aeyrix: tetraktys: Or Docker, because I'm still not convinced docker isn't literally broken.
[23:27:30] Aeyrix: I can still root a server using Docker.
[23:27:43] rhizome: tetraktys: using rails 5 means you know how to troubleshoot that stuff
[23:28:00] kalusn: has joined #RubyOnRails
[23:28:02] Aeyrix: mices: Devise doesn't have "suggestions" for that sort of stuff.
[23:28:05] Aeyrix: It's an authentication framework.
[23:28:14] Aeyrix: Its contribution to your app ends there.
[23:28:34] slash_nick: layout, devise doesn't touch... the view for /authentications/new, devise can give you a starting point on that
[23:28:42] mices: it has views i thought there might be something for layouts
[23:28:44] tetraktys: Aeyrix, of course i realise rails 5 isn't fully supported yet, but i was kind of hoping anyone tried this and ran into the same issue
[23:28:54] Aeyrix: mices: Just the views.
[23:29:02] lacrymol1gy: has joined #RubyOnRails
[23:29:04] rhizome: first i've heard docker and rails 5 mentioned together
[23:29:36] Aeyrix: That's because most people using Docker are also only on Slack.
[23:29:38] slash_nick: still a weird message
[23:29:47] tetraktys: Aeyrix, the double negatives are a challenge to interpret ;) "still not convinced" "isn't really broken"
[23:29:50] chridal: has joined #RubyOnRails
[23:29:52] jahbrews1i: has joined #RubyOnRails
[23:29:58] slash_nick: rhizome: right? is this a docker-compose usage problem?... i'll bet rails behaves the same whether dockers in the picture or not
[23:30:05] Aeyrix: tetraktys: Docker's fukt yo
[23:30:35] ruurd: has joined #RubyOnRails
[23:31:21] slash_nick: we use docker over at 80.80.80.80
[23:31:59] rhizome: vanity mac address
[23:32:00] tetraktys: what's your beef with docker Aeyrix ?
[23:32:18] baweaver: has joined #RubyOnRails
[23:32:32] rhizome: WHO WON'T WEAR THE RRIBBON?
[23:32:47] Aeyrix: tetraktys: 10:27 AM <Aeyrix> I can still root a server using Docker.
[23:32:52] Aeyrix: I work in information security.
[23:33:12] EminenceHC: has joined #RubyOnRails
[23:33:35] mices: why doesn't rake routes show the routes for sessions
[23:33:42] Aeyrix: From a pragmatic point of view I firmly believe that it's making things too easy, as well. That much abstraction can only bring problems to projects later down the line when the wrong person - the only person who knows how to actually manage the system - leaves.
[23:33:49] slash_nick: Aeyrix: all of 'em? or just... generally?
[23:34:03] Axsuul: has joined #RubyOnRails
[23:34:08] Aeyrix: slash_nick: It depends.
[23:34:11] slash_nick: as in... "i see docker, i'm in" vs "i see docker, i'm probably in"
[23:34:20] Aeyrix: The latter.
[23:34:22] rickmasta: has joined #RubyOnRails
[23:34:31] Aeyrix: The default configuration for Docker is vulnerable.
[23:34:31] Aeyrix: Most people don't change it.
[23:34:39] Aeyrix: In fact, I completely lie. All of them.
[23:34:40] simplyianm: has joined #RubyOnRails
[23:34:52] slash_nick: ACTION 's servers shiver
[23:35:07] slash_nick: folks lay off 80.80.80.80 until we can fix this
[23:35:27] Aeyrix: It's a "feature".
[23:35:27] Aeyrix: And it's a side-effect of them deciding to roll their own alternatives to cgroups.
[23:35:27] Aeyrix: >have a user account on the system
[23:35:27] Aeyrix: Congratulations! You're root!
[23:35:44] Aeyrix: Hosting services for Docker like Tutum, as weird and Frankenstein's monsteresque as they are, have some protections around this.
[23:35:56] Aeyrix: But realistically if you gave me enough time I could probably find something
[23:36:05] axsuul_: has joined #RubyOnRails
[23:36:09] tetraktys: holy crap... you guys lost me quick :/
[23:36:28] mices: o yes it does sorry
[23:36:33] smathy: Most of the docker recipes are terrible, security-wise.
[23:36:42] slash_nick: it was the third 80 wasn't it?
[23:36:57] tetraktys: even sooner, the second one did it
[23:37:14] slash_nick: lots of folks lost themselves in the 80s
[23:37:36] slash_nick: it was a good time.
[23:38:18] Aeyrix: tetraktys: If I have an account on your server with which to use Docker in pretty much any capacity
[23:38:20] Aeyrix: I can become root.
[23:38:25] prasselpikachu: has joined #RubyOnRails
[23:38:32] Aeyrix: "Feature".
[23:38:35] Iacobus: has joined #RubyOnRails
[23:38:37] tetraktys: i feel some aversion when it comes to docker, even though the whole world and their mother are embracing it. in your opinions: is it the way to go?
[23:38:50] MiracleBlue: has joined #RubyOnRails
[23:38:51] wa_r_ch_i__ld1: has joined #RubyOnRails
[23:39:07] tetraktys: is it really that insecure?
[23:39:17] jahbrewski: has joined #RubyOnRails
[23:40:00] Aeyrix: 10:33 AM <Aeyrix> From a pragmatic point of view I firmly believe that it's making things too easy, as well. That much abstraction can only bring problems to projects later down the line when the wrong person - the only person who knows how to actually manage the system - leaves.
[23:40:08] Aeyrix: I will honestly resist using Docker until the end of time.
[23:40:21] Aeyrix: It will most probably never be a thing in the field I work in, which is a bonus.
[23:40:23] chridal: has joined #RubyOnRails
[23:40:24] abracadaniel: has joined #RubyOnRails
[23:41:11] ruurd: has joined #RubyOnRails
[23:41:12] wa_r_ch_i__ld1: hey all, can you pass params in a method with .try in ruby? e.g nillmethod.try(:method1(params))
[23:41:20] wa_r_ch_i__ld1: i seem to get this weird error
[23:41:47] safety_cut: has joined #RubyOnRails
[23:41:56] wa_r_ch_i__ld1: by the way im on ruby 1.8.7
[23:42:23] Aeyrix: ... What version of Rails?
[23:42:33] Aeyrix: Do you realise how outdated Ruby 1.8.7 is?
[23:42:36] EasyCo: has joined #RubyOnRails
[23:43:10] royvandermeij: has joined #RubyOnRails
[23:43:24] wa_r_ch_i__ld1: @Aeyrix sorry, I meant Rails 2.3.8
[23:43:43] Iacobus: has joined #RubyOnRails
[23:43:46] wa_r_ch_i__ld1: Do I have to pass the params in a block?
[23:43:46] Aeyrix: We don't even support Rails 3
[23:43:58] Aeyrix: I don't think anyone here even remembers rails 2
[23:44:41] jobewan: has joined #RubyOnRails
[23:44:58] wa_r_ch_i__ld1: http://apidock.com/rails/v2.3.8/Object/try
[23:45:08] skyjumpe1: has left #RubyOnRails: ()
[23:45:43] smathy: wa_r_ch_i__ld1, just as other arguments to the try method.
[23:46:48] wa_r_ch_i__ld1: @smathy, so in my example it looks like, nilmethod.try(:method1, :params) ??
[23:48:04] EminenceHC: has joined #RubyOnRails
[23:48:33] smathy: wa_r_ch_i__ld1, that will call nilmethod.method1(:params)
[23:48:37] slash_nick: ACTION raises hand
[23:48:43] smathy: wa_r_ch_i__ld1, you probably meant just params not :params
[23:48:55] smathy: Yes slash_nick?
[23:49:02] wa_r_ch_i__ld1: nilmethod.try(:method1, params)
[23:49:09] wa_r_ch_i__ld1: will call method1(params) ?
[23:49:21] slash_nick: smathy: rails 2
[23:49:21] arthurix_: has joined #RubyOnRails
[23:51:06] smathy: slash_nick, yes, what's your point?
[23:51:16] atomical: has joined #RubyOnRails
[23:51:29] chipotle: has joined #RubyOnRails
[23:51:53] bruno-: has joined #RubyOnRails
[23:52:05] slash_nick: sorry to interrupt :)... i remember rails 2, that's it. no point.
[23:52:05] alfie_max15: has joined #RubyOnRails
[23:52:14] alfie_max15: got a quick question
[23:52:45] alfie_max15: I've got a class and a module with the same name
[23:52:51] smathy: You don't have to put your hand up for that silly.
[23:52:57] wa_r_ch_i__ld1: @smathy so that is the syntax though? ;)
[23:53:12] wa_r_ch_i__ld1: not to symbolify the args?
[23:53:40] smathy: wa_r_ch_i__ld1, as I said, try(:foo, :bar) will call foo(:bar)
[23:53:55] fre: has joined #RubyOnRails
[23:53:59] smathy: wa_r_ch_i__ld1, if you want foo(bar) then use try(:foo, bar)
[23:54:00] wa_r_ch_i__ld1: so try(:foo, bar) calls foo(bar)
[23:54:12] alfie_max15: the module is present in the application/concerns dir
[23:54:26] alfie_max15: has left #RubyOnRails: ()
[23:54:34] smathy: alfie_max15, it's hard to follow a problem split over so many lines, try to hit ENTER a bit less.
[23:55:08] smathy: ...or that.
[23:55:23] chridal: has joined #RubyOnRails
[23:55:38] ellisTAA: i want to generate controller specs for a controller that is nested in the app > controllers > v1 > authentications_controller.rb ??? would i write rails g rspec:controller AuthenticationsController
[23:55:55] prasselpikachu: has joined #RubyOnRails
[23:57:02] krzkrz: has joined #RubyOnRails
[23:57:20] Guest7916: has joined #RubyOnRails
[23:58:09] tubbo: EllisTAA: i would just create the file myself with that kind of namespace
[23:58:18] hardtail: has joined #RubyOnRails
[23:58:27] tubbo: EllisTAA: you might be able to get away with rails g rspec:controller V1::AuthenticationsController
[23:59:26] mices: has joined #RubyOnRails
[23:59:55] smathy: I thought we'd already been over the fact that rspec generators do virtually nothing.
[23:59:57] Cache_Money: has joined #RubyOnRails