Permalink
Browse files

update readme

  • Loading branch information...
1 parent f35fa3b commit 71f8a2240e4d8275aca88fd48504835a2ccd27ce @activestylus committed Mar 14, 2011
Showing with 20 additions and 19 deletions.
  1. +17 −17 README.markdown
  2. +3 −2 padrino-fields.gemspec
View
34 README.markdown
@@ -49,14 +49,28 @@ Disable labels, hints or errors:
= f.input :username, :caption => false
= f.input :password, :hint => false
- = f.input :email, :disabled => true
+ = f.input :email, :disabled => true
Pass html attribute straight to the input:
- = f.input :username, :input_html => { :class => 'special' }
- = f.input :password, :input_html => { :maxlength => 20 }
+ = f.input :username, :input_html => { :class => 'special' }
+ = f.input :password, :input_html => { :maxlength => 20 }
= f.input :remember_me, :input_html => { :value => '1' }
+### Options / Collections
+
+Options can be arrays or ranges, and when a **:options** is given the **:select** input will be rendered by default, so we don't need to pass the **:as => :select** option.
+
+ = f.input :user, :options => User.all.map(&:name)
+
+Use ranges as options for your select tags
+
+ = f.input :year, :options => (1950..Time.now.year)
+
+Options may also be rendered as **:radios** and **:checks**
+
+ = f.input :user, :options => User.all.map(&:name), :as => :radios
+
### Available Inputs
Mapping | Input | Column Type
@@ -94,20 +108,6 @@ You can also do it manually with the **:required** option
= f.input :email, :required => true
-### Options / Collections
-
-Options can be arrays or ranges, and when a **:options** is given the **:select** input will be rendered by default, so we don't need to pass the **:as => :select** option.
-
- = f.input :user, :options => User.all.map(&:name)
-
-Use ranges as options for your select tags
-
- = f.input :year, :options => (1950..Time.now.year)
-
-Options may also be rendered as **:radios** and **:checks**
-
- = f.input :user, :options => User.all.map(&:name), :as => :radios
-
### Settings
You can override a few default settings by creating a lib file as follows:
View
5 padrino-fields.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{padrino-fields}
- s.version = "0.1.0"
+ s.version = "0.2.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Steven Garcia"]
- s.date = %q{2011-03-13}
+ s.date = %q{2011-03-14}
s.description = %q{Smart fields for your forms, similar to Formtastic or SimpleForm}
s.email = %q{stevendgarcia@gmail.com}
s.extra_rdoc_files = [
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
"lib/padrino-fields/orms/datamapper.rb",
"lib/padrino-fields/settings.rb",
"load_paths.rb",
+ "padrino-fields.gemspec",
"test/.DS_Store",
"test/fixtures/datamapper/app.rb",
"test/fixtures/datamapper/views/capture_concat.erb",

0 comments on commit 71f8a22

Please sign in to comment.