Skip to content
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
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require:
plugins:
- rubocop-performance
- rubocop-rails
- rubocop-rspec
Expand Down
6 changes: 2 additions & 4 deletions lib/operations/form/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def reflect_on_association(...); end

# :nodoc:
module InstanceMethods
delegate :model_name, to: :class

# Copied from globalize-accessors, should be deprecated and removed as it is not a core method
def localized_attr_name_for(attr_name, locale)
"#{attr_name}_#{locale.to_s.underscore}"
Expand Down Expand Up @@ -138,10 +140,6 @@ def respond_to_missing?(name, *)
operation_result&.context&.key?(name)
end

def model_name
self.class.model_name
end

def persisted?
self.class.persisted.nil? ? read_attribute(self.class.primary_key).present? : self.class.persisted
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "bundler/setup"
require "operations"
require "pp" # rubocop:disable Lint/RedundantRequireStatement
require "pp"
require "active_record"
require "database_cleaner-active_record"
require "./spec/support/test_helpers"
Expand Down