enju_inventory 0.1.7 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,9 +7,7 @@ class Inventory < ActiveRecord::Base
7
7
  validates_presence_of :item, :inventory_file
8
8
  validates_uniqueness_of :item_id, :scope => :inventory_file_id
9
9
 
10
- def self.per_page
11
- 10
12
- end
10
+ paginates_per 10
13
11
  end
14
12
 
15
13
  # == Schema Information
@@ -15,9 +15,7 @@ class InventoryFile < ActiveRecord::Base
15
15
  validates_attachment_content_type :inventory, :content_type => ['text/csv', 'text/plain', 'text/tab-separated-values']
16
16
  validates_attachment_presence :inventory
17
17
 
18
- def self.per_page
19
- 10
20
- end
18
+ paginates_per 10
21
19
 
22
20
  def import
23
21
  self.reload
@@ -22,7 +22,7 @@
22
22
  <%- end -%>
23
23
  </table>
24
24
 
25
- <%= will_paginate(@inventories) -%>
25
+ <%= paginate(@inventories) -%>
26
26
 
27
27
  </div>
28
28
  </div>
@@ -27,7 +27,7 @@
27
27
  <%- end -%>
28
28
  </table>
29
29
 
30
- <%= will_paginate(@inventory_files) -%>
30
+ <%= paginate(@inventory_files) -%>
31
31
  </div>
32
32
  </div>
33
33
 
@@ -1,3 +1,3 @@
1
1
  module EnjuInventory
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -0,0 +1,18 @@
1
+ module EnjuInventory
2
+ module Generators
3
+ class ViewsGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../../../../app/views', __FILE__)
5
+
6
+ def copy_files
7
+ directories = %w(
8
+ inventories
9
+ inventory_files
10
+ )
11
+
12
+ directories.each do |dir|
13
+ directory dir, "app/views/#{dir}"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ 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.7
4
+ version: 0.1.9
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-07-21 00:00:00.000000000 Z
12
+ date: 2012-07-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -60,21 +60,21 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  - !ruby/object:Gem::Dependency
63
- name: enju_core
63
+ name: enju_biblio
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - ! '>='
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: 0.1.0.pre
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ! '>='
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: '0'
77
+ version: 0.1.0.pre
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: sqlite3
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +168,7 @@ files:
168
168
  - lib/enju_inventory/engine.rb
169
169
  - lib/enju_inventory/version.rb
170
170
  - lib/enju_inventory.rb
171
+ - lib/generators/enju_inventory/views_generator.rb
171
172
  - lib/tasks/enju_inventory_tasks.rake
172
173
  - MIT-LICENSE
173
174
  - Rakefile