Skip to content

Commit

Permalink
description が求められる場合は body を返すようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamu-kazu222 committed Feb 15, 2025
1 parent 4eeeb7b commit 7cb22ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def self.search_by_slug_or_id!(params)
Page.find_by!(attr_name => params)
end

def description
body # description が求められる場合は body を返す
end

private

def empty_slug_to_nil
Expand Down

0 comments on commit 7cb22ac

Please sign in to comment.