Reputation: 1699
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?
Upvotes: 3
Views: 2157
Reputation: 74
Try:
require 'pact_helper.rb'
Above:
class RegistrationsController < ApplicationController
In:
registrations_controller.rb
Upvotes: 3