From 300e6a3b452002a99c16f93bba630865aec953cd Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Mon, 26 May 2014 10:57:26 -0300 Subject: [PATCH] change type parameter for content_type --- lib/api/v1/articles.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/v1/articles.rb b/lib/api/v1/articles.rb index b114d0b..627f123 100644 --- a/lib/api/v1/articles.rb +++ b/lib/api/v1/articles.rb @@ -65,7 +65,7 @@ module API post do community = environment.communities.find(params[:community_id]) article = community.articles.build(params[:article].merge(:last_changed_by => current_person)) - article.type= params[:type].nil? ? 'TinyMceArticle' : params[:type] + article.type= params[:content_type].nil? ? 'TinyMceArticle' : params[:content_type] if !article.save render_api_errors!(article.errors.full_messages) end -- libgit2 0.21.2