code completion problems with Rails 3?

IMO, Rails 3 makes it a bit harder -- the validators are now hash keys on the generic validates method.

e.g.

  validates :email, :presence => true,
                    :format => {:with => /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i},
                    :uniqueness => {:ca<Ctrl+Space> here does not complete it to :case_sensitive




Am I right or there is some setting that will enable the completion somehow?

In general, is there a comprehensive list somewhere of things that are candidates for auto-completion?

-Kedar
1 comment
Comment actions Permalink

Hi,

  validates :email, :presence => true,
                    :format => {:with => /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i},
                    :uniqueness => {:ca<Ctrl+Space> here does not complete it to :case_sensitive



Am I right or there is some setting that will enable the completion somehow?


Semantic-aware completion isn't available here for ":uniqueness" hash key. I've filed an issue - http://youtrack.jetbrains.net/issue/RUBY-7830

In general, is there a comprehensive list somewhere of things that are candidates for auto-completion?


You may play with  /Applications/idea/RubyMine\ 3.1.app/rb/paramdefs/rails/rails3_paramdefs_loader.rb. It is rather easy to fix it (you need patch line 86). If you wont manage to tune it I'll show right answer, ok ;) ?

0

Please sign in to leave a comment.