Class: Betauseraccess::SignUpForBetaAccessesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Betauseraccess::SignUpForBetaAccessesController
- Defined in:
- app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /sign_up_for_beta_accesses POST /sign_up_for_beta_accesses.xml.
-
#destroy ⇒ Object
DELETE /sign_up_for_beta_accesses/1 DELETE /sign_up_for_beta_accesses/1.xml.
-
#edit ⇒ Object
GET /sign_up_for_beta_accesses/1/edit.
-
#index ⇒ Object
GET /sign_up_for_beta_accesses GET /sign_up_for_beta_accesses.xml.
- #isuseramoderator ⇒ Object
-
#new ⇒ Object
GET /sign_up_for_beta_accesses/new GET /sign_up_for_beta_accesses/new.xml.
-
#show ⇒ Object
GET /sign_up_for_beta_accesses/1 GET /sign_up_for_beta_accesses/1.xml.
- #thanks ⇒ Object
-
#update ⇒ Object
PUT /sign_up_for_beta_accesses/1 PUT /sign_up_for_beta_accesses/1.xml.
Instance Method Details
#create ⇒ Object
POST /sign_up_for_beta_accesses POST /sign_up_for_beta_accesses.xml
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 57 def create @sign_up_for_beta_access = SignUpForBetaAccess.new(params[:sign_up_for_beta_access]) respond_to do |format| if @sign_up_for_beta_access.save format.html { redirect_to(@sign_up_for_beta_access, :notice => 'Sign up for beta access was successfully created.') } format.xml { render :xml => @sign_up_for_beta_access, :status => :created, :location => @sign_up_for_beta_access } else format.html { render :action => "new" } format.xml { render :xml => @sign_up_for_beta_access.errors, :status => :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /sign_up_for_beta_accesses/1 DELETE /sign_up_for_beta_accesses/1.xml
89 90 91 92 93 94 95 96 97 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 89 def destroy @sign_up_for_beta_access = SignUpForBetaAccess.find(params[:id]) @sign_up_for_beta_access.destroy respond_to do |format| format.html { redirect_to(sign_up_for_beta_accesses_url) } format.xml { head :ok } end end |
#edit ⇒ Object
GET /sign_up_for_beta_accesses/1/edit
51 52 53 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 51 def edit @sign_up_for_beta_access = SignUpForBetaAccess.find(params[:id]) end |
#index ⇒ Object
GET /sign_up_for_beta_accesses GET /sign_up_for_beta_accesses.xml
19 20 21 22 23 24 25 26 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 19 def index @sign_up_for_beta_accesses = SignUpForBetaAccess.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @sign_up_for_beta_accesses } end end |
#isuseramoderator ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 5 def isuseramoderator unless(IsCurrentUserModerator?) redirect_to root_path end end |
#new ⇒ Object
GET /sign_up_for_beta_accesses/new GET /sign_up_for_beta_accesses/new.xml
41 42 43 44 45 46 47 48 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 41 def new @sign_up_for_beta_access = SignUpForBetaAccess.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @sign_up_for_beta_access } end end |
#show ⇒ Object
GET /sign_up_for_beta_accesses/1 GET /sign_up_for_beta_accesses/1.xml
30 31 32 33 34 35 36 37 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 30 def show @sign_up_for_beta_access = SignUpForBetaAccess.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @sign_up_for_beta_access } end end |
#thanks ⇒ Object
11 12 13 14 15 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 11 def thanks respond_to do |format| format.html end end |
#update ⇒ Object
PUT /sign_up_for_beta_accesses/1 PUT /sign_up_for_beta_accesses/1.xml
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'app/controllers/betauseraccess/sign_up_for_beta_accesses_controller.rb', line 73 def update @sign_up_for_beta_access = SignUpForBetaAccess.find(params[:id]) respond_to do |format| if @sign_up_for_beta_access.update_attributes(params[:sign_up_for_beta_access]) format.html { redirect_to(@sign_up_for_beta_access, :notice => 'Sign up for beta access was successfully updated.') } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @sign_up_for_beta_access.errors, :status => :unprocessable_entity } end end end |