Class: Post

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
tmp/mongoid-demo/sinatra-minimal/app.rb,
tmp/mongoid-test/app/models/post.rb,
tmp/mongoid-demo/rails/app/models/post.rb,
tmp/mongoid-demo/rails-api/app/models/post.rb

Overview

Define models

Constant Summary

Constants included from Mongoid::Document

Mongoid::Document::ILLEGAL_KEY

Constants included from Mongoid::Composable

Mongoid::Composable::MODULES, Mongoid::Composable::RESERVED_METHOD_NAMES

Constants included from Mongoid::Interceptable

Mongoid::Interceptable::CALLBACKS

Constants included from Mongoid::Association

Mongoid::Association::MACRO_MAPPING

Constants included from Mongoid::Association::Depending

Mongoid::Association::Depending::STRATEGIES

Constants included from Mongoid::Persistable

Mongoid::Persistable::LIST_OPERATIONS

Constants included from Mongoid::Fields

Mongoid::Fields::Boolean, Mongoid::Fields::IDS, Mongoid::Fields::INVALID_BSON_CLASSES, Mongoid::Fields::StringifiedSymbol, Mongoid::Fields::TYPE_MAPPINGS

Constants included from Mongoid::Atomic

Mongoid::Atomic::UPDATES

Instance Attribute Summary

Attributes included from Mongoid::Document

#__selected_fields, #new_record

Attributes included from Mongoid::Stateful

#destroyed, #flagged_for_destroy, #previously_new_record

Attributes included from Mongoid::Association

#_association

Attributes included from Mongoid::Attributes

#attributes

Attributes included from Mongoid::Clients::StorageOptions

#remembered_storage_options

Method Summary

Methods included from Mongoid::Timestamps::Updated

#able_to_set_updated_at?, #set_updated_at

Methods included from Mongoid::Timestamps::Created

#set_created_at

Methods included from Mongoid::Document

#_handle_callbacks_after_instantiation, #as_document, #as_json, #becomes, #freeze, #frozen?, #hash, #identity, #initialize, #internal_state=, #model_name, #to_key

Methods included from Mongoid::Touchable::InstanceMethods

#_clear_touch_updates, #_gather_touch_updates, #_run_touch_callbacks_from_root, #_touchable_parent?, #suppress_touch_callbacks, #touch, #touch_callbacks_suppressed?

Methods included from Mongoid::Composable

prohibited_methods

Methods included from Mongoid::Equality

#<=>, #==, #eql?

Methods included from Mongoid::Copyable

#clone

Methods included from Mongoid::Interceptable

#_mongoid_run_child_after_callbacks, #_mongoid_run_child_before_callbacks, #_mongoid_run_child_callbacks, #_mongoid_run_child_callbacks_with_around, #_mongoid_run_child_callbacks_without_around, #callback_executable?, #in_callback_state?, #pending_callbacks, #pending_callbacks=, #run_after_callbacks, #run_before_callbacks, #run_callbacks, #run_pending_callbacks

Methods included from Mongoid::Validatable

#begin_validate, #exit_validate, #performing_validations?, #read_attribute_for_validation, #valid?, #validated?, #validating_with_query?

Methods included from Mongoid::Traversable

#_children, #_descendants, #_parent, #_parent=, #_reset_memoized_descendants!, #_root, #_root?, #collect_children, #collect_descendants, #flag_descendants_persisted, #hereditary?, #parentize, #remove_child, #reset_persisted_descendants

Methods included from Mongoid::Cacheable

#cache_key

Methods included from Mongoid::Stateful

#destroyed?, #flagged_for_destroy?, #new_record=, #new_record?, #persisted?, #previously_new_record?, #previously_persisted?, #pushable?, #readonly!, #readonly?, #settable?, #updateable?

Methods included from Mongoid::Shardable

#shard_key_field_value, #shard_key_fields, #shard_key_selector, #shard_key_selector_in_db

Methods included from Mongoid::Serializable

#serializable_hash

Methods included from Mongoid::Selectable

#atomic_selector

Methods included from Mongoid::Reloadable

#reload

Methods included from Mongoid::Association

#association_name, #embedded?, #embedded_many?, #embedded_one?, #referenced_many?, #referenced_one?, #reload_relations

Methods included from Mongoid::Association::Reflections

#reflect_on_all_association, #reflect_on_association

Methods included from Mongoid::Association::Macros

#associations

Methods included from Mongoid::Association::Depending

#apply_destroy_dependencies!, define_dependency!, validate!

Methods included from Mongoid::Association::Accessors

#__build__, #create_relation, #reset_relation_criteria, #set_relation

Methods included from Mongoid::Association::Referenced::Syncable

#_syncable?, #_synced, #_synced?, #remove_inverse_keys, #update_inverse_keys

Methods included from Mongoid::Association::Referenced::CounterCache

define_callbacks!, #reset_counters

Methods included from Mongoid::Association::Referenced::AutoSave

#__autosaving__, #autosaved?, #changed_for_autosave?, define_autosave!

Methods included from Mongoid::Persistable

#atomically, #fail_due_to_callback!, #fail_due_to_validation!

Methods included from Mongoid::Persistable::Unsettable

#unset

Methods included from Mongoid::Persistable::Upsertable

#upsert

Methods included from Mongoid::Persistable::Updatable

#update, #update!, #update_attribute

Methods included from Mongoid::Persistable::Settable

#set

Methods included from Mongoid::Persistable::Savable

#save, #save!

Methods included from Mongoid::Persistable::Renamable

#rename

Methods included from Mongoid::Persistable::Pushable

#add_to_set, #push

Methods included from Mongoid::Persistable::Pullable

#pull, #pull_all

Methods included from Mongoid::Positional

#positionally

Methods included from Mongoid::Persistable::Poppable

#pop

Methods included from Mongoid::Persistable::Multipliable

#mul

Methods included from Mongoid::Persistable::Minable

#set_min

Methods included from Mongoid::Persistable::Maxable

#set_max

Methods included from Mongoid::Persistable::Logical

#bit

Methods included from Mongoid::Persistable::Incrementable

#inc

Methods included from Mongoid::Persistable::Destroyable

#destroy, #destroy!

Methods included from Mongoid::Persistable::Deletable

#delete

Methods included from Mongoid::Persistable::Creatable

#insert

Methods included from Mongoid::Matchable

#_matches?

Methods included from Mongoid::Fields

#apply_default, #apply_defaults, #apply_post_processed_defaults, #apply_pre_processed_defaults, #attribute_names, database_field_name, #database_field_name, #dot_dollar_field?, #lazy_settable?, option, options, traverse_association_tree, #using_object_ids?, #validate_writable_field_name!

Methods included from Mongoid::Evolvable

#__evolve_object_id__

Methods included from Mongoid::Attributes

#assign_attributes, #attribute_missing?, #attribute_present?, #attributes_before_type_cast, #has_attribute?, #has_attribute_before_type_cast?, #process_raw_attribute, #read_attribute, #read_attribute_before_type_cast, #remove_attribute, #typed_attributes, #write_attribute, #write_attributes

Methods included from Mongoid::Attributes::Readonly

#attribute_writable?

Methods included from Mongoid::Attributes::Processing

#process_attributes

Methods included from Mongoid::Clients

clear, clients, default, disconnect, set, with_name

Methods included from Mongoid::Clients::Sessions

included

Methods included from Mongoid::Clients::Options

#collection, #collection_name, #mongo_client, #persistence_context, #persistence_context?, #with

Methods included from Mongoid::Clients::StorageOptions

#remember_storage_options!, #storage_options

Methods included from Mongoid::Changeable

#attribute_before_last_save, #changed, #changed?, #changed_attributes, #changes, #children_changed?, #move_changes, #post_persist, #previous_changes, #remove_change, #saved_change_to_attribute, #saved_change_to_attribute?, #setters, #will_save_change_to_attribute?

Methods included from Mongoid::Atomic

#add_atomic_pull, #add_atomic_unset, #atomic_array_add_to_sets, #atomic_array_pulls, #atomic_array_pushes, #atomic_attribute_name, #atomic_delete_modifier, #atomic_insert_modifier, #atomic_path, #atomic_paths, #atomic_position, #atomic_pulls, #atomic_pushes, #atomic_sets, #atomic_unsets, #atomic_updates, #delayed_atomic_pulls, #delayed_atomic_sets, #delayed_atomic_unsets, #flag_as_destroyed, #flagged_destroys, #process_flagged_destroys