#RubyOnRails - 19 July 2018
« Back 1 day Forward 1 day »
[00:09:00] i8igmac: are there collections repos of generators like for bootstrap of actioncontroller::live
[10:50:09] conta: Anybody knows gem that would do from some day string like : "last friday" "yesterday"
[11:40:58] syndikate: Guys, I have a question related to view logic. One of my view requires data from lot of tables and conditions. As a start I have a service which eager loads all the records and does some transformations to create a data structure and pass to view.
[11:41:35] syndikate: Although In view I still need to alter the data structure, I was wondering where could I put all these logic - wasn't sure if view objects would fit in
[11:42:03] syndikate: I have managed to move out all the database calls to the controller, but there is still some data transormaation left.
[15:30:32] s2013: man i keep getting error r14 (memory quote exceeded) even though i have 2 dynos. .and its a basic basic app.. still cant figure out whats wrong
[16:09:07] jerojasro: hello. Is any of you aware of a Gem/package that allows me to define/change project settings at runtime? (as opposed to defining them via confib/application.rb)
[16:09:38] jerojasro: I was expecting to find something similar to Django's constance: https://django-constance.readthedocs.io/en/latest/
[16:10:41] jerojasro: that lets me define settings without editing the config files, have them stored somewhere (redis, or db), and edit them and have them take effect immediately, without restarting the app server
[16:11:47] jerojasro: so far I've found configatron, and ledermann-rails-settings, which, as far as i can see, don't really do what I need
[19:37:42] theRoUS: rails 5. i keep running into a catch-22 situation. the autoloaded files (such as app/**/*.rb) apparently get loaded *before* config/initializers/*.rb, which get loaded *before* lib/*.rb. and routing gets set up after the initialisers, but i'm not sure where in the sequence.
[19:40:48] theRoUS: all of my controllers need info from the load and the routes at their compile-time. there isn't an 'application is loaded and about to start' hook or callback, is there?
[20:18:33] fryguy: jerojasro: take a look at dotenv. how you choose to inject environment variables into your application process is up to you
[21:08:55] blackcross: I have @company = Company.new(company_params), how would I force every value in company_params to be .upcase ?
[21:33:39] jerojasro: fryguy dotenv doesn't cut it: it depends on files (which doesn't work in setups with multiple application servers, like mine), and it's intended only for development... and adds the problem of managing those files