I'm trying to show custom error messages without the attribute name in front. I used to do this with the custom_error_message gem, however it doesn't work with Rails 3.1

What I'm trying now in create.js.erb:

alert("<%= @post.errors[:title] %>")

Which returns

[&quot;Here goes my custom message?&quot;]

My question is -- how can I remove the brackets and the &quot so only the message is left. I'll insert it into the page using jquery.

Edit
Report