Hello
I have a controller where I`m implementing a batch/bulk create action
so I can create bulks of items to a model.
The controller have a create_range function where the form sends params
like this:
params[:range_count_from]
params[:range_count_to]
params[:range_pre_text]
params[:range_post_text]
Is there a simple way to add ActiveRecord kind of validation on them?
For instance the text_field for range_count_from, would like to
validate as a positive Integer.
what is the DRY`est way of doing this.. I would like to have as few If
<statements> as possible..
What is the Rails way of doing this? Should it be handled in controller
or model?
/MartOn
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---