In Rails3 Active Model feature is added that helps to use feature of active record class for a non active record class.In Active Model you can make Any Ruby Object Feel Like Active Record and can get Rails-style models with validations, serialization, callbacks, dirty tracking, internationalization, attributes, observers and all the other Rails goodness.
@message=Message.new({:name=>"rays",:email=>'[email protected]',:text_message=>"this my text message"})@message.valid?=>true@message=Message.new({:name=>"rays",:text_message=>"this my text message"})@message.valid?=>false@message.errorswillgiveerror"Email can't be blank"