Cross Reference: tag_helper.rb
xref
: /
ontohub
/
app
/
helpers
/
tag_helper.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
module
TagHelper
def
fancy_tag
(
resource
,
tags
)
result
=
""
first
=
true
tags.each
do
|
tag
|
if
(
eval
"resource."
+
tag.to
_s
)
if
block_given
?
result
+=
first
?
tag.to
_s
:
(
yield
tag.to
_s
)
else
result
+=
first
?
tag.to
_s
:
' '
+
tag.to
_s
end
first
=
false
end
end
result
#if block_given?
# yield
#else
# name = resource
#end
end
end