require_dependency "article" class Article def attr_to_hash { "type" => self.type, "data" => { "id" => self.id, "parent_id" => self.parent_id, "title" => self.title, "body" => self.body, "path" => self.path, "slug" => self.slug, "published" => self.published, "show_to_followers" => self.show_to_followers, "author_id" => self.author_id } } end end