diff --git a/app/models/article.rb b/app/models/article.rb index 04516a7..1ce070a 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -790,6 +790,12 @@ class Article < ActiveRecord::Base true end + #FIXME make this test + #Define which parameters will be returned in json object + def as_json(options = {}) + super(:only => [:id, :name, :body, :created_at], :methods => [:title]) + end + private def sanitize_tag_list -- libgit2 0.21.2