[Rails-core] ActionMailer::Base helper :all

2013-01-13 Thread Nick Ostrovsky
Shouldn't helper: all work in ActionMailer? Similar issue was discussed before: https://rails.lighthouseapp.com/projects/8994/tickets/3945-helper-all-on-by-default But as of rails 3.2.11 the problem is still there: class ContactMailer < ActionMailer::Base helper :all end Produces: LoadErr

[Rails-core] ActionMailer helper :all

2013-01-13 Thread Nick Ostrovsky
The problem is: ActionMailer doesn't include view helpers by default, and helper :all makes it to look for all_helper.rb Similar issue was discussed before: https://rails.lighthouseapp.com/projects/8994/tickets/3945-helper-all-on-by-default https://github.com/rails/rails/issues/928 https://g

Re: [Rails-core] How about a :without_type_cast => true option for validations?

2013-01-13 Thread Godfrey Chan
I would love to see this happen, I remember I had to do something like that for a few times in the past. On Sunday, January 13, 2013, Steve Jorgensen wrote: > One of the annoying problems with validations is that they are always > applied after typecasting. This means, for instance, that the :onl

[Rails-core] How about a :without_type_cast => true option for validations?

2013-01-13 Thread Steve Jorgensen
One of the annoying problems with validations is that they are always applied after typecasting. This means, for instance, that the :only_integer option is effectively a no-op for an integer AR attribute. Whatever digits the user thought they were entering have already been lost before the vali

Re: [Rails-core] Should the secret_token.rb be added to the .gitignore?

2013-01-13 Thread Richard Schneeman
Looks like can set ENV variables from Capistrano fairly trivially: http://craiccomputing.blogspot.com/2009/08/capistrano-and-environment-variables.html API docs for Capistrano config: http://rubydoc.info/github/capistrano/capistrano/master/Capistrano/Configuration/Actions/Invocation -- Ri

Re: [Rails-core] Should the secret_token.rb be added to the .gitignore?

2013-01-13 Thread Jay Feldblum
Weston, I see using environment variables as the interface to configure your application as the anti-Microsoft. As the Unix. It is simple to implement in both the infrastructure (if you are implementing your own) and in your application. The convention is not not Heroku-specific; it is specific t

Re: [Rails-core] Should the secret_token.rb be added to the .gitignore?

2013-01-13 Thread Steve Klabnik
It's only Heroku-specific in the sense that Heroku basically follows http://www.12factor.net/ ;) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from t

Re: [Rails-core] Should the secret_token.rb be added to the .gitignore?

2013-01-13 Thread Weston Platter
@schneems. @jay. Good ideas. A fear that I have is that these conventions are Heroku specific, and not deployment agnostic. This feels enterprisely or Microsoft-ishy (or this feeling could be my own emotional baggage). To make this a Rails deployment convention and not just a Heroku, maybe mak

Re: [Rails-core] Arel for any AR action?

2013-01-13 Thread Steve Jorgensen
OK -- that's an avenue for further research. My suggestion is starting to seem like less of a good idea the more I think about it, however. Perhaps, what's really needed is simply more & better Arel documentation and usage examples (without sticking in lots of literal SQL bits that'll break whe

Re: [Rails-core] Arel for any AR action?

2013-01-13 Thread Steve Schwartz
> > > > What would the usecase for this be? > > > > > > > > > > > > > > > > > I just had a similar need the other day, where I needed to build a separate query based on the current scope (not clone the current scope, but take the specific parameters of the scope to apply to anot

Re: [Rails-core] Arel for any AR action?

2013-01-13 Thread Steve Jorgensen
Could that be done as a plugin and not rely on undocumented internal APIs that are likely to change without warning? On Sunday, January 13, 2013 12:02:31 AM UTC-8, Nicolás Sanguinetti wrote: > > I think this is way too specific for core. Looks like a great idea for a > plugin, though :) > > Chee

Re: [Rails-core] Arel for any AR action?

2013-01-13 Thread Nicolas Sanguinetti
I think this is way too specific for core. Looks like a great idea for a plugin, though :) Cheers, -foca On 12/01/2013, at 21:57, Steve Jorgensen wrote: > The use case would be using AR semantics to define an action, but then using > that in a larger context, such as concatenating the SQL for