In my Rails app I use Devise as the authentication system. I have successfully installed the Devide gem and its working fine.
But now I want to redirect user to a different path after they login, ex:
dash_board#home
How can I define that in Devise? I'm confused as it doesn't have any controllers shows (as sessions, users etc..). I can see them in the gem file, but I guess changing the gem is not a good option
I'm using Rails 3, Devise 1.1.3
Related
If a web application just needs to authenticate users with a google account with omniauth, in other words, users can just login with their google account.
What's the best choice to choose between the two gems:
omniauth-google-oauth2 or google-api-ruby-client ?
omniauth-google-oauth2 is your best choice, because "omniauth" gem not dependent on suppliers and perfectly integrates with Devise
Can anyone please have some tutorial or link for accessing Box.net API through attachements.me ruby gem?
I want to access box data though attachements.me ruby gem from Ruby on Rails application but I don't understand where to start.
I created a new rail app and want to add attachements.me ruby gem. I updated the gem file and installed bundle.
I will have to authenticate users but cant understand where to start.
Thanks
You should start by reading through their great documentation here: https://github.com/attachmentsme/ruby-box
A great place to begin is authenticating a user. You need to redirect them to the authorize_url after they click a button or link in one of your views to connect their Box account.
Box will send a code with the redirect URI that you need to capture to create this instance variable: #token = session.get_access_token('code-returned-to-redirect_url')
Once you do this, use the #token instance variable to create a session = RubyBox::Session.new
To understand what is going on behind the scenes, I'd also recommend reading through the Box documentation here: http://developers.box.com/oauth/
I'm using RailsAdmin, this time with CanCan!
I've built my Ability Model and everything looks nice. Except for this problem:
When the user logs in for the very first time (I'm using Devise), for some reason the system is not loading the correct permissions. This leads to the unconvenient situation: the user can see more actions and entities the the actual permissions would normally grant. Any subsequent requests work fine and the correct permissions are loaded. Don't know what else I might add. Logs are not reporting anything relevant. Anyone experiencing something similar?
rails 3.2.8
rails_admin 0.4.4
cancan 1.6.7
devise 2.1.2
I want to configure the devise gem for admin user. In my application ive installed the devise gem and currently it is used as a normal user who has account in my application. I want to add administration in my application so that an admin user can delete or modify etc operations to a particular user account and also do other administrative work such as deleting the user data which is not appropriate for public users.
I'd look into two gems: RailsAdmin and CanCan.
I recently migrated my app from rails 2.3.8 to rails 3.0.7, i was using lockdown for access control but lockdown is not supported in rails 3.x. Is there any gem similar to lockdown for access control, i tried cancan but its not that much effective like lockdown(i had to write if conditions since the links were still visible).
Is there any gem in rails 3 which provides similar access control
you could take a look at gems such as cancan for authorization and OmniAuth for authentication
also look at http://railscasts.com/?tag_id=25 and http://railscasts.com/?tag_id=26 for more info.