Class: Kwipper::Comment
Constant Summary
Constants inherited from Model
Model::DB_FILE_NAME, Model::DB_NAME, Model::ID_COLUMN, Model::UnknownAttribute
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
all, attr_array_to_hash, column, count, create, db, destroy, #destroy, exists?, find, generate_id, hash_to_key_vals, #initialize, normalize_value_for_db, #save, sql, #sql, table_name, #update, update, where
Constructor Details
This class inherits a constructor from Kwipper::Model
Instance Method Details
#post ⇒ Object
16 17 18 |
# File 'app/models/comment.rb', line 16 def post @post ||= Post.find post_id end |
#user ⇒ Object
8 9 10 |
# File 'app/models/comment.rb', line 8 def user @user ||= User.find user_id end |
#username ⇒ Object
12 13 14 |
# File 'app/models/comment.rb', line 12 def username user.username end |