huacnlee / rails-settings-cached

Global settings for your Rails application.
Other
1.06k stars 202 forks source link

If I use CanCanCan like this I have this error: "Couldn't find Setting with 'id'=myLabelSetting" #103

Closed ghost closed 7 years ago

ghost commented 8 years ago

If I use CanCanCan like this I have this error: "Couldn't find Setting with 'id'=myLabelSetting".

Why?

My ability.rb:

class Ability
  include CanCan::Ability

  def initialize(user)

    if user.admin?

        can :manage, :all

    else

      # do nothing

    end