Thursday, July 25, 2013

[Rails] Re: Rails migration generation with options or defaults

Kirankumar Skk wrote in post #1116632:
> In Rails we have command to add migration that specifies the table name
> column name. For example :
>
> $ rails generate migration AddPartNumberToProducts part_number:string
>
> *Problem: How to specify the options (example :after => :descritpion) on
> command line so that it will add directly on migration file.*

Allowing you to specify the columns on the command line generator is a
convenience feature. It was never intended to provide the full range of
options that can be specified in the actual migration.

There is a limited set of additional options you can specify on the
command line as detailed in section 2.3 of the following guide:

http://guides.rubyonrails.org/migrations.html#model-generators

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cb33e0839821891f17393362890f1607%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate