Permalink
Browse files

Fixed a bug

  • Loading branch information...
ashrafuzzaman committed Jun 7, 2012
1 parent 6173321 commit ba6fc7e5ff941217f3f21457d5edaae22a9c858b
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/generators/nested_scaffold/nested_scaffold_generator.rb
@@ -4,10 +4,13 @@
class NestedScaffoldGenerator < Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
class_option :stylesheets, :type => :boolean, :desc => "Generate Stylesheets"
class_option :stylesheet_engine, :desc => "Engine for Stylesheets"
def initialize(args, *options) #:nodoc:
parse_reources!(args[0])
args[0] = r.name
args << "#{r.name.downcase}:references"
super(args, *options)
end
@@ -28,7 +31,8 @@ def copy_controller
# end
#end
hook_for :test_framework, :messages, :as => :scaffold
hook_for :test_framework, :as => :scaffold
hook_for :messages
protected
@@ -50,6 +54,10 @@ def pr
@pr
end
def controller_name
"#{class_name}_controller"
end
def index_helper_path
uncountable? ? "#{pr_singular_r_plural}_index_path(@#{pr.singular_table_name}})" : "#{pr_singular_r_plural}_path(@#{pr.singular_table_name})"
end

0 comments on commit ba6fc7e

Please sign in to comment.