diff --git a/lib/declarative_authorization/controller/runtime.rb b/lib/declarative_authorization/controller/runtime.rb index adf0bf3..714e590 100644 --- a/lib/declarative_authorization/controller/runtime.rb +++ b/lib/declarative_authorization/controller/runtime.rb @@ -7,7 +7,7 @@ module Runtime # load the appropriate object from the current controller's model with # the id from params[:id]. If that fails, a 404 Not Found is often the # right way to handle the error. If you have additional measures in place - # that restricts the find scope, handling this error as a permission denied + # that restrict the find scope, handling this error as a permission denied # might be a better way. Set failed_auto_loading_is_not_found to false # for the latter behavior. @@failed_auto_loading_is_not_found = true @@ -59,7 +59,7 @@ def permitted_to?(privilege, object_or_sym = nil, options = {}) end end - # Works similar to the permitted_to? method, but + # Works similarly to the permitted_to? method, but # throws the authorization exceptions, just like Engine#permit! def permitted_to!(privilege, object_or_sym = nil, options = {}) authorization_engine.permit!(privilege, options_for_permit(object_or_sym, options, true)) diff --git a/lib/declarative_authorization/in_model.rb b/lib/declarative_authorization/in_model.rb index 38bbe02..e9552ca 100644 --- a/lib/declarative_authorization/in_model.rb +++ b/lib/declarative_authorization/in_model.rb @@ -18,7 +18,7 @@ def permitted_to?(privilege, options = {}) end end - # Works similar to the permitted_to? method, but doesn't accept a block + # Works similarly to the permitted_to? method, but doesn't accept a block # and throws the authorization exceptions, just like Engine#permit! def permitted_to!(privilege, options = {}) options = { @@ -107,7 +107,7 @@ def self.with_permissions_to(*args) # using_access_control # end # - # If an operation is not permitted, a Authorization::AuthorizationError + # If an operation is not permitted, an Authorization::AuthorizationError # is raised. # # To activate model security on all models, call using_access_control @@ -115,7 +115,7 @@ def self.with_permissions_to(*args) # ActiveRecord::Base.using_access_control # # Available options - # [:+context+] Specify context different from the models table name. + # [:+context+] Specify context different from the model's table name. # [:+include_read+] Also check for :+read+ privilege after find. # def self.using_access_control(options = {}) diff --git a/lib/declarative_authorization/maintenance.rb b/lib/declarative_authorization/maintenance.rb index cdde18a..11e1f4b 100644 --- a/lib/declarative_authorization/maintenance.rb +++ b/lib/declarative_authorization/maintenance.rb @@ -6,7 +6,7 @@ module Authorization # authorization. module Maintenance # Disables access control for the given block. Appropriate for - # maintenance operation at the Rails console or in test case setup. + # maintenance operations at the Rails console or in test case setup. # # For use in the Rails console: # require "vendor/plugins/declarative_authorization/lib/maintenance" @@ -141,7 +141,7 @@ def self.usages_by_controller module TestHelper include Authorization::Maintenance - # Analogue to the Ruby's assert_raise method, only executing the block + # Analogue to Ruby's assert_raise method, only executing the block # in the context of the given user. def assert_raise_with_user(user, *args) assert_raise(*args) do @@ -158,10 +158,10 @@ def assert_raise_with_user(user, *args) # should_be_allowed_to :read, a_published_conference # end # - # If the objects class name does not match the controller name, you can set the object and context manually + # If the object's class name does not match the controller name, you can set the object and context manually # should_be_allowed_to :create, :object => car, :context => :vehicles # - # If you use specify the object and context manually, you can also specify the user manually, skipping the with_user block: + # If you specify the object and context manually, you can also specify the user manually, skipping the with_user block: # should_be_allowed_to :create, :object => car, :context => :vehicles, :user => a_normal_user def should_be_allowed_to(privilege, *args) options = {}