SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Location
    Byron Bay, NSW, Australia
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RoR 3+ and TextMate

    Hey guys,

    Is there an autocomplete for RoR 3+? I'm told that the latest bundle is for both 2 & 3+ but the validate syntax is the old stuff

    For example:
    RoR 3+ should be
    Code Ruby:
    validates :name, :presence => true

    But the TextMate only has autocomplete for old validation syntax
    Code Ruby:
    validates_presence_of :attribute, :on => :create, :message => "can't be blank"
    Madproject - I'm an amateur...
    What I learn from day to day

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can edit your snippets in the bundle editor.

    You can get to it at:

    Bundles > Bundle Editor > Edit Snippets

    The syntax is pretty simple. I like to customise things quite a lot, as the default snippets tend to do too much.

    You could also download a more up to date bundle if you like, but I'd suggest the homebrew approach as it's probably faster, and you'll know what you've got.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Location
    Byron Bay, NSW, Australia
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Legend, thanks for that!
    Madproject - I'm an amateur...
    What I learn from day to day

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •