This project is archived and is in readonly mode.
delegate method doesn't allow false for option :prefix
Reported by de_jonas | August 13th, 2010 @ 02:26 PM | in 3.x
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
Comments and changes to this ticket
-
de_jonas August 13th, 2010 @ 02:27 PM
- Tag set to delegate method, rails3, rails3rc
-
Neeraj Singh August 18th, 2010 @ 06:46 PM
- 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.
-
Repository September 1st, 2010 @ 09:15 AM
- State changed from open to resolved
(from [d1eb9ff8b1a1f9ea08650f1b7048ce6e232812ba]) delegate method should treat :prefix => false same as :prefix => nil
[#5375 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/d1eb9ff8b1a1f9ea08650f1b7048ce... -
Repository September 1st, 2010 @ 09:15 AM
(from [cacb44874fd5dad608268325b00b4c0058950420]) delegate method should treat :prefix => false same as :prefix => nil
[#5375 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/cacb44874fd5dad608268325b00b4c...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 5375 delegate method doesn't allow false for option :prefix [#5375 state:resolved]
- 5375 delegate method doesn't allow false for option :prefix [#5375 state:resolved]