Is there any difference between

post[:title] and post.title?

On Thu, Sep 16, 2010 at 5:11 PM, Mauro [email protected] wrote:

post[:title] and post.title?

It allows you to access the attribute value without going through a
method. Not really a good idea most of the time, but it can be
like if you’re calling it from within the getter method itself.

Adam S.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs