Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8158

Show
Ignore:
Timestamp:
11/16/07 23:01:24 (10 months ago)
Author:
bitsweat
Message:

Table names aren't nested: replace / with _ to match the likely table name.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/lib/rails_generator/base.rb

    r7961 r8158  
    231231          @class_name_without_nesting, @singular_name, @plural_name = inflect_names(base_name) 
    232232          @table_name = (!defined?(ActiveRecord::Base) || ActiveRecord::Base.pluralize_table_names) ? plural_name : singular_name 
     233          @table_name.gsub! '/', '_' 
    233234          if @class_nesting.empty? 
    234235            @class_name = @class_name_without_nesting