added attr accessible guards to post

This commit is contained in:
albert
2010-02-15 14:45:39 -05:00
parent a7a6395384
commit e745a87e5f
5 changed files with 67 additions and 53 deletions

View File

@@ -11,6 +11,7 @@ class Artist < ActiveRecord::Base
has_one :wiki_page, :foreign_key => "title", :primary_key => "name"
has_one :tag_alias, :foreign_key => "antecedent_name", :primary_key => "name"
accepts_nested_attributes_for :wiki_page
attr_accessible :url_string, :other_names, :group_name, :wiki_page_attributes
module UrlMethods
module ClassMethods

View File

@@ -2,18 +2,17 @@ class Post < ActiveRecord::Base
attr_accessor :updater_id, :updater_ip_addr, :old_tag_string
after_destroy :delete_files
after_destroy :delete_favorites
after_save :create_version
after_save :create_version
before_save :merge_old_tags
before_save :normalize_tags
before_save :create_tags
before_save :update_tag_post_counts
before_save :set_tag_counts
belongs_to :updater, :class_name => "User"
has_one :unapproval, :dependent => :destroy
has_one :upload, :dependent => :destroy
has_many :versions, :class_name => "PostVersion", :dependent => :destroy
has_many :versions, :class_name => "PostVersion", :dependent => :destroy
attr_accessible :source, :rating, :tag_string, :old_tag_string
module FileMethods
def delete_files