problem date_select with active_form

Aldo Italo
Wed, 16 Sep 2009 20:07:12 -0000

hi,
i have a problem with date_select and and active_form plugin

example:


view:
form_for( "contact", :url => { :action =>
"form_contact" } ) do |f|
  .... other code ....
  f.date_select :period, :order => [:day, :month, :year]
  .... other code ....
end


model:
class FormContact < ActiveForm
  attr_accessor :name, :surname, :period, ......
  ... validations
end


control:
def form_contact
  @contact = FormContact.new(params[:contact])
  respond_to do |format|
    if @contact.valid?
    ..........
    end
  end
end



when i submit the for wen is present the date_select i retrive an error
controller like this:

`@period(3i)'' is not allowed as an instance variable name


why?