app/controllers/products_controller.rb
# Page for viewing a product in detail
# Contains rest services for viewing product in json
Page for viewing a product in detail
Contains rest services for viewing product in json
Page for viewing a product in detail Contains rest services for viewing product in json
def show
    @dependencies = @product.dependencies.order(:name).paginate(
        :page => params[:dependencies_page], 
        :per_page => session[:results_per_page])
    @dependents = @product.dependents.order(:name).paginate(
        :page => params[:dependents_page], 
        :per_page => session[:results_per_page])
    @groups = @product.groups.order(:name).uniq
    @total_allocation = @product.get_total_allocation(@year, @allocation_precision)
    respond_to do |format|
      format.html
      format.js  { render :json => @product.rest_show, :callback => params[:callback] }
      format.json { render :json => @product.rest_show }
      format.xml { render :xml => @product }
    end
  end
def show @dependencies = @product . dependencies . order ( :name ) . paginate ( :page => params [ :dependencies_page ] , :per_page => session [ :results_per_page ] ) @dependents = @product . dependents . order ( :name ) . paginate ( :page => params [ :dependents_page ] , :per_page => session [ :results_per_page ] ) @groups = @product . groups . order ( :name ) . uniq @total_allocation = @product . get_total_allocation ( @year , @allocation_precision ) respond_to do | format | format . html format . js { render :json => @product . rest_show , :callback => params [ :callback ] } format . json { render :json => @product . rest_show } format . xml { render :xml => @product } end end
Page for viewing a product in detail
Contains rest services for viewing product in json
Page for viewing a product in detail Contains rest services for viewing product in json