Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Noitificaton
- FIRST_NOTIFICATION_TEXT = "Welcome to Import Xperts! Let's get started now"
- def self.create_for_new_user(user, link_href)
- text = "<a href='#{link_href}'>#{FIRST_NOTIFICATION_TEXT} </a>"
- create(user: user, text: text, notif_type: 'text-success')
- end
- end
- class OauthController
- after_action { Notification.create_for_new_user(current_user, some_link) if current_user }
- def create
- super
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement