is there any difference between......

post[:title] and post.title?

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

Adam Stegman