Skip to content

Commit

Permalink
Merge pull request #145 from samvera/simple_form-update
Browse files Browse the repository at this point in the history
Replace `Hydra::Presenter#to_model` delegation with `self`
  • Loading branch information
jrgriffiniii committed Mar 21, 2018
2 parents 6cf7299 + 5da194a commit c264bb8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions app/presenters/hydra/presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ def initialize(object)
@model = object
end

delegate :to_key, :to_param, :to_model, :persisted?, :new_record?,
:[], :model_name, to: :model
delegate :to_key, :to_param, :persisted?, :new_record?, :[], :model_name, to: :model

##
# @return [#to_model] self
def to_model
self
end

module ClassMethods
def model_name
Expand All @@ -33,8 +38,8 @@ module Presenter
included do
class_attribute :_terms, instance_accessor: false

# You may want to set your own field_metadata_service that can
# answer the questions about a fields cardinality regardless of the
# You may want to set your own field_metadata_service that can
# answer the questions about a fields cardinality regardless of the
# cardinality of the model
class_attribute :field_metadata_service
# This default service just give us the cardiality defined in the model.
Expand Down
2 changes: 1 addition & 1 deletion hydra-editor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.add_dependency "rails", ">= 4.2.0", "< 6"
s.add_dependency "active-fedora", ">= 9.0.0"
s.add_dependency "cancancan", "~> 1.8"
s.add_dependency "simple_form", '~> 3.2', '<= 3.5.0'
s.add_dependency "simple_form", '~> 3.2'
s.add_dependency 'sprockets-es6'
s.add_dependency "almond-rails", '~> 0.1'

Expand Down
2 changes: 1 addition & 1 deletion lib/hydra_editor/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module HydraEditor
VERSION = '3.4.0.beta'.freeze
VERSION = '4.0.0.rc1'.freeze
end

0 comments on commit c264bb8

Please sign in to comment.