cirandas.net

ref: master

plugins/driven_signup/controllers/admin/driven_signup_plugin/admin_controller.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class DrivenSignupPlugin::AdminController < AdminController

  no_design_blocks

  protect 'edit_environment_features', :environment

  def index

  end

  def new
    @auth = environment.driven_signup_auths.build
  end

  def edit
    @auth = environment.driven_signup_auths.where(id: params[:id]).first
    @auth ||= environment.driven_signup_auths.build
    @auth.update params[:auth]
  end

  def destroy
    @auth = environment.driven_signup_auths.where(token: params[:token]).first
    @auth.destroy if @auth
  end

end