lib/hybag/ingester.rb in hybag-0.0.9 vs lib/hybag/ingester.rb in hybag-0.0.10
- old
+ new
@@ -7,10 +7,10 @@
@bag = bag
end
def ingest
raise "Unable to determine model from bag" if model_name.blank?
- new_object = ActiveFedora.class_from_string(model_name.to_s).new
+ new_object = model_name.constantize.new
# Assign a pid
new_object.inner_object.pid = new_object.inner_object.assign_pid
set_metadata_streams(new_object)
set_file_streams(new_object)
return new_object
\ No newline at end of file