Skip to content

Commit

Permalink
Adding size for all image for inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
havesolutions committed Apr 15, 2012
1 parent 0d59281 commit 28fe768
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions app/models/inventory.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ class Inventory < ActiveRecord::Base
attr_accessible :avatar, :item_name, :room, :local_location_1, :local_location, :global_location_1, :global_location, attr_accessible :avatar, :item_name, :room, :local_location_1, :local_location, :global_location_1, :global_location,
:condition, :notes :condition, :notes
has_attached_file :avatar, has_attached_file :avatar,
:styles => { :medium => "240x240#", :styles => { :medium => "200x200>",
:thumb => "50x50>", :thumb => "50x50#",
:large => "640x640" } :large => "640x640" }


# :storage => :s3, # :storage => :s3,
# :s3_credentials => "#{Rails.root}/config/s3.yml" # :s3_credentials => "#{Rails.root}/config/s3.yml"


Expand Down
8 changes: 4 additions & 4 deletions app/views/dashboards/index.html.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<dt>All</dt> <dt>All</dt>
<dd><a href="#"><%=@subscription.jobs.try(:size)%></a></dd> <dd><a href="#"><%=@subscription.jobs.try(:size)%></a></dd>
<dt>Active</dt> <dt>Active</dt>
<dd><a href="#"><%=@subscription.jobs_status("Active").try(:size).try(:to_i)%></a></dd> <dd><a href="#"><%=@subscription.jobs_status("Active").try(:size)%></a></dd>
<dt>Inactive</dt> <dt>Inactive</dt>
<dd><a href="#"><%=@subscription.jobs_status("In Active").try(:size).try(:to_i)%></a></dd> <dd><a href="#"><%=@subscription.jobs_status("In Active").try(:size)%></a></dd>
<dt>On Hold</dt> <dt>On Hold</dt>
<dd><a href="#"><%=@subscription.jobs_status("On Hold").try(:size).try(:to_i)%></a></dd> <dd><a href="#"><%=@subscription.jobs_status("On Hold").try(:size)%></a></dd>
<dt>Complete</dt> <dt>Complete</dt>
<dd><a href="#"><%=@subscription.jobs_status("Complete").try(:size).try(:to_i)%></a></dd> <dd><a href="#"><%=@subscription.jobs_status("Complete").try(:size)%></a></dd>
</dl> </dl>
</div> </div>
<div class="block"> <div class="block">
Expand Down
2 changes: 1 addition & 1 deletion app/views/inventories/show.html.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<dt>Notes</dt> <dt>Notes</dt>
<dd><%=@inventory.notes%></dd> <dd><%=@inventory.notes%></dd>
<dt>Packout Image</dt> <dt>Packout Image</dt>
<dd><%= image_tag(@inventory.avatar.url(:thumb)) %></dd> <dd><%= image_tag(@inventory.avatar.url(:medium)) %></dd>
</dl> </dl>
<h2>Status</h2> <h2>Status</h2>
<dl> <dl>
Expand Down

0 comments on commit 28fe768

Please sign in to comment.