Displaying 1 result from an estimated 1 matches for "validate_associated_records_for_tag".
Did you mean:
validate_associated_records_for_tags
2008 Jun 10
2
validates_associated doesn't work on update (and i've tried :on => :update)
...how the errors for @story in a form on both new and edit. Everything
works fine on new/create, but it fails on edit/update. First the
models:
class Story < ActiveRecord::Base
attr_accessor :tag_string_holder #holds a CSV of tags
...
has_and_belongs_to_many :tags, :uniq=> true
...
def validate_associated_records_for_tags() end #to remove the
generic "is invalid" error for tags
...
validates_associated :tags, :message => ''may consist of only
letters, numbers, and underscores''
...
class Tag < ActiveRecord::Base
has_and_belongs_to_many :stories, :uniq => true, :order =>...