powii, config.x is already a rails feature :)
On Wednesday, September 17, 2014 9:41:49 AM UTC-3, powiii wrote: > > I don't think this would be a good idea. IMO doing a > `config_for(:redis)['host']` is much more clear than doing a > `config.x.redis.host`. > > By the way what would that "x" be? Can you think of a good name? > > On Wednesday, 17 September 2014 05:08:30 UTC+3, Gabriel Sobrinho wrote: >> >> Hello guys, >> >> I just came across this post >> http://www.justinweiss.com/blog/2014/08/25/the-lesser-known-features-in-rails-4-dot-2/?utm_source=rubyweekly&utm_medium=email >> >> which shows the Rails.application.config_for feature. >> >> What if config.x by default reads the configuration files? >> >> In other words, Rails.config.x.redis.host == >> Rails.application.config_for(:redis)["host"]. >> >> -- >> Cheers, >> >> Gabriel Sobrinho >> http://gabrielsobrinho.com/ >> > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.