Class: NotesController
Instance Method Summary
collapse
Methods included from BlogHelper
#blog_base_url, #this_blog
Instance Method Details
#index ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'app/controllers/notes_controller.rb', line 10
def index
@notes = Note.published.page(params[:page]).per(this_blog.limit_article_display)
if @notes.empty?
@message = I18n.t("errors.no_notes_found")
render "notes/error", status: :ok
end
end
|
#show ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'app/controllers/notes_controller.rb', line 19
def show
@note = Note.published.find_by! permalink: CGI.escape(params[:permalink])
if @note.in_reply_to_message.present?
@reply = JSON.parse(@note.in_reply_to_message)
render :show_in_reply
end
end
|