Class: ActiveStix::UserAccountsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ActiveStix::UserAccountsController
- Defined in:
- app/controllers/active_stix/user_accounts_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /stix/user_accounts POST /stix/user_accounts.json.
-
#destroy ⇒ Object
DELETE /stix/user_accounts/1 DELETE /stix/user_accounts/1.json.
-
#edit ⇒ Object
GET /stix/user_accounts/1/edit.
-
#index ⇒ Object
GET /stix/user_accounts GET /stix/user_accounts.json.
-
#new ⇒ Object
GET /stix/user_accounts/new.
-
#show ⇒ Object
GET /stix/user_accounts/1 GET /stix/user_accounts/1.json.
-
#update ⇒ Object
PATCH/PUT /stix/user_accounts/1 PATCH/PUT /stix/user_accounts/1.json.
Instance Method Details
#create ⇒ Object
POST /stix/user_accounts POST /stix/user_accounts.json
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/controllers/active_stix/user_accounts_controller.rb', line 26 def create @user_account = ActiveStix::UserAccount.new(stix_user_account_params) respond_to do |format| if @user_account.save format.html { redirect_to @user_account, notice: 'User account was successfully created.' } format.json { render :show, status: :created, location: @user_account } else format.html { render :new } format.json { render json: @user_account.errors, status: :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /stix/user_accounts/1 DELETE /stix/user_accounts/1.json
56 57 58 59 60 61 62 |
# File 'app/controllers/active_stix/user_accounts_controller.rb', line 56 def destroy @user_account.destroy respond_to do |format| format.html { redirect_to stix_user_accounts_url, notice: 'User account was successfully destroyed.' } format.json { head :no_content } end end |
#edit ⇒ Object
GET /stix/user_accounts/1/edit
21 22 |
# File 'app/controllers/active_stix/user_accounts_controller.rb', line 21 def edit end |
#index ⇒ Object
GET /stix/user_accounts GET /stix/user_accounts.json
6 7 8 |
# File 'app/controllers/active_stix/user_accounts_controller.rb', line 6 def index @user_accounts = ActiveStix::UserAccount.all end |
#new ⇒ Object
GET /stix/user_accounts/new
16 17 18 |
# File 'app/controllers/active_stix/user_accounts_controller.rb', line 16 def new @user_account = ActiveStix::UserAccount.new end |
#show ⇒ Object
GET /stix/user_accounts/1 GET /stix/user_accounts/1.json
12 13 |
# File 'app/controllers/active_stix/user_accounts_controller.rb', line 12 def show end |
#update ⇒ Object
PATCH/PUT /stix/user_accounts/1 PATCH/PUT /stix/user_accounts/1.json
42 43 44 45 46 47 48 49 50 51 52 |
# File 'app/controllers/active_stix/user_accounts_controller.rb', line 42 def update respond_to do |format| if @user_account.update(stix_user_account_params) format.html { redirect_to @user_account, notice: 'User account was successfully updated.' } format.json { render :show, status: :ok, location: @user_account } else format.html { render :edit } format.json { render json: @user_account.errors, status: :unprocessable_entity } end end end |