fixing instance loading with :singleton option - closes #310

This commit is contained in:
Ryan Bates
2011-03-18 09:42:30 -07:00
parent 3efa069349
commit 7688025404
2 changed files with 3 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ module CanCan
end
def member_action?
new_actions.include?(@params[:action].to_sym) || (@params[:id] && !collection_actions.include?(@params[:action].to_sym))
new_actions.include?(@params[:action].to_sym) || @options[:singleton] || (@params[:id] && !collection_actions.include?(@params[:action].to_sym))
end
# Returns the class used for this resource. This can be overriden by the :class option.