Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def make_current!
- @decks = Deck.where(current: true) #AR::Relation ??
- @decks.map! {|deck| deck.current = false}
- self.current = true
- save
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement