aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/generated_attribute.rb
Commit message (Collapse)AuthorAgeFilesLines
* Refactor GeneratedAttributesCarlos Antonio da Silva2012-04-221-7/+10
| | | | | | | | * Move reference? method to class to remove duplicated code * Move to_sym typecast from #initialize to .parse method (make it easier to refactor reference?), remove AS object/blank require * Use []= instead of merge!({}) * Remove in? in favor of include?, remove AS object/inclusion require
* the index option is always created if the type is one of references or ↵Vijay Dev2012-04-181-2/+4
| | | | belongs_to. Refactoring it to a simpler form and fixing the build
* let's not use `and` in place of `&&`Vijay Dev2012-04-181-1/+1
|
* Automatically create indexes for references/belongs_to statements in migrations.Joshua Wood2012-04-141-0/+4
|
* Fix failing test from [7619bcf2]Prem Sichanugrist2012-01-301-1/+1
|
* rewrites a couple of alternations in regexps as character classesXavier Noria2012-01-301-1/+1
| | | | | Character classes are the specific regexp construct to express alternation of individual characters.
* Support decimal{1,2} and decimal{1-2} and decimal{1.2} so it works fine with ↵José Valim2012-01-221-2/+2
| | | | | | | | bash, zsh, etc, closes #4602 Conflicts: railties/test/generators/migration_generator_test.rb
* fix a broken testVijay Dev2012-01-151-1/+1
| | | | | | The commit 2f632f53919d2b44dbb2cfaadabed2310319f005 extracted the options into constants and while doing so, there was a minor error of using a wrong constant name.
* Extract index and uniq index options to constantsCarlos Antonio da Silva2012-01-141-4/+7
|
* Use 1.9 hash syntax instead.José Valim2011-12-241-2/+2
|
* Fix regexp intervals.José Valim2011-12-241-2/+2
|
* Tidy up migration types.José Valim2011-12-241-33/+43
|
* added ability to specify from cli when generating a model/migration whether ↵Dmitrii Samoilov2011-12-241-4/+48
| | | | particular property should be an index like this 'rails g model person name:string:index profile:string'
* Generate valid default fixtures for models with a type columnMarc-Andre Lafortune2011-07-111-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Attributes on scaffold and model generators default to string.José Valim2011-06-171-1/+1
| | | | This allows the following: "rails g scaffold Post title body:text author"
* generate HTML5 number_field tag for integer fieldsAkira Matsuda2011-05-161-6/+7
|
* Remove `#among?` from Active SupportPrem Sichanugrist2011-04-131-1/+1
| | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
* Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵David Heinemeier Hansson2011-04-121-1/+1
| | | | suggestion!
* Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-111-1/+2
| | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
* Output a friendly message when no type given for GeneratedAttribute [#5461 ↵rohit2010-09-021-0/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Rails::Generators::GeneratedAttribute: tests, cleanups and a bugfix [#4631 ↵Jeff Kreeftmeijer2010-06-101-1/+2
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* using :time_select when the attribute type is :time in the scaffold ↵Jeff Kreeftmeijer2010-05-161-6/+7
| | | | | | generator. [#2377 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move railties/lib/* into railties/lib/*Yehuda Katz + Carl Lerche2009-09-241-0/+48