Skip to content

Commit

Permalink
Use more sensible variable name in the partial
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Jul 19, 2011
1 parent d783a01 commit 0d447b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions app/views/applications/_application_mobile.haml
@@ -1,9 +1,9 @@
- link_to application_mobile do
- link_to application do
.listitem
%h4= application_mobile.address
%h4= application.address
%p
- if application_mobile.respond_to? :distance
#{time_ago_in_words(application_mobile.date_scraped)} ago, #{km_in_words(application_mobile.distance.to_f / 0.621371192)} away
- if application.respond_to? :distance
#{time_ago_in_words(application.date_scraped)} ago, #{km_in_words(application.distance.to_f / 0.621371192)} away
- else
#{time_ago_in_words(application_mobile.date_scraped)} ago
%strong= application_mobile.description
#{time_ago_in_words(application.date_scraped)} ago
%strong= application.description
2 changes: 1 addition & 1 deletion app/views/applications/index_mobile.haml
Expand Up @@ -2,4 +2,4 @@
%h2.title= @description
- paginated_section @applications, :previous_label => "Newer", :next_label => "Older", :inner_window => 1, :outer_window => 0 do
.list
= render :partial => "application_mobile", :collection => @applications
= render :partial => "application_mobile", :as => :application, :collection => @applications
2 changes: 1 addition & 1 deletion app/views/applications/show_mobile.haml
Expand Up @@ -12,5 +12,5 @@
#nearby-applications
%h3.info Selection of other recent or nearby applications
.list
= render :partial => "application_mobile", :collection => @application.find_all_nearest_or_recent[0...5]
= render :partial => "application_mobile", :as => :application, :collection => @application.find_all_nearest_or_recent[0...5]
.info= link_to("more…".html_safe, nearby_application_url(@application))

0 comments on commit 0d447b0

Please sign in to comment.