Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | respect `pluralize_table_names` when generate fixture file. fixes #19519 | yuuji.yaginuma | 2015-03-27 | 1 | -0/+10 |
| | |||||
* | Add Secure Token Generator | robertomiranda | 2015-01-11 | 1 | -0/+11 |
| | |||||
* | Change the default `null` value for `timestamps` to `false` | Rafael Mendonça França | 2015-01-04 | 1 | -1/+1 |
| | |||||
* | Generated fixtures won't use parent_id when generated with parent:references | Pablo Olmos de Aguilera Corradini | 2015-01-02 | 1 | -5/+5 |
| | | | | Fix #18301 | ||||
* | Use the new `foreign_key` option on `references` in generators | Sean Griffin | 2014-12-22 | 1 | -3/+13 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes `rails g model Post user:references` from def change create_table :posts do |t| t.references :user, index: true end add_foreign_key :posts, :users end to def change create_table :posts do |t| t.references :user, index: true, foreign_key: true end end Changes `rails g migration add_user_to_posts user:references` from def change add_reference :posts, :users, index: true add_foreign_key :posts, :users end to def change add_reference :posts, :users, index: true, foreign_key: true end | ||||
* | Generators add foreign keys on references | Derek Prior | 2014-11-25 | 1 | -0/+21 |
| | | | | | | | | | | | If you run a generator such as: ``` rails generate model accounts supplier:references ``` The resulting migration will now add the corresponding foreign key constraint unless the reference was specified to be polymorphic. | ||||
* | Merge pull request #16062 from sgrif/sg-required-generators | Rafael Mendonça França | 2014-08-17 | 1 | -0/+44 |
|\ | | | | | Add a `required` option to the model generator | ||||
| * | Add a `required` option to the model generator | Sean Griffin | 2014-08-08 | 1 | -0/+44 |
| | | | | | | | | | | | | | | | | | | | | | | Syntax was chosen to follow the passing of multiple options to decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or `-` to be used as a separator to avoid the need for shell quoting. (I'm intending to expand this to all columns, but that's another PR. The `required` option will cause 2 things to change. `required: true` will be added to the association. `null: false` will be added to the column in the migration. | ||||
* | | Change the default `null` value for timestamps | Sean Griffin | 2014-08-12 | 1 | -1/+1 |
|/ | | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5. | ||||
* | modify model generator warning message. refs [#174c9f0] | Kuldeep Aggarwal | 2014-02-27 | 1 | -1/+1 |
| | |||||
* | include names in model generator warning message. refs #13515. | Yves Senn | 2014-02-24 | 1 | -1/+1 |
| | | | | | | This is a follow up to #13515. It includes the name given and the singularized version in the warning message. This will aide the user to see wether the detected singular was right or not. | ||||
* | Add warning when user tried to create model with pluralize name. | Kuldeep Aggarwal | 2014-02-23 | 1 | -0/+7 |
| | | | | | 1. Generate model with correct_name. 2. It will help new users to avoid mistakes when tried to create model with wrong name. | ||||
* | Consistent use of single and double quotes | Rafael Mendonça França | 2012-12-26 | 1 | -10/+10 |
| | |||||
* | quote column names in generated fixture files | Yves Senn | 2012-12-26 | 1 | -3/+26 |
| | |||||
* | Make sure that no extra spaces are created with a non-polymorphic | Rafael Mendonça França | 2012-12-10 | 1 | -2/+2 |
| | | | | attributes | ||||
* | Deal with polymorphic attributes correctly in the generators | Rafael Mendonça França | 2012-12-10 | 1 | -0/+5 |
| | |||||
* | Make references and belongs_to attributes to generate the _id column in | Rafael Mendonça França | 2012-12-10 | 1 | -0/+5 |
| | | | | fixtures | ||||
* | Use Ruby 1.9 Hash syntax in railties | Robin Dupret | 2012-10-14 | 1 | -3/+3 |
| | |||||
* | Update test locations | Mike Moore | 2012-10-09 | 1 | -3/+3 |
| | | | | | | | | | | | | | | Change the default test locations to avoid confusion around the common testing terms "unit" and "functional". Add new rake tasks for the new locations, while maintaining backwards compatibility with the old rake tasks. New testing locations are as follows: app/models -> test/models (was test/units) app/helpers -> test/helpers (was test/units/helpers) app/controllers -> test/controllers (was test/functional) app/mailers -> test/mailers (was test/functional) | ||||
* | Remove all references to attr_accessible/protected and old ↵ | Guillermo Iguaran | 2012-09-16 | 1 | -10/+0 |
| | | | | mass_assignment_sanitizers | ||||
* | Add polymorphic option to model generator | Aleksey Magusev | 2012-06-27 | 1 | -3/+14 |
| | | | | | | | | | | For instance, $ rails g model Product supplier:references{polymorphic} generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration. Also fix model_generator_test.rb#L196 and #L201 | ||||
* | fix scaffold_generator_test.rb and model_generator_test.rb | Arun Agrawal | 2012-04-16 | 1 | -4/+4 |
| | | | | Broken after this 6a054b0038bac288a1f6e45feb5470f4ee492081 | ||||
* | Whitelist all attribute assignment by default. | Michael Koziarski | 2012-03-05 | 1 | -0/+10 |
| | | | | Change the default for newly generated applications to whitelist all attribute assignment. Also update the generated model classes so users are reminded of the importance of attr_accessible. | ||||
* | Use 1.9 hash syntax instead. | José Valim | 2011-12-24 | 1 | -6/+6 |
| | |||||
* | assert_not_match -> assert_no_match. | José Valim | 2011-12-24 | 1 | -4/+4 |
| | |||||
* | Tidy up migration types. | José Valim | 2011-12-24 | 1 | -1/+1 |
| | |||||
* | added ability to specify from cli when generating a model/migration whether ↵ | Dmitrii Samoilov | 2011-12-24 | 1 | -0/+68 |
| | | | | particular property should be an index like this 'rails g model person name:string:index profile:string' | ||||
* | Attributes on scaffold and model generators default to string. | José Valim | 2011-06-17 | 1 | -3/+9 |
| | | | | This allows the following: "rails g scaffold Post title body:text author" | ||||
* | be sure to parenthesize the arguments when the first one is a RegExp literal | Akira Matsuda | 2011-05-18 | 1 | -17/+16 |
| | | | | | | this fixes: "warning: ambiguous first argument; put parentheses or even spaces" because: you need this to tell the parser that you're not calling :/ method (division) details (Japanese!): http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/42445?42370-43277 | ||||
* | Correct migration name the test is looking to match. | Ben Orenstein | 2011-02-04 | 1 | -1/+1 |
| | | | | | | [#6375 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Configurable generation of add_index for references columns | Michał Łomnicki | 2011-02-01 | 1 | -0/+41 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Use Rails 3.1 `change` method in model generator | Prem Sichanugrist | 2011-01-04 | 1 | -6/+2 |
| | |||||
* | Skip creating migration if --skip option is passed to model generator [#6144 ↵ | Piotr Sarnacki | 2010-12-16 | 1 | -3/+15 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Facepunch failing tests. | José Valim | 2010-11-18 | 1 | -3/+3 |
| | |||||
* | Remove existing migration when using 'rails generate model' with --force ↵ | David Trasbo | 2010-09-18 | 1 | -0/+9 |
| | | | | | | [#5526 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Add two integration tests for GeneratedAttribute missing type error. [#5461 ↵ | rohit | 2010-09-02 | 1 | -0/+6 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Generate module file for namespaced models [#4230 state:resolved] | Andrew White | 2010-04-12 | 1 | -0/+8 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Load generators from both lib/rails/generators and lib/generators. Using the ↵ | José Valim | 2010-03-23 | 1 | -1/+1 |
| | | | | former since it's less obstrusive. | ||||
* | Get generators tests running on Ruby 1.9.1 | José Valim | 2010-01-19 | 1 | -1/+2 |
| | |||||
* | Generators load path now will be Ruby load path. If you want to use ↵ | José Valim | 2010-01-18 | 1 | -1/+1 |
| | | | | rspec:install generator, you need generators/rspec/install_generator in your load path. | ||||
* | Move all generators tests to use new test case syntax. | José Valim | 2010-01-03 | 1 | -8/+1 |
| | |||||
* | Create Rails::Generators::TestCase. | José Valim | 2010-01-03 | 1 | -3/+3 |
| | |||||
* | CI breakage | Yehuda Katz | 2009-11-02 | 1 | -1/+1 |
| | | | | This reverts commit a288b74f1c75c6f100de7611a5093a421f1ad6d1. | ||||
* | Generators should use Rails.root instead of Dir.pwd [#3408 status:resolved] | José Valim | 2009-10-28 | 1 | -1/+1 |
| | | | | Signed-off-by: Yehuda Katz <wycats@gmail.com> | ||||
* | Move railties/lib/* into railties/lib/* | Yehuda Katz + Carl Lerche | 2009-09-24 | 1 | -1/+1 |
| | |||||
* | Fixed generating a namespaced model with table pluralization turned off. Add ↵ | Hugo Peixoto | 2009-08-09 | 1 | -0/+44 |
| | | | | | | | | tests for namespaced model generation. [#767 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Updated vendored Thor to 0.11.1 and update Rails::Generators. | José Valim | 2009-07-14 | 1 | -1/+1 |
| | |||||
* | Ensure non timestamped migrations are generated properly. | José Valim | 2009-07-13 | 1 | -0/+11 |
| | |||||
* | Add the new generators environment and update commands. | José Valim | 2009-07-08 | 1 | -1/+1 |
| | |||||
* | More tests for rails generators and lookup. | José Valim | 2009-07-03 | 1 | -2/+2 |
| |