10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/generators/authority/install_generator.rb', line 10
def do_all
copy_initializer
copy_forbidden
create_authorizers_directory
message = <<-RUBY
Install complete! See the README on Github for instructions on getting your
app running with Authority.
One note: each model needs to know the name of its its authorizer class.
You can specify that in the model like `authorizer_name FooAuthorizer`.
If you don't, the `Article` model (for example) will look for `ArticleAuthorizer`.
To generate one authorizer like that for each of your models, see
`rails g authority:authorizers`. If you also want to specify your own
parent class for them, use `rails g authority:authorizers MyClass`.
RUBY
puts message.strip_heredoc
end
|