modifying helper to better suit forms

git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@75 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7
master
andrew 2008-01-02 07:57:32 +00:00
parent c4e2ce6375
commit 704b5de94a
1 changed files with 2 additions and 5 deletions

View File

@ -185,7 +185,7 @@ module ActiveRecord
write_inheritable_attribute(:tag_options, options) write_inheritable_attribute(:tag_options, options)
[ :collection, :tag_class_name, :join_class_name ].each { |key| options.delete(key) } # remove these, we don't need it anymore [ :collection, :tag_class_name, :join_class_name ].each { |key| options.delete(key) } # remove these, we don't need it anymore
[ :join_table, :association_foreign_key ].each { |key| options.delete(key) } if join_model # don<EFBFBD>t need this for has_many [ :join_table, :association_foreign_key ].each { |key| options.delete(key) } if join_model # don't need this for has_many
# now, finally add the proper relationships # now, finally add the proper relationships
class_eval do class_eval do
@ -439,10 +439,7 @@ module ActiveRecord
# Returns an array of strings containing the tags applied to this object. # Returns an array of strings containing the tags applied to this object.
# If +reload+ is +true+, the tags collection is reloaded. # If +reload+ is +true+, the tags collection is reloaded.
def tag_names(reload = false) def tag_names(reload = false)
ary = tag_collection(reload).map { |tag| tag.name } ary = tag_collection(reload).map { |tag| tag.name }.join(' ')
ary.extend(TagNamesMixin)
ary.set_tag_container(self)
ary
end end
# Checks to see if this object has been tagged with +tag_name+. # Checks to see if this object has been tagged with +tag_name+.