Skip to content

Commit cb72f18

Browse files
committed
Create route that makes a beta_signup for a logged in user
1 parent 02b2b71 commit cb72f18

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class BetaSignupsController < ApplicationController
2+
def create
3+
bsu = BetaSignup.new
4+
bsu.user = current_user
5+
6+
respond_to do |format|
7+
format.json { render json: bsu.save.to_json }
8+
end
9+
end
10+
end

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
resources :projects
2222
resources :favorites
2323
resources :events
24+
resources :beta_signups, only: [:create]
2425

2526
# Static content
2627
get '/about', controller: 'home', action: 'about'

0 commit comments

Comments
 (0)