adds association name to spending proposals
This commit is contained in:
@@ -29,7 +29,7 @@ class SpendingProposalsController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def spending_proposal_params
|
def spending_proposal_params
|
||||||
params.require(:spending_proposal).permit(:title, :description, :external_url, :geozone_id, :terms_of_service, :captcha, :captcha_key)
|
params.require(:spending_proposal).permit(:title, :description, :external_url, :geozone_id, :association_name, :terms_of_service, :captcha, :captcha_key)
|
||||||
end
|
end
|
||||||
|
|
||||||
def verify_valuator
|
def verify_valuator
|
||||||
|
|||||||
@@ -22,6 +22,11 @@
|
|||||||
<%= f.select :geozone_id, geozone_select_options, {include_blank: t("geozones.none"), label: false} %>
|
<%= f.select :geozone_id, geozone_select_options, {include_blank: t("geozones.none"), label: false} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="small-12 column">
|
||||||
|
<%= f.label :association_name, t("spending_proposals.form.association_name") %>
|
||||||
|
<%= f.text_field :association_name, placeholder: t("spending_proposals.form.association_name"), label: false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<% if @spending_proposal.new_record? %>
|
<% if @spending_proposal.new_record? %>
|
||||||
<%= f.label :terms_of_service do %>
|
<%= f.label :terms_of_service do %>
|
||||||
|
|||||||
@@ -399,6 +399,7 @@ en:
|
|||||||
youtube: YouTube
|
youtube: YouTube
|
||||||
spending_proposals:
|
spending_proposals:
|
||||||
form:
|
form:
|
||||||
|
association_name: 'Association'
|
||||||
description: Description
|
description: Description
|
||||||
external_url: Link to additional documentation
|
external_url: Link to additional documentation
|
||||||
geozone: Scope of operation
|
geozone: Scope of operation
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ es:
|
|||||||
youtube: YouTube
|
youtube: YouTube
|
||||||
spending_proposals:
|
spending_proposals:
|
||||||
form:
|
form:
|
||||||
|
association_name: 'Asociación'
|
||||||
description: Descripción detallada
|
description: Descripción detallada
|
||||||
external_url: Enlace a documentación adicional
|
external_url: Enlace a documentación adicional
|
||||||
geozone: "Ámbito de actuación"
|
geozone: "Ámbito de actuación"
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class AddAssociationToSpendingProposals < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :spending_proposals, :association_name, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20160219172824) do
|
ActiveRecord::Schema.define(version: 20160220181602) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -294,14 +294,15 @@ ActiveRecord::Schema.define(version: 20160219172824) do
|
|||||||
t.text "description"
|
t.text "description"
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.string "external_url"
|
t.string "external_url"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.integer "geozone_id"
|
t.integer "geozone_id"
|
||||||
t.string "resolution"
|
t.string "resolution"
|
||||||
t.float "price"
|
t.float "price"
|
||||||
t.boolean "legal"
|
t.boolean "legal"
|
||||||
t.boolean "feasible"
|
t.boolean "feasible"
|
||||||
t.text "explanation"
|
t.text "explanation"
|
||||||
|
t.string "association_name"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "spending_proposals", ["author_id"], name: "index_spending_proposals_on_author_id", using: :btree
|
add_index "spending_proposals", ["author_id"], name: "index_spending_proposals_on_author_id", using: :btree
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ feature 'Spending proposals' do
|
|||||||
fill_in 'spending_proposal_title', with: 'Build a skyscraper'
|
fill_in 'spending_proposal_title', with: 'Build a skyscraper'
|
||||||
fill_in 'spending_proposal_description', with: 'I want to live in a high tower over the clouds'
|
fill_in 'spending_proposal_description', with: 'I want to live in a high tower over the clouds'
|
||||||
fill_in 'spending_proposal_external_url', with: 'http://http://skyscraperpage.com/'
|
fill_in 'spending_proposal_external_url', with: 'http://http://skyscraperpage.com/'
|
||||||
|
fill_in 'spending_proposal_association_name', with: 'People of the neighbourhood'
|
||||||
fill_in 'spending_proposal_captcha', with: correct_captcha_text
|
fill_in 'spending_proposal_captcha', with: correct_captcha_text
|
||||||
select 'All city', from: 'spending_proposal_geozone_id'
|
select 'All city', from: 'spending_proposal_geozone_id'
|
||||||
check 'spending_proposal_terms_of_service'
|
check 'spending_proposal_terms_of_service'
|
||||||
|
|||||||
Reference in New Issue
Block a user