We have an application that is multi-user (many users who access their own data, similar to something like Basecamp).
Question: What is the easiest and easiest way in Rails to provide users with the ability to see only their account information? Is this a case of passing and checking each request?
The way to do this is:
, , .
, current_user, . .
, current_user. . , , , current_user.posts.all current_user.posts.find().
cookie " ", . , , .
Source: https://habr.com/ru/post/1776249/More articles:Access error while accessing when opening a file in JavaScript - javascriptSkip some column replication on slave in MySQL - mysqlC # Control menu position on multiple monitors - c #WEB-INF путь для файлов - javaDesign for cross-platform classes in C # - designКаков наилучший способ хранения значений node (i).x и node (i).y в С++? - c++How to get a C # Windows control to automatically update if the database table is updated / inserted? - c #pause / start AVAudioPlayer without glitchy pops - iosStartup C # automatically adds the application to the startup folder - c #How to set up your own remote debugging? - c ++All Articles