class Mobility::BackendGenerators::TableBackend
Public Instance Methods
create_migration_file()
click to toggle source
Calls superclass method
Mobility::BackendGenerators::Base#create_migration_file
# File lib/rails/generators/mobility/backend_generators/table_backend.rb, line 9 def create_migration_file if data_source_exists? && !self.class.migration_exists?(migration_dir, migration_file) migration_template "#{backend}_migration.rb", "db/migrate/#{migration_file}.rb" else super end end
Private Instance Methods
foreign_key()
click to toggle source
# File lib/rails/generators/mobility/backend_generators/table_backend.rb, line 25 def foreign_key "#{model_table_name.singularize}_id" end
table_name()
click to toggle source
Calls superclass method
# File lib/rails/generators/mobility/backend_generators/table_backend.rb, line 20 def table_name model_table_name = super "#{model_table_name.singularize}_translations" end
Also aliased as: model_table_name