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
27 28 29 30 31 32 33 |
# File 'app/controllers/tim/base_images_controller.rb', line 27 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 end |
#destroy ⇒ Object
43 44 45 46 47 |
# File 'app/controllers/tim/base_images_controller.rb', line 43 def destroy @base_image = Tim::BaseImage.find(params[:id]) unless defined? @base_image @base_image.destroy respond_with(@base_image) end |
#edit ⇒ Object
22 23 24 25 |
# File 'app/controllers/tim/base_images_controller.rb', line 22 def edit @base_image = Tim::BaseImage.find(params[:id]) unless defined? @base_image respond_with @base_image end |
#index ⇒ Object
7 8 9 10 |
# File 'app/controllers/tim/base_images_controller.rb', line 7 def index @base_images = Tim::BaseImage.all unless defined? @base_images respond_with @base_images end |
#new ⇒ Object
17 18 19 20 |
# File 'app/controllers/tim/base_images_controller.rb', line 17 def new @base_image = Tim::BaseImage.new respond_with @base_image end |
#show ⇒ Object
12 13 14 15 |
# File 'app/controllers/tim/base_images_controller.rb', line 12 def show @base_image = Tim::BaseImage.find(params[:id]) unless defined? @base_image respond_with @base_image end |
#update ⇒ Object
35 36 37 38 39 40 41 |
# File 'app/controllers/tim/base_images_controller.rb', line 35 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 end |