app/controllers/anoubis/data/convert.rb
##
# Convert value from database to view format according by defining field type and {Anoubis::Etc::Base#action action}
# @param key [Symbol] field's identifier in {Anoubis::Etc::Data#fields self.etc.data.fields} structure
# @param value [String] value from database
Convert value from database to view format according by defining field type and {Anoubis::Etc::Base#action action}
Convert value from database to view format according by defining field type and { Anoubis :: Etc :: Base#action action }
def convert_db_to_view_value(key, value)
        field = self.etc.data.fields[key]
        return { key => value } if !field.type
        proc = format('convert_db_to_view_value_%s', field.type)
        result = self.send proc, key, value
        result
      end
def convert_db_to_view_value ( key , value ) field = self . etc . data . fields [ key ] return { key => value } if ! field . type proc = format ( 'convert_db_to_view_value_%s' , field . type ) result = self . send proc , key , value result end
Convert value from database to view format according by defining field type and {Anoubis::Etc::Base#action action}
Convert value from database to view format according by defining field type and { Anoubis :: Etc :: Base#action action }
key
field's identifier in {Anoubis::Etc::Data#fields self.etc.data.fields} structure
field ' s identifier in { Anoubis :: Etc :: Data#fields self . etc . data . fields } structure
value
value from database
value from database