Created
May 2, 2011 16:33
-
-
Save kirkconnell/951884 to your computer and use it in GitHub Desktop.
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
#return an array of arrays for the act event logger track changes in content_ui fields | |
# [ profile content real name, "displayed field name: displayed field value"] | |
def content_x_log_array | |
content_ui_log_instructions = (1..20).map {|n| ["content_#{n}", lambda{|value| "#{get_display_name(n)} : #{value}" }} | |
end | |
def get_display_name(n) | |
if template_group.present? && ci = template_group.content_uis.find{|ci| c.generic_field_number == n} | |
ci.field_name.titleize.gsub(/\s+/, '').underscore.to_sym | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment