Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

wilkerlucio

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .bundle
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 tasks
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.textile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 init.rb
Octocat-spinner-32 jcheck_rails.gemspec
README.textile

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.

Something went wrong with that request. Please try again.