Class: HiveSQL::Comment
- Defined in:
- lib/hive_sql/models/comment.rb
Class Method Summary collapse
- .find_by_author(author) ⇒ Object
- .find_by_author_and_permlink(author, permlink) ⇒ Object
- .find_by_parent(parent_author) ⇒ Object
Instance Method Summary collapse
Methods inherited from SqlBase
Class Method Details
.find_by_author(author) ⇒ Object
101 102 103 |
# File 'lib/hive_sql/models/comment.rb', line 101 def self.() where(author: ).first end |
.find_by_author_and_permlink(author, permlink) ⇒ Object
109 110 111 |
# File 'lib/hive_sql/models/comment.rb', line 109 def self.(, permlink) where(author: , permlink: permlink).first end |
.find_by_parent(parent_author) ⇒ Object
105 106 107 |
# File 'lib/hive_sql/models/comment.rb', line 105 def self.find_by_parent() where(parent_author: ).first end |
Instance Method Details
#beneficiaries ⇒ Object
113 114 115 |
# File 'lib/hive_sql/models/comment.rb', line 113 def beneficiaries JSON[self[:beneficiaries]] end |
#hydrated_json_metadata ⇒ Object
121 122 123 |
# File 'lib/hive_sql/models/comment.rb', line 121 def JSON[] rescue {} end |
#tag_names ⇒ Object
117 118 119 |
# File 'lib/hive_sql/models/comment.rb', line 117 def tag_names .pluck(:tag) end |