Changeset 322

Show
Ignore:
Timestamp:
03/30/06 08:47:40 (3 years ago)
Author:
snowblink
Message:

Ticket #81 link_if_authorized lets 'wrap_in' option into link attributes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • user_engine/branches/rb_1.0/lib/user_engine.rb

    r280 r322  
    157157     
    158158    (block.nil? || (yield block)) && authorized?(auth_options) { 
     159      wrap_tag = html_options.delete(:wrap_in) 
    159160      #result = link_to_with_current_styling(name, options, html_options, *params) 
    160161      result = link_to(name, options, html_options, *params) 
     
    162163      # TODO: won't this pass other things like html_options[:id], which is EVIL since two 
    163164      # things shouldn't share the same ID. 
    164       wrap_tag = html_options.delete(:wrap_in) 
    165165      result = content_tag(wrap_tag, result, html_options) if wrap_tag != nil 
    166166    }