class Author

Attributes

post[RW]
post_log[RW]

Public Instance Methods

extension_method() click to toggle source
# File activerecord/test/models/author.rb, line 150
def extension_method; end
label() click to toggle source
# File activerecord/test/models/author.rb, line 164
def label
  "#{id}-#{name}"
end
post_attributes=(attributes) click to toggle source
# File actionview/test/lib/controller/fake_models.rb, line 153
def post_attributes=(attributes); end
ratings() click to toggle source
# File activerecord/test/models/author.rb, line 18
def ratings
  Rating.joins(:comment).merge(self)
end
set_post_log() click to toggle source
# File activerecord/test/models/author.rb, line 160
def set_post_log
  @post_log = []
end
social() click to toggle source
# File activerecord/test/models/author.rb, line 168
def social
  %w(twitter github)
end

Private Instance Methods

log_after_adding(object) click to toggle source
# File activerecord/test/models/author.rb, line 179
def log_after_adding(object)
  @post_log << "after_adding#{object.id}"
end
log_after_removing(object) click to toggle source
# File activerecord/test/models/author.rb, line 187
def log_after_removing(object)
  @post_log << "after_removing#{object.id}"
end
log_before_adding(object) click to toggle source
# File activerecord/test/models/author.rb, line 175
def log_before_adding(object)
  @post_log << "before_adding#{object.id || '<new>'}"
end
log_before_removing(object) click to toggle source
# File activerecord/test/models/author.rb, line 183
def log_before_removing(object)
  @post_log << "before_removing#{object.id}"
end
raise_exception(object) click to toggle source
# File activerecord/test/models/author.rb, line 191
def raise_exception(object)
  raise Exception.new("You can't add a post")
end