On Jan 18, 2007, at 8:39 AM, James.Strachan wrote:
James.Strachan wrote:
James.Strachan wrote:
It'd be great if it'd work inside, say, Rails controllers/models too
rather than self contained ruby scripts. I wonder if the user is
in a
Rails project we could switch the 'ruby -I' stuff with 'script/
console'
(or something like that - maybe a require 'config/boot' or
something) so
that working on a rails project it would boot up the various rails
plugins so that we'd get lovely completion inside controllers &
models?
Will noodle around and see if I can figure it out...
I've reached the end of my rcodetools/ruby knowledge unfortunately
- but I
did figure out how to boot up rails config/environment if it was
present
and pass it into rcodetools which avoids the error message you get
with
undefined constants like ActionController or ActiveRecord, though
when
this is added it seems to stop finding any matches at all :)
I'm attaching it here in case it helps anyone else figure it out...
http://www.nabble.com/file/5703/patch.txt patch.txt
Actually this patch does work when trying completion at the class
level!
e.g. inside an ActiveRecord::Base you get completion of the various
validates_* or act_as_* methods etc. YAY!
I just committed a patch inspired by your own. Rails support should
be working now.
James Edward Gray II
_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev