Topic: Is this a method call?
Hi, I was reading ROR tutorial and can't figure out this piece of code:
class Post < ActiveRecord::Base
validates :name, :presence => true
validates :title, :presence => true,
:length => { :minimum => 5}
endI understand class declaration, inheritance, but "validates" is what's bugging me. I know what it is supposed to do inside rails but what is it? Is it a method call? Why isn't it inside another method? How it works and what's passed as argument to it?
Thanks ![]()
Last edited by dabrorius (2011-01-02 21:07:32)