more progress

This commit is contained in:
danielgrippi 2012-03-21 16:39:40 -07:00 committed by Maxwell Salzberg
parent 5b2716d2ef
commit f72f1d4059
5 changed files with 10 additions and 4 deletions

View file

@ -19,6 +19,7 @@ module PeopleHelper
def request_partial single_aspect_form def request_partial single_aspect_form
if single_aspect_form if single_aspect_form
'requests/new_request_with_aspect_to_person' 'requests/new_request_with_aspect_to_person'
else else
'requests/new_request_to_person' 'requests/new_request_to_person'
end end
@ -67,7 +68,6 @@ module PeopleHelper
"href=\"#{local_or_remote_person_path(person, opts)}\"".html_safe "href=\"#{local_or_remote_person_path(person, opts)}\"".html_safe
end end
# Rails.application.routes.url_helpers is needed since this is indirectly called from a model # Rails.application.routes.url_helpers is needed since this is indirectly called from a model
def local_or_remote_person_path(person, opts={}) def local_or_remote_person_path(person, opts={})
opts.merge!(:protocol => AppConfig[:pod_uri].scheme, :host => AppConfig[:pod_uri].authority) opts.merge!(:protocol => AppConfig[:pod_uri].scheme, :host => AppConfig[:pod_uri].authority)

View file

@ -74,7 +74,7 @@ class Profile < ActiveRecord::Base
else else
self[:image_url] self[:image_url]
end end
result || '/images/user/default.png' result || '/assets/user/default.png'
end end
def from_omniauth_hash(omniauth_user_hash) def from_omniauth_hash(omniauth_user_hash)

View file

@ -34,6 +34,9 @@ Diaspora::Application.configure do
config.serve_static_assets = true config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600" 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 # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
config.assets.allow_debugging = true config.assets.allow_debugging = true

View file

@ -16,6 +16,8 @@ require 'cucumber/api_steps'
# Ensure we know the appservers port # Ensure we know the appservers port
Capybara.server_port = 9887 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 # 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 # order to ease the transition to Capybara we set the default here. If you'd
@ -94,4 +96,5 @@ end
After('@localserver') do After('@localserver') do
CapybaraSettings.instance.restore CapybaraSettings.instance.restore
end end

View file

@ -118,7 +118,7 @@ var View = {
avatars: { avatars: {
fallback: function(evt) { fallback: function(evt) {
$(this).attr("src", "/images/user/default.png"); $(this).attr("src", "/assets/user/default.png");
}, },
selector: "img.avatar" selector: "img.avatar"
} }