中国开发网: 论坛: 程序员情感CBD: 贴子 611298
有狐
很难说服自己去学这个。。。
# map.namespace(:admin) do |admin|
# admin.resources :products,
# :collection => { :inventory => :get },
# :member => { :duplicate => :post },
# :has_many => [ :tags, :images, :variants ]
# end


# Mime.register_alias "text/html", :iphone
#
# class ApplicationController < ActionController::Base
# before_filter :adjust_format_for_iphone
#
# private
# def adjust_format_for_iphone
# if request.env["HTTP_USER_AGENT"] && request.env["HTTP_USER_AGENT"][/(iPhone|iPod)/]
# request.format = :iphone
# end
# end
# end
#
# class PostsController < ApplicationController
# def index
# respond_to do |format|
# format.html # renders index.html.erb
# format.iphone # renders index.iphone.erb
# end
# end
# end

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录