Files
railsgoat/app/models/performance.rb
T
Fred Nixon ea8e9901f4 On branch strong-params
Your branch is behind 'origin/strong-params' by 1 commit, and can be fast-forwarded.

I'll pull to catch up after this commit
Change code to whitelist params
Remove attr_accessible lines
Add strong_params to Gemfile, since this branch is still on Rails 3
Mixin to ActiveRecord::Base ActiveModel::ForbiddenAttributesProtection
Use an initializer for the mixin
2014-12-05 15:04:01 -05:00

9 lines
171 B
Ruby

class Performance < ActiveRecord::Base
belongs_to :user
def reviewer_name
u = User.find_by_id(self.reviewer)
u.full_name if u.respond_to?('fullname')
end
end