class Voting::InstallGenerator

Public Instance Methods

create_migration() click to toggle source
# File lib/generators/voting/install_generator.rb, line 9
def create_migration
  template 'db/migrate/create_voting_tables.rb', "db/migrate/#{timestamp}_create_voting_tables.rb"
end

Private Instance Methods

timestamp() click to toggle source
# File lib/generators/voting/install_generator.rb, line 15
def timestamp
  Time.current.strftime '%Y%m%d%H%M%S'
end