Skip to content

Commit

Permalink
removed extraneous % signs from the time_formats.rb initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
rishighan committed Apr 17, 2012
1 parent af16cb3 commit 6df1d01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/post.rb
Expand Up @@ -29,7 +29,7 @@ class Post < ActiveRecord::Base


# filtering by category # filtering by category
def self.exclude_category(cats) 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 end


def self.include_category(cats) def self.include_category(cats)
Expand Down
8 changes: 5 additions & 3 deletions app/views/pages/index.html.erb
Expand Up @@ -36,7 +36,8 @@


<hr> <hr>
<!-- Store --> <!-- Store -->
<span> <% unless @product.blank? %>
<span>
<% @product.product_shots.each do |pic|%> <% @product.product_shots.each do |pic|%>
<%= image_tag pic.shot.url(:thumb)%> <%= image_tag pic.shot.url(:thumb)%>
<%end%> <%end%>
Expand All @@ -45,10 +46,11 @@
<h4><%= variant.name%></h4> <h4><%= variant.name%></h4>
<h2><%= number_to_currency(variant.price)%></h2> <h2><%= number_to_currency(variant.price)%></h2>
<%end%> <%end%>

</span>
</span>
<%end%>
</span> </span>

<!-- Posts pane --> <!-- Posts pane -->
<span class="span6"> <span class="span6">
<% @posts.each do |post| %> <% @posts.each do |post| %>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/time_formats.rb
@@ -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.