How to get notification on the dashboard? - ruby-on-rails

I have articles section in my application , and I want to show a flash notification on the dashboard for all the users who in my application if they are logged in or when they log in , when a user post a new article ?
How can I do so ? and I need an explain because I asked before and I didn't get any answers.
i need something like this !

Instead of flash messages, you seem to be looking for "One-off announcements" or "Side-wide annoucements".
Two great resources, all here listed Plugingeek, might help you.
paul_revere by thoughtbot: Simple announcement plugin to include "one off" style announcements in Rails web apps.
Site-wide annoucements RailsCast (pro)

Related

Create user profile pages with ActiveAdmin in rails 5 app

Can someone give me advise on If it is possible to create user profiles with ActiveAdmin?
I'm learning rails by doing and I wan't to build an app were the users go to private profile page after log_in.
I've built basic blog apps using ActiveAdmin, but now I want more.
The Idea is to put personalised material to each user profile via ActiveAdmin.
I'll create the user_profiles and hand the sign_in info to the user.
I've bee searching the internet for tutorials on the topic but with no luck yet, It would be nice if someone could inform me.
thanks
I think you may be looking for https://github.com/activeadmin/activeadmin/wiki/How-to-add-User-Accounts-for-users-to-administer-their-personal-accounts There are various other links to sample apps and how-to articles on the wiki also.

Facebook like user search as you type

I am creating a messaging system for my web app and need help with searching for users to send messages to. So far I have it so that if you type a persons name (who is on the site) you can send a message to them. I want it to be as you start typing a persons name, a drop down appears with users names that the current user is following. Any thoughts on how I can do this?
I am using the gem mailboxer also wondering if anyone has suggestions for a better messaging gem. Thanks in advance.
Use jQuery autocomplete, and just populate the dropdown contents as all users that the user is following... something like current_user.followed_users. It's impossible to give code without seeing how your code works though.
A good alternative to jquery autocomplete is http://loopj.com/jquery-tokeninput/ and github at: https://github.com/loopj/jquery-tokeninput. A facebook like tagging to send message to multiple users. A demo app on https://github.com/railscasts/258-token-fields-revised/tree/master/bookstore-tokeninput-after from Ryan Bates from Railscasts http://railscasts.com/episodes/258-token-fields-revised
Good luck.

Rails Facebook-like Notifications

In my Rails 3 app I have Users, Products, and Likes. If a User posts a Product, and another User Likes this Product, I want that User to get a notification that their Product was Liked.
Is there an existing gem that handles this? I've only come across Pusher but that seems to be overkill.
There are a couple of gems that do that:
RailsActivity
https://www.ruby-toolbox.com/categories/Rails_Activity_Feeds
PublicActivity
http://railscasts.com/episodes/406-public-activity
https://github.com/pokonski/public_activity
I have never used them (although i probably will do it tomorrow ^^) so maybe someone with more experience can give you a better insight given your requirements (or read some part of the documentation)
All the gems that are mentioned above by different people is for implementing activity feed.There is lot of difference between implementing facebook news feed and facebook notification system.
For implementing notification system, I recommend you to check these links.
Gritter
Link
Have you seen this http://railscasts.com/episodes/260-messaging-with-faye ? Faye is used in the example. I'm not sure if you'd still consider it an overkill.

How to implement notification system in RoR?

I finished Ruby on Rails tutorial where I can follow other users and others may follow me like twitter. Now I wonder how to implement notification system if someone starts to follow me, for example, as in stackexchange or facebook in which come and display a notification (eg red 1). How to go about it? Are there any examples of ready solutions you or MVC?
I'd add a before_filter to relevant controller actions that checks for new followers in the database and sets flash[:notice] to something useful like 'X new followers' and links to your followers page. There's a quick overview of how flash works in the docs: http://api.rubyonrails.org/classes/ActionDispatch/Flash.html
Have a look at those 2 railscasts:
http://railscasts.com/episodes/407-activity-feed-from-scratch
http://railscasts.com/episodes/406-public-activity.

Posting a comment on a page through native iOS UI

Ok so I've scoured the docs and stackoverflow for an answer, but maybe I'm asking the wrong questions or looking in the wrong places. I'm working on an native iOS app and I want to give the user a way to post a comment to a page, but through native UI and not through a UIWebView with the comments plugin embedded. I can make a comment on a comment on the page, but I can't seem to make a comment from an authenticated user on the page itself. Is this even possible?
Apple's URL Loading System provides you with the ability to set credentials for basic HTTP authentication, but it sounds like you're talking about logging in to some kind of forum system. The way those generally work is that you send your credentials to the site, and get an authentication cookie back. You then need to provide that cookie to the system when you interact with the site.
Here's a blog post with an example of how to do that.

Resources