Module: Rails3::Assist::Artifact::View::TwoArgs::TwoLabels

Extended by:
FileName::Helper
Defined in:
lib/rails3_artifactor/artifact/file_name/view.rb

Class Method Summary collapse

Methods included from FileName::Helper

default_template_lang, filename_name, filename_type, get_type, get_view_type

Class Method Details

.get_view_args(*args) ⇒ Object

view_file(:person, :show).should == /views/person/show.html.erb/ view_file(‘person/admin’, :show, :type => :erb).should == /views/person/show.html.erb/



142
143
144
145
146
147
148
149
# File 'lib/rails3_artifactor/artifact/file_name/view.rb', line 142

def self.get_view_args *args
  args = args.flatten 
  folder = args.first.to_s
  action = args[1].to_s
  hash = args[2] if args.size > 2          
  type = get_view_type(hash ? hash[:type] : nil)
  [folder, action, type]
end