We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Cream comes with a few helper methods to make it easy to act according to the role of the current user and the host IP address.
if has_role? :admin ... end
If the user has all the roles given, …
if has_roles? :editor, :admin ... end
Tests if the #editor method on the @post object is the same as the current_user.
if owner? @post, :editor ... end
Use these to act according to the user host IP address.
if localhost? ... end
if publichost? ... end