« Back to channel list

#RubyOnRails - 02 August 2017

« Back 1 day Forward 1 day »
[00:00:17] jhfisc: has joined #RubyOnRails
[00:09:12] jhfisc: has joined #RubyOnRails
[00:11:55] jhfisc: has joined #RubyOnRails
[00:17:00] jhfisc: has joined #RubyOnRails
[00:21:56] Ropeney: has joined #RubyOnRails
[00:22:43] jhfisc: has joined #RubyOnRails
[00:22:46] duderono_: has joined #RubyOnRails
[00:29:44] gusrub: has joined #RubyOnRails
[00:30:50] jhfisc: has joined #RubyOnRails
[00:31:59] tanuki: has joined #RubyOnRails
[00:36:26] jhfisc: has joined #RubyOnRails
[00:36:56] brent__: has joined #RubyOnRails
[00:38:16] moei: has joined #RubyOnRails
[00:41:00] Radar: GOOD MORNING
[00:48:17] jhfisc: has joined #RubyOnRails
[00:54:38] sevenseacat: has joined #RubyOnRails
[01:03:38] Ropeney: has joined #RubyOnRails
[01:06:40] jhfisc: has joined #RubyOnRails
[01:12:09] jhfisc: has joined #RubyOnRails
[01:15:25] chouhoulis: has joined #RubyOnRails
[01:16:19] chouhoulis: has joined #RubyOnRails
[01:16:21] jhfisc: has joined #RubyOnRails
[01:21:00] Jameser: has joined #RubyOnRails
[01:39:32] Rodya_: has joined #RubyOnRails
[01:48:13] bronson: has joined #RubyOnRails
[01:51:29] irishfromua: has joined #RubyOnRails
[01:59:23] Rodya_: has joined #RubyOnRails
[02:04:01] gusrub: has joined #RubyOnRails
[02:05:16] jhfisc: has joined #RubyOnRails
[02:05:56] mtkd: has joined #RubyOnRails
[02:09:59] PresidentBiscuit: has joined #RubyOnRails
[02:11:49] jhfisc: has joined #RubyOnRails
[02:18:34] cam27: has joined #RubyOnRails
[02:20:45] jhfisc: has joined #RubyOnRails
[02:26:14] ElFerna: has joined #RubyOnRails
[02:26:50] jhfisc: has joined #RubyOnRails
[02:29:56] jhfisc: has joined #RubyOnRails
[02:30:41] chouhoulis: has joined #RubyOnRails
[02:36:22] jhfisc: has joined #RubyOnRails
[03:15:43] duderonomy: has joined #RubyOnRails
[03:17:00] ElFerna: has joined #RubyOnRails
[03:22:35] bondibox: has joined #RubyOnRails
[03:24:14] bondibox: so ? what is the 'right' way to do a secret_key_base in production? I'd be happy with just putting it in config/secrets.yml but Git insists on including that file in my repo no matter what I try.
[03:24:37] sevenseacat: I'd use an env var
[03:25:16] bondibox: I did, I can 'echo $SECRET_KEY_BASE and I get the right string, but the app can't get the env var
[03:26:27] sevenseacat: what d oyou mean, 'cant get it'?
[03:26:39] bondibox: my production entry in secrets.yml is this: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
[03:26:50] bondibox: I get an error
[03:27:08] sevenseacat: and the error is....
[03:27:26] bondibox: Missing `secret_key_base` for 'production' environment
[03:27:57] bondibox: seems like all the pieces to the puzzle are there
[03:28:12] sevenseacat: depends. is the env var set for the user that's trying to run the app?
[03:28:32] bondibox: well, the user is www-data who doesn't have a shell
[03:29:44] sevenseacat: so how are you configuring the env var for that user
[03:30:17] bondibox: sudo -u www-data echo $SECRET_KEY_BASE <-- this works
[03:30:46] bondibox: /etc/environment
[03:34:45] RahulT: has joined #RubyOnRails
[03:39:56] ElFerna: has joined #RubyOnRails
[03:42:35] bondibox: well I guess it will remain a mystery for a while. Thanks for the reality check sevenseacat at least it's not something dumb
[04:00:48] wethu: has joined #RubyOnRails
[04:03:47] segy_: has joined #RubyOnRails
[04:05:18] segy-: has joined #RubyOnRails
[04:05:32] bronson: has joined #RubyOnRails
[04:07:47] segy-: has joined #RubyOnRails
[04:09:49] segy_: has joined #RubyOnRails
[04:51:22] ascarter: has joined #RubyOnRails
[04:58:30] ali_g__: <cjohnson> where you able to link_to a non-standard action? I'm having the same issue.
[04:59:52] ali_g__: I have a person_somecolumn_path and trying to pass somecolumns as params via a method in the model:
[04:59:53] ali_g__: def to_param
[04:59:53] ali_g__: somecolumn
[04:59:53] ali_g__: and a method in the controller:
[04:59:53] ali_g__: @person = Person.find_by (params[:somecolumn])
[04:59:54] ali_g__: but getting No route matches {:action=>"show", :controller=>"servidor", :id=>"64", :person_id=>nil}, possible unmatched constraints: [:person_id]
[05:00:46] ali_g__: :somecolumn is an alternative for of :id I use to join tables
[05:05:44] bronson: has joined #RubyOnRails
[05:07:06] RahulT: has joined #RubyOnRails
[05:26:04] srinidhi: has joined #RubyOnRails
[05:31:18] cjohnson: ali_g__: I had to create a route for the action
[05:31:51] ali_g__: I solved it too with a custom route & some tweaks
[05:32:01] RahulT: has joined #RubyOnRails
[05:32:04] ali_g__: this helped: http://guides.rubyonrails.org/routing.html#overriding-named-route-parameters
[05:32:12] ali_g__: and this: https://stackoverflow.com/questions/7759457/rails-route-based-on-something-different-than-id
[05:47:58] Jameser: has joined #RubyOnRails
[05:50:05] Abhijit: has joined #RubyOnRails
[05:50:24] Abhijit: do i need to import css fiiles manually into reactjs components in rails app?
[05:57:03] nickjj: has joined #RubyOnRails
[06:22:37] workmad3: has joined #RubyOnRails
[06:39:35] conta: has joined #RubyOnRails
[06:41:19] jhfisc: has joined #RubyOnRails
[06:46:21] jhfisc: has joined #RubyOnRails
[06:49:46] xiljin: has joined #RubyOnRails
[06:51:52] rrichardsr3: has joined #RubyOnRails
[06:53:10] srinidhi: has joined #RubyOnRails
[06:53:10] KeyJoo: has joined #RubyOnRails
[06:53:42] dionysus69: has joined #RubyOnRails
[06:56:07] snickers: has joined #RubyOnRails
[06:59:37] snickers: Hi this is not strictly related to rails, but I need to embed iframe that source is http in https site. I try to use Content-Security-Policy: frame-ancestors but without success. Someone can help?
[07:03:22] jhfisc: has joined #RubyOnRails
[07:06:34] bronson: has joined #RubyOnRails
[07:16:15] jhfisc: has joined #RubyOnRails
[07:21:02] lxsameer: has joined #RubyOnRails
[07:22:45] jhfisc: has joined #RubyOnRails
[07:22:45] noob_on_rails: has joined #RubyOnRails
[07:23:10] noob_on_rails: hey all ,can smn help me understand this line has_many :published, foreign_key: :publisher_id, class_name: 'Book', as: :publisher
[07:23:23] noob_on_rails: where published is a polymorphic assoc
[07:23:31] noob_on_rails: publisher*** sorry
[07:23:47] noob_on_rails: i don't get the class_name: 'Book'
[07:24:33] sevenseacat: it's the class of objects inside the association
[07:25:02] sevenseacat: eg. if you called @publisher.published, you'd get a relation of Book instances back
[07:25:58] noob_on_rails: so he says that 'published' will be a book
[07:26:04] noob_on_rails: ok cool thanks!
[07:26:12] sevenseacat: rails by default infers it from the name of the association, but if you want to name it something different, you can specify the class manually
[07:27:33] noob_on_rails: has_many :dogs , class_name: 'Canine'
[07:27:39] noob_on_rails: where dogs stands as an alias
[07:27:56] noob_on_rails: but has a Canine object init?
[07:28:03] jhfisc: has joined #RubyOnRails
[07:28:13] noob_on_rails: (concept-wise)
[07:28:50] sevenseacat: pretty much. for another example, in a Book class, it might belongs_to :author, class_name: 'User' and also belongs_to :owner, class_name: 'User'
[07:33:33] jhfisc: has joined #RubyOnRails
[07:41:45] moeabdol: has joined #RubyOnRails
[07:45:28] jhfisc: has joined #RubyOnRails
[07:49:22] kies: has joined #RubyOnRails
[07:51:17] jhfisc: has joined #RubyOnRails
[07:52:54] mikecmpbll: has joined #RubyOnRails
[07:53:14] roshanavand: has joined #RubyOnRails
[07:59:06] jhfisc: has joined #RubyOnRails
[08:02:53] noob_on_rails: sevenseacat: thank you that's great!
[08:07:09] jhfisc: has joined #RubyOnRails
[08:07:44] muzik: has joined #RubyOnRails
[08:10:17] Jameser: has joined #RubyOnRails
[08:10:39] dangerousdave: has joined #RubyOnRails
[08:19:02] dionysus69: is there downside to making application.js into erb for rendering img path?
[08:22:29] jhfisc: has joined #RubyOnRails
[08:30:32] Jameser: has joined #RubyOnRails
[08:34:48] muzik: has joined #RubyOnRails
[08:37:07] jhfisc: has joined #RubyOnRails
[08:43:19] jhfisc: has joined #RubyOnRails
[08:47:53] jhfisc: has joined #RubyOnRails
[08:52:33] workmad3: has joined #RubyOnRails
[08:53:22] mtkd: has joined #RubyOnRails
[08:53:40] jhfisc: has joined #RubyOnRails
[08:54:56] marr: has joined #RubyOnRails
[08:57:33] cabotto: has joined #RubyOnRails
[09:00:17] arBmind: has joined #RubyOnRails
[09:01:34] jhfisc: has joined #RubyOnRails
[09:05:46] ams__: has joined #RubyOnRails
[09:07:38] bronson: has joined #RubyOnRails
[09:07:58] jhfisc: has joined #RubyOnRails
[09:13:16] krmela: has joined #RubyOnRails
[09:16:29] Winter_Foxo: has joined #RubyOnRails
[09:17:05] jhfisc: has joined #RubyOnRails
[09:23:39] krmela: hello there i have question about ransack i have report controller where i am search for model Order which is in resources: in routes and but form submit send me to /orders source https://gist.github.com/netmoleCBA/2e0769a337f2f112a43d579482e2402e
[09:28:01] jhfisc: has joined #RubyOnRails
[09:37:11] Jameser: has joined #RubyOnRails
[09:37:53] cabotto: has joined #RubyOnRails
[09:46:32] jhfisc: has joined #RubyOnRails
[09:47:14] mikecmpb_: has joined #RubyOnRails
[09:47:57] arBmind: has joined #RubyOnRails
[09:55:15] jhfisc: has joined #RubyOnRails
[09:55:54] conta: has joined #RubyOnRails
[10:01:08] dionysus69: has joined #RubyOnRails
[10:01:18] jhfisc: has joined #RubyOnRails
[10:07:25] jhfisc: has joined #RubyOnRails
[10:08:41] kitallis: has joined #RubyOnRails
[10:09:17] kitallis: I'm using this gem, is there any way to avoid running it in my regular "bundle exec rake"
[10:09:19] kitallis: https://github.com/zipmark/rspec_api_documentation
[10:10:14] spion: has left #RubyOnRails: ("Leaving")
[10:17:12] jhfisc: has joined #RubyOnRails
[10:23:45] jhfisc: has joined #RubyOnRails
[10:26:43] jhfisc: has joined #RubyOnRails
[10:28:04] zacts: has joined #RubyOnRails
[10:36:43] high_fiver: has joined #RubyOnRails
[10:36:49] violarium: has joined #RubyOnRails
[10:42:58] someuser: has joined #RubyOnRails
[10:46:40] DTZUZO: has joined #RubyOnRails
[10:49:09] stamina: has joined #RubyOnRails
[10:55:12] jhfisc: has joined #RubyOnRails
[10:55:12] ElFerna: has joined #RubyOnRails
[11:06:25] Or1on: has joined #RubyOnRails
[11:07:57] jhfisc: has joined #RubyOnRails
[11:08:06] Ergo: has joined #RubyOnRails
[11:08:57] bronson: has joined #RubyOnRails
[11:14:11] arBmind: has joined #RubyOnRails
[11:16:20] zacts: has joined #RubyOnRails
[11:19:57] jhfisc: has joined #RubyOnRails
[11:25:33] arBmind: has joined #RubyOnRails
[11:25:33] Defenestrate: has joined #RubyOnRails
[11:26:13] Jameser: has joined #RubyOnRails
[11:28:00] jhfisc: has joined #RubyOnRails
[11:29:21] Winter_Foxo: has joined #RubyOnRails
[11:33:14] jhfisc: has joined #RubyOnRails
[11:35:04] GodFather: has joined #RubyOnRails
[11:39:12] jhfisc: has joined #RubyOnRails
[11:42:09] jhfisc: has joined #RubyOnRails
[11:47:50] jhfisc: has joined #RubyOnRails
[11:53:11] jhfisc: has joined #RubyOnRails
[12:05:13] jhfisc: has joined #RubyOnRails
[12:09:18] liquid-silence: has joined #RubyOnRails
[12:09:42] liquid-silence: have any of you had experience with savon?
[12:09:53] liquid-silence: Savon::SOAPFault: (soap:Client) Unmarshalling Error: unexpected element (uri:"", local:"api").
[12:10:07] liquid-silence: I am not sure why its complaining about the local: 'api'
[12:11:05] liquid-silence: full error Savon::SOAPFault: (soap:Client) Unmarshalling Error: unexpected element (uri:"", local:"api"). Expected elements are <{}DiscoveryMiles>,<{}TransactionType>,<{}RCS>,<{}Customer>,<{}Basket>,<{}Fraud>,<{}Autopay>,<{}Eft>,<{}EWallet>,<{}Credit>,<{}Globalpay>,<{}Creditcard>,<{}Customfield>,<{}ThirdParty>,<{}AuthenticationType>,<{}AdditionalInformation>,<{}PayPal>,<{}Wallet>,<{}Mobicred>,<{}Ebucks>,<{}Safekey>,<{}Ban
[12:11:05] liquid-silence: kAccount>,<{}Soulstace>,<{}Sbux>,<{}EWalletMpesa>,<{}BankTransfer>,<{}Debitcard>,<{}Api>,<{}Loyalty>,<{}TransactionRecord>
[12:13:09] jhfisc: has joined #RubyOnRails
[12:20:30] liquid-silence: I am going to loose my cool with this thing
[12:21:53] jhfisc: has joined #RubyOnRails
[12:23:21] apparition47: has joined #RubyOnRails
[12:28:21] jhfisc: has joined #RubyOnRails
[12:31:49] ornerymoose: has joined #RubyOnRails
[12:32:31] eelster: has joined #RubyOnRails
[12:43:26] workmad3: has joined #RubyOnRails
[12:43:28] cabotto: has joined #RubyOnRails
[12:43:58] jhfisc: has joined #RubyOnRails
[12:55:32] jhfisc: has joined #RubyOnRails
[13:04:48] jhfisc: has joined #RubyOnRails
[13:07:21] cabotto: has joined #RubyOnRails
[13:09:46] bronson: has joined #RubyOnRails
[13:12:54] jhfisc: has joined #RubyOnRails
[13:14:29] Or1on: has joined #RubyOnRails
[13:18:36] jhfisc: has joined #RubyOnRails
[13:21:24] mtkd: has joined #RubyOnRails
[13:23:58] jhfisc: has joined #RubyOnRails
[13:26:43] segy: has joined #RubyOnRails
[13:29:21] Winter_Foxo: has joined #RubyOnRails
[13:29:59] jhfisc: has joined #RubyOnRails
[13:46:37] jhfisc: has joined #RubyOnRails
[13:49:51] truenito: has joined #RubyOnRails
[13:52:14] chouhoulis: has joined #RubyOnRails
[13:59:39] jhfisc: has joined #RubyOnRails
[14:22:57] Ropeney: has joined #RubyOnRails
[14:28:03] npgm: has joined #RubyOnRails
[14:45:24] jhfisc: has joined #RubyOnRails
[14:55:06] jphase: has joined #RubyOnRails
[14:57:03] chare: has joined #RubyOnRails
[15:07:28] Doldge: has joined #RubyOnRails
[15:10:58] bronson: has joined #RubyOnRails
[15:12:44] jhfisc: has joined #RubyOnRails
[15:17:18] [Butch]: has joined #RubyOnRails
[15:17:27] dminuoso: has joined #RubyOnRails
[15:19:56] Ropeney: has joined #RubyOnRails
[15:21:27] dminuoso: I have a request that looks like this: https://image.ibb.co/fw8Gx5/Screen_Shot_2017_08_02_at_17_18_47.png - but somehow the body does not end in params in my control
[15:21:31] dminuoso: *controller
[15:23:11] dminuoso: # params.to_unsafe_h => {"controller"=>"lead_notes", "action"=>"create"}
[15:23:23] dminuoso: Why is that?
[15:24:37] jhfisc: has joined #RubyOnRails
[15:25:57] dminuoso: GAH. I hate myself. My mind skipped over the the content-type for an hour because I kept looking at the wrong JavaScript code..
[15:35:05] jhfisc: has joined #RubyOnRails
[15:40:07] brent__: has joined #RubyOnRails
[15:40:20] jhfisc: has joined #RubyOnRails
[15:40:43] brent__: has joined #RubyOnRails
[15:43:22] brent__: has joined #RubyOnRails
[15:44:32] liquid-silence: has joined #RubyOnRails
[15:45:29] jhfisc: has joined #RubyOnRails
[15:47:17] liquid-silence: why would xml generated. by savonrb work perfectly when copied into soap-ui but not via. savonrb?
[15:48:22] SteenJobs: has joined #RubyOnRails
[15:49:23] jhfisc: has joined #RubyOnRails
[15:52:17] truenito: has joined #RubyOnRails
[15:54:12] zacts: has joined #RubyOnRails
[15:55:16] DoctorMonocular: has joined #RubyOnRails
[16:01:08] conta: has joined #RubyOnRails
[16:02:26] liquid-silence: this is annoying
[16:16:04] airdisa: has joined #RubyOnRails
[16:21:14] jhfisc: has joined #RubyOnRails
[16:23:57] conta: has joined #RubyOnRails
[16:24:04] gusrub: has joined #RubyOnRails
[16:24:57] truenito: has joined #RubyOnRails
[16:25:35] cabotto: has joined #RubyOnRails
[16:27:11] jhfisc: has joined #RubyOnRails
[16:29:22] gusrub: has joined #RubyOnRails
[16:31:30] defsdoor: has joined #RubyOnRails
[16:33:13] jhfisc: has joined #RubyOnRails
[16:40:12] troys: has joined #RubyOnRails
[16:41:12] jhfisc: has joined #RubyOnRails
[16:42:53] dionysus69: has joined #RubyOnRails
[16:46:12] jhfisc: has joined #RubyOnRails
[16:46:58] dviola: has joined #RubyOnRails
[16:54:58] jhfisc: has joined #RubyOnRails
[16:55:06] cam27: has joined #RubyOnRails
[16:57:08] truenito: has joined #RubyOnRails
[16:58:09] one_zero: has joined #RubyOnRails
[17:00:15] boxmein: how would you suggest I do authorization for a ~6-deep tree of resources
[17:00:43] boxmein: aka, Account has_many Location has_many Controller has_many Zone has_many Sensor
[17:00:51] boxmein: where Location is the main resource for cancancan authorization
[17:01:38] boxmein: ie, User alpha should have role in Location Y giving them access to Controller, Zone and Sensor, while user beta has role in Location Y giving them access to Controller and Zone but not Sensor
[17:02:54] boxmein: right now my system is doing can :manage, Sensor, { zone: { controller: { location_id: Location.with_role(:manager, user).pluck(:id) } } }
[17:07:09] jhfisc: has joined #RubyOnRails
[17:12:10] bronson: has joined #RubyOnRails
[17:16:23] baweaver: boxmein: your nick name is strangely apropos for this.
[17:16:40] baweaver: When a problem is difficult, try solving it from another angle.
[17:17:16] baweaver: What you're hinting at is that a user implicitly has roles
[17:17:17] baweaver: Why not cut the middlemen?
[17:17:57] baweaver: User has_many Roles
[17:21:16] baweaver: and a role could polymorphically refer to a Controller, Zone, Sensor, etc
[17:21:24] jhfisc: has joined #RubyOnRails
[17:21:39] eelster: has joined #RubyOnRails
[17:23:30] chrisgopher: has joined #RubyOnRails
[17:29:31] truenito: has joined #RubyOnRails
[17:34:12] boxmein: baweaver, true. so what you're saying is each User should have a Location role, Controller role, Sensor role
[17:34:35] baweaver: User should have many roles
[17:34:46] baweaver: Roles should be worried about whether they're a location role or whatever else
[17:34:48] boxmein: yeah, it would be a many-to-many
[17:35:12] boxmein: but... what confuses me is if I should have a role for each resource
[17:36:18] one_zero: has joined #RubyOnRails
[17:37:04] Chernobuk: has joined #RubyOnRails
[17:49:50] cjohnson: Well it sounds like you don't want to inherit a role from a parent resource right?
[17:49:57] cjohnson: That's teh only way to have that level of granular control
[17:50:18] cjohnson: If it sounds like a lot to manage all those roles then make some helper methods to cascade their creation
[17:51:08] jhfisc: has joined #RubyOnRails
[17:55:43] duderonomy: has joined #RubyOnRails
[17:57:17] jhfisc: has joined #RubyOnRails
[18:02:19] truenito: has joined #RubyOnRails
[18:03:12] jhfisc: has joined #RubyOnRails
[18:13:51] boxmein: cjohnson, I kinda wanna inherit the roles
[18:14:03] boxmein: just, I didn't have a good plan to do the inheritance nicely
[18:14:25] boxmein: I now ended up with a lot of cascaded rules
[18:14:41] boxmein: such as that you can manage a zone that has a controller that has a device that is in a location with THESE ids
[18:17:06] jhfisc: has joined #RubyOnRails
[18:20:44] ResidentBiscuit: has joined #RubyOnRails
[18:30:00] brent__: has joined #RubyOnRails
[18:30:04] cjohnson: So you can either do inheritance implicitly or explicitly
[18:30:12] cjohnson: the way I explained before was the explicit approach
[18:30:22] cjohnson: Where every user <-> item role is its own record
[18:31:36] cjohnson: The advantage there is the granularity and fine-grained control, and making the logic for determining who can access what a lot easier
[18:31:55] cjohnson: But it requires you to make all those records. You could write a helper to cascade creating the records like I said if it's too much work
[18:32:11] cjohnson: The other option is implicit, where you just do a high-level role only, at the location level
[18:32:24] cjohnson: then every child record scans upward to find if the descendent location allows access
[18:33:40] cjohnson: But downside is you can't revoke access to only certain controllers or certain zones
[18:34:33] brent__: Still workign on a 3.2 => 4.0 rails upgrade and getting a weird issue on this form_for https://gist.github.com/brentluna/5a8befba2387218ad88a13be6f38a830
[18:35:01] brent__: it thorws a no implicit conversion of string to integer error on all of the f.label and f.text lines
[18:37:46] jhfisc: has joined #RubyOnRails
[18:41:49] Aherin: has joined #RubyOnRails
[18:44:02] jhfisc: has joined #RubyOnRails
[18:46:44] srinidhi: has joined #RubyOnRails
[18:50:00] jhfisc: has joined #RubyOnRails
[18:54:39] jhfisc: has joined #RubyOnRails
[19:03:22] gusrub_: has joined #RubyOnRails
[19:12:22] mtkd: has joined #RubyOnRails
[19:13:04] bronson: has joined #RubyOnRails
[19:19:11] jhfisc: has joined #RubyOnRails
[19:23:26] jhfisc: has joined #RubyOnRails
[19:30:49] jhfisc: has joined #RubyOnRails
[19:31:12] arBmind: has joined #RubyOnRails
[19:34:50] truenito: has joined #RubyOnRails
[19:44:04] Ryzokuken: has joined #RubyOnRails
[19:44:30] Ryzokuken: I had a little trouble finding an HTTP Header.
[19:45:03] Ryzokuken: let's say I wanted to display a header from the http request, how would I do that?
[19:45:18] Ryzokuken: I have already tried env and request.headers
[19:47:58] brent__: https://stackoverflow.com/questions/14729795/reading-header-data-in-rails this is a no go?
[19:48:16] lxsameer: has joined #RubyOnRails
[19:49:03] Ryzokuken: brent__, yes
[19:49:18] Ryzokuken: strangely, it does not display the header I'm sending.
[19:50:28] Ryzokuken: wait, the HTTP_ prefixing stuff worked
[19:50:30] Ryzokuken: brent__, thanks
[19:51:00] brent__: no problem
[19:51:11] jhfisc: has joined #RubyOnRails
[19:51:16] srinidhi: has joined #RubyOnRails
[19:53:17] guacamole: has joined #RubyOnRails
[19:53:56] jhfisc: has joined #RubyOnRails
[19:54:25] fryguy: has joined #RubyOnRails
[19:56:34] spheric: has joined #RubyOnRails
[19:57:30] chouhoulis: has joined #RubyOnRails
[20:02:02] jhfisc: has joined #RubyOnRails
[20:03:15] mindcrimes: has joined #RubyOnRails
[20:03:30] mindcrimes: how do i change the timeout for unicorn?]
[20:12:35] jhfisc: has joined #RubyOnRails
[20:26:00] cjohnson: How does form_for map an instance of a model to a route?
[20:26:24] cjohnson: I've got form_for [:admin, my_model] and for one model it maps automatically, but for a different model it doesn't
[20:27:32] brent__: my thought is you're passing it an object so it knows what model to be effecting, and if its persisted object it probably determines it is an update
[20:28:10] cjohnson: Yeah it can definitely tell the model I'm just not sure how the model maps to the route specifically
[20:28:31] cjohnson: I've got a custom route for the second model that's giving me issues and I want to determine what I have to add to that route to get it to map automatically
[20:28:38] cjohnson: right now I have to specify url: on that form
[20:30:51] brent__: it sounds like [:admin, model] would treat it as nested resource? path/admin/:id/model ?
[20:31:18] cjohnson: it's actually [:admin, record]
[20:31:25] cjohnson: where record is Model.new or Model.find
[20:31:37] cjohnson: and yeah Model is a nested resource under admin
[20:31:44] cjohnson: so maybe it's resources that do the mapping
[20:32:46] gambl0re: has joined #RubyOnRails
[20:47:00] dionysus69: does someone know why my actioncable setup works without having action_cable_meta_tag in application.html at all?
[20:47:21] ur5us: has joined #RubyOnRails
[20:49:02] sansation: has joined #RubyOnRails
[20:54:13] mikecmpbll: has joined #RubyOnRails
[20:56:06] benlieb: has joined #RubyOnRails
[20:57:27] benlieb: a cross-post from the quite #ruby: is there a shorter way to write this: return @activation_based_info if @activation_based_info
[21:07:11] jhfisc: has joined #RubyOnRails
[21:11:38] dionysus69: you can use implicit return, so you can remove word return + you dont need if statement, if @activation_based_info is nil, it will just return nil
[21:11:59] dionysus69: so the last line of method would just be @activation_based_info
[21:12:08] jhfisc: has joined #RubyOnRails
[21:13:50] bronson: has joined #RubyOnRails
[21:14:20] HoierM: has joined #RubyOnRails
[21:18:40] jhfisc: has joined #RubyOnRails
[21:23:48] jhfisc: has joined #RubyOnRails
[21:29:15] jhfisc: has joined #RubyOnRails
[21:30:00] arup_r: has joined #RubyOnRails
[21:34:13] jhfisc: has joined #RubyOnRails
[21:37:46] ForeignBiscuit: has joined #RubyOnRails
[21:38:40] ForeignBiscuit: has joined #RubyOnRails
[21:39:55] mostlybadfly: has joined #RubyOnRails
[21:50:58] pvl1: has joined #RubyOnRails
[21:51:16] pvl1: anyone recommend a text editor for rails? right now im deciding between geany or gvim...
[21:57:43] jhfisc: has joined #RubyOnRails
[22:03:12] banisterfiend: has joined #RubyOnRails
[22:05:42] Isa_: has joined #RubyOnRails
[22:05:43] sansation: i'd definitely recommend vim over geany
[22:08:46] baweaver: How would one redirect favicon.ico to favicon-SHA.ico? Certain UAs like to request the file directly and give a nice amount of 404s in the logs because of it.
[22:08:49] cam27: has joined #RubyOnRails
[22:09:16] dviola: has joined #RubyOnRails
[22:09:50] jhfisc: has joined #RubyOnRails
[22:09:59] baweaver: I mean technically you could jack with the manifest file and some rules for NginX or Apache, but it feels like there's a cleaner way
[22:12:00] cjohnson: pvl1: Another vote for vim
[22:12:13] cjohnson: lots of good plugins and a well established ecosystem
[22:12:17] cjohnson: not to mention all the non-rails goodies
[22:12:51] pvl1: welp, ive been using gvim the last 5 minutes, and im pretty commited now
[22:15:01] baweaver: ACTION just uses Sublime
[22:15:12] cjohnson: vim-endwise, vim-rails, vim-ruby are good plugins
[22:15:34] baweaver: Really just use what works for you
[22:15:37] cjohnson: sublime is mostly an indicator that you don't know what you're doing
[22:15:46] cjohnson: ACTION smirks
[22:16:02] baweaver: I really don't half the time
[22:16:03] cjohnson: HAhahahahaha
[22:16:12] cjohnson: Actually I like ST best among all the GUI editors
[22:16:18] pvl1: hm def looking into those. they might be packaged into whatever thing i found on github that packages a lot of plugins
[22:16:31] baweaver: I find it's less likely to incite violence against my person while pair programming
[22:16:49] cjohnson: I'm lucky enough to have a large base of coworkers using vim for pairing
[22:19:17] jhfisc: has joined #RubyOnRails
[22:21:52] chouhoulis: has joined #RubyOnRails
[22:25:15] jhfisc: has joined #RubyOnRails
[22:30:01] airdisa: has joined #RubyOnRails
[22:33:40] Radar: GOOD MORNING
[22:38:38] baweaver: GOOD MORNING RADAR
[22:44:07] cam27: has joined #RubyOnRails
[22:49:25] xco: has joined #RubyOnRails
[22:50:19] xco: hi. what’s the 5.0 in “ActiveRecord::Migration[5.0]”? i think the reason was so migrations will be compatible with earlier versions of Rails but not sure about the details
[22:51:19] jhfisc: has joined #RubyOnRails
[22:54:30] xco: has joined #RubyOnRails
[22:55:19] xco: has joined #RubyOnRails
[22:56:05] xco: has joined #RubyOnRails
[22:56:17] Radar: xco: the version of Rails
[22:56:23] baweaver: What version the migration ran o....
[22:56:39] baweaver: they took out xco!!!
[22:56:41] Radar: xco: It's because the syntax of migrations may change between Rails versions and so they are now using this to show which version of Rails this migration will run on
[22:56:42] baweaver: sneaky devils
[22:56:49] baweaver: (he's DC'd)
[22:56:54] xco: has joined #RubyOnRails
[22:57:00] baweaver: There they are
[22:57:43] xco: has joined #RubyOnRails
[22:58:30] xco: has joined #RubyOnRails
[22:59:22] xco: has joined #RubyOnRails
[23:00:09] xco: has joined #RubyOnRails
[23:00:19] baweaver: ACTION pokes xco's connection
[23:00:59] xco: has joined #RubyOnRails
[23:01:45] xco: has joined #RubyOnRails
[23:02:30] xco: has joined #RubyOnRails
[23:15:14] bronson: has joined #RubyOnRails
[23:18:22] pwnd_nsfw: has joined #RubyOnRails
[23:24:34] RahulT: has joined #RubyOnRails
[23:25:01] jhfisc: has joined #RubyOnRails
[23:30:25] s2013: has joined #RubyOnRails
[23:31:56] jhfisc: has joined #RubyOnRails
[23:33:25] guacamole: has joined #RubyOnRails
[23:43:19] s2013: im having the stupidest issue.. using jbuilder.. if we do respond_to do |format|; format.json; end;
[23:43:21] s2013: that should work right
[23:43:24] s2013: instead i get {"errors":{"error":["ActionController::UnknownFormat"]}}
[23:43:30] s2013: am i missing something obvious
[23:43:42] s2013: and yes i am
[23:43:43] s2013: ignore me
[23:47:21] jhfisc: has joined #RubyOnRails
[23:53:11] jhfisc: has joined #RubyOnRails