ref: master
plugins/open_graph/lib/open_graph_plugin/settings.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
class OpenGraphPlugin::Settings < Noosfero::Plugin::Settings def self.new base, attrs = {} super base, self.parents.first, attrs end OpenGraphPlugin::TrackConfig::Types.each do |track, klass| define_method "#{track}_track_enabled=" do |value| super ActiveRecord::Type::Boolean.new.send :cast_value, value end end end |