Skip to content

Commit

Permalink
Revert range_funds rename.
Browse files Browse the repository at this point in the history
  • Loading branch information
taitus committed Nov 23, 2017
1 parent dd6933f commit 8e6ed08
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin/organizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def organization_params
.permit(:reference, :identifier, :name, :first_name, :last_name, :phones, :email,
:web, :address_type, :address, :number, :gateway, :stairs, :floor, :door,
:postal_code, :town, :province, :description, :registered_lobbies, :category_id,
:fiscal_year, :range_funds, :subvention, :contract, :denied_public_data, :denied_public_events, interest_ids: [],
:fiscal_year, :range_fund, :subvention, :contract, :denied_public_data, :denied_public_events, interest_ids: [],
legal_representant_attributes: [:id, :identifier, :name, :first_name, :last_name, :phones, :email],
user_attributes: [:id, :first_name, :last_name, :role, :email, :active, :phones, :password, :password_confirmation],
represented_entities_attributes: [:id, :identifier, :name, :first_name, :last_name, :from, :fiscal_year, :range_funds, :subvention, :contract],
represented_entities_attributes: [:id, :identifier, :name, :first_name, :last_name, :from, :fiscal_year, :range_fund, :subvention, :contract],
organization_interests_attributes: [:interest_ids],
agents_attributes: [:id, :identifier, :name, :first_name, :last_name, :from, :to, :public_assignments])
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/represented_entity.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class RepresentedEntity < ActiveRecord::Base

enum range_funds: [:range_1, :range_2, :range_3, :range_4]
enum range_fund: [:range_1, :range_2, :range_3, :range_4]

belongs_to :organization

Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/organizations/_lobbies_data.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<%= f.number_field :fiscal_year %>
</div>
<div class="small-6 columns">
<%= f.label :range_funds, t('backend.lobbies_data.range_funds') %>
<%= f.select :range_funds, Organization.range_funds.keys.to_a %>
<%= f.label :range_fund, t('backend.lobbies_data.range_fund') %>
<%= f.select :range_fund, Organization.range_funds.keys.to_a %>
</div>
<div class="small-12 columns">
<%= f.label :subvention, t('backend.lobbies_data.subvention') %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
</div>

<div class="small-6 columns">
<%= f.label :range_funds, t('backend.represented_entities.range_founds') %>
<%= f.select :range_funds, Organization.range_funds.keys.to_a %>
<%= f.label :range_fund, t('backend.represented_entities.range_founds') %>
<%= f.select :range_fund, Organization.range_funds.keys.to_a %>
</div>

<div class="small-12 columns">
Expand Down
2 changes: 1 addition & 1 deletion config/locales/oragnizations.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ en:
lobbies_data:
title_fieldset: "Datos de quien va a ejercer la actividad de lobby por cuenta propia"
fiscal_year: "Ejercicio anual"
range_funds: "Fondos"
range_fund: "Fondos"
subvention: "¿Ha recibido ayudas y/o subvenciones con cargo al Ayuntamiento de Madrid, sus organismos autónomos, sociedades mercantiles o consorcios en los que participe?"
contract: "¿Ha celebrado contratos y/o convenios con el Ayuntamiento de Madrid, sus organismos autónomos, sociedades mercantiles o consorcios en los que participe?"

Expand Down
2 changes: 1 addition & 1 deletion config/locales/oragnizations.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ es:
lobbies_data:
title_fieldset: "Datos de quien va a ejercer la actividad de lobby por cuenta propia"
fiscal_year: "Ejercicio anual"
range_funds: "Fondos"
range_fund: "Fondos"
subvention: "¿Ha recibido ayudas y/o subvenciones con cargo al Ayuntamiento de Madrid, sus organismos autónomos, sociedades mercantiles o consorcios en los que participe?"
contract: "¿Ha celebrado contratos y/o convenios con el Ayuntamiento de Madrid, sus organismos autónomos, sociedades mercantiles o consorcios en los que participe?"

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171120203928_create_organizations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def change
t.string :web
t.integer :registered_lobbies
t.integer :fiscal_year
t.integer :range_funds
t.integer :range_fund
t.boolean :subvention
t.boolean :contract
t.boolean :denied_public_data
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171120204546_create_represented_entities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def change
t.date :to
t.references :organization, index: true, foreign_key: true
t.integer :fiscal_year
t.integer :range_funds
t.integer :range_fund
t.boolean :subvention
t.boolean :contract

Expand Down
6 changes: 3 additions & 3 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20171122152500) do
ActiveRecord::Schema.define(version: 20171122183612) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -191,7 +191,7 @@
t.string "web"
t.integer "registered_lobbies"
t.integer "fiscal_year"
t.integer "range_funds"
t.integer "range_fund"
t.boolean "subvention"
t.boolean "contract"
t.boolean "denied_public_data"
Expand Down Expand Up @@ -242,7 +242,7 @@
t.date "to"
t.integer "organization_id"
t.integer "fiscal_year"
t.integer "range_funds"
t.integer "range_fund"
t.boolean "subvention"
t.boolean "contract"
t.datetime "created_at", null: false
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/organizations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
web "www.organization.com"
registered_lobbies :generalitat_catalunya
fiscal_year 2018
range_funds :range_1
range_fund :range_1
subvention false
contract true
denied_public_data false
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/represented_entities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from Time.zone.yesterday
to Time.zone.today
fiscal_year 2018
range_funds :range_1
range_fund :range_1
subvention false
contract true
association :organization, factory: :organization
Expand Down

0 comments on commit 8e6ed08

Please sign in to comment.