class UserPreferences::Generators::InstallGenerator

Public Class Methods

next_migration_number(dir) click to toggle source

TODO get rid of this

# File lib/generators/user_preferences/install_generator.rb, line 16
def self.next_migration_number(dir)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end

Public Instance Methods

copy_migrations() click to toggle source
# File lib/generators/user_preferences/install_generator.rb, line 11
def copy_migrations
  migration_template 'migration.rb', "db/migrate/create_preferences.rb"
end
create_initializer_file() click to toggle source
# File lib/generators/user_preferences/install_generator.rb, line 7
def create_initializer_file
  template 'user_preferences.yml', "config/user_preferences.yml"
end