class ActiveRecord::Generators::SimonSaysGenerator
Public Instance Methods
copy_simon_says_migration()
click to toggle source
# File lib/generators/active_record/simon_says_generator.rb, line 8 def copy_simon_says_migration migration_template "migration.rb", "db/migrate/simon_says_add_to_#{table_name}.rb" end
Private Instance Methods
migration_version()
click to toggle source
# File lib/generators/active_record/simon_says_generator.rb, line 14 def migration_version "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if Rails.version >= '5.0.0' end
role_attribute_name()
click to toggle source
# File lib/generators/active_record/simon_says_generator.rb, line 18 def role_attribute_name args.first || 'roles' end