Browse files

Allow script to be ran when visiting a file in the project; current w…

…orking directory does not always reflect project root.
  • Loading branch information...
1 parent 20206f4 commit a460fdfe1bd57558eca79f7c06fb955be479c38f @remvee committed May 16, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 rails-scripts.el
@@ -199,9 +199,9 @@ BUFFER-MAJOR-MODE and process-sentinel SENTINEL."
(defun rails-script:find-rails-command (command)
"Find first of 'script/rails command', 'script/command' or 'rails command' as a list of program & args"
(cond ((file-exists-p (rails-core:file "script/rails"))
- (list rails-ruby-command "script/rails" command))
+ (list rails-ruby-command (rails-core:file "script/rails") command))
((file-exists-p (rails-core:file (format "script/%s" command)))
- (list rails-ruby-command (format "script/%s" command)))
+ (list rails-ruby-command (rails-core:file (format "script/%s" command))))
(t (list "rails" command))))
(defun rails-script:run-rails-command (command &rest parameters)

0 comments on commit a460fdf

Please sign in to comment.