Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Found via `typos --format brief`
  • Loading branch information
kianmeng committed Mar 20, 2024
1 parent 1f732e2 commit 0e30868
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ _No changes_.
## Version 1.4.1

* Supports Rails 4.
* Improved compatability with strong params.
* Improved compatibility with strong params.

## Version 1.4.0

Expand Down Expand Up @@ -178,7 +178,7 @@ _No changes_.

* Fixed a bug that happens only when format.xml is given to blocks and then it acts as default, instead of format.html.
* Fixed a strange bug where when you have create.html.erb or update.html.erb, it makes IE6 and IE7 return unprocessable entity (because they send Mime::ALL).
* Stop rescueing any error when constantizing the resource class and allow route_prefix to be nil.
* Stop rescuing any error when constantizing the resource class and allow route_prefix to be nil.
* Cleaned up tests and responder structure. Whenever you pass a block to aliases and this block responds to the request, the other blocks are not parsed improving performance.
* [BACKWARDS INCOMPATIBLE] By default, Inherited Resources respond only :html requests.
* Added a quick way to overwrite the redirect to url in :create, :update and :destroy.
Expand Down
2 changes: 1 addition & 1 deletion lib/inherited_resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.flash_keys=(array)
ActiveSupport.on_load(:action_controller_base) do
# If you cannot inherit from InheritedResources::Base you can call
# inherit_resources in your controller to have all the required modules and
# funcionality included.
# functionality included.
def self.inherit_resources
InheritedResources::Base.inherit_resources(self)
initialize_resources_class_accessors!
Expand Down
2 changes: 1 addition & 1 deletion lib/inherited_resources/actions.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module InheritedResources
# Holds all default actions for InheritedResouces.
# Holds all default actions for InheritedResources.
module Actions

# GET /resources
Expand Down
4 changes: 2 additions & 2 deletions lib/inherited_resources/base_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def build_resource

# Responsible for saving the resource on :create method. Overwriting this
# allow you to control the way resource is saved. Let's say you have a
# PassworsController who is responsible for finding an user by email and
# PasswordsController who is responsible for finding an user by email and
# sent password instructions for him. Instead of overwriting the entire
# :create method, you could do something:
#
Expand Down Expand Up @@ -370,7 +370,7 @@ def role_given?
self.resources_configuration[:self][:role].present?
end

# getting role for mass-asignment
# getting role for mass-assignment
def as_role
{ as: self.resources_configuration[:self][:role] }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/inherited_resources/belongs_to_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module InheritedResources
# = belongs_to
#
# Let's suppose that we have some tasks that belongs to projects. To specify
# this assoication in your controllers, just do:
# this association in your controllers, just do:
#
# class TasksController < InheritedResources::Base
# belongs_to :project
Expand Down
4 changes: 2 additions & 2 deletions lib/inherited_resources/class_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module ClassMethods
#
# * <tt>:route_instance_name</tt> - The name of the singular route. Defaults to :instance_name.
#
# * <tt>:route_prefix</tt> - The route prefix which is automically set in namespaced
# * <tt>:route_prefix</tt> - The route prefix which is automatically set in namespaced
# controllers. Default to :admin on Admin::ProjectsController.
#
# * <tt>:singleton</tt> - Tells if this controller is singleton or not.
Expand Down Expand Up @@ -67,7 +67,7 @@ def defaults(options)
create_resources_url_helpers!
end

# Defines wich actions will be inherited from the inherited controller.
# Defines which actions will be inherited from the inherited controller.
# Syntax is borrowed from resource_controller.
#
# actions :index, :show, :edit
Expand Down
2 changes: 1 addition & 1 deletion test/aliases_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_dumb_responder_quietly_receives_everything_on_failure
assert_equal "New HTML", @response.body.strip
end

def test_html_is_the_default_when_only_xml_is_overwriten
def test_html_is_the_default_when_only_xml_is_overwritten
@request.accept = '*/*'
Student.stubs(:new).returns(mock_student(save: false, errors: {some: :error}))
@controller.stubs(:resource_url).returns('http://test.host/')
Expand Down
2 changes: 1 addition & 1 deletion test/url_helpers_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def test_url_helpers_on_nested_polymorphic_belongs_to # rubocop:disable Minitest
end

def test_url_helpers_on_singleton_nested_polymorphic_belongs_to # rubocop:disable Minitest/NoAssertions
# This must not be usefull in singleton controllers...
# This must not be useful in singleton controllers...
# Center.new
house = House.new
house.stubs(:persisted?).returns(true)
Expand Down

0 comments on commit 0e30868

Please sign in to comment.