diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-20 22:53:20 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-20 22:53:20 +0100 |
commit | 9c4856bdb11fc9311ab30a97224cee3dfaec492f (patch) | |
tree | 37fd831e505f040bbd3c583f56d3502ebd75e9c8 /app/models |
Initial commit
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/.keep | 0 | ||||
-rw-r--r-- | app/models/account.rb | 7 | ||||
-rw-r--r-- | app/models/concerns/.keep | 0 | ||||
-rw-r--r-- | app/models/status.rb | 3 |
4 files changed, 10 insertions, 0 deletions
diff --git a/app/models/.keep b/app/models/.keep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/app/models/.keep diff --git a/app/models/account.rb b/app/models/account.rb new file mode 100644 index 000000000..c0b153794 --- /dev/null +++ b/app/models/account.rb @@ -0,0 +1,7 @@ +class Account < ActiveRecord::Base + has_many :statuses, inverse_of: :account + + def subscription(webhook_url) + @subscription ||= OStatus2::Subscription.new(self.remote_url, secret: self.secret, token: self.verify_token, webhook: webhook_url, hub: self.hub_url) + end +end diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/app/models/concerns/.keep diff --git a/app/models/status.rb b/app/models/status.rb new file mode 100644 index 000000000..a1278ccaa --- /dev/null +++ b/app/models/status.rb @@ -0,0 +1,3 @@ +class Status < ActiveRecord::Base + belongs_to :account, inverse_of: :statuses +end |