mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-26 19:20:59 +00:00
Implemented #show
This commit is contained in:
parent
826614a92c
commit
29d447e97b
2 changed files with 7 additions and 1 deletions
|
@ -3,9 +3,15 @@ class CustomUrlsController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
|
||||
end
|
||||
|
||||
def show
|
||||
custom_url = CustomUrl.find_by_name(params[:name])
|
||||
@article = custom_url.article
|
||||
raise AccessError unless @article.can_show? cuser
|
||||
@article.read_by! cuser if cuser
|
||||
render 'articles/show'
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
<%= render partial: "top", locals: { article: @article } %>
|
||||
<% end %>
|
||||
|
||||
<%= render partial: "article", object: @article %>
|
||||
<%= render partial: "articles/article", object: @article %>
|
||||
<%= add_comments @article %>
|
||||
|
|
Loading…
Reference in a new issue