search for: activerecordextensions

Displaying 4 results from an estimated 4 matches for "activerecordextensions".

2006 Nov 09
2
redefining the method belongs_to in ActiveRecord::Base
...e the method belongs_to in ActiveRecord::Base, so every time a model is defined as belonging to :attachment, it should have some additional methods. I tried to do an alias of belongs_to, but this was not successful. The error message in Webrick was > Booting WEBrick... ./script/../config/../lib/ActiveRecordExtensions.rb:67: undefined method `belongs_to'' for module `ActiveRecord'' (NameError) The code with problem is: alias :attachment_belongs_to :belongs_to def belongs_to(association_id, options={}) self.attachment_belongs_to(association_id,options) if association_id == :attachmen...
2009 Oct 13
1
loofah 0.3.1 Released
loofah version 0.3.1 has been released! * <http://loofah.rubyforge.org> * <http://rubyforge.org/projects/loofah> * <http://github.com/flavorjones/loofah> Loofah is an HTML sanitizer. It will always fix broken markup, but can also sanitize unsafe tags in a few different ways, and transform the markup for storage or display. It''s built on top of Nokogiri and libxml2, so
2005 Dec 05
0
bug in bubbleshare's Active Record extensions?
...yalbum_id /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/connection_adapters/abstract_adapter.rb:67:in `log'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/connection_adapters/postgresql_adapter.rb:113:in `execute'' ./config/../vendor/plugins/ActiveRecordExtensions/lib/active_record_extensions.rb:60:in `remove_foreign_key_constraint'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/migration.rb:153:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/migration.rb:153:in `method_missing'' ./d...
2006 Feb 01
7
Explanation of "alias_method"
Hi! I''m trying to extend ActiveRecord''s find method (Rails 1.0, Ruby 1.8.2), but I recognize a strange behaviour of the "alias_method" call. I wrote a very simple script to explain my problem: ------------------------------------------------------ module ActiveRecordExtension def self.included(base) base.extend(ClassMethods) base.class_eval do