Class: Tim::ProviderImagesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Tim::ProviderImagesController
- Defined in:
- app/controllers/tim/provider_images_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
29 30 31 32 33 34 35 |
# File 'app/controllers/tim/provider_images_controller.rb', line 29 def create @provider_image = ProviderImage.new(params[:provider_image]) unless defined? @provider_image if @provider_image.save flash[:notice] = 'Provider image was successfully created.' end respond_with(@provider_image, @respond_options) end |
#destroy ⇒ Object
45 46 47 48 49 |
# File 'app/controllers/tim/provider_images_controller.rb', line 45 def destroy @provider_image = Tim::ProviderImage.find(params[:id]) unless defined? @provider_image @provider_image.destroy respond_with(@provider_image, @respond_options) end |
#edit ⇒ Object
24 25 26 27 |
# File 'app/controllers/tim/provider_images_controller.rb', line 24 def edit @provider_image = Tim::ProviderImage.find(params[:id]) unless defined? @provider_image respond_with(@provider_image, @respond_options) end |
#index ⇒ Object
9 10 11 12 |
# File 'app/controllers/tim/provider_images_controller.rb', line 9 def index @provider_images = Tim::ProviderImage.all unless defined? @provider_images respond_with(@provider_images, @respond_options) end |
#new ⇒ Object
19 20 21 22 |
# File 'app/controllers/tim/provider_images_controller.rb', line 19 def new @provider_image = Tim::ProviderImage.new respond_with(@provider_image, @respond_options) end |
#show ⇒ Object
14 15 16 17 |
# File 'app/controllers/tim/provider_images_controller.rb', line 14 def show @provider_image = Tim::ProviderImage.find(params[:id]) unless defined? @provider_image respond_with(@provider_image, @respond_options) end |
#update ⇒ Object
37 38 39 40 41 42 43 |
# File 'app/controllers/tim/provider_images_controller.rb', line 37 def update @provider_image = Tim::ProviderImage.find(params[:id]) unless defined? @provider_image if @provider_image.update_attributes(params[:provider_image]) flash[:notice] = 'Provider image was successfully updated.' end respond_with(@provider_image, @respond_options) end |