Posted in In-App Navbar Notifications Discussion
- "John D started following you"
- "Jane D sent you a friend request"
I did a quick test and added a `notification_to_s` method to my `Follow` and `FriendRequest` models like so:
# follow.rb def notification_to_s "following you" end
# friend_request.rb def notification_to_s "you a friend request" end
And then adapted the jbuilder method like this:
# index.json.jbuilder # ... json.notifiable do json.type notification.notifiable.notification_to_s end
This doesn't seem as dynamic as your example. Can you think of a better way to do this?
Any ideas on how to go about this without Jquery and/or jQuery file upload?
I was able to fixe Rails.ajax by updating my gemfile to run Rails 5.1 or above and by requiring rails-ujs in application.js
Hi Chris. First of all, thanks for putting this out, GoRails has been a great resource to implement new features and learn.
I've got a file in my model that gets upload with Shrine to S3 (works perfectly) and I was wondering how can I attach that file when sending email with a Mailer?