A
A
Alexander Isaev2016-02-26 01:04:14
Ruby on Rails
Alexander Isaev, 2016-02-26 01:04:14

How to disable actions on the user's personal page?

Hello everyone) There is a personal user profile. This profile has a button to add a product. I don't know how to prevent other registered users from adding a product on someone else's profile page? I did the whole authentication system with Devise. Thanks for the help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Yarikov, 2016-02-26
@IsaevAlex

If I understand the question correctly, then you need authorization in the application. And for this, rails has two wonderful gems Pundit and CanCanCan .
I also recommend watching the Authorization with CanCan screencast .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question