Sha256: 2b010af23ecf16e0a85c3a1dd78e893b6b60b5d276fda761687816a6b6b87a9c

Contents?: true

Size: 343 Bytes

Versions: 8

Compression:

Stored size: 343 Bytes

Contents

require "rails/generators/base"

module Tokens
  class InstallGenerator < ::Rails::Generators::Base
    source_root File.dirname(__FILE__) + "/../../templates"

    def copy_migrations
      stamp = proc {|time| time.utc.strftime("%Y%m%d%H%M%S")}
      copy_file "tokens.rb", "db/migrate/#{stamp[Time.now]}_create_tokens.rb"
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
mongoid-tokens-1.0.0 lib/tokens/generator.rb
tokens-2.1.1 lib/tokens/generator.rb
tokens-2.1.0 lib/tokens/generator.rb
tokens-2.0.1 lib/tokens/generator.rb
tokens-2.0.0 lib/tokens/generator.rb
tokens-1.1.0 lib/tokens/generator.rb
tokens-1.0.0 lib/tokens/generator.rb
tokens-0.2.1 lib/tokens/generator.rb