#RubyOnRails - 28 January 2018
« Back 1 day
[01:04:33] nso95: I'm using paperclip to handle image uploads, and I get the following NoMethodError: "undefined method `image_content_type' for #<Image:0x000000060b0c38>"
[01:10:18] nso95: Here's the code: https://gist.github.com/anonymous/c30a225f337a371d7bc1f6157d67ab08
[05:23:36] blackcross: Any RubyOnRails devs on here for hire? Brand new project, I have the required models and just need someone to make the views/controllers and interactions between them. 8 models total
[06:13:32] kapil___: DEPRECATION WARNING: Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "created_at: :desc". Non-attribute arguments will be disallowed in Rails 6.0. This method should not be called with user-provided values, such as request parameters or model attributes. Known-safe values can be passed by wrapping them in Arel.sql().
[09:00:37] za1b1tsu: Hello, I'm learning about omniauth with a rails app that uses facebook as a provider
[11:56:55] oded: Hey, I have a model with default_scope containing a where and a joins. When I join with this model, the query contains the where but not the joins. Any ideas?
[15:43:00] syndikate: Hello people, I am sending out emails to users and I use url_helper to build urls for them to link to my application for various actions like viewing some results etc. So, in production would I have to change anything so that my production domain url will be added instead of 'localhost:300' in the generated urls?
[15:53:09] syndikate: fryguy: config.action_mailer.default_url_options -> I have set this to use an env variable
[16:02:42] fryguy: that should be all you need, there is a corresponding default_url_options for action_mailer, but I don't think that needs to also be set (might be worth experimenting).
[16:06:39] syndikate: https://stackoverflow.com/questions/43961548/what-is-actionmailer-default-url-options
[16:19:22] crova: Hello everyone, how is it going? Anyone familiar with ransack gem? I'm trying to figure out how to 'blacklist' a few attributes for the sorting (I don't want to show everything on the dropdown list). I reckon that this can be done with ransortable_attributes, but I'm not sure on how to implement it on the model
[17:29:42] jimms: Having a weird environment issue in the console and not sure if it's affecting my tests: https://gist.github.com/JimmStout/f1b76256a2eda6f739eb5b2f467deb4c
[17:37:07] jimms: Okay, I ate a walnut, received a bunch of brain juice, and realized it's 'rails c [env] [options]' and not 'rails c [options] [env]'
[17:37:58] jimms: Still doesn't explain why 'Rails.env == "test"' in both cases, but I got different DBs
[20:43:43] desperek: how can i put contents of an array to an array instead of an array to an array in map?
[21:13:58] desperek: https://github.com/plataformatec/devise/wiki/How-To%3A-Redirect-to-a-specific-page-on-successful-sign-in-and-sign-out
[21:32:22] mnms_: Is there any way to add readonly attribute to activerecord model which will be serialized?