Sha256: b2a736213744e5dca800d771c997400fa7161e17d291280643d6252d6682f879
Contents?: true
Size: 554 Bytes
Versions: 8
Compression:
Stored size: 554 Bytes
Contents
module ActsAsUser module Generators module OrmHelpers def model_exists? File.exists?(File.join(destination_root, model_path)) end def migration_exists?(table_name) Dir.glob("#{File.join(destination_root, migration_path)}/[0-9]*_*.rb").grep(/\d+_add_acts_as_user_to_#{table_name}.rb$/).first end def migration_path @migration_path ||= File.join("db", "migrate") end def model_path @model_path ||= File.join("app", "models", "#{file_path}.rb") end end end end
Version data entries
8 entries across 8 versions & 1 rubygems