Class: Improvements::AnotherMove
- Inherits:
-
Improvement
- Object
- ActiveRecord::Base
- ApplicationRecord
- Improvement
- Improvements::AnotherMove
- Defined in:
- app/models/improvements/another_move.rb
Overview
This is for Improvements like “Take a move from another 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
Instance Method Details
#improvable_options(hunter) ⇒ Object
37 38 39 40 41 42 |
# File 'app/models/improvements/another_move.rb', line 37 def (hunter) moves = Move.where.not(id: hunter.moves.select(:id)) .where.not(playbook_id: playbook_id) .select(:id, :name, :description) { move: { data: moves, count: 1 } } end |