diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-25 09:17:32 +0000 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-25 09:17:32 +0000 |
commit | 6d9f9b3b05f6ea55aad9853888912bcca4d81c9f (patch) | |
tree | 54531d8f1ce2ed6a1eecfb8ae4d143ed922f3387 /railties/lib | |
parent | ebb8ea22f30dc029f4a868a550828443b160f639 (diff) | |
download | rails-6d9f9b3b05f6ea55aad9853888912bcca4d81c9f.tar.gz rails-6d9f9b3b05f6ea55aad9853888912bcca4d81c9f.tar.bz2 rails-6d9f9b3b05f6ea55aad9853888912bcca4d81c9f.zip |
Add a hook for serializers in the scaffold generator (off for now).
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 27f8d13ce8..f1ca9080ff 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -33,7 +33,8 @@ module Rails :stylesheets => '-y', :stylesheet_engine => '-se', :template_engine => '-e', - :test_framework => '-t' + :test_framework => '-t', + :serializer => '-z' }, :test_unit => { @@ -58,6 +59,7 @@ module Rails :performance_tool => nil, :resource_controller => :controller, :scaffold_controller => :scaffold_controller, + :serializer => false, :stylesheets => true, :stylesheet_engine => :css, :test_framework => false, diff --git a/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb index 03a61a035e..7353a67c83 100644 --- a/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb +++ b/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb @@ -10,6 +10,7 @@ module Rails class_option :stylesheet_engine, :desc => "Engine for Stylesheets" hook_for :scaffold_controller, :required => true + hook_for :serializer hook_for :assets do |assets| invoke assets, [controller_name] |