Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UsersController
- def notifiers
- @user = User.find(params[:id])
- %w(morning afternoon evening).each do |timeframe|
- @user.build_notifier(:timeframe => timeframe) unless @user.notifiers.find_by_timeframe(timeframe)
- end
- end
- end
Add Comment
Please, Sign In to add comment