# File app/controllers/fusioncharts/db_drilldown_controller.rb, line 40 def detailed headers["content-type"]="text/html"; @factory_id = params[:FactoryId] @factory_data = [] factory_master = Fusioncharts::FactoryMaster. find(@factory_id) factory_master.factory_output_quantities.each do |factory_output| date_of_production = factory_output.date_pro # Formats the date to dd/mm #formatted_date = date_of_production.strftime('%d/%m') # Formats the date to dd/mm without leading zeroes formatted_date = format_date_remove_zeroes(date_of_production) quantity_number = factory_output.quantity @factory_data<<{:date_of_production=>formatted_date,:quantity_number=>quantity_number} end end