Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails include dynamic

p =  self.user.company.subdomain + ".rb"
if File.exists?(Rails.root + "lib/" + p)
myself = self
class_eval do
  include self.const_get(myself.user.company.subdomain.capitalize.to_sym)
end
self.custom_add_url
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rails #include #dynamic
ADD COMMENT
Topic
Name
5+9 =