From cb72f18ed8c807aaceb48dcfa3d60ee6532d0ce0 Mon Sep 17 00:00:00 2001 From: Courteney Ervin Date: Fri, 6 Mar 2015 18:54:25 -0500 Subject: [PATCH] Create route that makes a beta_signup for a logged in user --- app/controllers/beta_signups_controller.rb | 10 ++++++++++ config/routes.rb | 1 + 2 files changed, 11 insertions(+) create mode 100644 app/controllers/beta_signups_controller.rb diff --git a/app/controllers/beta_signups_controller.rb b/app/controllers/beta_signups_controller.rb new file mode 100644 index 00000000..ac9ab7f9 --- /dev/null +++ b/app/controllers/beta_signups_controller.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index 9b99d3dc..e723ee43 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,6 +21,7 @@ resources :projects resources :favorites resources :events + resources :beta_signups, only: [:create] # Static content get '/about', controller: 'home', action: 'about'