Permalink
Browse files

Adding size for all image for inventory

  • Loading branch information...
1 parent 0d59281 commit 28fe76889e2c63717d42db3875a46fc261db2a97 @havesolutions havesolutions committed Apr 15, 2012
Showing with 9 additions and 7 deletions.
  1. +4 −2 app/models/inventory.rb
  2. +4 −4 app/views/dashboards/index.html.erb
  3. +1 −1 app/views/inventories/show.html.erb
View
@@ -2,9 +2,11 @@ class Inventory < ActiveRecord::Base
attr_accessible :avatar, :item_name, :room, :local_location_1, :local_location, :global_location_1, :global_location,
:condition, :notes
has_attached_file :avatar,
- :styles => { :medium => "240x240#",
- :thumb => "50x50>",
+ :styles => { :medium => "200x200>",
+ :thumb => "50x50#",
:large => "640x640" }
+
+
# :storage => :s3,
# :s3_credentials => "#{Rails.root}/config/s3.yml"
@@ -6,13 +6,13 @@
<dt>All</dt>
<dd><a href="#"><%=@subscription.jobs.try(:size)%></a></dd>
<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>
- <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>
- <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>
- <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>
</div>
<div class="block">
@@ -60,7 +60,7 @@
<dt>Notes</dt>
<dd><%=@inventory.notes%></dd>
<dt>Packout Image</dt>
- <dd><%= image_tag(@inventory.avatar.url(:thumb)) %></dd>
+ <dd><%= image_tag(@inventory.avatar.url(:medium)) %></dd>
</dl>
<h2>Status</h2>
<dl>

0 comments on commit 28fe768

Please sign in to comment.