title: Datamapper validation errors show with brackets around them
body: <p>I've gotten Datamapper validations to work in Sinatra, however when trying to display them with <strong>flash[:error]</strong> I keep getting errors that are surrounded by brackets and quotes.</p>
  
  <p>Ex: ["Email is already taken"]</p>
  
  <pre><code>%w{sinatra haml data_mapper bcrypt sinatra/flash}.each { |gem| require gem }
  
  DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3://#{Dir.pwd}/development.db")
  
  class User
     include DataMapper::Resource
     property :id,             Serial
     property :email,          String, :length =&gt; 255, :unique =&gt; true
     property :password,       String, :length =&gt; 255
     property :password_salt,  String, :length =&gt; 255
     attr_accessor :password, :password_confirmation
  
     validates_format_of :email, :as =&gt; :email_address
     validates_confirmation_of :password
  end
  
  enable :sessions
  
  get '/signup' do
    haml :signup
  end
  
  post '/signup' do
  @user = User.new(:email =&gt; params[:email], :password =&gt; params[:password], 
                 :password_confirmation =&gt; params[:password_confirmation],
                 :password_salt =&gt; BCrypt::Engine.generate_salt)
   if @user.save
     redirect '/'
   else
     flash[:error] = @user.errors.full_messages # here is the problem (I think)
     redirect '/signup'
   end
  end
  
  DataMapper.auto_upgrade!
  </code></pre>
  
  <p>And signup.haml</p>
  
  <pre><code>%h1 Sign up here!
  
    - if flash[:error]
    %p= flash[:error] ## Shortened for brevity (didn't include forms)
  </code></pre>
  
  <p>I have literally tried everything, flatten, to_s, etc on @user.errors.full_messages, but nothing seems to get rid of the brackets and quotes.</p>
  
  <p>Is this actually problem with the gem sinatra-flash?</p>