Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer require_relative for internal requires #939

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/inherited_resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# This is here because responders don't require it.
require 'rails/engine'
require 'responders'
require 'inherited_resources/engine'
require 'inherited_resources/blank_slate'
require 'inherited_resources/responder'

require_relative 'inherited_resources/engine'
require_relative 'inherited_resources/blank_slate'
require_relative 'inherited_resources/responder'

module InheritedResources
ACTIONS = [ :index, :show, :new, :edit, :create, :update, :destroy ] unless self.const_defined?(:ACTIONS)
Expand Down
2 changes: 1 addition & 1 deletion lib/inherited_resources/base_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Whenever base is required load the dumb responder since it's used inside actions.
require 'inherited_resources/blank_slate'
require_relative 'blank_slate'

module InheritedResources
# Base helpers for InheritedResource work. Some methods here can be overwritten
Expand Down