Skip to content
This repository
Browse code

Fixed autocomplete bug when model has no associations. Thanks alobato…

… (Arley Lobato).

Changed Create functional test snippet.
  • Loading branch information...
commit 54fa7b253bb99a083fc2137cda6a4648f7694197 1 parent 9ead074
Carlos Brando carlosbrando authored
4 Snippets/Create functional test class.tmSnippet
@@ -3,10 +3,10 @@
3 3 <plist version="1.0">
4 4 <dict>
5 5 <key>content</key>
6   - <string>require File.dirname(__FILE__) + '/../test_helper'
  6 + <string>require 'test_helper'
7 7
8 8 class ${1:Model}ControllerTest &lt; ActionController::TestCase
9   - deft$0
  9 + test$0
10 10 end
11 11 </string>
12 12 <key>name</key>
4 Support/bin/list_columns.rb
@@ -62,8 +62,10 @@ def clone_cache(klass, new_word)
62 62 def display_menu(klass)
63 63 columns = cache[klass][:columns]
64 64 associations = cache[klass][:associations]
  65 +
  66 + options = associations.empty? ? [] : associations + [nil]
  67 + options += columns + [nil, RELOAD_MESSAGE]
65 68
66   - options = associations + [nil] + columns + [nil, RELOAD_MESSAGE]
67 69 selected = TextMate::UI.menu(options)
68 70 return if selected.nil?
69 71

0 comments on commit 54fa7b2

Please sign in to comment.
Something went wrong with that request. Please try again.