Module: Rails3::Assist::Artifact::View::TwoArgs::ActionAndHash

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(:show, :folder => ‘person’, :type => :erb).should == /views/person/show.html.erb/



156
157
158
159
160
161
162
163
164
165
# File 'lib/rails3_artifactor/artifact/file_name/view.rb', line 156

def self.get_view_args *args
  args = args.flatten 
  action = args.first.to_s

  hash = args.last
  folder = hash[:folder]
  type = get_view_type(hash[:type])
  
  [folder, action, type]
end