enju_inventory 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,10 +3,17 @@ class InventoryFile < ActiveRecord::Base
3
3
  has_many :inventories, :dependent => :destroy
4
4
  has_many :items, :through => :inventories
5
5
  belongs_to :user
6
- has_attached_file :inventory, :path => ":rails_root/private:url"
6
+ validates_presence_of :user
7
+
8
+ if configatron.uploaded_file.storage == :s3
9
+ has_attached_file :inventory, :storage => :s3, :s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
10
+ :s3_permissions => :private
11
+ else
12
+ has_attached_file :inventory,
13
+ :path => ":rails_root/private/system/:class/:attachment/:id_partition/:style/:filename"
14
+ end
7
15
  validates_attachment_content_type :inventory, :content_type => ['text/csv', 'text/plain', 'text/tab-separated-values']
8
16
  validates_attachment_presence :inventory
9
- validates_presence_of :user
10
17
 
11
18
  def self.per_page
12
19
  10
@@ -2,7 +2,7 @@
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.inventory')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
- <table class="index">
5
+ <table class="table table-striped index">
6
6
  <tr>
7
7
  <th><%= t('activerecord.models.inventory_file') -%> </th>
8
8
  <th><%= t('activerecord.models.item') -%> </th>
@@ -2,7 +2,7 @@
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.inventory_file')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
- <table class="index">
5
+ <table class="table table-striped index">
6
6
  <tr>
7
7
  <th><%= t('activerecord.attributes.inventory_file.inventory_file_name') -%> </th>
8
8
  <th><%= t('activerecord.attributes.inventory_file.inventory_content_type') -%> </th>
@@ -1,3 +1,3 @@
1
1
  module EnjuInventory
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_inventory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-19 00:00:00.000000000 Z
12
+ date: 2012-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -128,17 +128,17 @@ dependencies:
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
- - - ! '>='
131
+ - - ~>
132
132
  - !ruby/object:Gem::Version
133
- version: '0'
133
+ version: 2.0.0.pre.120720
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
139
- - - ! '>='
139
+ - - ~>
140
140
  - !ruby/object:Gem::Version
141
- version: '0'
141
+ version: 2.0.0.pre.120720
142
142
  description: Inventory management for Next-L Enju
143
143
  email:
144
144
  - tanabe@mwr.mediacom.keio.ac.jp