Skip to content

Commit

Permalink
rails-core.el (rails-core:model-file
Browse files Browse the repository at this point in the history
  rails-core:controller-file-by-model): search namespaced models and
  controllers.


git-svn-id: svn+ssh://rubyforge.org/var/svn/emacs-rails/trunk@218 cc5033d0-740f-0410-afc7-949910e492f2
  • Loading branch information
dimaexe committed Nov 2, 2007
1 parent c5ba131 commit 1ff2c51
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
2007-11-03 Dmitry Galinsky <[email protected]>

* rails-core.el (rails-core:model-file): search namespaced models.
* rails-core.el (rails-core:model-file
rails-core:controller-file-by-model): search namespaced models and
controllers.

* rails-test.el (rails-test:line-regexp): applled patch by Alan Shields,
don't hightlight whitespaces in test output.
Expand Down
13 changes: 11 additions & 2 deletions rails-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,17 @@ it does not exist, ask to create it using QUESTION as a prompt."
(setq controller
(cond
((rails-core:controller-exist-p controller) controller) ;; pluralized
((rails-core:controller-exist-p model) model))) ;; singularized
((rails-core:controller-exist-p model) model) ;; singularized
(t (let ((controllers (rails-core:controllers t)))
(cond
;; with namespace
((find
(list controller model)
controllers
:test #'(lambda(x y)
(or
(string= (car x) (rails-core:strip-namespace y))
(string= (cadr x) (rails-core:strip-namespace y)))))))))))
(when controller
(rails-core:controller-file controller)))))

Expand Down Expand Up @@ -569,7 +579,6 @@ cannot be determinated."
(when line-number
(goto-line line-number)))))


;;;;;;;;;; Rails minor mode logs ;;;;;;;;;;

(defun rails-log-add (message)
Expand Down

0 comments on commit 1ff2c51

Please sign in to comment.