Skip to content

Commit

Permalink
rails-core.el (rails-core:observer-p, rails-core:mailer-p): fixed reg…
Browse files Browse the repository at this point in the history
…exp.

git-svn-id: svn+ssh://rubyforge.org/var/svn/emacs-rails/trunk@224 cc5033d0-740f-0410-afc7-949910e492f2
  • Loading branch information
dimaexe committed Feb 15, 2008
1 parent 52c036d commit 4b6fba1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions 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)
Expand Down
5 changes: 3 additions & 2 deletions rails-core.el
Expand Up @@ -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."
Expand Down

0 comments on commit 4b6fba1

Please sign in to comment.