diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb index adf89671a..317118345 100644 --- a/app/helpers/people_helper.rb +++ b/app/helpers/people_helper.rb @@ -19,6 +19,7 @@ module PeopleHelper def request_partial single_aspect_form if single_aspect_form 'requests/new_request_with_aspect_to_person' + else 'requests/new_request_to_person' end @@ -67,7 +68,6 @@ module PeopleHelper "href=\"#{local_or_remote_person_path(person, opts)}\"".html_safe end - # Rails.application.routes.url_helpers is needed since this is indirectly called from a model def local_or_remote_person_path(person, opts={}) opts.merge!(:protocol => AppConfig[:pod_uri].scheme, :host => AppConfig[:pod_uri].authority) diff --git a/app/models/profile.rb b/app/models/profile.rb index 8cb9bb3b5..202ed0e3d 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -74,7 +74,7 @@ class Profile < ActiveRecord::Base else self[:image_url] end - result || '/images/user/default.png' + result || '/assets/user/default.png' end def from_omniauth_hash(omniauth_user_hash) diff --git a/config/environments/test.rb b/config/environments/test.rb index be4ea36b5..a1958bfeb 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -34,6 +34,9 @@ Diaspora::Application.configure do config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" + config.assets.enabled = true + config.assets.debug = true + # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets config.assets.allow_debugging = true diff --git a/features/support/env.rb b/features/support/env.rb index 470673f97..95a9af22b 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -16,6 +16,8 @@ require 'cucumber/api_steps' # Ensure we know the appservers port Capybara.server_port = 9887 +# Set the asset host for the pipeline +ActionController::Base.asset_host = Capybara.app_host # Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In # order to ease the transition to Capybara we set the default here. If you'd @@ -94,4 +96,5 @@ end After('@localserver') do CapybaraSettings.instance.restore -end \ No newline at end of file +end + diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 977b7cded..9728b1083 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -118,7 +118,7 @@ var View = { avatars: { fallback: function(evt) { - $(this).attr("src", "/images/user/default.png"); + $(this).attr("src", "/assets/user/default.png"); }, selector: "img.avatar" }