Is it possible to use FormTagHelper from within Radius tags?
I’m trying to do something like this:
module CommentTags
include Radiant::Taggable
include ActionView::Helpers::FormTagHelper
tag “comment:text_field” do |tag|
attrs = tag.attr.symbolize_keys
text_field_tag(attrs[:name], attrs[:value]).inspect
end
end
Thanks…
Ryan H. wrote:
attrs = tag.attr.symbolize_keys
text_field_tag(attrs[:name], attrs[:value]).inspect
end
end
It’s possible to make this work, but you will need to study the
FormTagHelper module to see which methods and instance variables it
depends on. I did a similar thing on a search plugin for Ruby-Lang.org
to use the builtin text helpers.
–
John L.
http://wiseheartdesign.com