What rails plugins are good, stable and *really* enhance your code?

前端 未结 7 1683
难免孤独
难免孤独 2021-02-03 14:44

Anyone have a list of rails plugins that are both stable and give you enough functionality to be worth the extra effort of supporting?

Edit:

I am mos

相关标签:
7条回答
  • 2021-02-03 14:52

    You can use bort as reference

    Plugins Installed

    Bort comes with a few commonly used plugins installed and already setup.

    RESTful Authentication

    RESTful Authentication is already setup. The routes are setup, along with the mailers and observers. Forgotten password comes setup, so you don’t have to mess around setting it up with every project.

    The AASM plugin comes pre-installed. RESTful Authentication is also setup to use user activation.

    User Roles

    Bort now comes with Role Requirement by Tim Harper. A default admin role is predefined along with a default admin user. See the migrations for the admin login details.

    Open ID Authentication

    Bort, as of 0.3, has Open ID integrated with RESTful Authentication. Rejoice!

    Will Paginate

    We use will_paginate in pretty much every project we use, so Bort comes with it pre-installed.

    Rspec & Rspec-rails

    You should be testing your code, so Bort comes with Rspec and Rspec-rails already installed so you’re ready to roll.

    Exception Notifier

    You don’t want your applications to crash and burn so Exception Notifier is already installed to let you know when everything goes to shit.

    Asset Packager

    Packages up your css/javascript so you’re not sending 143 files down to the user at the same time. Reduces load times and saves you bandwidth.

    p/s: agree with @eric, specifics

    0 讨论(0)
  • 2021-02-03 14:52

    I my rails time I used http://github.com/mbleigh/acts-as-taggable-on/tree/master with success.

    0 讨论(0)
  • 2021-02-03 15:01

    I can imagine why you are asking that. I used to work in a project with more than 20 plugins in use. Sure, it speeded up the development early on, but later debugging became difficult. Also, updating to a new version of Rails was a lengthy process.

    My advice is that don't start using a plugin before have a reasonable understanding of how it works and of the trade-offs involved. For small plugins you should probably read the source code. For larger ones, see what other people are saying about them, when the plugin was updated the last time, etc.

    For scanning popular plugins, see the most popular github projects. Quite a few of them are Rails plugins.

    0 讨论(0)
  • 2021-02-03 15:06

    Try resource_controller. http://jamesgolick.com/2007/10/19/introducing-resource_controller-focus-on-what-makes-your-controller-special

    It seriously dries up your RESTful controllers. And is the only plausible way of implementing polymorphic actions that I've come across.

    Loads of other good stuff too. Give it a try.

    0 讨论(0)
  • 2021-02-03 15:10

    For me, Haml is excellent. It's not for everyone but if it clicks with you you'll love it. Set aside 30 min and give it a shot. It reduces the clutter in my views by about 50%.

    It's easy to install using Rails 2.1+'s gem dependencies :

    # environment.rb
    config.gem 'haml'
    

    Then:

    rake gems:install
    
    0 讨论(0)
  • 2021-02-03 15:10

    Ruby Trends is a good place to check what the most popular plugins/gems/books/practices are. It's like StackOverflow (i.e., voting plugins up/down) but is more fine-grained and has the ability to search/filter.

    0 讨论(0)
提交回复
热议问题