Deal with controller names on scaffold and add some helpers to deal with ActiveModel.

Methods
C
O
Attributes
[R] controller_name
Instance Protected methods
controller_class_name()
    # File railties/lib/rails/generators/resource_helpers.rb, line 48
48:         def controller_class_name
49:           (controller_class_path + [controller_file_name]).map!{ |m| m.camelize }.join('::')
50:         end
controller_class_path()
    # File railties/lib/rails/generators/resource_helpers.rb, line 36
36:         def controller_class_path
37:           class_path
38:         end
controller_file_name()
    # File railties/lib/rails/generators/resource_helpers.rb, line 40
40:         def controller_file_name
41:           @controller_file_name ||= file_name.pluralize
42:         end
controller_file_path()
    # File railties/lib/rails/generators/resource_helpers.rb, line 44
44:         def controller_file_path
45:           @controller_file_path ||= (controller_class_path + [controller_file_name]).join('/')
46:         end
controller_i18n_scope()
    # File railties/lib/rails/generators/resource_helpers.rb, line 52
52:         def controller_i18n_scope
53:           @controller_i18n_scope ||= controller_file_path.gsub('/', '.')
54:         end
orm_class()

Loads the ORM::Generators::ActiveModel class. This class is responsible to tell scaffold entities how to generate an specific method for the ORM. Check Rails::Generators::ActiveModel for more information.

    # File railties/lib/rails/generators/resource_helpers.rb, line 59
59:         def orm_class
60:           @orm_class ||= begin
61:             # Raise an error if the class_option :orm was not defined.
62:             unless self.class.class_options[:orm]
63:               raise "You need to have :orm as class option to invoke orm_class and orm_instance"
64:             end
65: 
66:             begin
67:               "#{options[:orm].to_s.camelize}::Generators::ActiveModel".constantize
68:             rescue NameError
69:               Rails::Generators::ActiveModel
70:             end
71:           end
72:         end
orm_instance(name=singular_table_name)

Initialize ORM::Generators::ActiveModel to access instance methods.

    # File railties/lib/rails/generators/resource_helpers.rb, line 75
75:         def orm_instance(name=singular_table_name)
76:           @orm_instance ||= orm_class.new(name)
77:         end