Sha256: c18f0a3375668c4f21b1a9b3bd1ed5275231884472153e60763431771d19ddad
Contents?: true
Size: 844 Bytes
Versions: 19
Compression:
Stored size: 844 Bytes
Contents
require "local_service" require "edition" class LocalTransactionEdition < Edition field :lgsl_code, type: Integer field :lgil_override, type: Integer field :introduction, type: String field :more_information, type: String field :need_to_know, type: String GOVSPEAK_FIELDS = [:introduction, :more_information, :need_to_know] validate :valid_lgsl_code def valid_lgsl_code if ! self.service errors.add(:lgsl_code, "#{lgsl_code} not recognised") end end def format_name "Local transaction" end def search_format "transaction" end def service LocalService.find_by_lgsl_code(lgsl_code) end def service_provided_by?(snac) authority = LocalAuthority.find_by_snac(snac) authority && authority.provides_service?(lgsl_code) end def whole_body self.introduction end end
Version data entries
19 entries across 19 versions & 1 rubygems