Created
February 27, 2019 21:50
-
-
Save ramfjord/0142e2b27e0e065f9d14815c9591fbd2 to your computer and use it in GitHub Desktop.
invoke included module from proc?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = ->() { validates_presence_of :foo } | |
B = Class.new() do | |
include ActiveModel::Validations | |
p.call | |
end | |
# => NoMethodError: undefined method `validates_presence_of' for main:Object |
havenwood
commented
Feb 27, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment