Class: Improvements::ChangePlaybook

Inherits:
Improvement show all
Defined in:
app/models/improvements/change_playbook.rb

Overview

This improvement changes the hunters playbook

Constant Summary

Constants inherited from Improvement

Improvement::IMPROVEMENT_TYPES

Instance Attribute Summary

Attributes inherited from Improvement

#advanced, #created_at, #description, #id, #playbook_id, #rating, #stat_limit, #type, #updated_at

Instance Method Summary collapse

Methods inherited from Improvement

advanced_eligible?, policy_class

Methods inherited from ApplicationRecord

policy_class

Instance Method Details

#improvable_options(_hunter) ⇒ Object


37
38
39
40
41
# File 'app/models/improvements/change_playbook.rb', line 37

def improvable_options(_hunter)
  playbooks = Playbook.where.not(id: playbook_id)
                      .select(:id, :name, :description)
  { playbook: { data: playbooks, count: 1 } }
end