Commit aefaa0157e0c5bd12577787be53243474262ba8c

Authored by Gabriela Navarro
1 parent 8578b1c9

Fix suggest article test. Properly testing the profile params in article creation

Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com>
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/article.rb
... ... @@ -28,7 +28,7 @@ class Article &lt; ActiveRecord::Base
28 28 def initialize(*params)
29 29 super
30 30  
31   - if !params.blank? && params.first.has_key?(:profile)
  31 + if !params.blank? && params.first[:profile]
32 32 profile = params.first[:profile]
33 33 self.published = false unless profile.public?
34 34 end
... ...