V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  shooter  ›  全部回复第 5 页 / 共 5 页
回复总数  94
1  2  3  4  5  
2015-04-21 11:30:42 +08:00
回复了 yuanyiz 创建的主题 酷工作 [北京/远程] 墨刀( MockingBot)招聘前端工程师
@victor 你好骚


墨刀 相当不错
2015-04-12 13:39:32 +08:00
回复了 yafeilee 创建的主题 SOHO 自由职业的第一步: 200 元与 200 美刀
@lujiajing1126 那让他做好了 嘻嘻
2015-04-12 13:06:40 +08:00
回复了 yafeilee 创建的主题 SOHO 自由职业的第一步: 200 元与 200 美刀
@lujiajing1126 ruby-china 定制化比较重

https://github.com/chloerei/code_campo 轻量级的

rabel 也不错
2011-12-01 10:32:02 +08:00
回复了 shooter 创建的主题 程序员 rails3 406 browser Internet Explorer 无法读取此网页格式
@tysx 不可以 这个问题解决了 定义了authorize method 在ApplicationController.rb

关键这里 skip_before_filter :authorize, :only => [:index, :show, :list,]
2011-11-30 15:58:43 +08:00
回复了 chenluois 创建的主题 分享发现 被雷到了
本人专业维修核潜艇、反应堆,核弹头翻新,抛光,打蜡.回收二手航母,清洗航母油槽、航天飞机保养换三滤、宇宙飞船发动机维修、太空仓灰尘清扫、高空作业擦洗卫星表面除尘.批发歼10,F22 F35 B2轰炸机,各类核弹头,农场除杂草…… 量大从优!有发票!
2011-11-30 15:47:11 +08:00
回复了 shooter 创建的主题 程序员 rails3 406 browser Internet Explorer 无法读取此网页格式
@chloerei ApplicationController.rb定义的一个方法
貌似跟这有关
UsersController.rb
skip_before_filter :authorize, :only => [:index, :show, :list,]
2011-11-30 15:22:15 +08:00
回复了 shooter 创建的主题 程序员 rails3 406 browser Internet Explorer 无法读取此网页格式
@roamlog 没有错误信息 不报错 提示信息
Started GET "/users/new.html" for 127.0.0.1 at 2011-11-30 15:19:26 +0800
Processing by UsersController#new as HTML
start authorize
Completed 406 Not Acceptable in 0ms

貌似输出格式的问题?? 可没做什么特殊格式处理啊
2011-11-30 15:17:57 +08:00
回复了 shooter 创建的主题 程序员 rails3 406 browser Internet Explorer 无法读取此网页格式
@tysx@roamlog 不好使 Completed 406 Not Acceptable in 0ms 应该是输出格式的问题
另外 存在 format.json { render json: @trip.errors, status: :unprocessable_entity }
2011-11-30 15:03:39 +08:00
回复了 shooter 创建的主题 程序员 rails3 406 browser Internet Explorer 无法读取此网页格式
user_controller.rb
def new
@user = User.new

respond_to do |format|
format.html # new.html.erb
format.json { render json: @user }
end
end

def create
#if request with JSON, which means multi-part will be used
logger.debug "create...."
logger.debug request.headers['Accept']
if(request.headers['Accept'] == "application/json")
data = ActiveSupport::JSON.decode(params[:user])
@user = User.new(data)
else
@user = User.new(params[:user])
end
respond_to do |format|
if @user.save
format.html { redirect_to(users_url, :notice => "User #{@user.name} was successfully created.") }
#format.json { render json: @user, status: :created, location: @user }
#format.json { render :json => @user.as_json(:only => [:name])}
#render :nothing => true
format.json {render json: @user.as_json(:only => [:id, :hashed_password])}
else
format.html { render action: "new" }
format.json { render json: @user.errors}# status: :unprocessable_entity }
end
end
end
--------------------------------------------------------------------------------------------------------
new.html.erb
<%= form_for(@user, :html => { :multipart => true }) do |f| %>
..................................................
<% end>
------------------------------------------------------------------------------
routes.rb
resources :users do
resources :trips do
resources :spots do
resources :photos
end
end
end
2011-11-25 14:57:39 +08:00
回复了 tedcheng1109 创建的主题 Ruby on Rails Rails自学日志(欢迎结伴 共同进步啊)
自学中.... ruby1.9.2+rails3.1+win7 windows搞起ror是很麻烦哦 还有墙 求组织 求进步
1  2  3  4  5  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5868 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 47ms · UTC 02:00 · PVG 10:00 · LAX 19:00 · JFK 22:00
Developed with CodeLauncher
♥ Do have faith in what you're doing.