Is your plugin hosted on GitHub? Make sure to press the "fetch" button next to the repository field to fetch your plugin's info from GitHub rather than typing it all in.
Repository
Name
Home Page
Short description Quickly add key/value options to any model
Description = Configurator == Expalanation Unleash your models and quickly and easily annotate anything. Store booleans, strings, or optionally serialized objects (hashes, custom classes, whatever) without extra migrations. Want your users to be able to define custom settings? class User < ActiveRecord::Base include Configurator end === Basics Now you can do things like: @user.config[:receive_email_alerts?] = true or @user.config[:notification_address] = 'user@gmail.com' Think of it as just a giant hash. @user.config = { :favorite_animal => 'dog', :favorite_color => 'blue' } === Namespaces Support for one level of namespacing: @user.config[:animals, :favorite] = 'cat' Namespaces within hash assignments: @user.config = { :animals => { :favorite => 'cat', :likes_elephants? => true }, :artists => { :favorite => 'Radiohead' } } === Form support Easy to use in views: <% fields_for :config, @user.config do |c| %> <%= c.select :favorite_color, %w(red green blue) %> <% end %> === Default Options Databases don't come filled, so there's an easy way to set defaults on your models. class User < ActiveRecord::Base include Configurator default_configuration :favorite_color => 'red', :receive_email_alerts? => true, :salary => { :default_for_manager => '$55,000', :default_for_employee => '$25,000' } end @user.config[:favorite_color] # => 'red' @user.config[:favorite_color] = 'green' @user.config[:favorite_color] # => 'green' == Setup To setup, you really just need to create the config table: class AddConfigTable < ActiveRecord::Migration def self.up create_table :config do |t| t.references :associated, :polymorphic => true t.string :namespace t.string :key, :limit => 40, :null => false t.string :value end end def self.down drop_table :config end end Include Configurator into the models you need it in, and that's it. If you need to be able to store complex objects, or strings greater than 255 characters, change the 'value' column to text. You can add to the ConfigurationHash class: serialize :value I haven't tried this yet, but it should work fine. Copyright (c) 2008 Brennan Dunn, released under the MIT license
Description format RDoc MarkDown Textile
License Ruby's Rails' (MIT) GPL LGPL BSD Apache Artistic PublicDomain BSD-type Free-Trial Free-but-Restricted OpenSource Proprietary Shareware Source-available-proprietary Commercial
Category Assets Controllers Internationalization Misc. Enhancements Model Rails Engines Searching and Queries Security Statistics and Logs Testing View Extensions