Method: Fixie::Model#fixture_table_name
- Defined in:
- lib/fixie.rb
#fixture_table_name ⇒ Symbol
This method returns the name of the table that the fixtures for this model should be loaded into/from. The default is to just underscore and pluralize the table name, e.g. City => cities.
193 194 195 196 197 198 199 |
# File 'lib/fixie.rb', line 193 def fixture_table_name @fixture_table_name ||= if respond_to?(:table_name) table_name.to_sym else name.demodulize.tableize.to_sym end end |