Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

delegate method doesn't allow false for option :prefix

#5375

I don't know if it is a bug, but i had a small headache therefor ^^

class User < ActiveRecord::Base  
   belongs_to :customer  
end  

class Customer < ActiveRecord::Base  
   has_one :user

   delegate :name, :to => :user, :prefix => nil
end

works but

   delegate :name, :to => :user, :prefix => false

doesn't

Edit: I'm using Rails3 RC / Ruby 1.9.2-head

Reported by de_jonas · August 13th, 2010 @ 02:26 PM

State: resolved
Milestone: 3.x
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. de_jonas
    de_jonas
    • Tag set to delegate method, rails3, rails3rc

    August 13th, 2010 @ 02:27 PM

  2. Neeraj Singh
    Neeraj Singh
    • Milestone set to 3.x
    • State changed from new to open
    • Assigned user set to José Valim
    • Tag changed from delegate method, rails3, rails3rc to delegate method, patch, rails3, rails3rc
    • Importance changed from to Low

    Attached is a patch with test.

    August 18th, 2010 @ 06:46 PM

  3. Repository
    Repository
    • State changed from open to resolved

    September 1st, 2010 @ 09:15 AM

  4. Repository