0.01
No commit activity in last 3 years
No release in over 3 years
Generate jCheck code according to ActiveModel validations
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.0.2
 Project Readme

jCheck Rails

jCheck Rails provide a ease way to generate jCheck code
to validate forms according to ActiveModel record validations.

Installation

Just configure your Gemfile with

gem 'jcheck_rails'

Basic Usage

You can easily download latest version of jcheck using the provided rake task:

rake jcheck:setup

This will download latest version of jcheck and will extract in correct directories for you. Them you just need to include files in your view layout.

With the library included, on your form views add the following:

<%= jcheck_for resource %>

Replace resource with the instance variable of the resource for form e.g. @user. This will
use reflection, to detect the model validations and will convert these to jCheck.

It’s highly recommended that you read the jCheck documentation at
http://jcheck.net/documentation for a full
overview on jCheck.

TODO

  • Get messages from i18n and append automatically

Change Log

0.5.0

  • Don’t create validations for unavailable ones (like uniqueness validator)
  • Generating field labels from Rails i18n
  • Able to filter attributes to be reflected

0.2.0

  • Added rake task for setup

0.1.1

  • Initial Release

Maintainers

License

Copyright 2010 Wilker Lucio.

Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.