Rails Using Devise to show Online users - ruby-on-rails

I would like to show my online users in a Who's online module.
I'm using Devise to manage my users.
I searched everywhere, but I don't have any idea to manage it.
Do you have a clue?
Thanks in advance

when someone has logged in, you can push him into an array, if someone has logged out, just remove him from the array. So you can loop the array items to show the online users.
Hope it is useful to you.
Sorry for my poor english.

Related

Method of integrating a certain persons Twitter account into iOS App

In my app so far, I have to implement all the Twitter posts from a certain individual into a table view, and it automatically updates when the person tweets a certain post. Is it possible to mention a certain individual e.g. #John.. If it is possible, how can I do it? If not just let me know and I will delete this question as it could be too ambitious. Thanks!
I don't quite understand what you mean. I do a little!
There is a quick and easy way of doing this! One easy way is to use Twitters own SDK called Fabric. See Here
See this link for the timeline stuff and integration to your app Documentation
This should help you out!
P.S. Let me know how you get on!

dynamic twitter widget id

I want to use the new twitter embedded timelines (https://dev.twitter.com/docs/embedded-timelines) but how can I get the data for the right user by username? I have a lot of websites with users (>500) who have their username in the database but as far as I can see you have to give a data-widget-id to get the tweets from the right user.
Is there any way to do this by username? And if not, how can I quickly convert all my users' data-widget-id to the database?
Any help is appreciated
Looks like the best you can do is get a single valid data-widget-id and use it for many different user names using the data-screen-name property.
There is a discussion here from one of the twitter devs. The same one as #alex_b posted in the comments.
You can wrote same script for PHP, for Rails community this gits could be helpfull to get widget-id dynamically.
https://gist.github.com/shah743/dd042df63a8f307f16ed

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.

where Jcomments data stored?

I want to synchronise comments on my site (JComments) with comments in my app. If someone adds comment from site, it would be displayed in app and vice versa. I just need to know where the comments are stored, i'm sure i can handle it over there.
Any suggestions are pretty much appreciated!
Thank you!
Look for jos_jcomments table in your database.
http://www.joomlatune.com/jcomments-faq.html

Getting Twitter data from RoR app

I have a RoR 3 application and I'm trying to integrate it with Twitter. So what do I need?
I need to count how many tweets with a certain hashtag (like #awesometag) were tweeted by users that follow me.
There are many ways to do this, as I saw while searching online. However, I want to know the most reliable way to do this.
Thanks!
There is a Twitter gem for all this stuff. If im not mistaken there is a Search class for doing what you want. More info about this gem

Resources