Therefore, I, like many others, present the concept of βlikesβ in my application. There are many different types of resources that you might like (messages, answers, lists, actions, etc.), and I'm looking for the best way to structure my routing file.
This may be due to the creation of a route.rb file that looks something like this:
resources lists do resources posts do resources replies do resources likes end resources likes end resources likes end
and LikesController, which does not know what load_and_authorize means:
class LikesController < ActionController:Base load_and_authorize :list
Are there any better ways to do this? I was thinking that I have a way / like that all the messages, but that means that I can not use load_and_authorize, and also means that it is harder to do things like Likes # index for a given list, message, response and etc.
Thanks.
source share