Method: ApplicationHelper#render_body

Defined in:
app/helpers/application_helper.rb

#render_body(post) ⇒ Object



86
87
88
89
90
91
# File 'app/helpers/application_helper.rb', line 86

def render_body(post)
  unless ['view', 'reply'].include? @params['action']
    return post.sections.first + (post.sections.length > 1 ? '<p>' + link_to('Read More ...', :controller => 'post', :action => 'view', :user => post.user.username, :slug => post.slug) + '</p>' : '')
  end
  post.rendered
end