Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Changing [].flatten to array wrapper method #977

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/cancan/controller_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ def instance_name
end

def collection_actions
[:index] + [@options[:collection]].flatten
[:index] + Array(@options[:collection])
end

def new_actions
[:new, :create] + [@options[:new]].flatten
[:new, :create] + Array(@options[:new])
end

private
Expand Down