aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
Commit message (Collapse)AuthorAgeFilesLines
* Updated scaffold_controller generator docs #7146Aaron Cruz2012-07-311-4/+3
| | | | | | | | | | 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
* Make ActiveSupport::Inflector locale aware and multilingualDavid Celis2012-07-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge pull request #6991 from frodsan/performance_test_generatorRafael Mendonça França2012-07-242-2/+2
|\ | | | | update performance test template to use test method
| * update performance test template to use test methodFrancesco Rodriguez2012-07-062-2/+2
| |
* | Remove ActionDispatch::Head middleware in favor of Rack::HeadSantiago Pastorino2012-07-231-1/+1
| | | | | | | | Closes #7110 there's more work to do on rack-cache issue 69
* | Copy-edits at Rails::Queueing documentationRafael Mendonça França2012-07-211-2/+2
| |
* | adding Rails::Queueing::ContainerAaron Patterson2012-07-192-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add fkey attributes to `join_table` migration generatorAleksey Magusev2012-07-191-1/+9
| |
* | Remove `:confirm` in favor of `:data => { :confirm => 'Text' }` optionCarlos Galdino2012-07-181-1/+1
| | | | | | | | | | | | | | | | | | This applies to the following helpers: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag`
* | Merge pull request #7028 from lexmag/join_table_indexesJosé Valim2012-07-181-1/+2
|\ \ | | | | | | Add indexes to create_join_table method
| * | Add join table migration generatorAleksey Magusev2012-07-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | A more informative comment for config.asset.debugJared Beck2012-07-161-1/+1
|/ /
* | Rename RouteInspector to RoutesInspectorCarlos Antonio da Silva2012-07-082-2/+2
| | | | | | | | Follow the consistency defined in dbc43bc.
* | Remove RoutesInspector from railties, since it was moved to APCarlos Antonio da Silva2012-07-082-122/+0
| | | | | | | | | | Changes introduced in 7404cda9f61e41d52ce244d60abbf598684a96c4. Fix railties build.
* | move route_inspector to actionpack@schneems and @mattt2012-07-073-5/+6
| | | | | | | | 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.
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-07-071-2/+1
|\ \
| * | There is only task for installing migrations when using enginesWojciech Wnętrzak2012-07-041-2/+1
| | |
* | | update test_help to config properly turn natural language optionFrancesco Rodriguez2012-07-061-1/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | 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)
* | Merge pull request #6959 from robin850/patch-1José Valim2012-07-051-0/+49
|\ \ | | | | | | Add few information on the field types
| * | Add few information on the field typesRobin Dupret2012-07-041-0/+49
| | |
* | | CSV fixtures aren't supported by default anymore, update generated ↵Guillermo Iguaran2012-07-041-1/+1
|/ / | | | | | | test_helper.rb to reflect that
* | remove test/dummy from gitignore when "plugin new -T"Francesco Rodriguez2012-07-031-0/+2
| |
* | Ensure test jobs are marshallablePaul Battley2012-07-031-0/+7
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #6910 from mulder/fix_path_globJosé Valim2012-07-011-1/+2
|\ \ | |/ |/| Persist glob when replacing a path
| * Persist glob when replacing a pathNicholas Mulder2012-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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"
* | Revert "Allow loading external route files from the router"José Valim2012-06-294-25/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove unused responsibilities and add a few load definitions to enginesJosé Valim2012-06-293-146/+139
|/ | | | | | | | 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.
* Remove unnecessary Railties structure now that plugins are goneJosé Valim2012-06-294-110/+80
|
* Rename RouteInspect to RoutesInspector for consistencyJosé Valim2012-06-293-5/+5
|
* Merge pull request #6856 from lexmag/polymorphic_generatorsCarlos Antonio da Silva2012-06-271-2/+12
|\ | | | | | | | | | | | | | | | | 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.
| * Add polymorphic option to model generatorAleksey Magusev2012-06-271-2/+12
| | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #6839 from bcardarella/async-actionmailerAaron Patterson2012-06-261-0/+3
|\ \ | |/ |/| Async actionmailer
| * Add commented out ActionMailer async config optionBrian Cardarella2012-06-231-0/+3
| |
* | ruby 1.9 hash syntax for generated codeRichard Huang2012-06-235-12/+12
|/ | | | | | | | app/controllers/application_controller.rb app/views/layouts/application.html.erb config/application.rb config/routes.rb test/performance/browsing_test.rb
* add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
|
* use system tmpdir rather than our ownAaron Patterson2012-06-191-2/+10
|
* Change minimum (default) log level in PostgreSQL to warning.kennyj2012-06-182-4/+4
|
* Require thor 0.15.3 onwardsJosé Valim2012-06-181-0/+1
|
* Merge pull request #6708 from ↵José Valim2012-06-111-1/+1
|\ | | | | | | | | amatsuda/ignore_git_ignored_files_in_rake_test_uncommitted ignore .gitignore'd files in rake test:uncomitted
| * ignore .gitignore'd files in rake test:uncomittedAkira Matsuda2012-06-121-1/+1
| |
* | Merge pull request #6690 from suginoy/fix-templates-copyRafael Mendonça França2012-06-111-1/+1
|\ \ | |/ |/| Fix: 'rake rails:templates:copy' doesn't work
| * fix stylesheet template dirSugino Yasuhiro2012-06-091-1/+1
| |
* | Merge pull request #6692 from schneems/schneems/something-went-wrongJosé Valim2012-06-102-0/+2
|\ \ | | | | | | Add Prompt to 404 & 500 Pages to Check Logs in Production
| * | add prompt to 404 & 500 pages to check logsschneems2012-06-092-0/+2
| |/ | | | | When new programmers push their code to a production server and receive an error they often don't know to check the logs, this simple reminder will help. Most professional applications have custom error pages so this change shouldn't affect them. The wording of the message should not confuse non-developer visitors.
* | Merge pull request #6665 from schneems/schneems/raise-migration-errorJosé Valim2012-06-102-0/+5
|\ \ | |/ |/| Notify A User they Have Pending Migrations
| * raise error for pending migration schneems2012-06-092-0/+5
| | | | | | can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
* | Merge pull request #6681 from arunagw/plugin_gen_fixRafael Mendonça França2012-06-081-1/+1
|\ \ | | | | | | Plugin gen fix
| * | We should not include engine.rake file into rakeArun Agrawal2012-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if we are passing -T which is skip_test_unit See issue #6673 for more details. I saw that we are not creating dummy app even if we do skip_test_unit. Fixes #6673
* | | Don't add sqlite3 to gemspec with -O on rails plugin newPiotr Sarnacki2012-06-081-0/+2
|/ / | | | | | | (closes #6672)
* | Merge pull request #6597 from frodsan/am_include_root_to_falseRafael Mendonça França2012-06-071-4/+4
|\ \ | | | | | | change AMS::JSON.include_root_in_json default value to false