Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: Fix examples in Modified & Custom Inputs #587

Merged
merged 2 commits into from
Jun 2, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ To create your own new types of inputs based on existing inputs, the process is

<pre>
# f.input(:body, :as => :flexible_text)
class FlexibleTextInput < Formtastic::Inputs::StringTextInput
class FlexibleTextInput < Formtastic::Inputs::StringInput
def input_html_options
super.merge(:class => "flexible-text-area")
end
Expand All @@ -593,9 +593,10 @@ To create your own new types of inputs from scratch:

<pre>
# f.input(:created_at, :as => :date_picker)
class DatePicker
def input_html_options
super.merge(:class => "date-picker")
class DatePickerInput
include Formtastic::Inputs::Base
def to_html
# ...
end
end
</pre>
Expand Down