Class: ActionController::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/guerrilla_rotate.rb

Class Method Summary collapse

Class Method Details

.guerrilla_rotate(*actions) ⇒ Object Also known as: guerilla_rotate



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/guerrilla_rotate.rb', line 5

def guerrilla_rotate( *actions )
  @@guerrilla_paths = {}
  actions.each do |a|
    catch (:next_path) do
      view_paths.each do |vp|
        Dir.chdir(vp) do
          gpath = _gr_gpath(controller_name, a)
          guerrilla_paths[gpath] = Dir.glob(gpath + '*') and
            throw :next_path
        end
      end
    end
  end
end