end
module ClassMethods
+ def colum_structures
+ raise
+ end
+
def list_opt_for_panel
{}
end
false
end
+ def has_helper? column_name
+ self.class.colum_structures[column_name] and self.class.colum_structures[column_name][:helper]
+ end
+
def new_parent
@new_parent
end
end
end
+ def form_helper_template(colum_name)
+ self.class.colum_structures[colum_name][:helper]
+ end
+
def tag_attributes column = nil, opt = {}
{
:id => self.field_tag_id(column), :panel_id => self.tag_panel_id,
r.merge(opt)
end
+ def select_tag_attributes(selected, column, no_attr)
+ [
+ :last, :first,
+ {:html => {:selected => selected}},
+ self.field_tag_attributes(column, no_attr)
+ ]
+ end
+
def tag_attr column = nil, opt = {}
self.tag_attributes(column, opt).to_attr
end