VladikOtez

make_current method

Jun 2nd, 2017
632
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def make_current!
  2.     @decks = Deck.where(current: true) #AR::Relation ??
  3.     @decks.map! {|deck| deck.current = false}
  4.     self.current = true
  5.     save
  6.   end
RAW Paste Data