Skip to content
  • azul's avatar
    use redirects to PagePostsController#show to rerender comments · 8f8f416b
    azul authored
     When updating or staring a post we redirect to it which will rerender it
     on the page.
    
     The redirect also means that page reloads work nicely. They do not trigger
     the starring again. In the long run it may also allow us to benefit from
     turbo links as turbo links handles GET requests only - which include GETs as
     a result of redirects.
    
     This way we can ignore all error cases for starring because the current state
     will be rendered to the view either way. So if a post already was starred and
     a user tries to star it again it will just see the starred post when the
     request returns - no need for an error message.
    8f8f416b