Sha256: e5a222f914a6b1a89f5f3d8bde1349690a2dbd683e45cf643ecdf9c066cd4cd4
Contents?: true
Size: 559 Bytes
Versions: 114
Compression:
Stored size: 559 Bytes
Contents
# Common methods for single relations, like {Relation::Public} and {Relation::Reject} # # Unlike {Relation::Custom}, {SocialStream::Models::Subject subjects} have only one of # these {Relation relations}. # class Relation::Single < Relation class << self def default_for(actor) create! :actor => actor end # The {Relation::Public} belonging to actor def of(actor) actor(actor).first end end # The name of public relation def name I18n.t("relation_#{ self.class.name.split("::").last.underscore }.name") end end
Version data entries
114 entries across 114 versions & 4 rubygems