Changeset 193

Show
Ignore:
Timestamp:
12/31/05 08:04:34 (3 years ago)
Author:
lazyatom
Message:

Fixed accidental modification of options hash in link_if_authorized - Ticket #46

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • user_engine/trunk/lib/user_engine.rb

    r149 r193  
    152152    # actually generating the link. 
    153153    auth_options = options.dup 
    154     auth_options[:controller].gsub!(/^\//, '') if auth_options[:controller] 
     154    if auth_options[:controller] 
     155      auth_options[:controller] = auth_options[:controller].gsub(/^\//, '') 
     156    end 
    155157     
    156158    (block.nil? || (yield block)) && authorized?(auth_options) {