Created
November 22, 2010 21:01
-
-
Save ddellacosta/710670 to your computer and use it in GitHub Desktop.
acts_as_taggable_on saving from parent relation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):094:0> @dfd.is_a?(User) | |
=> true | |
irb(main):095:0> @dfd.is_tagger? | |
=> true | |
irb(main):096:0> @alink = { :name => 'google', :link => 'http://google.com', :description => '', :tag_list => 'hello' } | |
=> {:name=>"google", :link=>"http://google.com", :description=>"", :tag_list=>"hello"} | |
irb(main):097:0> new_link = @dfd.links.new(@alink) | |
=> #<Link id: nil, name: "google", description: "", link: "http://google.com", created_at: nil, updated_at: nil, user_id: 1> | |
irb(main):098:0> new_link.tag_list | |
=> [] | |
irb(main):099:0> new_link.is_taggable? | |
=> true | |
irb(main):100:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment