Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

what is touch in rails

In rails touch is used to update the updated_at field for 
persisted objects. But if we pass other attributes as arguments,
it will update those fields too along with updated_at.
Even it will update non-date-time fields 
if passed as arguments.
 
PREVIOUS NEXT
Tagged: #touch #rails
ADD COMMENT
Topic
Name
3+4 =