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

Defined in:
lib/rails3_artifactor/artifact/file_name/view.rb

Defined Under Namespace

Modules: ActionAndHash, TwoLabels

Class Method Summary collapse

Class Method Details

.get_view_args(*args) ⇒ Object



123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/rails3_artifactor/artifact/file_name/view.rb', line 123

def self.get_view_args *args
  args = args.flatten
  arg2 = args[1]
  res = case arg2
  when String, Symbol
    # view_file(:person, :show).should == /views\/person\/show\.html\.erb/
    # view_file('person/admin', :show, :type => :erb).should == /views\/person\/show\.html\.erb/
    TwoLabels.get_view_args args
  when Hash
    # view_file(:show, :folder => 'person', :type => :erb).should == /views\/person\/show\.html\.erb/
    ActionAndHash.get_view_args args
  end        
end