[Rails] How can I access the value of params[:tags] in my validate
function?
softwareengineer 99
softwareengineer99 at yahoo.com
Mon Feb 13 18:34:31 GMT 2006
I would like to have tags mandatory in my app.
The following keeps giving me error that params is nill.
def validate()
if (@params[:tags])
errors.add(@params[:tags], ":tags must be entered ")
end
end
Why cannot I access params in my model class?
The field for tags is called "tags"
How else can I add an error using errors.add?
I finally got to use flash[:notice] in my controller but I'm sure there is a better way to do this.
Many thanks to the member of this great list for their assistance.
Frank
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060213/2974db17/attachment.html
More information about the Rails
mailing list