Commit d460f91063aea3a33d3fd7f5810f52e7a19e715b

Authored by Victor Costa
Committed by Rodrigo Souto
1 parent 7e13e968

Refactor SuggestArticle to accept other article types

app/models/suggest_article.rb
... ... @@ -41,6 +41,7 @@ class SuggestArticle < Task
41 41 return type if type < Article
42 42 end
43 43 TinyMceArticle
  44 + (article[:type] || 'TinyMceArticle').constantize
44 45 end
45 46  
46 47 def perform
... ...
app/views/tasks/_suggest_article_accept_details.html.erb
... ... @@ -14,6 +14,5 @@
14 14 <%= labelled_form_field(_('Highlight this article'), a.check_box(:highlighted)) %>
15 15  
16 16 <%= a.hidden_field(:type) %>
17   -
18 17 <%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :f => a, :lead_id => task.id} %>
19 18 <% end %>
... ...