mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fixed minor errors
This commit is contained in:
parent
492f60672c
commit
ffaefe2681
1 changed files with 4 additions and 3 deletions
|
@ -484,7 +484,7 @@ The +:allow_blank+ option is similar to the +:allow_nil+ option. This option wil
|
||||||
|
|
||||||
<ruby>
|
<ruby>
|
||||||
class Topic < ActiveRecord::Base
|
class Topic < ActiveRecord::Base
|
||||||
validates :title, :length => { :is => 5, :allow_blank => true }
|
validates :title, :length => { :is => 5 }, :allow_blank => true
|
||||||
end
|
end
|
||||||
|
|
||||||
Topic.create("title" => "").valid? # => true
|
Topic.create("title" => "").valid? # => true
|
||||||
|
@ -762,12 +762,13 @@ $ rails plugin install git://github.com/joelmoss/dynamic_form.git
|
||||||
</shell>
|
</shell>
|
||||||
|
|
||||||
h4. Installing as a Gem
|
h4. Installing as a Gem
|
||||||
|
|
||||||
Add this line in your Gemfile:
|
Add this line in your Gemfile:
|
||||||
<ruby>
|
<ruby>
|
||||||
gem "dynamic_form"
|
gem "dynamic_form"
|
||||||
</ruby>
|
</ruby>
|
||||||
|
|
||||||
Now you will have access to these two methods in your view templates:
|
Now you will have access to these two methods in your view templates.
|
||||||
|
|
||||||
h4. +error_messages+ and +error_messages_for+
|
h4. +error_messages+ and +error_messages_for+
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue