Skip to content

lesson 14 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

lesson 14 #2

wants to merge 1 commit into from

Conversation

webmstk
Copy link
Owner

@webmstk webmstk commented Aug 10, 2016

No description provided.

@@ -19,7 +19,13 @@ def create
end

def destroy

if current_user.id == params[:id].to_i
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В принципе, нам не обязательно получать идентификатор пользователя. Достаточно посмотреть в session и если там есть user_id - удалить этот ключ. Так тоже годится.

@psylone
Copy link

psylone commented Aug 10, 2016

+1 Approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants