Class: ValidatorGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/rails/validator/validator_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_concernObject



4
5
6
# File 'lib/generators/rails/validator/validator_generator.rb', line 4

def create_concern
  template("validator.rb", File.join("app/validators/#{class_name.underscore}_validator.rb"))
end