ruby on rails - NameError in PaymentsController#Summary, uninitialized constant PaymentsController::SummaryPdf -


am getting following error

nameerror in paymentscontroller#summary uninitialized constant paymentscontroller::summarypdf extracted source (around line #133):  131        format.html {render "summary"} 132        format.pdf 133        pdf = summarypdf.new(@klasses) 134        send_data pdf.render, filename: "payments summary_#{academicterm.current.details}.pdf", type: "application/pdf" 135      end 136    end 

payments_controller code is

def summary   @klasses = klass.all   respond_to |format|     format.html {render "summary"}     format.pdf       pdf = summarypdf.new(@klasses)       send_data pdf.render, filename: "payments summary_#{academicterm.current.details}.pdf", type: "application/pdf"     end 

my routes folder payments is

resources :payments   'search_form', :on=>:collection   'klass_menu',:on =>:collection   'byklass',:on =>:collection   'enrolment',:on =>:collection   'bystudent',:on =>:collection   'with_balance', :on=>:collection   'fully_paid', :on=>:collection   'all_with_balance', :on=>:collection   'all_fully_paid', :on=>:collection    'summary', :on=>:collection end 

i've tried looking through available answers few have similar problem mine not answered, i'll glad if helped.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -