Module: MovesHelper

Defined in:
app/helpers/moves_helper.rb

Overview

Moves Helper

Instance Method Summary collapse

Instance Method Details


5
6
7
# File 'app/helpers/moves_helper.rb', line 5

def link_to_move(move)
  link_to move.name, move_path(move)
end

#move_source(move) ⇒ Object


9
10
11
12
13
14
15
16
17
18
# File 'app/helpers/moves_helper.rb', line 9

def move_source(move)
  case
  when move.haven?
    'Haven'
  when move.is_a?(Moves::Basic)
    'Basic'
  when move.playbook
    link_to_playbook(move)
  end
end