problem with rails console


I have now Rails Enterprise Edition installed on Centos 6.
And I try to follow this tutorial :

I have this model :
class Post < ActiveRecord::Base
attr_accessible :content, :name, :title

validates :name, :presence => true
validates :title, :presence => true,
:length => { :minimum => 5 }


But when I do these steps I get another output as expected.
rails console
Loading development environment (Rails 3.2.8)
irb(main):001:0> p = => “A new post”)
=> #<Post id: nil, name: nil, title: nil, content: “A new post”, created_at: nil, updated_at: nil>
(0.1ms) begin transaction
(0.1ms) rollback transaction
=> false
irb(main):003:0> p.errors.full.message
NoMethodError: undefined method `full’ for #ActiveModel::Errors:0x2deaf88
from (irb):3

Where I expect this output :

>> p = => "A new post")

=> #<Post id: nil, name: nil, title: nil,

``content: "A new post", created_at: nil,

``updated_at: nil>


=> false

>> p.errors.full_messages

`=> [“Name can’t be blank”, “Title can’t be blank”, “Title is too short (minimum is 5 characters)”]

Cam anyone tell me what I did wrong?



It’s just .full_messages not ``.full.messages
:slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile:

Thanks, stupid mistake at my site.