Skip to content

Commit

Permalink
Merge pull request #482 from sul-dlss/home-page-callback
Browse files Browse the repository at this point in the history
Remove add_default_home_page method in favor of rails generated...
  • Loading branch information
cbeer committed Mar 7, 2014
2 parents fe045b5 + d6b8898 commit 62f61d3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/models/spotlight/exhibit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class Spotlight::Exhibit < ActiveRecord::Base

serialize :facets, Array

before_create :build_home_page
after_create :initialize_config
after_create :initialize_browse
after_create :add_default_home_page
before_save :sanitize_description

validate :title, presence: true
Expand Down Expand Up @@ -90,10 +90,6 @@ def initialize_browse
long_description: "All items in this exhibit"
end

def add_default_home_page
Spotlight::HomePage.create(exhibit: self).save
end

def sanitize_description
self.description = HTML::FullSanitizer.new.sanitize(description) if description_changed?
end
Expand Down

0 comments on commit 62f61d3

Please sign in to comment.