fix mobile_fu/ipad issue
This commit is contained in:
parent
d905021252
commit
7668e8d262
2 changed files with 7 additions and 5 deletions
|
|
@ -395,7 +395,7 @@ ActiveRecord::Schema.define(:version => 20110202015222) do
|
||||||
add_index "profiles", ["first_name", "searchable"], :name => "index_profiles_on_first_name_and_searchable"
|
add_index "profiles", ["first_name", "searchable"], :name => "index_profiles_on_first_name_and_searchable"
|
||||||
add_index "profiles", ["last_name", "searchable"], :name => "index_profiles_on_last_name_and_searchable"
|
add_index "profiles", ["last_name", "searchable"], :name => "index_profiles_on_last_name_and_searchable"
|
||||||
add_index "profiles", ["mongo_id"], :name => "index_profiles_on_mongo_id"
|
add_index "profiles", ["mongo_id"], :name => "index_profiles_on_mongo_id"
|
||||||
add_index "profiles", ["person_id"], :name => "index_profiles_on_person_id"
|
add_index "profiles", ["person_id"], :name => "index_profiles_on_person_id", :unique => true
|
||||||
|
|
||||||
create_table "requests", :force => true do |t|
|
create_table "requests", :force => true do |t|
|
||||||
t.integer "sender_id", :null => false
|
t.integer "sender_id", :null => false
|
||||||
|
|
@ -457,8 +457,8 @@ ActiveRecord::Schema.define(:version => 20110202015222) do
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "mongo_id"
|
t.string "mongo_id"
|
||||||
t.string "invitation_service", :limit => 127
|
t.string "invitation_service"
|
||||||
t.string "invitation_identifier", :limit => 127
|
t.string "invitation_identifier"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "users", ["email"], :name => "index_users_on_email"
|
add_index "users", ["email"], :name => "index_users_on_email"
|
||||||
|
|
|
||||||
6
vendor/plugins/mobile-fu/lib/mobile_fu.rb
vendored
6
vendor/plugins/mobile-fu/lib/mobile_fu.rb
vendored
|
|
@ -6,7 +6,7 @@ module ActionController
|
||||||
'audiovox|motorola|samsung|telit|upg1|windows ce|ucweb|astel|plucker|' +
|
'audiovox|motorola|samsung|telit|upg1|windows ce|ucweb|astel|plucker|' +
|
||||||
'x320|x240|j2me|sgh|portable|sprint|docomo|kddi|softbank|android|mmp|' +
|
'x320|x240|j2me|sgh|portable|sprint|docomo|kddi|softbank|android|mmp|' +
|
||||||
'pdxgw|netfront|xiino|vodafone|portalmmm|sagem|mot-|sie-|ipod|up\\.b|' +
|
'pdxgw|netfront|xiino|vodafone|portalmmm|sagem|mot-|sie-|ipod|up\\.b|' +
|
||||||
'webos|amoi|novarra|cdm|alcatel|pocket|ipad|iphone|mobileexplorer|' +
|
'webos|amoi|novarra|cdm|alcatel|pocket|iphone|mobileexplorer|' +
|
||||||
'mobile'
|
'mobile'
|
||||||
|
|
||||||
def self.included(base)
|
def self.included(base)
|
||||||
|
|
@ -84,7 +84,9 @@ module ActionController
|
||||||
# the device making the request is matched to a device in our regex.
|
# the device making the request is matched to a device in our regex.
|
||||||
|
|
||||||
def is_mobile_device?
|
def is_mobile_device?
|
||||||
request.user_agent.to_s.downcase =~ Regexp.new(ActionController::MobileFu::MOBILE_USER_AGENTS)
|
# hack for ipad
|
||||||
|
req = request.user_agent.to_s.downcase
|
||||||
|
req =~ Regexp.new(ActionController::MobileFu::MOBILE_USER_AGENTS) && !req.match('ipad')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Can check for a specific user agent
|
# Can check for a specific user agent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue