Adds budget investment location

This commit is contained in:
kikito
2016-12-29 17:30:21 +01:00
parent 9d0e736878
commit 110a4091f8
7 changed files with 29 additions and 8 deletions

View File

@@ -80,7 +80,7 @@ module Budgets
end
def investment_params
params.require(:budget_investment).permit(:title, :description, :external_url, :heading_id, :terms_of_service)
params.require(:budget_investment).permit(:title, :description, :external_url, :heading_id, :terms_of_service, :location)
end
def load_ballot

View File

@@ -24,6 +24,11 @@
<%= f.text_field :external_url, placeholder: t("budget.investments.form.external_url"), label: false %>
</div>
<div class="small-12 column">
<%= f.label :location, t("budget.investments.form.location") %>
<%= f.text_field :location, placeholder: t("budget.investments.form.location"), label: false %>
</div>
<% unless current_user.manager? %>
<div class="small-12 column">

View File

@@ -26,10 +26,15 @@
<br>
<p id="investment_code">
<%= t("budget.investments.show.code") %>
<strong><%= investment.id %></strong>
<%= t("budget.investments.show.code_html", code: investment.id) %>
</p>
<% if investment.location.present? %>
<p id="investment_code">
<%= t("budget.investments.show.location_html", location: investment.location) %>
</p>
<% end %>
<%= safe_html_with_links investment.description.html_safe %>
<% if investment.external_url.present? %>