1. 17 9月, 2012 3 次提交
  2. 13 9月, 2012 1 次提交
    • D
      change app/plugin generators to be more SCM agnostic · ceb05bd1
      Derek Prior 提交于
      Users of other SCM's can now generate rails
      apps that will add the "empty" directories to source control,
      but will not have a useless .gitignore or mis-named .gitkeep
      files.
      
      * Change `rails new` and `rails plugin new` generators to name
        the `.gitkeep` as `.keep` in a more SCM-agnostic way.
      
      * Change `--skip-git` option to only skip the `.gitignore` file
        and still generate the `.keep` files.
      
      * Add `--skip-keeps` option to skip the `.keep` files.
      
      It closes #2800.
      ceb05bd1
  3. 07 9月, 2012 1 次提交
  4. 01 9月, 2012 1 次提交
  5. 25 8月, 2012 1 次提交
  6. 11 8月, 2012 2 次提交
    • J
      09d2671c
    • J
      Remove the dependent_restrict_raises option. · 5ad79989
      Jon Leighton 提交于
      It's not really a good idea to have this as a global config option. We
      should allow people to specify the behaviour per association.
      
      There will now be two new values:
      
      * :dependent => :restrict_with_exception implements the current
        behaviour of :restrict. :restrict itself is deprecated in favour of
        :restrict_with_exception.
      * :dependent => :restrict_with_error implements the new behaviour - it
        adds an error to the owner if there are dependent records present
      
      See #4727 for the original discussion of this.
      5ad79989
  7. 08 8月, 2012 1 次提交
  8. 19 7月, 2012 1 次提交
  9. 18 7月, 2012 1 次提交
    • A
      Add join table migration generator · 211d88b7
      Aleksey Magusev 提交于
      For instance, running
      
          rails g migration CreateMediaJoinTable artists musics:uniq
      
      will create a migration with
      
          create_join_table :artists, :musics do |t|
            # t.index [:artist_id, :music_id]
            t.index [:music_id, :artist_id], unique: true
          end
      211d88b7
  10. 09 7月, 2012 1 次提交
    • A
      Add references statements to migration generator · 0cae7c60
      Aleksey Magusev 提交于
      AddXXXToYYY/RemoveXXXFromYYY migrations are produced with references
      statements, for instance
      
          rails g migration AddReferencesToProducts user:references
      supplier:references{polymorphic}
      
      will generate the migration with:
      
          add_reference :products, :user, index: true
          add_reference :products, :supplier, polymorphic: true, index: true
      0cae7c60
  11. 07 7月, 2012 1 次提交
  12. 04 7月, 2012 1 次提交
  13. 27 6月, 2012 1 次提交
    • A
      Add polymorphic option to model generator · 94b230e1
      Aleksey Magusev 提交于
      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
      94b230e1
  14. 09 6月, 2012 3 次提交
  15. 06 6月, 2012 1 次提交
  16. 05 6月, 2012 1 次提交
  17. 31 5月, 2012 1 次提交
  18. 24 5月, 2012 1 次提交
    • V
      Revert "Remove blank trailing comments" · 1ad0b378
      Vijay Dev 提交于
      This reverts commit fa6d921e.
      
      Reason: Not a fan of such massive changes. We usually close such changes
      if made to Rails master as a pull request. Following the same principle
      here and reverting.
      
      [ci skip]
      1ad0b378
  19. 23 5月, 2012 1 次提交
  20. 22 5月, 2012 2 次提交
  21. 21 5月, 2012 1 次提交
    • P
      Fix generators to help with ambiguous `ApplicationController` issue · 7c95be54
      Piotr Sarnacki 提交于
      In development mode, dependencies are loaded dynamically at runtime,
      using `const_missing`. Because of that, when one of the constants is
      already loaded and `const_missing` is not triggered, user can end up
      with unexpected results.
      
      Given such file in an Engine:
      
      ```ruby
      module Blog
        class PostsController < ApplicationController
        end
      end
      ```
      
      If you load it first, before loading any application files, it will
      correctly load `Blog::ApplicationController`, because second line will
      hit `const_missing`. However if you load `ApplicationController` first,
      the constant will be loaded already, `const_missing` hook will not be
      fired and in result `PostsController` will inherit from
      `ApplicationController` instead of `Blog::ApplicationController`.
      
      Since it can't be fixed in `AS::Dependencies`, the easiest fix is to
      just explicitly load application controller.
      
      closes #6413
      7c95be54
  22. 20 5月, 2012 1 次提交
    • H
      Remove blank trailing comments · fa6d921e
      Henrik Hodne 提交于
      For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace
      with the first match, and voilà! Note that the regex matches a little bit too
      much, so you probably want to `git add -i .` and go through every single diff
      to check if it actually should be changed.
      fa6d921e
  23. 19 5月, 2012 2 次提交
  24. 18 5月, 2012 1 次提交
  25. 16 5月, 2012 2 次提交
    • P
      Fix tests in railties · f3482a9f
      Piotr Sarnacki 提交于
      Since `bundle install` was fixed in `rails plugin new`, it
      now requires `rails 4.0.0.beta` version in filesystem when
      running tests. Instead of providing it, we can run tested
      command with `--dev` option, to use rails from the local
      directory.
      f3482a9f
    • M
      improve #6318 · 5904295b
      Michal Papis 提交于
      5904295b
  26. 14 5月, 2012 3 次提交
  27. 11 5月, 2012 1 次提交
  28. 08 5月, 2012 1 次提交
  29. 02 5月, 2012 2 次提交