Hello,
I have a Rails App. I had to add an admin section into that and for this i
am using Rails Admin. My problem is that i want that when a user logs in
it gets redirected to normal user's root controller but i want them to be
directed to /admin. I am very new to Rails and couldn't find anything
On Fri, Oct 26, 2012 at 5:54 PM, Raakesh kumar kumar3...@gmail.com wrote:
Hello,
I have a Rails App. I had to add an admin section into that and for this i
am using Rails Admin. My problem is that i want that when a user logs in
it gets redirected to normal user's root controller but i want
On Fri, Oct 26, 2012 at 6:15 PM, Harisankar P S mai...@hsps.in wrote:
On Fri, Oct 26, 2012 at 5:54 PM, Raakesh kumar kumar3...@gmail.comwrote:
Hello,
I have a Rails App. I had to add an admin section into that and for this i
am using Rails Admin. My problem is that i want that when a user
How do you specify in your application if he is admin or not. I do not use
cancan so not sure how if some function is available in cancan. But how I
would suggest is to use *before_filer* and check if admin or not.
Find a small code snipet https://gist.github.com/3958710
*assuming that
On Fri, Oct 26, 2012 at 6:41 PM, Harisankar P S mai...@hsps.in wrote:
How do you specify in your application if he is admin or not. I do not use
cancan so not sure how if some function is available in cancan. But how I
would suggest is to use *before_filer* and check if admin or not.
Find a
On Fri, Oct 26, 2012 at 7:13 PM, Raakesh kumar kumar3...@gmail.com wrote:
No in rolify and CanCan, basically i check for this by using
user.has_role? :superadmin..
Then just change the if condition accordingly, if user.has_role?
:super_admin
and place that code in the
On Fri, Oct 26, 2012 at 7:20 PM, Harisankar P S mai...@hsps.in wrote:
On Fri, Oct 26, 2012 at 7:13 PM, Raakesh kumar kumar3...@gmail.comwrote:
No in rolify and CanCan, basically i check for this by using
user.has_role? :superadmin..
Then just change the if condition accordingly, if