Module: LinkBlock::ViewHelpers
- Defined in:
- lib/link_block/view_helpers.rb
Defined Under Namespace
Classes: LinkBlockBuilder
Instance Method Summary collapse
Instance Method Details
#link_block(*args) {|LinkBlockBuilder.new(self, :url_options => url_options, :html_options => html_options)| ... } ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/link_block/view_helpers.rb', line 40 def link_block(*args, &block) = args.first = args.second || {} if and .class != Hash raise 'link_block requires html_options to be a Hash' end if .class != Hash and .class != String raise 'link_block requires url_options to be Hash or String -- and for your sake it really should be a Hash :-)' end yield LinkBlockBuilder.new(self, :url_options => , :html_options => ) end |