diff --git a/app/models/interest.rb b/app/models/interest.rb new file mode 100644 index 000000000..278c5fcab --- /dev/null +++ b/app/models/interest.rb @@ -0,0 +1,5 @@ +class Interest < ActiveRecord::Base + belongs_to :user + belongs_to :interestable, polymorphic: true + +end diff --git a/app/views/admin/budget_investments/_milestones.html.erb b/app/views/admin/budget_investments/_milestones.html.erb index 8fe5154af..4338dabfd 100644 --- a/app/views/admin/budget_investments/_milestones.html.erb +++ b/app/views/admin/budget_investments/_milestones.html.erb @@ -29,4 +29,8 @@ <% end %> +<% else %> +
+ <%= t('admin.milestones.index.no_milestones') %> +
<% end %> diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 96dc32a8b..baca6b270 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -169,6 +169,7 @@ en: table_description: "Description" table_actions: "Actions" delete: "Delete milestone" + no_milestones: "Don't have defined milestones" new: creating: Create milestone edit: diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 2b0b68a1c..f47bd19a8 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -169,6 +169,7 @@ es: table_description: "Descripción" table_actions: "Acciones" delete: "Eliminar hito" + no_milestones: "No hay hitos definidos" new: creating: Crear hito edit: diff --git a/spec/features/admin/budget_investment_milestones_spec.rb b/spec/features/admin/budget_investment_milestones_spec.rb index 208cc61a0..9bcb78479 100644 --- a/spec/features/admin/budget_investment_milestones_spec.rb +++ b/spec/features/admin/budget_investment_milestones_spec.rb @@ -19,6 +19,13 @@ feature 'Admin budget investment milestones' do expect(page).to have_content(milestone.title) expect(page).to have_content(milestone.id) end + + scenario 'Displaying no_milestones text' do + visit admin_budget_budget_investment_path(@investment.budget, @investment) + + expect(page).to have_content("Milestone") + expect(page).to have_content("Don't have defined milestones") + end end context "New" do