| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
The Gemfile of new application uses ruby 1.9 hashes. Gem method of
generators should use them too. It prevents from mixing two kinds of
syntax in one file.
|
|
|
|
|
|
|
| |
Using require in development mode will prevent required files from
reloading, even if they're changed. In order to keep namespaced
application_controller reloadable, we need to use require_dependency
instead of require.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Minitest uses different signature for assert_no_match, so we have to
swap arguments.
|
|
|
|
|
|
|
|
|
|
|
| |
Reverted changes:
f3482a9 Fix tests in railties
5904295 improve #6318
aed906a prevent using already loaded Gemfile for 'bundle install'
In order to fix this, we need a fix in bundler related to GEM_PATH,
which will allow to run tests properly. I will get this changes back
when it happens.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Related to a06a84bf77082a7435973fa1b6c8254fb410f243
|
| |
|
|\
| |
| |
| |
| | |
malclocke/add_option_to_skip_index.html_on_rails_generate
Added a generator option to skip the public/index.html file
|
| |
| |
| |
| |
| |
| |
| | |
generating a new Rails application
The option is:
-i, [--skip-index-html] # Skip public/index.html file
|
| | |
|
|\ \
| | |
| | | |
Don't indent blank lines in named base generators
|
| | | |
|
|/ / |
|
| | |
|
| |
| |
| |
| | |
Broken after this 6a054b0038bac288a1f6e45feb5470f4ee492081
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
In case `source_roout` is not set, `default_source_root` is used,
which includes also `templates` directory. If there is no `templates`
directory, `default_source_root` is not available and USAGE will not
be displayed. USAGE should be also checked based on default
directory excluding `templates`.
|
| |
| |
| |
| | |
@spastorino request
|
|\ \
| | |
| | | |
Remove blank line from generated migration
|
| |/ |
|
|/
|
|
|
| |
When generating a migration that removes a field with an index, the down
will add both the field and its index.
|
| |
|
| |
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main goal is to not generate the format.html block in scaffold
controller, and to generate a different functional test as we don't rely
on redirects anymore, we should test for http responses.
In addition to that, the :edit action is removed from the http
controller and the edit route is not generated by default, as they
usually do not make sense in this scenario.
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
|
|
|
| |
Change application controller template accordingly, to inherit from
ActionController::HTTP and not generate protect_from_forgery call.
[Carlos Antonio da Silva & Santiago Pastorino]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
the update action of resources
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PATCH is the correct HTML verb to map to the #update action. The
semantics for PATCH allows for partial updates, whereas PUT requires a
complete replacement.
Changes:
* adds config.default_method_for_update you can set to :patch
* optionally use PATCH instead of PUT in resource routes and forms
* adds the #patch verb to routes to detect PATCH requests
* adds #patch? to Request
* changes documentation and comments to indicate support for PATCH
This change maintains complete backwards compatibility by keeping :put
as the default for config.default_method_for_update.
|