Class: ApplicationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationsController
- Defined in:
- app/controllers/applications_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
18 19 20 21 22 23 24 25 |
# File 'app/controllers/applications_controller.rb', line 18 def create @application = OauthProviderEngine::Application.new(params[:oauth_provider_engine_application]) if @application.save redirect_to oauth_provider_engine_applications_path else render :new end end |
#destroy ⇒ Object
40 41 42 |
# File 'app/controllers/applications_controller.rb', line 40 def destroy @application = OauthProviderEngine::Application.find(params[:id]) end |
#edit ⇒ Object
27 28 29 |
# File 'app/controllers/applications_controller.rb', line 27 def edit @application = OauthProviderEngine::Application.find(params[:id]) end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/applications_controller.rb', line 6 def index @applications = OauthProviderEngine::Application.all end |
#new ⇒ Object
14 15 16 |
# File 'app/controllers/applications_controller.rb', line 14 def new @application = OauthProviderEngine::Application.new(params[:oauth_provider_engine_application]) end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/applications_controller.rb', line 10 def show @application = OauthProviderEngine::Application.find(params[:id]) end |
#update ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'app/controllers/applications_controller.rb', line 31 def update @application = OauthProviderEngine::Application.find(params[:id]) if @application.update_attributes(params[:oauth_provider_engine_application]) redirect_to @application else render :edit end end |