V
V
V2016-06-03 20:23:28
Ruby on Rails
V, 2016-06-03 20:23:28

How to properly tie the admin panel in Rails?

There is scaffolding Items name:string price:decimal email:string status:string. Any user can create a new thing? which will be assigned the status: under consideration / You need to somehow tie the admin panel so that the admin comes in, checks these applications and rejects them (then the status = rejected) or edits (in the standard form that the user fills out, there is no price field, but it should be in the form that the admin fills in) / I’m thinking how to do it all beautifully.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2016-06-03
@ermolushka

Theoretically, everything is simple, there is a user with admin rights. For example @user.admin = true.
When displaying fields, hide the price field if @user.admin = false.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question