Class: Flipper::UI::Actions::CloudMigrate
- Inherits:
-
Flipper::UI::Action
- Object
- Flipper::UI::Action
- Flipper::UI::Actions::CloudMigrate
- Defined in:
- lib/flipper/ui/actions/cloud_migrate.rb
Constant Summary
Constants inherited from Flipper::UI::Action
Flipper::UI::Action::CONTENT_SECURITY_POLICY, Flipper::UI::Action::SOURCES, Flipper::UI::Action::VALID_REQUEST_METHOD_NAMES
Instance Attribute Summary
Attributes inherited from Flipper::UI::Action
Instance Method Summary collapse
Methods inherited from Flipper::UI::Action
#asset_hash, #bootstrap_css, #bootstrap_js, #csrf_input_tag, #halt, #header, #initialize, #json_response, #popper_js, public_path, #public_path, #read_only?, #redirect_to, #render_read_only, #request_method_name, route, route_match?, route_regex, run, #run, #run_other_action, #script_name, #status, #url_for, #valid_request_method?, #view, #view_response, #view_with_layout, #view_without_layout, views_path, #views_path, #write_allowed?
Constructor Details
This class inherits a constructor from Flipper::UI::Action
Instance Method Details
#post ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/flipper/ui/actions/cloud_migrate.rb', line 10 def post result = Flipper::Cloud.migrate(flipper) if result.url status 302 header 'location', result.url halt [@code, @headers, ['']] else = "Migration failed (HTTP #{result.code})" << ": #{result.}" if result. redirect_to "/settings?error=#{Flipper::UI::Util.escape()}" end end |