Rails method “Send” has errors

Maybe it is too early in the morning to be coding.  I was running into a mysterious problem and could not find anything online about it.  Nuthatch is generating invoices but now I want to SEND them.  However just adding a blank send method to my controller is causing this error:

ArgumentError in InvoicesController#index
wrong number of arguments (2 for 0)

I got around this by renaming my method. It would appear that ‘send‘ is a protected method name.

  def send
# This should be harmless…
end

CHANGE TO

  def sendemail
# Or whatever
end

Categories

Leave a Reply

Translate »