diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-12 09:17:08 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-14 12:46:24 -0300 |
commit | 3e138df9776985de8ab367dcd9757b404c53435e (patch) | |
tree | 215deba7bba6a36ec1423a1e6b7cdb72e3d19a8a /railties/lib | |
parent | 2c0f6b0d8a8f357078fa7399765cf11edc7c645b (diff) | |
download | rails-3e138df9776985de8ab367dcd9757b404c53435e.tar.gz rails-3e138df9776985de8ab367dcd9757b404c53435e.tar.bz2 rails-3e138df9776985de8ab367dcd9757b404c53435e.zip |
Rename http-only app generator option to http
[Carlos Antonio da Silva & Santiago Pastorino]
Diffstat (limited to 'railties/lib')
3 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 3552ec2846..947ab82d00 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -144,8 +144,8 @@ module Rails class AppGenerator < AppBase add_shared_options_for "application" - class_option :http_only, :type => :boolean, :default => false, - :desc => "Preconfigure smaller stack for HTTP only apps" + class_option :http, :type => :boolean, :default => false, + :desc => "Preconfigure smaller stack for HTTP only apps" # Add bin/rails options class_option :version, :type => :boolean, :aliases => "-v", :group => :rails, 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 699b2c1119..4dc85ec156 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::<%= options.http_only? ? "HTTP" : "Base" %> +class ApplicationController < ActionController::<%= options.http? ? "HTTP" : "Base" %> # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :reset_session instead. - <%= comment_if :http_only %>protect_from_forgery :with => :exception + <%= comment_if :http %>protect_from_forgery :with => :exception end 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 3225c875a2..ba3785be35 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -67,7 +67,7 @@ module <%= app_const_base %> # Version of your assets, change this if you want to expire all your assets. config.assets.version = '1.0' <% end -%> -<% if options.http_only? -%> +<% if options.http? -%> # Only loads a smaller set of middleware suitable for HTTP only apps. # Middleware like session, flash, cookies can be added back manually. |