ruby on rails - how override attr_accessible role ActsAsTaggableOn::Tag model? -


how override attr_accessible role field :name in tag model in actsastaggableon gem ?

i want things in tag model ...

attr_accessible :name, :as => [:default, :admin] 

for allow me edit field name of tag admin role

you can monkey patch acts_as_taggable_on creating file in config/initializers , adding following lines. restart rails server changes take effect.

actsastaggableon::tag.class_eval   attr_accessible :name, :as => [:default, :admin] end 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -