class Portier::ViewTagsPermission

*************************************************************************************

Control the access using a tag.

*************************************************************************************

Public Instance Methods

can_view?(tag, options={}) click to toggle source
# File lib/portier/view_tags_permission.rb, line 5
def can_view?(tag, options={})
  if self.respond_to? tag.to_sym
    @options = options

    self.send(tag.to_sym)
  else
    raise Portier::NoPermissionError, "You must define the method \"#{tag}\" in the view tags file (app/permissions/view_tags_permission.rb). See documentation for more details."
  end
end