diff options
Diffstat (limited to 'railties')
7 files changed, 17 insertions, 17 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt b/railties/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt index 3ddc86ae0a..6c0ef31725 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt @@ -1,5 +1,5 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :reset_session instead. - protect_from_forgery :with => :exception -end
\ No newline at end of file + protect_from_forgery with: :exception +end diff --git a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt index bba96a7431..e0539aa8bb 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt @@ -2,7 +2,7 @@ <html> <head> <title><%= camelized %></title> - <%%= stylesheet_link_tag "application", :media => "all" %> + <%%= stylesheet_link_tag "application", media: "all" %> <%%= javascript_include_tag "application" %> <%%= csrf_meta_tags %> </head> diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb index d816f973e6..2b8e5b5dcd 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -13,7 +13,7 @@ require "action_mailer/railtie" if defined?(Bundler) # If you precompile assets before deploying to production, use this line. - Bundler.require(*Rails.groups(:assets => %w(development test))) + Bundler.require(*Rails.groups(assets: %w(development test))) # If you want your assets lazily compiled in production, use this line. # Bundler.require(:default, :assets, Rails.env) end diff --git a/railties/lib/rails/generators/rails/app/templates/config/routes.rb b/railties/lib/rails/generators/rails/app/templates/config/routes.rb index 303e47877f..85acac6725 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/routes.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/routes.rb @@ -1,18 +1,18 @@ <%= app_const %>.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. - + # You can have the root of your site routed with "root" # just remember to delete public/index.html. - # root :to => 'welcome#index' + # root to: 'welcome#index' # Sample of regular route: # get 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: - # get 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) + # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase + # This route can be invoked with purchase_url(id: product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products @@ -39,7 +39,7 @@ # resources :products do # resources :comments # resources :sales do - # get 'recent', :on => :collection + # get 'recent', on: :collection # end # end @@ -52,4 +52,4 @@ # See how all your routes lay out with "rake routes" -end
\ No newline at end of file +end diff --git a/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb b/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb index 2a849b7f2b..9342a57b20 100644 --- a/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb +++ b/railties/lib/rails/generators/rails/app/templates/test/performance/browsing_test.rb @@ -3,8 +3,8 @@ require 'rails/performance_test_help' class BrowsingTest < ActionDispatch::PerformanceTest # Refer to the documentation for all available options - # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory], - # :output => 'tmp/performance', :formats => [:flat] } + # self.profile_options = { runs: 5, metrics: [:wall_time, :memory], + # output: 'tmp/performance', formats: [:flat] } def test_homepage get '/' diff --git a/railties/lib/rails/initializable.rb b/railties/lib/rails/initializable.rb index a61673fab8..1a0b6d1e1a 100644 --- a/railties/lib/rails/initializable.rb +++ b/railties/lib/rails/initializable.rb @@ -2,7 +2,7 @@ require 'tsort' module Rails module Initializable - def self.included(base) + def self.included(base) #:nodoc: base.extend ClassMethods end diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index c1aa98e481..c813defe93 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -69,11 +69,11 @@ module ApplicationTests Rails.env = "development" assert_equal [:default, "development"], Rails.groups - assert_equal [:default, "development", :assets], Rails.groups(:assets => [:development]) - assert_equal [:default, "development", :another, :assets], Rails.groups(:another, :assets => %w(development)) + assert_equal [:default, "development", :assets], Rails.groups(assets: [:development]) + assert_equal [:default, "development", :another, :assets], Rails.groups(:another, assets: %w(development)) Rails.env = "test" - assert_equal [:default, "test"], Rails.groups(:assets => [:development]) + assert_equal [:default, "test"], Rails.groups(assets: [:development]) ENV["RAILS_GROUPS"] = "javascripts,stylesheets" assert_equal [:default, "test", "javascripts", "stylesheets"], Rails.groups @@ -567,7 +567,7 @@ module ApplicationTests app_file 'app/controllers/application_controller.rb', <<-RUBY class ApplicationController < ActionController::Base - protect_from_forgery :with => :reset_session # as we are testing API here + protect_from_forgery with: :reset_session # as we are testing API here end RUBY |