#RubyOnRails - 21 November 2017
« Back 1 day Forward 1 day »
[02:35:24] no0p: so I just installed rails 5 and I'm seeing ActionController::RoutingError (No route matches [GET] "/assetsapplication.self
[02:35:51] no0p: is there some default configuration trick to get it to like add routes or format the urls correctly?
[07:37:00] beilabs: Anyone have the experience of uploading a svg to s3 then render via cloudfront? Have set the mime type but the content-type from cloudfront keeps coming back as application/gzip instead of image/svg
[08:02:32] MrCrackPotBuilde: be better for you to follow along with either learn rails book one and two or the ruby on rails tutorial by michael hartl
[08:03:20] dionysus69: I have a question about token based authentication, i understand when user signs in gets auth token etc, let's say its through api and client is android app, but what about registration, how do I allow only that specific android app to send registration post requests? do I create an application wide auth token ?
[10:45:55] duyleekun: I found a side effect in rails 5 which is very inconvenient, should I ask here first or go straight to github issue?
[13:10:28] mcr1: why won't Rails::Server, (and Thor) parse additional arguments to rails server and pass them into the chosen server...
[14:57:00] MrCrackPotBuilde: any other function i can add to this form <%= f.email_field :contactEmail, placeholder: 'Email', id: "id_email" %>
[15:33:23] Technodrome: if i have a form with some saved settings like, form checkboxes, what is the best way to persist them across sessions, i am using https://github.com/ledermann/rails-settings to save the options
[15:48:44] elsurudo: Rails 5 with webpack, I have “babel-loader” in my loaders, yet it doesn’t seem to be transpiling my JS, as I can’t use things like “const” without having my app break on older browsers. Does anyone have experience with this?
[16:32:32] Andr3as: hi everyone.. during a csv import i want to compare if values have changed and skip those items where they have.. my poor try was to do it like this: https://gist.github.com/awunder/dd32abb73f0a849a985a28f436e36bc6
[16:33:18] Andr3as: however, it doesnt work as the "economic_event2 = economic_event" seems to create a "link" so when i change economic_events, it also "changes" economic_events2
[16:56:03] MrCrackPotBuilde: technodrome follow along with this tutorial to the end and you should be able to transfer data as you want using erb
[16:56:05] MrCrackPotBuilde: https://www.murdo.ch/blog/build-a-contact-form-with-ruby-on-rails-part-1
[16:56:46] MrCrackPotBuilde: i was able to create a form then from that form insert data into an email.html.erb and using something like this
[16:57:40] MrCrackPotBuilde: this will then take the name from the contact form input it to the layout and then send it
[16:59:38] MrCrackPotBuilde: technodrome https://www.google.com/search?client=ubuntu&channel=fs&q=rails+5+save+a+form+state+and+persistent+across+sessions&spell=1&sa=X&ved=0ahUKEwjzq-b0kdDXAhXFQ48KHSqXDOQQBQgkKAA&biw=1366&bih=672
[17:00:40] Technodrome: yes most of those implementations of state are not what I am referring to here
[17:20:43] Nitrodist: it doesn't see any application groups, although apache seems to see that they're listening on the ports I've defined in each app's apache config file
[17:36:25] Sylario: Nitrodist: did you do that ? : @nitrodist : gist the site config you put in apache
[17:36:42] Sylario: https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/apache/oss/xenial/install_passenger.html
[18:26:20] Andr3as: fwiw, i found a way with using "event_attributes2 = economic_event.attributes" and compare them like "economic_event.attributes == event_attributes2"
[18:30:47] Technodrome: say i have 5 checkboxes checked, i want to come back to that page later, and the same 5 checkboxes are checked on a per user basis, is there any gem out there to help with this ?
[21:38:10] Technodrome: is it considered bad practice to throw some JSON into a session variable? to be available on the client side ?
[22:29:21] dbpqdbpq: Hi RoR, I'm running through upgrading an old Rails 4.0 app up to 5.1. There a release note for 4.1 I'm struggling to understand I was hoping for some community help with. http://guides.rubyonrails.org/4_1_release_notes.html - "Removed deprecated ActiveRecord::Base#connection method. Make sure to access it via the class." - I don't understand what the second part of that means, and I created a new Rails 5.1 app where
[22:29:22] dbpqdbpq: ActiveRecord::Base#connection still works, so does it just mean you can't use it from an instance of a model?
[23:21:24] hnanon: This is what I have so far: https://gist.github.com/anonymous/5ae8495e38c03ebdfa141572dd21e816
[23:25:33] creature: Could you, for instance, manage to get just the market names listed out? How would you go about doing that? (You might find the 'getting started' guide & other docs at http://guides.rubyonrails.org/ useful).
[23:32:42] creature: hnanon: I think I'd expect that join to do what you'd expect it to. Do you have same raw sample data you could share, and the result of that query?
[23:42:32] creature: It'd be useful to be able to see some example data, and the output you're getting from that query, and to compare it to what you've got in the sample.html.
[23:42:59] creature: Like, I'm presuming this is kind of a homeworky problem, and such a data dump would be easy to include in a gist. :) But I might be off-base there...
[23:44:44] hnanon: This is a sample output: https://gist.github.com/anonymous/96fc2f2d8fcbacd07404e6945bbcc8a6
[23:47:37] Radar: You'd be iterating over each category and finding the data for those to build the rows
[23:47:50] creature: OK. Are you sure that this data is wrong? You're grouping by locations.market_id, not location_id.
[23:49:49] hnanon: Radar: But table columns are grouped by Market. Does that make a difference where I start from?
[23:53:37] Radar: Can you at least get that much of the problem solved? Ignore the TODO columns for now.