I cannot load my PactHelper module from my lib dir.
# lib/pact_helper.rb
module PactHelper
def so_something
end
end
and
# app/controllers/registrations_controller.rb
class RegistrationsController < ApplicationController
include PactHelper
def new
...
end
end
returns undefined method 'include' for #<RegistrationsController:0x5287cf8>
Could someone explain to me why my module is not being included?
Try:
require 'pact_helper.rb'
Above:
class RegistrationsController < ApplicationController
In:
registrations_controller.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With