Module: RailsAssist::Artifact::View::TwoArgs

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

Defined Under Namespace

Modules: ActionAndHash, TwoLabels

Class Method Summary collapse

Class Method Details

.get_view_args(*args) ⇒ Object



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

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