Skip to content

Commit

Permalink
Remove add_default_home_page method in favor of rails generated build…
Browse files Browse the repository at this point in the history
…_home_page method in before_create callback.
  • Loading branch information
jkeck committed Mar 7, 2014
1 parent fe045b5 commit d6b8898
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 d6b8898

Please sign in to comment.