Skip to content

Commit

Permalink
Create route that makes a beta_signup for a logged in user
Browse files Browse the repository at this point in the history
  • Loading branch information
courte committed Mar 6, 2015
1 parent 02b2b71 commit cb72f18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/controllers/beta_signups_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class BetaSignupsController < ApplicationController
def create
bsu = BetaSignup.new
bsu.user = current_user

respond_to do |format|
format.json { render json: bsu.save.to_json }
end
end
end
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
resources :projects
resources :favorites
resources :events
resources :beta_signups, only: [:create]

# Static content
get '/about', controller: 'home', action: 'about'
Expand Down

0 comments on commit cb72f18

Please sign in to comment.