diff --git a/app/models/snapshot.rb b/app/models/snapshot.rb index 0c256d0c3e..5605bf1af7 100644 --- a/app/models/snapshot.rb +++ b/app/models/snapshot.rb @@ -49,14 +49,6 @@ def description end end - def m_title - metadata['title'] - end - - def m_description - metadata['description'] - end - def contributor Person.find(metadata['contributor']['uri'].match(/people\/([1-9][0-9]*)/)[1]) end diff --git a/app/views/snapshots/show.html.erb b/app/views/snapshots/show.html.erb index 99e0d4235b..27ef30fe31 100644 --- a/app/views/snapshots/show.html.erb +++ b/app/views/snapshots/show.html.erb @@ -34,8 +34,8 @@
Created at: <%= date_as_string(@snapshot.created_at, true) %>
<%= panel('Resource') do %> - <%= render :partial => "general/item_title", :locals => {:item=>@resource, :title=>@snapshot.m_title} %> - <%= item_description @snapshot.m_description -%> + <%= render :partial => "general/item_title", :locals => {:item=>@resource, :title=>@snapshot.metadata['title']} %> + <%= item_description @snapshot.metadata['description'] -%> <% end %> <%= panel('Contents') do %> diff --git a/test/unit/investigation_test.rb b/test/unit/investigation_test.rb index f17cfa50cc..1c74096a23 100644 --- a/test/unit/investigation_test.rb +++ b/test/unit/investigation_test.rb @@ -155,7 +155,7 @@ class InvestigationTest < ActiveSupport::TestCase end assert_equal 1, investigation.snapshots.count - assert_equal investigation.title, snapshot.m_title + assert_equal investigation.title, snapshot.metadata['title'] end test 'clone with associations' do diff --git a/test/unit/snapshot_test.rb b/test/unit/snapshot_test.rb index 35674f0776..556e8d43b1 100644 --- a/test/unit/snapshot_test.rb +++ b/test/unit/snapshot_test.rb @@ -82,8 +82,8 @@ class SnapshotTest < ActiveSupport::TestCase assert_equal 'New title', @investigation.title assert_equal 'New description', @investigation.description - assert_equal old_title, snapshot.m_title - assert_equal old_description, snapshot.m_description + assert_equal old_title, snapshot.metadata['title'] + assert_equal old_description, snapshot.metadata['description'] end test 'generates sensible DOI' do