Bugs: Browse | Submit New | Admin

[#22715] Redefinition of sum can cause problems with rails 2.x.y project

Date:
2008-11-07 20:07
Priority:
3
Submitted By:
Chick Markley (chickmarkley)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Redefinition of sum can cause problems with rails 2.x.y project

Detailed description
I included Classifier in a rails project that also uses the Comatose plugin.
While trying to do a rake db:migrate the initializer for Comatose calls layout_list defined in ActionController.
#layout_list
uses a rails extension to array which defines a sum method with an argument.
Unfortunately for me overrides sum back to a function that does not have
an argument

From: ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/layout.rb
    188       def layout_list #:nodoc:
    189         Array(view_paths).sum([]) { |path| Dir["#{path}/layouts/**/*"] }
    190       end
    191 

I don't know what the right thing to do here is (maybe define a classifier_sum) but it took me a while to figure out
what was happening so I thought I would pass it on.  Otherwise classifier was great.
Cheers

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item