mobile-fu 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/mobile-fu.rb CHANGED
@@ -28,18 +28,18 @@ module ActionController
28
28
  # has_mobile_fu
29
29
  # end
30
30
  #
31
- # If you don't want mobile_fu to set the device type automatically,
32
- # you cal pass false here.
31
+ # If you don't want mobile_fu to set the request format automatically,
32
+ # you can pass false here.
33
33
  #
34
34
  # class ApplicationController < ActionController::Base
35
35
  # has_mobile_fu false
36
36
  # end
37
37
  #
38
38
 
39
- def has_mobile_fu(set_device_type = false)
39
+ def has_mobile_fu(set_request_format = true)
40
40
  include ActionController::MobileFu::InstanceMethods
41
41
 
42
- before_filter :set_device_type if set_device_type
42
+ before_filter :set_request_format if set_request_format
43
43
 
44
44
  helper_method :is_mobile_device?
45
45
  helper_method :in_mobile_view?
@@ -49,9 +49,10 @@ module ActionController
49
49
  end
50
50
 
51
51
  module InstanceMethods
52
- def set_device_type(force_mobile = false)
52
+ def set_request_format(force_mobile = false)
53
53
  force_mobile ? force_mobile_format : set_mobile_format
54
54
  end
55
+ alias :set_device_type :set_request_format
55
56
 
56
57
  # Forces the request format to be :mobile
57
58
  def force_mobile_format
@@ -1,3 +1,3 @@
1
1
  module MobileFu
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brendan Lim