lib/osm/member.rb in osm-1.0.4.dev vs lib/osm/member.rb in osm-1.0.4

- old
+ new

@@ -367,19 +367,19 @@ return "#{first_name}#{seperator.to_s}#{last_name}" end # Get the My.SCOUT link for this member # @param [Osm::Api] api The api to use to make the request - # @param [Symbol] link_to The page in My.SCOUT to link to (:payments, :events, :programme or :badges) + # @param [Symbol] link_to The page in My.SCOUT to link to (:payments, :events, :programme, :badges or :notice) # @return [String] the link for this member's My.SCOUT # @raise [Osm::ObjectIsInvalid] If the Member is invalid # @raise [Osm::ArgumentIsInvalid] If link_to is not an allowed Symbol # @raise [Osm::Error] if the member does not already exist in OSM or the member's My.SCOUT key could not be retrieved from OSM def myscout_link(api, link_to=:badges) raise Osm::ObjectIsInvalid, 'member is invalid' unless valid? require_ability_to(api, :read, :member, section_id) raise Osm::Error, 'the member does not already exist in OSM' if id.nil? - raise Osm::ArgumentIsInvalid, 'link_to is invalid' unless [:payments, :events, :programme, :badges].include?(link_to) + raise Osm::ArgumentIsInvalid, 'link_to is invalid' unless [:payments, :events, :programme, :badges, :notice].include?(link_to) if @myscout_link_key.nil? data = api.perform_query("api.php?action=getMyScoutKey&sectionid=#{section_id}&scoutid=#{self.id}") raise Osm::Error, 'Could not retrieve the key for the link from OSM' unless data['ok'] @myscout_link_key = data['key']