ハッシュをシリアル化してアプリケーションのデフォルト・チェックリストを作成しようとしています。私は私のビューに私のsetup_checklistハッシュの情報を引き出す方法を知らない。どんな助けもありがとうございます。ここでシリアライズされたハッシュ・レールの表示
は私のユーザモデルが私のview.html.erb
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :confirmable
serialize :checklist, Hash
before_create :setup_checklist
private
def setup_checklist
self.checklist = {
"Organize Your Finances" => false,
"Approval Letter" => false,
"Get a Real Estate Agent and look for houses" => false,
"Find lawyer" => false,
"Get the mortgage" => false,
"Apprisal and inspection" => false,
"Close the deal" => false
}
end
end
ある
<%= form_for :checklist do |f| %>
<%= f.check_box :checklist %>
<% end %>
私は似ても似つかないですが、右方向への操舵が大きな