class Favorable::FavorableGenerator

Public Class Methods

next_migration_number(path) click to toggle source
# File lib/generators/favorable_generator.rb, line 11
def self.next_migration_number(path)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end
source_root() click to toggle source
# File lib/generators/favorable_generator.rb, line 7
def self.source_root
  File.join(File.dirname(__FILE__), "templates")
end

Public Instance Methods

create_migration_file() click to toggle source
# File lib/generators/favorable_generator.rb, line 15
def create_migration_file
  migration_template "migrator.rb", "db/migrate/favorable_migration.rb"
end
create_model() click to toggle source
# File lib/generators/favorable_generator.rb, line 19
def create_model
  template "model.rb", File.join("app/models", "favorite.rb")
end