]> nos-oignons.net Git - gestion-adh.git/blobdiff - lib/nos_oignons/member.rb
Correction du fichier sudoer
[gestion-adh.git] / lib / nos_oignons / member.rb
index 8b0bd97a0f4b97a7d1e8b601c00341e0053cb1de..a67581c114ea6d06588e5442d8c8ffe53f676bf8 100644 (file)
@@ -59,7 +59,8 @@ module NosOignons
       unless page_content.start_with?("---\n")
         raise ArgumentError.new('content is not a proper YAML document')
       end
-      data = YAML.load(page_content)
+      yaml_content = /\A---\n(.*)\n---\n/m.match(page_content)[1]
+      data = YAML.load(yaml_content)
       MEMBER_FIELDS.each do |field|
         self[field] = data[field.to_s]
       end