app/helpers/application_helper.rb
def story_body(story, query:)
    if query
      highlight(simple_format(excerpt(story.body, query, radius: 200)), query)
    else
      simple_format(truncate(story.body, length: 300))
    end
  end
# render the body of the story
render the body of the story
render the body of the story
def story_body(story, query:)
    if query
      highlight(simple_format(excerpt(story.body, query, radius: 200)), query)
    else
      simple_format(truncate(story.body, length: 300))
    end
  end
def story_body ( story , query : ) if query highlight ( simple_format ( excerpt ( story . body , query , radius : 200 ) ) , query ) else simple_format ( truncate ( story . body , length : 300 ) ) end end
render the body of the story
render the body of the story
story
query