Skip to content

Instantly share code, notes, and snippets.

@keppy
Created September 1, 2012 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keppy/3584678 to your computer and use it in GitHub Desktop.
Save keppy/3584678 to your computer and use it in GitHub Desktop.
TypeError in InvoicesController#show_client_invoices
app/controllers/invoices_controller.rb:3:in `[]'
app/controllers/invoices_controller.rb:3:in `show_client_invoices'
<% @clients.each do |c| %>
<li><%= link_to c.name, show_client_invoices_invoices_path(:invoice => "1", :company_id => "#{c.id}")%></li>
<% end %>
show_client_invoices_invoices GET /invoices/show_client_invoices(.:format) invoices#show_client_invoices
def show_client_invoices
if params[:invoice][:company_id] != ""
@company = Client.find(params[:invoice][:company_id])
@invoice_reservations = @company.invoice_reservations
render :partial => 'client_reservations', :content_type => 'text/html'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment