I’m writing a review system for items in Ruby on Rails. I want the process to be as follow:
- users to start entering their review/ratings
- when they hit submit, if they’re not logged in, users are redirected to the signup or login page,
- they create and account or signup
- they’re redirected to the post where they wrote a review, and the review is added.
How do I do that?
Some highlights
/app/controllers/reviews_controller.rb
Then re-render the form on new_review_path with the session value after logged in.
There’s some broad strokes in there, but that should work.
As a note: as a User, I’d want you to ask me to login before I do the review.