Class: Tim::BaseImagesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Tim::BaseImagesController
- Defined in:
- app/controllers/tim/base_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
28 29 30 31 32 33 34 |
# File 'app/controllers/tim/base_images_controller.rb', line 28 def create @base_image = Tim::BaseImage.new(params[:base_image]) unless defined? @base_image if @base_image.save flash[:notice] = "Successfully created Base Image" end respond_with(@base_image, @respond_options) end |
#destroy ⇒ Object
44 45 46 47 48 |
# File 'app/controllers/tim/base_images_controller.rb', line 44 def destroy @base_image = Tim::BaseImage.find(params[:id]) unless defined? @base_image @base_image.destroy respond_with(@base_image, @respond_options) end |
#edit ⇒ Object
23 24 25 26 |
# File 'app/controllers/tim/base_images_controller.rb', line 23 def edit @base_image = Tim::BaseImage.find(params[:id]) unless defined? @base_image respond_with(@base_image, @respond_options) end |
#index ⇒ Object
8 9 10 11 |
# File 'app/controllers/tim/base_images_controller.rb', line 8 def index @base_images = Tim::BaseImage.all unless defined? @base_images respond_with(@base_images, @respond_options) end |
#new ⇒ Object
18 19 20 21 |
# File 'app/controllers/tim/base_images_controller.rb', line 18 def new @base_image = Tim::BaseImage.new unless defined? @base_image respond_with(@base_image, @respond_options) end |
#show ⇒ Object
13 14 15 16 |
# File 'app/controllers/tim/base_images_controller.rb', line 13 def show @base_image = Tim::BaseImage.find(params[:id]) unless defined? @base_image respond_with(@base_image, @respond_options) end |
#update ⇒ Object
36 37 38 39 40 41 42 |
# File 'app/controllers/tim/base_images_controller.rb', line 36 def update @base_image = Tim::BaseImage.find(params[:id]) unless defined? @base_image if @base_image.update_attributes(params[:base_image]) flash[:notice] = "Successfully updated Base Image" end respond_with(@base_image, @respond_options) end |