I would like to have a My_Events page, which only display events that current user subscribed to, and allow user to manipulate these events, in addition to Index page that displays all events in the system.
How should I go about this to comply with RESTful pattern? Should I just create a my_events action and my_event.html.erb, or create a new controller for it? What would be the reason to choose one over another approach?
Thank you.
If you happen to have a user controller, adding an events action to that and routing based on the user for user specific events would seem most RESTful.
The benefit to this over something like /events/my_events is that the URL is unique to the data that is being presented. If a user uses the link /users/fubar/events then it will show events for the user fubar, where as with something like /events/my_events the generated page is tied to the session and not the URL.
Of course it really depends on what your goal is, and what requirements your application has.