Module: Card::Action::Admin
- Included in:
- Card::Action
- Defined in:
- mod/history/lib/card/action/admin.rb
Overview
methods for administering card actions
Instance Method Summary collapse
Instance Method Details
#delete_cardless ⇒ Object
6 7 8 9 |
# File 'mod/history/lib/card/action/admin.rb', line 6 def delete_cardless left_join = "LEFT JOIN cards ON card_actions.card_id = cards.id" joins(left_join).where("cards.id IS NULL").delete_all end |
#delete_changeless ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'mod/history/lib/card/action/admin.rb', line 13 def delete_changeless joins( "LEFT JOIN card_changes "\ "ON card_changes.card_action_id = card_actions.id" ).where( "card_changes.id IS NULL" ).delete_all end |