Skip to content

Form component: Add support for redirect_to in the controller. #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

fiedl
Copy link
Collaborator

@fiedl fiedl commented Feb 22, 2020

Changes

  • When a transition follows the server response,

    class MyPage
      def form_config
        {
          # ...
          success: {
            transition: {
              follow_response: true
            }
          }
        }
      end
    end

    the controller can set the destination via redirect_to:

    class MyController
      def update
        my_model.update model_params
        redirect_to root_path
      end
    end

Notes

Copy link
Member

@jonasjabari jonasjabari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

@jonasjabari jonasjabari merged commit c4e7554 into develop Mar 10, 2020
@jonasjabari jonasjabari added this to the 0.7.5 milestone Mar 11, 2020
@pascalwengerter pascalwengerter deleted the sf/form-transition-redirect-to branch March 11, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants