Ruby on Rails
Wednesday, December 17, 2014
I can not understand how can I help?
I do not have different roles. All users have one role.
среда, 17 декабря 2014 г., 12:26:36 UTC+2 пользователь Vivek Sampara написал:
-- I do not have different roles. All users have one role.
среда, 17 декабря 2014 г., 12:26:36 UTC+2 пользователь Vivek Sampara написал:
I think you can use rolify as you have dynamic permissions.On Tue, Dec 16, 2014 at 11:43 PM, Artem T <artt...@gmail.com> wrote:I have a problem with the implementation of the search in the project--
I have such models(bring a simplified version)
User
id
name
Friends
user_id
friend_id
Post
id
title
author_id
is_public
PostDeniedUser
post_id
user_id
some explanations:
User can create post. Post can be public or private. If post private only friends of author can see it post, but author can denied access to some friends.
I need to implement search Post by title considering visibility for each user.
some explanations:
User can search in all public posts, in private posts of his friends which are not denied in one query.
I think create some model SearchPost and like NewsFeed.
duplicate all the data on posts for each user, taking into account the availability of, and then just make an inquiry with the search by title by authorized users
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .9a7219ac-e7e1-4b7e-8943- 30eadf6ae8c0%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f6098cac-9e74-4959-b7e7-5dfeeaa3d8da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment