86 Posts tagged with plugin
ReinH explores the differences between UltraSphinx and ThinkingSphinx, and explains why is awesomer.
A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration and searching.
CSS/JS asset bundling plugin
a Rails plugin that easily integrates your app with Fire Eagle, by yours truly
All sorts of wonderful addons for Safari, including History Flow - a Cover Flow style browser for your history.
This plugin makes it possible to define has_many :through relationships that go through other has_many :through relationships, possibly through an arbitrarily deep hierarchy
Paperclip is intended as an easy file attachment library for ActiveRecord. The intent behind it was to keep setup as easy as possible and to treat files as much like other attributes as possible.
Pretty Rails.production?, Rails.development?, Rails.test? and Rails.environment methods
Validate your (X)HTML against the W3C Validator web service from within your functional tests.
Plugin to help populate the development and production databases of Ruby on Rails projects
This is a simple module which changes Mongrel's process title to reflect what it's currently doing. You can then determine a given Mongrel server's status using ps
Edge changeset 8664 introduces ActiveSupport::Callbacks. This currently breaks attachment_fu's callback internals and may affect other plugins as well...
Database based asynchronously priority queue system -- Extracted from Shopify
Adds a simple #search class method that does SQL searching behind the scenes.
Overrides find_one and to_param to use the given attribute
Excludes attributes from serialization methods like to_xml and to_json
Adds :if and :unless modifiers to before_filters, most ActiveRecord callbacks, and validations.
An XMPP chat plugin for use w/ Rails
a plugin called 'workling' that integrates starling into your rails app
Clever optimizations to Rails Sessions
Beast (a Rails forum), as a plugin, for Rails 2.0
Provides an additional AR::Errors object, referred to as warnings, to ActiveRecord objects. Useful for noting that objects are valid but not in the desired 'complete' state.
Rails plugin for generating URL slugs. Automatically generates redirects if the field used to generate the slug changes
Syntactic sugar for multi-model forms
To ensure your test cases call efficient MySQL
An advanced mysql query analyzer for rails: runs 'EXPLAIN' before each of your select queries in development and summarizes query warnings.
Template Inheritance is a plugin for Movable Type that enables you to link templates together in a way that one template inherits its template code from another template
Desert is a component framework for Rails that allows you to seamlessly define Models, Controllers, Views, Helpers, Routes, Migrations, and Plugin Dependencies in your plugins.
Great intro to acts_as_state_machine
A small enhancement to the very useful Acts As State Machine
SimplyVersioned is a simple, non-invasive, approach to versioning ActiveRecord models
A collection of RSpec Matchers focused on specing Ruby on Rails projects
RJS Generator for the Script.aculo.us Sounds library
MinimalCart is very lightweight shopping cart plugin for Rails that leverages ActiveMerchant as a payment gateway.
A Sample Rails' plugin for those not wise in the ways of science. Or something.
Async Observer is a Rails plugin that provides deep integration with Beanstalk
This plugin provides a 'spawn' method to easily fork OR thread long-running sections of code so that your application can return results to your users more quickly.
The plugin currently provides helper methods for hAtom, basic hCard, and the datetime design pattern.
Nice, clean approach to HTTP caching in Rails
Better In-place Controls for Rails 2.0
Interlock makes your view fragments and associated controller blocks march along together. If a fragment is fresh, the controller behavior won‘t run. It also automatically tracks invalidation dependencies based on the model lifecycle.
Streamlined is a plugin for Ruby on Rails that provides an instant, production-ready UI for your ActiveRecord models.
MultiRails lets you test your Rails plugin or app against many versions of Rails in one sweep.
Duck-punch your Rails plugins without pissing off the Duck. Or something.
A plugin that allows you to freeze gems into vendor, including compiled extension for multiple platforms (!!!)
Connection proxy sends some queries (thoes in a transaction, update statements, and ActiveRecord::Base#reload) to a master database, and the rest to the slave database
Proof of concept Lazy-Loading for ActiveRecord. Inspired by the 'kickers' of Ambition.
Allows you to decorate the respond_to block of actions on sublcassed controllers
This plugin allows controllers to use HTTP Basic and Digest access authentication.
The goal of the MultiAppRouting plugin is to allow easy linking between multiple rails applications on different hosts.
This code, extracted from the Rails codebase of dopplr.com, extends your User model with methods to pull in social network information from sites such as GMail, Twitter, Flickr, Facebook and any site supporting appropriate Microformats.

I’ve always been annoyed at the lack of maintainability that comes with using multiple resource controllers in my Rails apps. Each generated resource controller clocks in at 85 lines, and most of mine only differ from each other by a line or two – an added before_filter or a change in the url that the users is redirected to after the creation of a new Widget. Not very DRY. When coming back to each one of these controllers to add or adjust features, it takes me entirely too much time to sift through the stock 85 lines and find my application-specific behavior.
Enter resource_this
git clone git://github.com/jnewland/resource_this.git
resource_this aims to solve this maintainability problem by making your stock resource controllers look like this:
class PostsController < ActionController::Base
resource_this
end
Behind the scenes, this code is generated:
class PostsController < ActionController::Base
before_filter :load_post, :only => [ :show, :edit, :update, :destroy ]
before_filter :load_posts, :only => [ :index ]
before_filter :new_post, :only => [ :new ]
before_filter :create_post, :only => [ :create ]
before_filter :update_post, :only => [ :update ]
before_filter :destroy_post, :only => [ :destroy ]
protected
def load_post
@post = Post.find(params[:id])
end
def new_post
@post = Post.new
end
def create_post
@post = Post.new(params[:post])
@created = @post.save
end
def update_post
@updated = @post.update_attributes(params[:post])
end
def destroy_post
@post = @post.destroy
end
def load_posts
@posts = Post.find(:all)
end
public
def index
respond_to do |format|
format.html
format.xml { render :xml => @posts }
format.js
end
end
def show
respond_to do |format|
format.html
format.xml { render :xml => @post }
format.js
end
end
def new
respond_to do |format|
format.html { render :action => :edit }
format.xml { render :xml => @post }
format.js
end
end
def create
respond_to do |format|
if @created
flash[:notice] = 'Post was successfully created.'
format.html { redirect_to @post }
format.xml { render :xml => @post, :status => :created, :location => @post }
format.js
else
format.html { render :action => :new }
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
format.js
end
end
end
def edit
respond_to do |format|
format.html
format.js
end
end
def update
respond_to do |format|
if @updated
flash[:notice] = 'Post was successfully updated.'
format.html { redirect_to @post }
format.xml { head :ok }
format.js
else
format.html { render :action => :edit }
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
format.js
end
end
end
def destroy
respond_to do |format|
format.html { redirect_to :action => posts_url }
format.xml { head :ok }
format.js
end
end
end
Nested resources like so:
class CommentsController < ActionController::Base
resource_this :nested => [:posts]
end
This generates a very similar controller to the one above with adjusted redirects and one additional before_filter / loader method pair to grab the parent resource. In this case:
before_filter :load_post
def load_post
@post = Post.find(params[:post_id])
end
The separation of logic – DB operations in before_filters, rendering in the standard resource controller methods – makes this approach ridiculously easy to customize. Need to load an additional object for the :show action? Slap another before_filter on it. Need to change the path that the :update action redirects to? Override the :update action with your new rendering behavior. And this customized behavior sticks out like a sore thumb – making it infinitely easier to maintain.
Oh, there’s also a generator:
./script/generate resource_this FooKlass [title:string body:text]
This works just like the resource generator, with the addition of the resource_this line to your controller and a functional test. No views are generated, so the test focuses on the XML behavior of this controller.
Contributing
resource_this is hosted on GitHub, so feel free to fork it and send a pull request with your changes.
Not scaffolding. Resourcing. Creates extremely customizable resource controllers with one line of code.
a template lookup system on top of standard Rails rendering pipeline.
simple Rails plugin for providing poloymorphic ratings
A simple plugin extracted from Mephisto for creating permalinks from attributes.
Was just looking for this today. Perfect.
has_many :through for polymorphic relationships
Oy. Nice, simple, auto-creation of REST controllers. Encourages fat models. Rawk.
This plugin enables greater levels of page caching by rendering flash messages from a cookie using JavaScript, instead of in your Rails view template.
A Ruby on Rails plugin for visually setting expectations throughout application development. MileMarker adds a helper for marking page elements with the milestone they are slated to be developed, and makes them unable to be interacted with.
A plugin to prevent widows from appearing in titles and entry headers. Widows are single words, left on their lonesome on a line at the end of a paragraph, and generally look like poo.
AJAX-y file uploads with attachment_fu using an IFRAME trick. Slick
An incredible detailed tutorial for using attachment_fu
The extended_fragment_cache plugin provides content interpolation and an in-process memory cache for fragment caching.
Nice simple pagination for Rails apps
This auto-save plugin for Movable Type acts on all new and unpublished entries, in both the back-end and bookmarklets. Whenever you've typed some new text within a span of time that you define, the entry gets saved automatically.
Nice hack to make Radiant even more useful.
ResourceFu is a collection of hacks from various plugins that ... developed to make using nested and polymorphic resources simpler in my projects.
Nice simple rails plugin to provide a simple friendship model
...a pattern of posting a form to a hidden IFRAME returning javascript control back to the parent page to display a progress bar, make visual effects, show a “uploading” graphic or basically do anything than the default blocking of the page until the
DRY syntax for Active Record Migrations
Redirects in routes, as well as host and subdomain routing.
Mike Clark covers attachment_fu, Rick Olson's amazing file uploading plugin with drop-in support for using s3 as storage.
This White Listing helper will html encode all tags and strip all attributes that aren’t specifically allowed. It also strips href/src tags with invalid protocols, like javascript: especially. It does its best to counter any tricks that hackers may use,
A collection of helpers to match Rails' new REST-ful style
Allows you to create messages in the user interface, which the users can dismiss once read. The plugin stores the reference to the dismissed message in a cookie.
Mix-in for classes that needs to have a token generated using MD5.
Account location is a set of protected methods that supports the account-key-as-subdomain
way of identifying the current scope. These methods allow you to easily produce URLs that
match this style and to get the current account key from the subdomain.
Geokit is a Rails plugin for building location-based apps. It provides geocoding, location finders, and distance calculation in one cohesive package.
Plugin to make timezone handling in Rails less of a pain.
Nice writeup of acts_as_versioned, a Rails plugin providing wiki-like versioned behavior for any model.
This is smooth, and easy. Nice.
A crazy way to monitor the performance of your Rails app using, of all things, Mint.
Rails Plugin: Makes graphs using pure CSS. Includes itself in the ActionView::Helpers::TextHelper module, so no extra include is required.