Skip to content

Commit

Permalink
More explicit customization example
Browse files Browse the repository at this point in the history
closes #8
  • Loading branch information
foxyblocks committed Dec 9, 2014
1 parent a5b02fb commit 8dad7e6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,16 @@ If you want to customize the behavior of the controller, for example to add or s

```ruby
class MorphingController < Morphing::MorphingController
authenticate_user! only: [:morph]
before_filter :authorize_admin

private

def authorize_admin
unless user.is_admin?
flash[:error] = 'Permission denied!'
redirect_to root_path
end
end
end
```

Expand Down

0 comments on commit 8dad7e6

Please sign in to comment.