| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* Move system tests back into Action Pack
* Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase`
* Remove private base module and only make file for public
`SystemTestCase` class, name private module `SystemTesting`
* Rename `ActionSystemTestCase` to `ApplicationSystemTestCase`
* Update corresponding documentation and guides
* Delete old `ActionSystemTest` files
|
|
|
|
|
|
|
|
|
|
| |
Renames `Rails::SystemTestCase` to `ActionSystemTest` and moves it to a
gem under the Rails name.
We need to name the class `ActionSystemTestCase` because the gem expects
a module but tests themselves expect a class.
Adds MIT-LICENSE, CHANGELOG, and README for the future.
|
|
|
|
|
|
|
|
|
|
| |
* Adds test case test
* Adds driver adapter test
* Adds tests for capybara seleium driver (testing the settings not
actually opening the browser to test capybara w/ selenium because that
would so so so slow)
* Adds tests for rack test driver
* Adds tests for generators
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite https://github.com/rails/rails/pull/27550
085546df45 was reverted (b6ffb5efcb) because it change the return of `namespaced_path` from String to Array.
----------------
If we create nested (namespaced) rails engine such like bukkits-admin,
`bin/rails g scaffold User name:string age:integer`
will create
`bukkits-admin/app/controllers/bukkits/users_controller.rb`
but it should create
`bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`.
In #6643, we changed `namespaced_path` as root path
because we supposed application_controller is always in root
but nested rails engine's application_controller will not.
|
|
|
|
|
|
|
|
|
| |
mtsmfm/fix-generator-command-for-nested-rails-engine"
This reverts commit 1e969bfb98b88799e2c759fce25a1d8cf00d7ce7, reversing
changes made to a5041f267ded119c2d00b8786c2f2c1e3f93c8a1.
Reason: It breaks the public API
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we create nested (namespaced) rails engine such like bukkits-admin,
`bin/rails g scaffold User name:string age:integer`
will create
`bukkits-admin/app/controllers/bukkits/users_controller.rb`
but it should create
`bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`.
In #6643, we changed `namespaced_path` as root path
because we supposed application_controller is always in root
but nested rails engine's application_controller will not.
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
| |
Previously model file was generated first, which resulted in
inheriting from `ActiveRecord::Base`, but since application_record.rb
is generated as well, it should already be used.
|
|
|
|
| |
Follow up to e45f388.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Using `references` or `belongs_to` in migrations will always add index
for the referenced column by default, without adding `index:true` option
to generated migration file.
- Users can opt out of this by passing `index: false`.
- Legacy migrations won't be affected by this change. They will continue
to run as they were before.
- Fixes #18146
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Rails 5.1 `ActionController::TestCase` will be moved out of Rails
into it's own gem. Please use `ActionDispatch::IntegrationTest` going
forward.
This changes the generators to use `ActionDispatch::IntegrationTest` and
the required URL setup (rather than symbols) for each of the controller
actions.
Updated fix to #22076.
|
|
|
|
|
|
|
|
|
| |
This reverts commit 9712a7a12b7f9e4dcef751ceda8a73c3f4beb11f, reversing
changes made to 3e65c3d3886336e9145438cdeacaf4ebec6a48b8.
Reverting because this caused test failures and while we have a followup
branch there is still one failure that happens randomly and isn't
straight forward to fix.
|
|
|
|
| |
ControllerTest
|
|
|
|
|
| |
* set engine's route in setup
* use fixture with engine namespace
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Thor isn't very discerning over whether some content is present when passed
to `inject_into_file`, e.g. a commented out route is detected as being present.
So to prevent people scratching their heads as to why a route hasn't appeared
it's better to fall on the side of having duplicate routes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When there is a single scaffold in the routes.rb with no other lines
then revoking/destroying it will create a routes.rb file with a syntax
error. This is because the sentinel for the Thor `route` action didn't
include the newline but the logged route code did.
The fix is to add the newline to the sentinel and remove it from the
the logged route code.
Fixes #15913.
|
| |
|
|
|
|
| |
Related to #13434.
|
|\
| |
| |
| |
| |
| |
| | |
Use local variables in _form.html.erb generated by scaffold.
Conflicts:
railties/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It seems a good idea to use local variables in generated partials instead of using instance variables.
Before
<%= render 'form' %>
After
<%= render 'form', product: @product %>
|
| |
| |
| |
| |
| | |
warning: ambiguous first argument; put parentheses or a space even after
`/' operator'`
|
| |
| |
| |
| | |
Thanks @robin850.
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
_form view [Fixes #11573]
|
|
|
|
|
|
|
|
|
|
|
|
| |
- f1805a697831 Redefined 'test_scaffold_generator_no_assets' twice.
- Only the last instance of these three definitions of the same method
was getting called when the tests were actually running.
- This commit changes names of this method so that all three
definitions will be called
- scaffold.css is not generated by --assets=false switch.
- Test was expecting the presence of the file with --assets=false
- This issue was not discovered in f1805a697831b because it was
redefining the same method twice
|
|
|
|
|
|
| |
Scaffold generator with --assets=false option
outputs an error
See #9525
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* adds password_digest attribute to the migration
* adds has_secure_password to the model
* adds password and password_confirmation password_fields to _form.html
* omits password entirely from index.html and show.html
* adds password and password_confirmation to the controller
* adds unencrypted password and password_confirmation to the controller test
* adds encrypted password_digest to the fixture
|
|
|
|
| |
API. The default scaffold will now just create HTML if the user actively opts out of jbuilder
|
|\
| |
| | |
Rename update_attributes method to update
|
| |
| |
| |
| | |
update_attributes
|
|/
|
|
| |
rather than PUT
|
| |
|
| |
|
| |
|
|
|
|
| |
harder to read
|