Skip to content
Browse files

rails-core.el (rails-core:observer-p, rails-core:mailer-p): fixed reg…

…exp.

git-svn-id: svn+ssh://rubyforge.org/var/svn/emacs-rails/trunk@224 cc5033d0-740f-0410-afc7-949910e492f2
  • Loading branch information...
1 parent 52c036d commit 4b6fba1627d2256a99688082113da72d04e240f2 dimaexe committed Feb 15, 2008
Showing with 7 additions and 2 deletions.
  1. +4 −0 ChangeLog
  2. +3 −2 rails-core.el
View
4 ChangeLog
@@ -1,3 +1,7 @@
+2008-02-15 Dmitry Galinsky <dima.exe@gmail.com>
+
+ * rails-core.el (rails-core:observer-p, rails-core:mailer-p): fixed regexp.
+
2008-02-11 Dmitry Galinsky <dima.exe@gmail.com>
* rails-snippets-feature.el (rails-snippets-feature:fixture)
View
5 rails-core.el
@@ -316,14 +316,15 @@ CONTROLLER."
;;;;;;;;;; Functions that return collection of Rails objects ;;;;;;;;;;
(defun rails-core:observer-p (name)
(when name
- (if (string-match "\\(Observer\\|_observer\\(\\.rb\\)?\\)$" name)
+ (if (string-match "\\(Observer\\|_observer\\)\\(\\.rb\\)?$" name)
t nil)))
(defun rails-core:mailer-p (name)
(when name
- (if (string-match "\\(Mailer\\|Notifier\\|_mailer\\|_notifier\\(\\.rb\\)?\\)$" name)
+ (if (string-match "\\(Mailer\\|Notifier\\|_mailer\\|_notifier\\)\\(\\.rb\\)?$" name)
t nil)))
+
(defun rails-core:controllers (&optional cut-contoller-suffix)
"Return a list of Rails controllers. Remove the '_controller'
suffix if CUT-CONTOLLER-SUFFIX is non nil."

0 comments on commit 4b6fba1

Please sign in to comment.
Something went wrong with that request. Please try again.