Validation doesnt work :(

I have problem…
i have scaffold question with text field named Q… i have model
answer with question_id and answer fields.
i have relations -> question has_many :answers, answer ->
belongs_to :question… Ok…
I validate question ->
validates_presence_of :q … everything works…I can leave question
field empty, perfect!
ok next setup… i need to answer on this question… so i create
controller answer (for user where they see only question and answer
text_area field)…
then i create form, everything ok… BUT, i validate answer (in model i
write -> validates_presence_of :answer), but nothing…nothing
changed… i can leave an empty field!:frowning:
What do i did wrong?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs