| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
called out at the top level
|
|
|
|
| |
basic data". I dont consider this something most people is going to want most of the time. If you want to add it in your own app, knock yourself out. But it doesnt belong in Rails imo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It was just a copy of the controller generator documentation which was
misleading. It doesn't accept arguments for views. This seems more
descriptive as well.
Respect 80 char limit. #7147
Made a nicer paragraph #7147
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Inflector is currently not very supportive of internationalized
websites. If a user wants to singularize and/or pluralize words based on
any locale other than English, they must define each case in locale
files. Rather than create large locale files with mappings between
singular and plural words, why not allow the Inflector to accept a
locale?
This patch makes ActiveSupport::Inflector locale aware and uses `:en`` unless
otherwise specified. Users will still be provided a list of English (:en)
inflections, but they may additionally define inflection rules for other
locales. Each list is kept separately and permanently. There is no reason to
limit users to one list of inflections:
ActiveSupport::Inflector.inflections(:es) do |inflect|
inflect.plural(/$/, 's')
inflect.plural(/([^aeéiou])$/i, '\1es')
inflect.plural(/([aeiou]s)$/i, '\1')
inflect.plural(/z$/i, 'ces')
inflect.plural(/á([sn])$/i, 'a\1es')
inflect.plural(/é([sn])$/i, 'e\1es')
inflect.plural(/í([sn])$/i, 'i\1es')
inflect.plural(/ó([sn])$/i, 'o\1es')
inflect.plural(/ú([sn])$/i, 'u\1es')
inflect.singular(/s$/, '')
inflect.singular(/es$/, '')
inflect.irregular('el', 'los')
end
'ley'.pluralize(:es) # => "leyes"
'ley'.pluralize(:en) # => "leys"
'avión'.pluralize(:es) # => "aviones"
'avión'.pluralize(:en) # => "avións"
A multilingual Inflector should be of use to anybody that is tasked with
internationalizing their Rails application.
Signed-off-by: David Celis <david@davidcelis.com>
|
|\
| |
| | |
update performance test template to use test method
|
| | |
|
| |
| |
| |
| | |
Closes #7110 there's more work to do on rack-cache issue 69
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows us to do:
In your configuration:
Rails.queue[:image_queue] = SomeQueue.new
Rails.queue[:mail_queue] = SomeQueue.new
In your app code:
Rails.queue[:mail_queue].push MailJob.new
Both jobs pushed to the same default queue
Rails.queue.push DefaultJob.new
Rails.queue[:default].push DefaultJob.new
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This applies to the following helpers:
`button_to`
`button_tag`
`image_submit_tag`
`link_to`
`submit_tag`
|
|\ \
| | |
| | | |
Add indexes to create_join_table method
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|/ / |
|
| |
| |
| |
| | |
Follow the consistency defined in dbc43bc.
|
| |
| |
| |
| |
| | |
Changes introduced in 7404cda9f61e41d52ce244d60abbf598684a96c4.
Fix railties build.
|
| |
| |
| |
| | |
this is so we can show route output in the development when we get a routing error. Railties can use features of ActionDispatch, but ActionDispatch should not depend on Railties.
|
|\ \ |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Last versions of Turn don't monkey patch MiniTest to setup
the natural language option. Here is an
[example](https://github.com/TwP/turn/blob/master/try/test_autorun_minitest.rb#L3).
This patches the following behaviour:
$ rake test:units
`<top (required)>': undefined method `use_natural_language_case_names='
for MiniTest::Unit:Class (NoMethodError)
|
|\ \
| | |
| | | |
Add few information on the field types
|
| | | |
|
|/ /
| |
| |
| | |
test_helper.rb to reflect that
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By marshalling and unmarshalling jobs when adding them to the test queue, we
can ensure that jobs created during test runs are valid candidates for
marshalling, and, thus, that they can be used with queueing backends other than
the default simple in-process implementation.
This will also be used in a subsequent commit to ensure that jobs pushed to the
queue do not contain a reference to the queue itself.
|
|\ \
| |/
|/| |
Persist glob when replacing a path
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When Rails::Paths::Root's []= is used to replace a path it should persist the previous path's glob. Without passing the glob along we get gnarly bugs when trying to wire up things like engines.
module FooEngine
class Engine < ::Rails::Engine
isolate_namespace FooEngine
config.paths['config/initializers'] = "lib/foo_engine/initializers"
end
end
## Example of behaviour before this commit.
#
# Before the initializer override:
>> FooEngine::Engine.config.paths["config/initializers"].glob
=> "**/*.rb"
# After the initializer override:
>> FooEngine::Engine.config.paths["config/initializers"].glob
=> nil
## Example of behaviour after this commit.
#
# Before the initializer override:
>> FooEngine::Engine.config.paths["config/initializers"].glob
=> "**/*.rb"
# After the initializer override:
>> FooEngine::Engine.config.paths["config/initializers"].glob
=> "**/*.rb"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 6acebb38bc0637bc05c19d87f8767f16ce79189b.
Usage of this feature did not reveal any improvement in existing apps.
Conflicts:
actionpack/lib/action_dispatch/routing/mapper.rb
guides/source/routing.textile
railties/lib/rails/engine.rb
railties/lib/rails/paths.rb
railties/test/paths_test.rb
|
|/
|
|
|
|
|
|
| |
Since plugins were removed, we can clean up a few methods in engines.
We also use this opportunity to move `load_console`, `load_tasks` and
`load_runner` to Rails::Engine. This means that, if someone wants to
improve script/rails for engines to support console or runner commands,
part of the work is already done.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Add polymorphic option to model generator
For instance,
$ rails g model Product supplier:references{polymorphic}
generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/| |
Async actionmailer
|
| | |
|
|/
|
|
|
|
|
|
| |
app/controllers/application_controller.rb
app/views/layouts/application.html.erb
config/application.rb
config/routes.rb
test/performance/browsing_test.rb
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
amatsuda/ignore_git_ignored_files_in_rake_test_uncommitted
ignore .gitignore'd files in rake test:uncomitted
|
| | |
|
|\ \
| |/
|/| |
Fix: 'rake rails:templates:copy' doesn't work
|
| | |
|