Sounds good to me. The flag would be true by default for backwards compat,
but newly generated apps would have it generated in the environment config
files.

For new apps the generated flag assignment would assign to false in
production.rb.

The value for the test environment is doubtful, but I think it is better
not to generate the flag in test.rb. The reason is that generating the
schema after running migrations is a responsibility of the development
environment. In particular, you are not supposed to run migrations with
RAILS_ENV=test. Therefore, having a flag related to migrations written in
test.rb could send a confusing message in my view. If the test environment
has nothing to do with migrations, why do I need to say anything about them
in its config?

So, I believe for the test environment with can leave it at the implicit
true default.


On Tue, Feb 4, 2014 at 10:22 AM, Emil S <[email protected]> wrote:

> I agree, that's what I had in mind too . How about a config named
> "generate_schema_after_migration" which holds true/false. It could be true
> by default, and you can override the default behavior by setting it to
> false in `config/environments/production.rb`. I am ready to work on this if
> I get a green light.
>
>
> On 4 February 2014 00:54, Xavier Noria <[email protected]> wrote:
>
>> Adding support for this in principle makes sense to me. Since we want the
>> file to be generated in some environments an not in others, a generated
>> flag would probably make sense. A flag could also support the use case
>> explained by Seth, since he would just toggle it in
>> config/environments/production.rb (say).
>>
>> --
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/rubyonrails-core.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rubyonrails-core.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to