Class: Hyrax::ChangeSet

Inherits:
Valkyrie::ChangeSet
  • Object
show all
Defined in:
app/models/hyrax/change_set.rb

Class Method Summary collapse

Class Method Details

.for(resource) ⇒ Object

Factory for resource ChangeSets

Examples:

monograph  = Monograph.new
change_set = Hyrax::ChangeSet.for(monograph)

change_set.title = 'comet in moominland'
change_set.sync
monograph.title # => 'comet in moominland'


45
46
47
# File 'app/models/hyrax/change_set.rb', line 45

def self.for(resource)
  Hyrax::ChangeSet(resource.class).new(resource)
end