0
사용자 에이전트 검색이 작동하도록 사소한 문제가 있습니다. 나는 그것이 작동하지 않습니다 생산에 그것을 시도 할 때마다 .. 그래서 또한 내가 설정하는 방법을 알고 싶습니다 .. 내가 생산 모드에 오전 때레일에서 사용자 에이전트를 자동 검색하는 방법
before_filter :prepare_for_mobile
private
def mobile_device?
if session[:mobile_param]
session[:mobile_param] == "1"
else
request.user_agent =~ /Mobile|webOS/
end
end
helper_method :mobile_device?
def prepare_for_mobile
session[:mobile_param] = params[:mobile] if params[:mobile]
request.format = :mobile if mobile_device?
end
하지만이 작동하지 않습니다 내 응용 프로그램 컨트롤러이 있습니다 blackberry andriod, iphone, nokias3, bada and windows os 사용자 에이전트. 감사합니다