We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77cdd47 commit 06ffcc1Copy full SHA for 06ffcc1
app/controllers/integrations/basecamps_controller.rb
@@ -3,7 +3,10 @@ def new
3
end
4
5
def create
6
- integration = Integration::Basecamp.create(owner: Current.user)
7
- redirect_to integration.authorization_url, allow_other_host: true
+ integration = Integration::Basecamp.find_or_create_by(owner: Current.user)
+
8
+ unless integration.setup?
9
+ redirect_to integration.authorization_url, allow_other_host: true
10
+ end
11
12
app/views/integrations/basecamps/create.html.erb
@@ -0,0 +1,7 @@
1
+<% @hide_footer_frames = true %>
2
+<div data-controller="popup-window">
+ <p>You have already setup your Basecamp integration</p>
+ <button class="btn" data-action="popup-window#close">Ok</button>
+</div>
0 commit comments