NoMethodError in WebsiteNewController#offers_product

undefined method `[]' for nil:NilClass

Extracted source (around line #307):
305
306
307
308
309
310
              
@category = ProductCategory::WEBSITE_CATEGORIES.find { |obj| obj[:name].parameterize == params[:index] }
@data = Array.new
stock_items = OfferStockItem.joins(:offer).where.not(:product_group_id => nil).where("offers.updated_at >= ? && offers.updated_at <= ?", Offer::ONLINE_DATE,Date.today + 1.day).where("offers.visible" => 1,:product_category_id => @category[:category_ids])
group = Array.new
category_offers = Array.new
current_product = ProductGroup.friendly.find(params[:product_id])

Rails.root: /var/www/demo.epsilon-paper.com

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"index"=>"category", "product_id"=>"printing-fine-papers"}

Response

Headers:

None