Commit 289857af429678e45da70980e86533c335254229
1 parent
acbf97a0
Exists in
master
and in
29 other branches
ActionItem21: checkpoint
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@965 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
12 additions
and
4 deletions
Show diff stats
app/controllers/my_profile/cms/text_html.rb
... | ... | @@ -2,7 +2,9 @@ class CmsController |
2 | 2 | |
3 | 3 | def text_html_new |
4 | 4 | @article = Article.new(params[:article]) |
5 | - @article.parent = profile.articles.find(params[:parent_id]) | |
5 | + if params[:parent_id] | |
6 | + @article.parent = profile.articles.find(params[:parent_id]) | |
7 | + end | |
6 | 8 | @article.profile = profile |
7 | 9 | if request.post? |
8 | 10 | if @article.save | ... | ... |
app/models/article.rb
app/views/cms/new.rhtml
app/views/cms/text_html_new.rhtml