aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2015-07-23 17:58:02 +0200
committerRobin Dupret <robin.dupret@gmail.com>2015-07-23 18:27:18 +0200
commite3cfd5b174f37146b81026c0d1856b672bd6bbec (patch)
treed65f8c4574b1f05794644f63bb5d639984698228 /railties/lib/rails
parent67863aa8440805628477647e1015372d11913ca7 (diff)
downloadrails-e3cfd5b174f37146b81026c0d1856b672bd6bbec.tar.gz
rails-e3cfd5b174f37146b81026c0d1856b672bd6bbec.tar.bz2
rails-e3cfd5b174f37146b81026c0d1856b672bd6bbec.zip
Make ApplicationController inherit from AC::API for API plugins
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt b/railties/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt
index 7157e48c42..7fe4e5034d 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt
+++ b/railties/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt
@@ -1,5 +1,5 @@
<%= wrap_in_modules <<-rb.strip_heredoc
- class ApplicationController < ActionController::Base
+ class ApplicationController < ActionController::#{api? ? "API" : "Base"}
end
rb
%>