noosfero | WIP: Custom forms graphs (!1597)

Rodrigo Souto gitlab at mg.gitlab.com
Mon Aug 20 17:26:16 BRT 2018


Rodrigo Souto started a new discussion on plugins/custom_forms/lib/custom_forms_plugin/answer.rb:

>    self.table_name = :custom_forms_plugin_answers
>    belongs_to :field, :class_name => 'CustomFormsPlugin::Field'
>    belongs_to :submission, :class_name => 'CustomFormsPlugin::Submission'
> -
> +  has_many :form_answers, :class_name => 'CustomFormsPlugin::FormAnswer'
> +  has_many :alternatives, :through => :form_answers
>    validates_presence_of :field
> -  validate :value_is_mandatory, :if => 'field.present?'
> -  validate :value_is_valid, :if => 'field.try(:alternatives).present?'
> +  #validate :value_is_mandatory, :if => 'field.present?'

Remove this comments.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1597#note_95694380
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180820/3bf0fd22/attachment.html>


More information about the Noosfero-dev mailing list