Projects tagged ‘activerecord’ and ‘rubyonrails’


Jump to tag:

Projects tagged ‘activerecord’ and ‘rubyonrails’

Filtered by Project Tags activerecord rubyonrails

Refine results Project Tags ruby (12) plugin (8) rails (8) validation (3) database (3) query (2) dodb (2) model (2) rubygem (2) attributes (2) log (2) thrudb (2)

[20 total ]

1 Users

This RubyGem and Rails plugin adds a ‘validates_constancy_of’ validation to Active Record. It allows you to prevent particular database fields from being changed after a record is created. A ... [More] validation error occurs on updates if an attribute of a model object is different from its value in the database. The code is packaged as both a RubyGem and a Rails plugin. You can use either one, depending on what your needs are. NOTE: This project is no longer in active development. It has been superseded by the built-in attr_readonly method in Rails. [Less]
Created over 2 years ago.

0 Users

CustomXMLSerialization is a Ruby on Rails plug-in that allows you more freedom in how your model objects are serialized using the to_xml method in ActiveRecord::XmlSerialization. Your ActiveRecord ... [More] subclasses can specify a complete custom serialization, without having to override to_xml in each object. You can specify exactly which fields to include in a serialization, apply custom tag names, enclose data in CDATA constructs, and unwrap superfluous second-level associations into more brief first-level fields. For more information and examples of usage, visit the overview page at http://code.google.com/p/custom-xml-serialization/wiki/Overview [Less]
Created about 1 year ago.

0 Users

DynamicRecord is a plugin for Rail's ActiveRecord which lets users dynamically expand at runtime an ActiveRecord model's set of attributes. This facilitates users to design their own forms, for ... [More] example, and collect data submitted on those forms. A goal is to make this feature completely transparent, so the dynamic model looks and quacks like a conventional ActiveRecord model. Other than aesthetics and my own coding preference, this is important so the DynamicRecord models can utilize ActiveRecord features (like validations), and use other Rails plug-ins. Related Links: http://www.vaporbase.com/postings/Choosing_a_Schema_for_Dynamic_Records [Less]
Created 12 months ago.

0 Users

As an active Python developer I find it rather tedious to continuously deploy production database changes and having the application down for an extended time because I'm running database migrations ... [More] through imports. What's really bad is that there may be many imports because several developers have checked in their needed migrations as well. Then there's the dreaded roll back. Better have that db dump you created before the deployment. Ruby on Rails however solved this with ActiveRecord::Migration. With this you just simply run rake db:migrate and boom your database is brought up to where it needs to be. Need to roll back run the command again with the pre-deploy version and it gets done. All the migrations needed and with one command. PyMigrate can be used in two ways: stand-alone; inclusion in an application. In either case all that is needed in an initial configuration dictionary, a version to run to and the environment to run in. When PyMigrate runs it will attempt to find a database table called schema_info. If this is not found then one will be created and the default version number will be 0. If one is found the version will be recorded and compared to any/none versions you pass in to run against. Depending on the version of the database and the version you wish to migrate to PyMigrate will run either the up or down sections of the appropriate migration files in order to bring the database into your desired standards. What is a migration manager that doesn't allow the use of native code? Yes PyMigrate will allow you to run native and your Python code as needed. One of the command blocks is code: to allow you to do that. Now, if need be you can create synching classes and code as you see fit. [Less]
Created 9 months ago.

0 Users

PostgreLogCleaner ================= Make ActiveRecord logs more short and clean by removing system SQL logs lines. That actually only for PostgreSQL. You also can check ... [More] http://agilewebdevelopment.com/plugins/db_log_cleaner for mysql support. Example of Removed Log Line ======= SQL (0.000000) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = 'categories'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum NOTE: If you want to see SQL Logs in production mode, set RAILS_DEFAULT_LOGGER.level = Logger::DEBUG in your environments/production.rb [Less]
Created 12 months ago.

0 Users

SummaryThis plugin adds new simple validation to your rails models. It validates that the value of the specified attribute does not exceed specified word count. SVN ... [More] Repositoryhttp://validates-word-count.googlecode.com/svn/ Installation> ruby ./script/plugin install http://validates-word-count.googlecode.com/svn/tags/validates-word-count UsageJust drop the following lines to a model you want to add this validation to: class Article < ActiveRecord::Base validates_word_count :summary, :maximum => 30 validates_word_count :about_author, :minimum => 25 validates_word_count :annotation, :in => 100..150 endThat's it. It will make sure that the :summary value does not exceed 30 words, :annotation value word count is in 100..150 words range, and about_autor has at least 25 words. It supports regular validation options such as :if, :unless, :allow_nil etc., and works fine in conjunction with 'Validation Scenariios' plugin (http://agilewebdevelopment.com/plugins/validation_scenarios) It also extends ruby core String class and adds 'words' method to it, so all the following assertions pass: assert_equal 0, ''.words assert_equal 1, 'Hello'.words assert_equal 2, 'Hello All!'.words [Less]
Created about 1 year ago.

0 Users
   

Ambition is a library for simple database querying using Ruby's common Enumerable methods. It translates Ruby blocks and method chains into SQL queries, making it a breeze to write complex yet database-agnostic queries.
Created over 2 years ago.

0 Users

ActsAsRdf is a Ruby on Rails plugin that enables you to easily map your ActiveRecord objects to an RDF representation.
Created about 1 year ago.

0 Users

This library provides an abstract view of the database for the user, in such a way that they need to know little or no SQL. It is designed to act like ActiveRecord for RubyOnRails, and LINQ for ASP.NET.
Created 3 months ago.

0 Users

HasMagicColumnsExtends ActiveRecord models and adds "magic" columns and attributes to a model. Model classes or instances can maintain completely unique and separate data and are able to access this ... [More] data through the standard ActiveRecord style interface. This is useful in multi-user or multi-account applications where each user can "customize" the attributes they would like to use without managing multiple schema or installations. This plugin was written by and maintained by Brandon Keene, a professional Rails developer working in San Francisco, CA. InstallationYou need to create table definitions for included column and attribute models. Generate the migration using the included task: rake has_magic_columns:db:createRun the standard migrate task to update your schema: rake db:migrateYou're ready to start using Has Magic Columns! - Brandon Keene Exampleclass Person < ActiveRecord::Base has_magic_columns end # Create a Person @bob = Person.create(:email => "bob@example.com") # Add some MagicColumns @bob.magic_columns << MagicColumn.create(:name => "first_name") @bob.magic_columns << MagicColumn.create(:name => "last_name") @bob.magic_columns << MagicColumn.create(:name => "birthday", :datatype => "date") # Give @bob some magic... @bob.first_name = "Bob" @bob.last_name = "Magic!" @bob.birthday = Date.today # Save @bob like normal @bob.save # Find @bob and inspect him @bob = Person.find(@bob.id) @bob.first_name #=> "Bob" @bob.last_name #=> "Magic!" @bob.birthday #=> #Inherit from "Template" ColumnsA child can "inherit" magic columns from its parent. You can use container models to provide a column template for contained objects. For example, an Account has_magic_columns and has_many :people. A Person inherits magic columns from its account: class Person < ActiveRecord::Base belongs_to :account has_magic_columns :inherit => :account endChildren people now all share the columns of their parent account. You don't need to use these magic columns on the Account of course. It's just a convenient and logical way to provide column templating. [Less]
Created about 1 year ago.