simple_form with store attribute ?

99 views
Skip to first unread message

erwin

unread,
May 26, 2012, 9:48:50 AM5/26/12
to SimpleForm
I have a model Blog with settings as store attributes


class Blog < ActiveRecord::Base
store :settings, accessors:
[ :blog_name, :blog_subtitle, :lang, ...

migrated as :
create_table :blogs do |t|
t.text :settings

is it possible to set up a simple_form to update these attributes or
should i use the standard form_tag ?

the standard way doesn't accept @blog.settings...
= simple_form_for @blog, :url => backoffice_blog_path, :html =>
{ :method => "put", :class => 'form-vertical'} do |f|


thanks for feedback and suggestions


erwin

unread,
May 26, 2012, 9:55:20 AM5/26/12
to SimpleForm
sorry .. mea culpa ! , I could not display the :name field in the
simple_form , because the actual field is :blog_name !!!!
so easy when you re-read your table field list ; -)))
Reply all
Reply to author
Forward
0 new messages