mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-27 11:40:57 +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
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
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
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
<%= render partial: "top", locals: { article: @article } %>
|
<%= render partial: "top", locals: { article: @article } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render partial: "article", object: @article %>
|
<%= render partial: "articles/article", object: @article %>
|
||||||
<%= add_comments @article %>
|
<%= add_comments @article %>
|
||||||
|
|
Loading…
Reference in a new issue