lib/seek/assets_standard_controller_actions.rb
# the standard response block after created a new asset
the standard response block after created a new asset
the standard response block after created a new asset
def create_asset_and_respond
      item = create_asset
      if item.save
        create_content_blobs
        unless return_to_fancy_parent(item)
          flash[:notice] = "#{t(item.class.name.underscore)} was successfully uploaded and saved."
          respond_to do |format|
            format.html { redirect_to item }
          end
        end
      else
        respond_to do |format|
          format.html do
            render action: 'new'
          end
        end
      end
    end
def create_asset_and_respond item = create_asset if item . save create_content_blobs unless return_to_fancy_parent ( item ) flash [ :notice ] = "#{t(item.class.name.underscore)} was successfully uploaded and saved." respond_to do | format | format . html { redirect_to item } end end else respond_to do | format | format . html do render action : 'new' end end end end
the standard response block after created a new asset
the standard response block after created a new asset