search for: vendortransact

Displaying 1 result from an estimated 1 matches for "vendortransact".

2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
...t admin user You need to sign in or sign up before continuing Here is my Ability Class class Ability include CanCan::Ability def initialize(user) user ||= User.new # guest user if user.role == 1 #admin can :manage, :all can :read, :all elsif user.role == 2 #Vendor can :manage, VendorTransaction can :index, Account end end end Ok Here is my Transaction controller require ''csv'' class TransactionsController < ApplicationController load_and_authorize_resource helper_method :sort_column, :sort_direction respond_to :html, :js def index per_page = 40 @transac...