Sha256: b4cda7a4c1a28a3f401aefb976be0ff24cdc22ca29176d3091fec3bec7e91bc1
Contents?: true
Size: 576 Bytes
Versions: 4
Compression:
Stored size: 576 Bytes
Contents
class ProductsController < ApplicationController before_filter :login_required def index @products = User.find(current_user.id).account.products render :xml => @products, :status => :ok end def update @products = User.find(current_user.id).account.products.find(params[:id]) if @products.update_attributes(params[:products]) flash[:notice] = 'Products was successfully updated.' render :xml => @products, :status => :ok else render :xml => @products.errors, :status => :ok end end end
Version data entries
4 entries across 4 versions & 2 rubygems