Permalink
Browse files

removed extraneous % signs from the time_formats.rb initializer

  • Loading branch information...
1 parent af16cb3 commit 6df1d01d2bb248133da0a3621dada45325babd7e @rishighan committed Apr 17, 2012
Showing with 7 additions and 5 deletions.
  1. +1 −1 app/models/post.rb
  2. +5 −3 app/views/pages/index.html.erb
  3. +1 −1 config/initializers/time_formats.rb
View
@@ -29,7 +29,7 @@ class Post < ActiveRecord::Base
# filtering by category
def self.exclude_category(cats)
- joins(:categories).where('categories.category_name NOT IN (?)', cats)
+ joins(:categories).where('categories.category_name NOT IN (?)', cats).order("created_at DESC").limit(5)
end
def self.include_category(cats)
@@ -36,7 +36,8 @@
<hr>
<!-- Store -->
- <span>
+ <% unless @product.blank? %>
+ <span>
<% @product.product_shots.each do |pic|%>
<%= image_tag pic.shot.url(:thumb)%>
<%end%>
@@ -45,10 +46,11 @@
<h4><%= variant.name%></h4>
<h2><%= number_to_currency(variant.price)%></h2>
<%end%>
-
- </span>
+ </span>
+ <%end%>
</span>
+
<!-- Posts pane -->
<span class="span6">
<% @posts.each do |post| %>
@@ -1 +1 @@
-Time::DATE_FORMATS[:short] = "%d %B %Y % at %H%:%M %p"
+Time::DATE_FORMATS[:short] = "%d %B %Y at %H:%M %p"

0 comments on commit 6df1d01

Please sign in to comment.