class ActsAsPushable::Generators::InstallGenerator
Public Class Methods
next_migration_number(dirname)
click to toggle source
# File lib/generators/acts_as_pushable/install_generator.rb, line 18 def self.next_migration_number(dirname) if ActiveRecord::Base.timestamped_migrations sleep 1 # make sure each time we get a different timestamp Time.new.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end
Public Instance Methods
copy_initializer_file()
click to toggle source
# File lib/generators/acts_as_pushable/install_generator.rb, line 10 def copy_initializer_file template "initializer.rb", "config/initializers/acts_as_pushable.rb" end
copy_migration_files()
click to toggle source
# File lib/generators/acts_as_pushable/install_generator.rb, line 14 def copy_migration_files migration_template "migration/devices.rb", "db/migrate/devices.rb" end