Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

Commit

Permalink
more explicit conversion of parameters into arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Apr 1, 2008
1 parent dedee01 commit 2355162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Support/tmvc/lib/application_controller.rb
Expand Up @@ -38,11 +38,11 @@ def layout_for_action(action)

layouts_conditions.each do |layout, condition|
if condition[:except]
next if condition[:except].map{|c| c.to_s}.include?(action.to_s)
next if [condition[:only]].flatten.map{|c| c.to_s}.include?(action.to_s)
end

if condition[:only]
next unless condition[:only].map{|c| c.to_s}.include?(action.to_s)
next unless [condition[:only]].flatten.map{|c| c.to_s}.include?(action.to_s)
end

return layout
Expand Down

0 comments on commit 2355162

Please sign in to comment.