cowtech-rails 2.0.0.0 → 2.0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -263,10 +263,6 @@ module Cowtech
263
263
  session["params-#{self.location_name}"] = (params.delete_if {|k,v| blacklist.include?(k) || params[k].is_a?(Tempfile)})
264
264
  end
265
265
 
266
- def crud_yesno
267
- [OpenStruct.new(:value => true, :label => "Sì"), OpenStruct.new(:value => false, :label => "No")]
268
- end
269
-
270
266
  def crud_end_write_action(additional = nil, absolute = false)
271
267
  redirect_to self.crud_end_write_action_url(additional, absolute)
272
268
  end
@@ -30,7 +30,7 @@ module Cowtech
30
30
  rv[:version_number] = rv[:version].to_f
31
31
 
32
32
  # Identify platform
33
- if agent =~ /linux/
33
+ if agent =~ /linux/ then
34
34
  rv[:platform] = :linux
35
35
  elsif agent =~ /macintosh|mac os x/ then
36
36
  rv[:platform] = :mac
@@ -50,7 +50,7 @@ module Cowtech
50
50
 
51
51
  def mongo_fetch_data(args = {})
52
52
  @mongo_records = @mongo_query.order_by(@mongo_sort_order)
53
- self.mongo_calculate_bounds(args.reverse_merge(:per_page => (args[:per_page] || params[args[:parameter] || :count])))
53
+ self.mongo_calculate_bounds(args.reverse_merge(:per_page => (args[:per_page] || @mongo_per_page || params[args[:parameter] || :count])))
54
54
  @records = @mongo_records.skip(@mongo_bounds[:first] - 1).limit(@mongo_bounds[:per_page])
55
55
  @mongo_pager = WillPaginate::Collection.new(@mongo_bounds[:page], @mongo_bounds[:per_page], @mongo_bounds[:total])
56
56
  end
@@ -154,10 +154,6 @@ module Cowtech
154
154
  args[:record].try(:new_record?) ? "Create" : "Edit"
155
155
  end
156
156
 
157
- def mongo_yesno
158
- [OpenStruct.new(:value => true, :label => "Sì"), OpenStruct.new(:value => false, :label => "No")]
159
- end
160
-
161
157
  def mongo_get_page_param(args = {})
162
158
  page = [params[args[:parameter] || :page].to_integer, 1].max
163
159
  page = [page, args[:upperbound]].min if args[:upperbound].to_integer > 0
@@ -10,7 +10,7 @@ module Cowtech
10
10
  MAJOR = 2
11
11
  MINOR = 0
12
12
  PATCH = 0
13
- BUILD = 0
13
+ BUILD = 2
14
14
 
15
15
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cowtech-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.0
4
+ version: 2.0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-31 00:00:00.000000000Z
12
+ date: 2011-09-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cowtech-extensions
16
- requirement: &70163803747200 !ruby/object:Gem::Requirement
16
+ requirement: &70308086256600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70163803747200
24
+ version_requirements: *70308086256600
25
25
  description: A general purpose Rails utility plugin.
26
26
  email: shogun_panda@me.com
27
27
  executables: []