diff options
| author | Marc Florisson | 2014-02-27 09:49:45 +0100 |
|---|---|---|
| committer | Marc Florisson | 2014-02-27 09:49:45 +0100 |
| commit | 47c48f52afcc24ff0dc040c6bbaf4e3787b4a63f (patch) | |
| tree | d550550f6a080e5637562113c13528ed7e1154cb | |
| parent | e27afb28bf51403c10029cdc5317e53ede593c47 (diff) | |
| download | chouette-core-47c48f52afcc24ff0dc040c6bbaf4e3787b4a63f.tar.bz2 | |
fix regexp , replcae with $'
| -rw-r--r-- | app/models/help_page.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/help_page.rb b/app/models/help_page.rb index ea9d34e44..064cdc680 100644 --- a/app/models/help_page.rb +++ b/app/models/help_page.rb @@ -21,10 +21,10 @@ class HelpPage self.data ||= {} if self.content =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m - self.content = $POSTMATCH + self.content = $' # cryptic name for $POSTMATCH, but since V2.2 self.data.merge! YAML.load($1) end - + # workaround for special chars self.content = self.content.gsub('é','é') self.content = self.content.gsub('è','è') @@ -66,7 +66,7 @@ class HelpPage if page.exists? page.load else - raise ActiveRecord::RecordNotFound + raise ActiveRecord::RecordNotFound end end end |
