| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method return `Gem::Version.new(Rails.version)`, suggesting a more
reliable way to perform version comparison.
Example:
Rails.version #=> "4.1.2"
Rails.gem_version #=> #<Gem::Version "4.1.2">
Rails.version > "4.1.10" #=> false
Rails.gem_version > Gem::Version.new("4.1.10") #=> true
Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true
This was originally introduced as `.version` by @charliesome in #8501
but got reverted in #10002 since it was not backward compatible.
Also, updating template for `rake update_versions`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since #11544, invoking the controller generator, any generated route is
namespaced according to the class_path method. Since a mountable plugin
is namespaced, creating a controller inside would generate a namespaced
route based on the engine's name.
The controller generator now relies on regular_class_path which does not
contain the class hierarchy but the given path.
Fixes #14079.
|
|
|
|
| |
Remove 4-1 related entries from master [ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit e0a521cfcd13e4d1f0ae8ab96004289e1c020f71.
Conflicts:
railties/CHANGELOG.md
We expect loggers to quack like stdlib logger. If log4r needs different
level= assignment, using a Logger-quacking wrapper is the way to do it.
Fixes #14114.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
git://github.com/emilsoman/rails into emilsoman-dump-schema-after-migration-flag
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add a config on Active Record named `dump_schema_after_migration`
* Schema dump doesn't happen if the config is set to false
* Set default value of the config to true
* Set config in generated production environment file to false
* Update configuration guide
* Update CHANGELOG
|
|/
|
|
| |
/cc @chancancode
|
|
|
|
|
|
|
|
|
|
| |
This Thor-action isolates the logic whether to (over-)write migration and
what is shown to the user. It's modelled after Thor's CreateFile-action.
This solves the issue that removing a non-existing migration, tried to
remove the template-path (#13588).
Related issues: #12674
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Write routes in route.rb with single quotes
get 'welcome/index'
instead of
get "welcome/index"
|
|
|
|
|
|
|
|
| |
This prevents Rails from assigning meaningless log levels to third
party loggers like log4r. If `Rails.logger` is not `kind_of?(::Logger)`
we simply assign the `config.log_level` as is.
This bug was introduced by #11665.
|
| |
|
|
|
|
| |
Kudos to @zzak for taking over SDoc and make it work with RDoc 4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move check from generated helper to test_help.rb, so that all
applications can benefit
* Rather than just raising when the test schema has pending migrations,
try to load in the schema and only raise if there are pending
migrations afterwards
* Opt out of the check by setting
config.active_record.maintain_test_schema = false
* Deprecate db:test:* tasks. The test helper is now fully responsible
for maintaining the test schema, so we don't need rake tasks for this.
This is also a speed improvement since we're no longer reloading the
test database on every call to "rake test".
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
- Fixes #10700
|
|
|
|
|
| |
Also make Action Mailer changelog format more consistent with the
others [ci skip]
|
|
|
|
|
|
| |
that skips it.
It can be skipped adding `add_gem_entry_filter { |gem| gem.name != "turbolinks" }` to the template.
|
|
|
|
|
|
| |
In order to simplify profiling loading of initializers,
added instument for tracking load config initializer event from
`config/initializers`
|
| |
|
| |
|
|
|
|
| |
Also improve the example to show as shell command [ci skip]
|
|
|
|
|
|
|
|
|
|
|
| |
We used to support the `BACKTRACE` environment variable but when
we switched to MiniTest it got removed: f9382cd7948
This commit adds back the functionality to show the unfiltered backtrace when needed.
This also works when you run your tests with `rake`:
* `BACKTRACE=1 bin/rake test`
* `BACKTRACE=1 ruby -Itest ...`
|
| |
|
|
|
|
|
|
|
|
|
| |
Commit 0417bc8 add the coffee-rails and javascript runtime gems even
when passing the --skip-javascript option but this is not the desired
behavior.
Also remove all javascript related stuff in the generated application
such as the vendor/assets/javascripts folder.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The application name is used to fill the `database.yml` and
`session_store.rb` files ; previously, if the provided name contained
whitespaces, it led to unexpected names in these files.
Since Shellwords.escape adds backslashes to escape spaces, the app_name
should remove them and replace any space with an underscore (just like
periods previously).
Also improve the assert_file helper to work with paths containing spaces
using String#shellescape.
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now when you start a server via `rails s`, the logger gets extended so that it logs to the file system and also to stdout. This extension behavior is not "intelligent" and if the default logger is already set to output to stdout, then the contents will be received twice.
To capture logs in accordance with http://www.12factor.net/logs some platforms require the logs to be sent to standard out. If a logger is set to stdout, and the server is started using `rails server` instead of another method (i.e. `thin start` etc.) then the app will produce double logs.
This PR fixes the issue by only extending the logger to standard out in the development environment. So that in production you don't get double logs like this:
```
ActionView::Template::Error (wrong number of arguments (5 for 4)):
1: <% lang_index = 0 %>
2: <div class="row">
3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs">
4: <% repos.group_by(&:language).each do |lang, repos| %>
5: <% unless lang == nil %>
6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li>
7: <% end -%>
app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000'
app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880'
ActionView::Template::Error (wrong number of arguments (5 for 4)):
1: <% lang_index = 0 %>
2: <div class="row">
3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs">
4: <% repos.group_by(&:language).each do |lang, repos| %>
5: <% unless lang == nil %>
6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li>
7: <% end -%>
app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000'
app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880'
```
ATP Railties. Opened against master in favor of #10999
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit options for `rails new` and `rails plugin new` had to
be passed in a strict order, trying to execute a following command:
rails new -J path/to/app
resulted in an error.
This commit fixes the situation and allows to pass path to app anywhere
after `new`
|