class LeadsToHighrise::Generators::InstallGenerator

Public Instance Methods

copy_migration() click to toggle source
# File lib/generators/leads_to_highrise/install_generator.rb, line 6
def copy_migration
        copy_file "migrations/create_leads.rb", "db/migrate/#{time}_create_leads.rb"
        copy_file "migrations/add_highrise_site_and_highrise_user_to_user.rb", "db/migrate/#{time}_add_highrise_site_and_highrise_user_to_user.rb"
end
time() click to toggle source
# File lib/generators/leads_to_highrise/install_generator.rb, line 11
def time
        unless @time
                @time = DateTime.now.strftime("%Y%m%d%H%M%S").to_i
        else
                @time += 1
        end
        @time.to_s
end