Class: Tim::ImageVersionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Tim::ImageVersionsController
- Defined in:
- app/controllers/tim/image_versions_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
26 27 28 29 30 31 32 |
# File 'app/controllers/tim/image_versions_controller.rb', line 26 def create @image_version = ImageVersion.new(params[:image_version]) unless defined? @image_version if @image_version.save flash[:notice] = 'Image version was successfully created.' end respond_with(@image_version, @respond_options) end |
#destroy ⇒ Object
42 43 44 45 46 |
# File 'app/controllers/tim/image_versions_controller.rb', line 42 def destroy @image_version = Tim::ImageVersion.find(params[:id]) unless defined? @image_version @image_version.destroy respond_with(@image_version, @respond_options) end |
#edit ⇒ Object
21 22 23 24 |
# File 'app/controllers/tim/image_versions_controller.rb', line 21 def edit @image_version = Tim::ImageVersion.find(params[:id]) unless defined? @image_version respond_with(@image_version, @respond_options) end |
#index ⇒ Object
6 7 8 9 |
# File 'app/controllers/tim/image_versions_controller.rb', line 6 def index @image_versions = Tim::ImageVersion.all unless defined? @image_versions respond_with(@image_versions, @respond_options) end |
#new ⇒ Object
16 17 18 19 |
# File 'app/controllers/tim/image_versions_controller.rb', line 16 def new @image_version = Tim::ImageVersion.new unless defined? @image_version respond_with(@image_version, @respond_options) end |
#show ⇒ Object
11 12 13 14 |
# File 'app/controllers/tim/image_versions_controller.rb', line 11 def show @image_version = Tim::ImageVersion.find(params[:id]) unless defined? @image_version respond_with(@image_version, @respond_options) end |
#update ⇒ Object
34 35 36 37 38 39 40 |
# File 'app/controllers/tim/image_versions_controller.rb', line 34 def update @image_version = Tim::ImageVersion.find(params[:id]) unless defined? @image_version if @image_version.update_attributes(params[:image_version]) flash[:notice] = 'Image version was successfully updated.' end respond_with(@image_version, @respond_options) end |