[Nitro] isTaggable bug
Mark Van De Vyver
mvyver at gmail.com
Tue Nov 6 22:34:39 EST 2007
Hi Rob,
Not sure if this helps or sheds any light....
In evolution.rb:Evolution#evolve_schema, the method will:
return unless @options[:evolve_schema]
HTH?
Mark
On Nov 7, 2007 10:21 AM, Robert Mela <rob at robmela.com> wrote:
> Actually, it's probably a generic many_to_many bug.
>
> Problem also exists in trunk.
>
>
> #!/opt/local/bin/ruby
> require 'og'
> require 'sqlite3'
>
> class Post
> attr_accessor :name, String
> is Taggable
> end
>
> Og.start(
> :adapter => 'sqlite',
> :name => 'tagtest',
> :destroy_schema => true,
> :create_schema => true
> )
> p=Post.new
> p.name = 'post1'
> t1 = Tag.new
> t1.name = 'tag1'
> t2 = Tag.new
> t2.name = 'tag2'
>
>
> p.tags << t1
> p.tags << t2
> p.save
>
> This exception thrown during save. I expect it's likely to bring any
> blog sample application crashing early. Not a good early impression!
>
> Also of note -- notice printed for ogtag and ogpost, but none for
> ogj_post_tag. But that's not important now :)
>
> robert-melas-computer:~/projects/og rmela$ ruby tagtest.rb
> INFO: Og uses the Sqlite store.
> INFO: Dropped database 'tagtest'
> INFO: Created table ogtag.
> INFO: Created table ogpost.
> /Users/rmela/nitro/branch/script/lib/../../og/lib/og/collection.rb:274:in
> `send': undefined method `remove' for [#<Tag:0x15bec48 @count=0,
> @name="tag1">]:Array (NoMethodError)
> from
> /Users/rmela/nitro/branch/script/lib/../../og/lib/og/collection.rb:274:in
> `method_missing'
> from
> /Users/rmela/nitro/branch/script/lib/../../og/lib/og/collection.rb:134:in
> `<<'
> from tagtest.rb:26
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
More information about the Nitro-general
mailing list