Thank you for your response, but this does not do the trick:
padrino-gen project sample_blog -t shoulda -e haml -c sass -s jquery -
d activerecord -b
cd sample_blog
padrino-gen admin
padrino rake ar:create
padrino rake ar:migrate
padrino rake seed
padrino-gen model post title:string body:text
padrino-gen model comment post_id:integer body:text
padrino rake ar:migrate
padrino-gen admin_page post
padrino-gen admin_page comment
# app/models/comment.rb
class Comment < ActiveRecord::Base
belongs_to :post
end
#app/models/post.rb
class Post < ActiveRecord::Base
has_many :comments
end
-#admin/views/comments/_form.haml
.group
=f.label :post_id
=f.error_message_on :post_id
-# =f.text_field :post_id, :class => :text_field
=f.select :post_id, :collection => Post.all
%span.description Ex: a simple text
.group
=f.label :body
=f.error_message_on :body
=f.text_area :body, :class => :text_area
%span.description Ex: a simple text
.group.navform.wat-cf
=f.submit pat(:save), :class => :button
=f.submit pat(:cancel), :onclick =>
"window.location='#{url(:comments, :index)}';return false", :class
=> :button
=f.select :post_id, :collection => Post.all