On Tue, Oct 20, 2009 at 3:40 AM, Francesco Belladonna
<[email protected]> wrote:
>
> Hi Rails community, here is my newbie problem (I'm migrating from PHP to
> ruby due to framework and ruby syntax, but I'm having some problems with
> "freedom" that a single php page offers):
>
> I'm using the scaffolding technique (yea, I love it) to create a
> webpage, but if I specify that a field type is :date, Rails auto
> generate a form where the field of type :date is created through 3
> fields: day, month and year.
>
> I would like to use only one field (always) (will be something that I'll
> use for all :date field-type), a text field, where the date will be
> written in dd/mm/YY format, how can I do this without writing something
> in javascript that "set some hidden fields" (month and year) when you
> write in the text field?
How would you do that on PHP?

>
> Are there a "general" way (as I've said, I'll use this always instead of
> normal way of setting dates)?

Scaffold will generate the form, but you can modify it as you please.
Change the form and make sure the parameters are OK in the controller
(yes, with tests)

Hope it helps.

-- 
Leonardo Mateo.
There's no place like ~

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to