aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYauheni Dakuka <yauheni.dakuka@gmail.com>2017-09-06 15:49:04 +0300
committerYauheni Dakuka <yauheni.dakuka@gmail.com>2017-09-06 15:49:04 +0300
commit56ac13e8e4549c680900eab14079881f5b2a38cf (patch)
tree6bf1bb5e06d7f12f13190c3c820fcd0ee61ffe25
parent18f342d82a380d5bd23c33018818224d32b69a95 (diff)
downloadrails-56ac13e8e4549c680900eab14079881f5b2a38cf.tar.gz
rails-56ac13e8e4549c680900eab14079881f5b2a38cf.tar.bz2
rails-56ac13e8e4549c680900eab14079881f5b2a38cf.zip
fix type fully qualified [ci skip]
-rw-r--r--actionpack/test/controller/rescue_test.rb2
-rw-r--r--guides/source/active_support_core_extensions.md6
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb
index 07f8c9dd8a..4ed79073e5 100644
--- a/actionpack/test/controller/rescue_test.rb
+++ b/actionpack/test/controller/rescue_test.rb
@@ -33,7 +33,7 @@ class RescueController < ActionController::Base
class ResourceUnavailableToRescueAsString < StandardError
end
- # We use a fully-qualified name in some strings, and a relative constant
+ # We use a fully qualified name in some strings, and a relative constant
# name in some other to test correct handling of both cases.
rescue_from NotAuthorized, with: :deny_access
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index b43d13b804..1438245f9c 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -634,7 +634,7 @@ NOTE: Defined in `active_support/core_ext/module/introspection.rb`.
#### `parent_name`
-The `parent_name` method on a nested named module returns the fully-qualified name of the module that contains its corresponding constant:
+The `parent_name` method on a nested named module returns the fully qualified name of the module that contains its corresponding constant:
```ruby
module X
@@ -3708,9 +3708,9 @@ Extensions to `NameError`
Active Support adds `missing_name?` to `NameError`, which tests whether the exception was raised because of the name passed as argument.
-The name may be given as a symbol or string. A symbol is tested against the bare constant name, a string is against the fully-qualified constant name.
+The name may be given as a symbol or string. A symbol is tested against the bare constant name, a string is against the fully qualified constant name.
-TIP: A symbol can represent a fully-qualified constant name as in `:"ActiveRecord::Base"`, so the behavior for symbols is defined for convenience, not because it has to be that way technically.
+TIP: A symbol can represent a fully qualified constant name as in `:"ActiveRecord::Base"`, so the behavior for symbols is defined for convenience, not because it has to be that way technically.
For example, when an action of `ArticlesController` is called Rails tries optimistically to use `ArticlesHelper`. It is OK that the helper module does not exist, so if an exception for that constant name is raised it should be silenced. But it could be the case that `articles_helper.rb` raises a `NameError` due to an actual unknown constant. That should be reraised. The method `missing_name?` provides a way to distinguish both cases: