10
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
["Here goes my custom message?"]
My question is -- how can I remove the brackets and the " so only the message is left. I'll insert it into the page using jquery.