diff --git a/app/controllers/legislation/proposals_controller.rb b/app/controllers/legislation/proposals_controller.rb index ee4d10c06..6aec36057 100644 --- a/app/controllers/legislation/proposals_controller.rb +++ b/app/controllers/legislation/proposals_controller.rb @@ -49,9 +49,10 @@ class Legislation::ProposalsController < Legislation::BaseController private def proposal_params - params.require(:legislation_proposal).permit(:legislation_process_id, :title, :question, :summary, :description, :external_url, :video_url, - :responsible_name, :tag_list, :terms_of_service, :geozone_id, - documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id] ) + params.require(:legislation_proposal).permit(:legislation_process_id, :title, + :question, :summary, :description, :video_url, :tag_list, + :terms_of_service, :geozone_id, + documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id] ) end def resource_model diff --git a/app/models/legislation/proposal.rb b/app/models/legislation/proposal.rb index 32badbb46..ec3dc6410 100644 --- a/app/models/legislation/proposal.rb +++ b/app/models/legislation/proposal.rb @@ -25,15 +25,11 @@ class Legislation::Proposal < ActiveRecord::Base has_many :comments, as: :commentable validates :title, presence: true - validates :question, presence: true validates :summary, presence: true validates :author, presence: true - validates :responsible_name, presence: true validates :title, length: { in: 4..Legislation::Proposal.title_max_length } validates :description, length: { maximum: Legislation::Proposal.description_max_length } - validates :question, length: { in: 10..Legislation::Proposal.question_max_length } - validates :responsible_name, length: { in: 6..Legislation::Proposal.responsible_name_max_length } validates :terms_of_service, acceptance: { allow_nil: false }, on: :create