Skip to content

Commit

Permalink
unshift plain text when size more than 1
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Sep 16, 2018
1 parent 02fc931 commit ec3cedc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_title
text = self.plain.split("\n")
heading = text.first
self.title = heading[0..120] if heading.present?
text.shift # removes first
text.shift if text.size > 1 # removes first
self.plain = text.join("\n")
end

Expand Down

0 comments on commit ec3cedc

Please sign in to comment.