Topic: Attributes of a Table

Hi,
i'm quite beginner on Ruby On Rails.
I would ask about Attributes of a Table.
so,... assume i have User-table that has many Attributes, such as name, email, password, address, birth date.
But for signing up, i just need name, email and password.
How can i say, if address and birth date aren't mandatory. So, those two attributes can be filled out later after signing up.
I really need help. Thanks before.

Re: Attributes of a Table

See the excellent tutorial by Michael Hartl: http://ruby.railstutorial.org/ruby-on-r … orial-book to start.
If an attribute is not mandatory, your form will be submitted without problems, they shall be just empty.
One more source to start is Rials Guides where you will all you need about migrations, validations, routes, etc.
Hope this helps.

Re: Attributes of a Table

Thanks for answering smile
anyway, i tried a sign-up page, but i got this error :
"Can't mass-assign protected attributes: password_confirmation"
maybe anyone knows what i should do with that?

Re: Attributes of a Table

Another question...

i tried to set the default of date. By date, the default is +- 5 years.
But, i want to start the year from 1940 for example.

i write down in file.rb :
validates :birth_date, :start_year => Time.now.year - 85

i got error :
Unknown validator: 'StartYearValidator'

my question, how to set start year of date type properly?
i really appreciate your help.
Thanks before

Re: Attributes of a Table

can anyone help me? sad