Remove video_url attr from Admin::Poll::Question form

This commit is contained in:
Angel Perez
2018-05-18 09:43:43 -04:00
parent 44b1eb929a
commit 4c0deb0eca
3 changed files with 1 additions and 17 deletions

View File

@@ -55,7 +55,7 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
private private
def question_params def question_params
params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id, :video_url) params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id)
end end
def search_params def search_params

View File

@@ -14,19 +14,6 @@
<%= f.text_field :title %> <%= f.text_field :title %>
<div class="small-12">
<%= f.label :video_url, t("proposals.form.proposal_video_url") %>
<p class="help-text" id="video-url-help-text">
<%= t("proposals.form.proposal_video_url_note") %>
</p>
<%= f.text_field :video_url,
placeholder: t("proposals.form.proposal_video_url"),
label: false,
aria: {describedby: "video-url-help-text"} %>
</div>
<div class="small-12 medium-6 large-4 margin-top"> <div class="small-12 medium-6 large-4 margin-top">
<%= f.submit(class: "button expanded", value: t("shared.save")) %> <%= f.submit(class: "button expanded", value: t("shared.save")) %>
</div> </div>

View File

@@ -36,19 +36,16 @@ feature 'Admin poll questions' do
Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her
people and restore freedom to the galaxy.... people and restore freedom to the galaxy....
} }
video_url = "https://puppyvideos.com"
visit admin_questions_path visit admin_questions_path
click_link "Create question" click_link "Create question"
select 'Movies', from: 'poll_question_poll_id' select 'Movies', from: 'poll_question_poll_id'
fill_in 'poll_question_title', with: title fill_in 'poll_question_title', with: title
fill_in 'poll_question_video_url', with: video_url
click_button 'Save' click_button 'Save'
expect(page).to have_content(title) expect(page).to have_content(title)
expect(page).to have_content(video_url)
end end
scenario 'Create from successful proposal index' do scenario 'Create from successful proposal index' do