Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get_balance(user_id, user_state = nil)
- if user_state.blank?
- Balance.where(:user_id => user_id, :user_state => user_state)
- else
- Balance.where(:user_id => user_id)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement