Class: Auth::My::OauthUsersController
- Inherits:
-
BaseController
- Object
- BaseController
- Auth::My::OauthUsersController
- Defined in:
- app/controllers/auth/my/oauth_users_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/auth/my/oauth_users_controller.rb', line 19 def create @oauth_user = OauthUser.new(oauth_user_params) respond_to do |format| if @oauth_user.save format.html { redirect_to @oauth_user, notice: 'Oauth user was successfully created.' } format.json { render :show, status: :created, location: @oauth_user } else format.html { render :new } format.json { render json: @oauth_user.errors, status: :unprocessable_entity } end end end |
#destroy ⇒ Object
45 46 47 48 49 50 51 |
# File 'app/controllers/auth/my/oauth_users_controller.rb', line 45 def destroy @oauth_user.destroy respond_to do |format| format.html { redirect_to my_oauth_users_url, notice: 'Oauth user was successfully destroyed.' } format.json { head :no_content } end end |
#edit ⇒ Object
16 17 |
# File 'app/controllers/auth/my/oauth_users_controller.rb', line 16 def edit end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/auth/my/oauth_users_controller.rb', line 5 def index @oauth_users = current_user.oauth_users end |
#new ⇒ Object
12 13 14 |
# File 'app/controllers/auth/my/oauth_users_controller.rb', line 12 def new @oauth_user = OauthUser.new end |
#show ⇒ Object
9 10 |
# File 'app/controllers/auth/my/oauth_users_controller.rb', line 9 def show end |
#update ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/auth/my/oauth_users_controller.rb', line 33 def update respond_to do |format| if @oauth_user.update(oauth_user_params) format.html { redirect_to @oauth_user, notice: 'Oauth user was successfully updated.' } format.json { render :show, status: :ok, location: @oauth_user } else format.html { render :edit } format.json { render json: @oauth_user.errors, status: :unprocessable_entity } end end end |