Method_missing not picking my internet method

24 views
Skip to first unread message

Joseph Rex

unread,
Sep 6, 2016, 10:58:48 AM9/6/16
to Ruby Faker
I added a new set under internet in locales/en.yml then in faker/internet.rb I created a method with the same name as the key in en.yml and used fetch like this:
fetch('internet.new_set')

when that was still returning undefined method each time I tried to call Faker::Internet.new_set I wrapped it in a with_locale(:en) block and it still gives method undefined. The fetch method says all I should have to do is just create it in the locale file which I did already. When I use
Faker::Base.fetch('internet.new_set')


it works as expected. How can I make this method available as Faker::Internet.new_set
Reply all
Reply to author
Forward
0 new messages