No commit activity in last 3 years
No release in over 3 years
Rails 3 generator plugin that generates validator's skeleton files.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
>= 3.0.0

Runtime

>= 3.0.0
 Project Readme

ValidatorGenerator

Rails3でカスタムvalidatorのスケルトンファイルを生成するプラグイン

Requirements

  • Rails >= 3.0.0

installation

In your Gemfile, add this line

gem 'validator_generator'

Then run bundle

$ bundle

Features

  • generates validator

カスタムvalidatorクラスのスケルトンファイルを作成する

$ rails g validator Email
      create  app/validators/email_validator.rb
      invoke  test_unit
      create    test/unit/email_validator_test.rb

$ cat app/validators/email_validator.rb 
class EmailValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
  end
end

Copyright (c) 2011 Kosuke Matsuda, released under the MIT license