From 102763f2ab37d891c8b82f0cbfd68982fcd99ed8 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 10 Feb 2015 22:12:22 +1100 Subject: [PATCH] link to new crop request form --- app/views/harvests/_form.html.haml | 2 +- app/views/plantings/_form.html.haml | 2 +- app/views/seeds/_form.html.haml | 2 +- config/environments/development.rb | 1 - config/environments/production.rb | 1 - config/environments/staging.rb | 1 - config/environments/test.rb | 1 - spec/views/plantings/edit.html.haml_spec.rb | 1 - spec/views/plantings/new.html.haml_spec.rb | 1 - 9 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/views/harvests/_form.html.haml b/app/views/harvests/_form.html.haml index 83aa71d08..806bf8701 100644 --- a/app/views/harvests/_form.html.haml +++ b/app/views/harvests/_form.html.haml @@ -14,7 +14,7 @@ = collection_select(:harvest, :plant_part_id, PlantPart.all, :id, :name, { :selected => @harvest.plant_part_id }, { :class => 'form-control' }) %span.help-block.col-md-8 Can't find what you're looking for? - = link_to "Request new crops.", Growstuff::Application.config.new_crops_request_link + = link_to "Request new crops.", new_crop_path .form-group = f.label :harvested_at, 'When?', :class => 'control-label col-md-2' diff --git a/app/views/plantings/_form.html.haml b/app/views/plantings/_form.html.haml index b797d3523..9c166449a 100644 --- a/app/views/plantings/_form.html.haml +++ b/app/views/plantings/_form.html.haml @@ -12,7 +12,7 @@ = auto_suggest @planting, :crop, :class => 'form-control', :default => @crop %span.help-inline Can't find what you're looking for? - = link_to "Request new crops.", Growstuff::Application.config.new_crops_request_link + = link_to "Request new crops.", new_crop_path .form-group = f.label :garden_id, 'Where did you plant it?', :class => 'control-label col-md-2' .col-md-8 diff --git a/app/views/seeds/_form.html.haml b/app/views/seeds/_form.html.haml index 8d8eeaa97..4d80d8726 100644 --- a/app/views/seeds/_form.html.haml +++ b/app/views/seeds/_form.html.haml @@ -12,7 +12,7 @@ = auto_suggest @seed, :crop, :class => 'form-control', :default => @crop %span.help-inline Can't find what you're looking for? - = link_to "Request new crops.", Growstuff::Application.config.new_crops_request_link + = link_to "Request new crops.", new_crop_path .form-group = f.label :quantity, 'Quantity:', :class => 'control-label col-md-2' .col-md-2 diff --git a/config/environments/development.rb b/config/environments/development.rb index 45d7b96bf..282071cda 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -44,7 +44,6 @@ Growstuff::Application.configure do # config.action_view.raise_on_missing_translations = true # Growstuff config - config.new_crops_request_link = "http://example.com/not-a-real-url" config.action_mailer.default_url_options = { :host => 'localhost:8080' } config.action_mailer.delivery_method = :letter_opener diff --git a/config/environments/production.rb b/config/environments/production.rb index 523418b32..2410617fb 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -67,7 +67,6 @@ Growstuff::Application.configure do config.active_record.dump_schema_after_migration = false # Growstuff configuration - config.new_crops_request_link = "http://growstuff.org/posts/skud-20130319-requests-for-new-crops" config.action_mailer.default_url_options = { :host => 'growstuff.org' } config.action_mailer.smtp_settings = { diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 150c62d8c..4b69b498c 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -69,7 +69,6 @@ Growstuff::Application.configure do config.active_record.dump_schema_after_migration = false # Growstuff configuration - config.new_crops_request_link = "http://example.com/not-a-real-url" config.action_mailer.default_url_options = { :host => 'staging.growstuff.org' } config.action_mailer.smtp_settings = { diff --git a/config/environments/test.rb b/config/environments/test.rb index ffdc4c972..8d99b4e84 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -40,7 +40,6 @@ Growstuff::Application.configure do # config.action_view.raise_on_missing_translations = true # Growstuff config - config.new_crops_request_link = "http://example.com/not-a-real-url" config.action_mailer.default_url_options = { :host => 'localhost:8080' } Growstuff::Application.configure do diff --git a/spec/views/plantings/edit.html.haml_spec.rb b/spec/views/plantings/edit.html.haml_spec.rb index 4cc06fcdc..2a690d0be 100644 --- a/spec/views/plantings/edit.html.haml_spec.rb +++ b/spec/views/plantings/edit.html.haml_spec.rb @@ -40,7 +40,6 @@ describe "plantings/edit" do it 'includes helpful links for crops and gardens' do assert_select "a[href=#{new_garden_path}]", :text => "Add a garden." - assert_select "a[href=#{Growstuff::Application.config.new_crops_request_link}]", :text => "Request new crops." end it "chooses the right crop" do diff --git a/spec/views/plantings/new.html.haml_spec.rb b/spec/views/plantings/new.html.haml_spec.rb index 455b9a411..2d35a47fb 100644 --- a/spec/views/plantings/new.html.haml_spec.rb +++ b/spec/views/plantings/new.html.haml_spec.rb @@ -41,7 +41,6 @@ describe "plantings/new" do it 'includes helpful links for crops and gardens' do assert_select "a[href=#{new_garden_path}]", :text => "Add a garden." - assert_select "a[href=#{Growstuff::Application.config.new_crops_request_link}]", :text => "Request new crops." end it "selects a garden given in a param" do