Adding a div element in rails -
i having helper function as
def link_to_user(text, user, options = {}) options[:class] = options.has_key?(:class) ? "#{options[:class]} user-link" : "" content_tag :span, :class => :vcard link_to(text, user, options) + content_tag(:span, :style => "display: none;", :class => "userbox") content_tag(:span, :class => "fn") content_tag(:span, :class => "given-name") user.firstname end + content_tag(:span, :class => "family-name") #user.lastname end end end end
end
now trying add div element sibling vcard span. tried getting errors syntax error, unexpected '+', expecting kend (syntaxerror)
please give suggestions
have tried:
@content = content_tag :span, :class => :vcard link_to(text, user, options) + content_tag(:span, :style => "display: none;", :class => "userbox") content_tag(:span, :class => "fn") content_tag(:span, :class => "given-name") user.firstname end + content_tag(:span, :class => "family-name") #user.lastname end end end end @content << content_tag(:div, "etc")
Comments
Post a Comment