Draggable Ruby files in Rails + Ruby bundles

3 views
Skip to first unread message

Dr Nic

unread,
Jun 3, 2008, 12:43:36 AM6/3/08
to Ruby on Rails: TextMate
I just added a Draggable to the bundle (+ one to the Ruby bundle on
github) which allows you to drag a ruby file (from the dock file tree)
into another ruby file, and creates a require statement.

The default behaviour for source.ruby and source.ruby.rails is to
create:

require File.dirname(__FILE__) + '/path/to/dragged/file'

But, if the file comes from a subset of known folders (app/
controllers, app/models, app/helpers, lib + config) then it is
shortened to:

require 'path/to/dragged/file'


Rails bundle: http://github.com/drnic/ruby-on-rails-tmbundle/tree/master
Ruby bundle: http://github.com/drnic/ruby-tmbundle/tree/master

Nic

jswanner

unread,
Jun 3, 2008, 10:24:56 AM6/3/08
to Ruby on Rails: TextMate
Brilliant!
Reply all
Reply to author
Forward
0 new messages