mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
18 lines
508 B
Ruby
18 lines
508 B
Ruby
module ValidatesTimeliness
|
|
module Generators
|
|
class InstallGenerator < Rails::Generators::Base
|
|
desc "Copy ValidatesTimeliness default files"
|
|
source_root File.expand_path('../templates', __FILE__)
|
|
class_option :template_engine
|
|
|
|
def copy_initializers
|
|
copy_file 'validates_timeliness.rb', 'config/initializers/validates_timeliness.rb'
|
|
end
|
|
|
|
def copy_locale_file
|
|
copy_file 'en.yml', 'config/locales/validates_timeliness.en.yml'
|
|
end
|
|
end
|
|
end
|
|
end
|