).html_safe
end
def field_date_time(tag)
default_tag_field(tag, :content_field_method => :datetime_field_tag)
end
def field_integer(tag)
default_tag_field(tag, :content_field_method => :number_field_tag)
end
def field_string(tag)
default_tag_field(tag)
end
def field_text(tag)
default_tag_field(tag, :content_field_method => :text_area_tag)
end
def page_date_time(tag)
default_tag_field(tag, :content_field_method => :datetime_field_tag)
end
def page_integer(tag)
default_tag_field(tag, :content_field_method => :number_field_tag)
end
def page_string(tag)
default_tag_field(tag)
end
def page_text(tag)
default_tag_field(tag, :content_field_method => :text_area_tag)
end
def page_rich_text(tag)
default_tag_field(tag, :content_field_method => :text_area_tag)
end
# Capturing all calls of cms_tag_* type. For those we'll try to render
# a form element. Everything else can trigger MethodNotFound error.
def method_missing(method_name, *args)
if m = method_name.to_s.match(/^cms_tag_(\w+)$/)
send(m[1], *args) if respond_to?(m[1])
else
super
end
end
end