Sha256: 8e05a436a18d8718bc52abed472b0fe72a8333ed004e05eb3bc07b0153c5abe7
Contents?: true
Size: 1.58 KB
Versions: 2
Compression:
Stored size: 1.58 KB
Contents
module Tim class ImageVersionsController < Tim::ApplicationController prepend_before_filter ResourceLinkFilter.new({ :image_version => :base_image }), :only => [:create] def index @image_versions = Tim::ImageVersion.all unless defined? @image_versions respond_with(@image_versions, @respond_options) end def show @image_version = Tim::ImageVersion.find(params[:id]) unless defined? @image_version respond_with(@image_version, @respond_options) end def new @image_version = Tim::ImageVersion.new unless defined? @image_version respond_with(@image_version, @respond_options) end def edit @image_version = Tim::ImageVersion.find(params[:id]) unless defined? @image_version respond_with(@image_version, @respond_options) end 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 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 def destroy @image_version = Tim::ImageVersion.find(params[:id]) unless defined? @image_version @image_version.destroy respond_with(@image_version, @respond_options) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tim-0.3.0 | app/controllers/tim/image_versions_controller.rb |
tim-0.2.0 | app/controllers/tim/image_versions_controller.rb |