Class: Writefully::Site
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Writefully::Site
- Extended by:
- FriendlyId
- Defined in:
- app/models/writefully/site.rb
Constant Summary collapse
- HOOK_EVENTS =
%w(push collaborator)
Instance Method Summary collapse
Instance Method Details
#clear_errors ⇒ Object
28 29 30 |
# File 'app/models/writefully/site.rb', line 28 def clear_errors Writefully.redis.with { |c| c.del("site:#{self.id}:errors") } end |
#processing_errors ⇒ Object
24 25 26 |
# File 'app/models/writefully/site.rb', line 24 def processing_errors Writefully.redis.with { |c| c.smembers "site:#{self.id}:errors" } end |
#setup_repository ⇒ Object
18 19 20 21 22 |
# File 'app/models/writefully/site.rb', line 18 def setup_repository Writefully.add_job :handyman, { task: :build, auth_token: owner.data["auth_token"], user_name: owner.data["user_name"], site_id: id, site_slug: slug } end |