Hi
All,
I
stumbled upon this bug, when i was trying to write my own sidebar
plugin.
Whenever i try to add or remove items to sidebar by dragging the stuff to
the active region, i get error:
NoMethodError (You
have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.inject):
/app/controllers/admin/sidebar_controller.rb:26:in `set_active'
/vendor/rails/actionpack/lib/action_controller/base.rb:910:in `perform_action_without_filters'
You might have expected an instance of Array.
The error occured while evaluating nil.inject):
/app/controllers/admin/sidebar_controller.rb:26:in `set_active'
/vendor/rails/actionpack/lib/action_controller/base.rb:910:in `perform_action_without_filters'
And the problem is with the line:
activemap = flash[:sidebars].inject({}) do |h,
sb_id|
sb = Sidebar.find(sb_id.to_i)
sb ? h.merge({ sb.html_id => sb_id }) : h
end
sb = Sidebar.find(sb_id.to_i)
sb ? h.merge({ sb.html_id => sb_id }) : h
end
while we assign the active plugins to flash[:sidebars] in index
action, but they are replaced or lost in set_active method and hence the
bug.
It may be something to do with the way mongrel handles sessions
alos, but may be.
It looks a bug to me, right now.
_______________________________________________ Typo-list mailing list [email protected] http://rubyforge.org/mailman/listinfo/typo-list
