Sha256: 1affd4b9673a89e73f87b75387d7d7dd427c763538b0e4a5a1b3e9b1375eb99f
Contents?: true
Size: 554 Bytes
Versions: 27
Compression:
Stored size: 554 Bytes
Contents
module Blogit module CommentsHelper # Creates a div tag with class 'blog_comment_' + name # Eg: # blog_comment_tag(:email, "") # => <div class="blog_comment_email"></div> def blog_comment_tag(name, content_or_options = {}, options ={}, &block) if block_given? content = capture(&block) options = content_or_options else content = content_or_options end options[:class] = "#{options[:class]} blog_comment_#{name}".strip content_tag(name, content, options) end end end
Version data entries
27 entries across 27 versions & 1 rubygems