Hallo..

ich bekomme das Datumsfeld einfach nicht angezeigt..
alles andere schon..

gem 'rails', '3.0.7'
gem "mongoid", "~> 2.0.0"
gem "bson_ext", "~> 1.3"

class Article
  include Mongoid::Document
  field :name
  field :content
  field :birthday, :type => Date
  field :online, :type => Boolean
end

<div class="field">
    <%=f.date_select :birthday %>
  </div>

Console:
  Parameters: {"utf8"=>"✓", 
"authenticity_token"=>"Yg+Yw+O+tTtfJ9cvNUT7G8NeOQzCo+Lz9RL+SH9utFw=", 
"article"=>{"name"=>"Mein Artikel", "birthday(3i)"=>"4", "birthday(2i)"=>"5", 
"birthday(1i)"=>"2011", "online"=>"1", "content"=>"testinhalt"}, 
"commit"=>"Create Article"}
MONGODB mongoid_development['articles'].insert([{"name"=>"Mein Artikel", 
"birthday(3i)"=>"4", "birthday(2i)"=>"5", "birthday(1i)"=>"2011", 
"online"=>true, "content"=>"testinhalt", 
"_id"=>BSON::ObjectId('4dc13f3824fff80d43000007')}])
Redirected to http://0.0.0.0:3000/articles/4dc13f3824fff80d43000007

<%= @article.birthday.inspect%> => nil

Jemand eine Idee was da schiefläuft?

Gruß

Werner Laude
http://www.webagentur-laude.de





_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an