Sha256: eb714f4584a4dfbe1231b428be5860584a43b84fce91ce7471666902dd7a817c
Contents?: true
Size: 559 Bytes
Versions: 58
Compression:
Stored size: 559 Bytes
Contents
class Project < ActiveRecord::Base belongs_to :user belongs_to :category has_many :contributions has_many :rewards has_many :project_transitions belongs_to :city has_one :account, class_name: "ProjectAccount", inverse_of: :project def pluck_from_database attribute Project.where(id: self.id).pluck("projects.#{attribute}").first end %w( draft rejected online successful waiting_funds deleted in_analysis approved failed ).each do |st| define_method "#{st}_at" do pluck_from_database("#{st}_at") end end end
Version data entries
58 entries across 58 versions & 1 rubygems