class ActiveRecord::Generators::SessionMigrationGenerator
Public Instance Methods
create_migration_file()
click to toggle source
# File lib/generators/active_record/session_migration_generator.rb, line 9 def create_migration_file migration_template "migration.rb", "db/migrate/#{file_name}.rb" end
Protected Instance Methods
session_table_name()
click to toggle source
# File lib/generators/active_record/session_migration_generator.rb, line 15 def session_table_name current_table_name = ActiveRecord::SessionStore::Session.table_name if current_table_name == 'session' || current_table_name == 'sessions' current_table_name = ActiveRecord::Base.pluralize_table_names ? 'sessions' : 'session' end current_table_name end