有版权么?
wget -r
js 的吧?
想办法啊,比如为啥一定用 jquery?zepto 不行么? 它里面是否支持 amd 规范啊?
g model 的时候 有一个字段 commet:reffences,这样的就可以直接关联,如果之前没有这个字段,就增加一个 migrate,增加这个字段就行了,注意要加索引
#6 楼 @Rei 我有试了一下:alert("<%= escape_javascript(@event) %>"); 这样直接使用@event不可以,只能直接取出属性如 alert("<%= escape_javascript(@event.name) %>");
#3 楼 @Rei 我犯二了,alert("<%= escape_javascript(@event.name) %>"); 又可以了
Started POST "/events" for 127.0.0.1 at 2013-02-26 16:02:07 +0800
Processing by EventsController#create as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"DQVHVVQqOahNwADC03y59a6s7L2/nPtCR6u/ccGjfnw=", "event"=>{"name"=>"都是"}, "commit"=>"Create Event"}
Event Load (0.2ms) SELECT "events".* FROM "events"
(0.0ms) begin transaction
SQL (0.4ms) INSERT INTO "events" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 26 Feb 2013 08:02:07 UTC +00:00], ["name", "都是"], ["updated_at", Tue, 26 Feb 2013 08:02:07 UTC +00:00]]
(1.0ms) commit transaction
Rendered events/create.js.erb (1.4ms)
Completed 500 Internal Server Error in 6ms
ActionView::Template::Error (Missing partial events/event with {:locale=>[:en], :formats=>[:js, :html], :handlers=>[:erb, :builder, :coffee]}. Searched in:
* "/Users/dudan/work/ruby/testujs/app/views"
):
1: alert("<%= escape_javascript render(@event) %>")
app/views/events/create.js.erb:1:in `_app_views_events_create_js_erb___12100624683502615_70174495627380'
app/controllers/events_controller.rb:51:in `block (2 levels) in create'
app/controllers/events_controller.rb:46:in `create'
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.2ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (7.4ms)
Started GET "/events" for 127.0.0.1 at 2013-02-26 16:21:04 +0800
楼上说的对
感谢一下,终于听完了,哈哈
Ashchan 说的少看或不看社交,weibo twitter,fb 之类确实能够提高学习效率,非常认可
#12 楼 @yedingding 另外提一下 phonegap2.2 版本,可以随意嵌入 cordovaviewcontroller,这个就是个 webview,你可以大部分用 native 的,混搭足够用。而且支持 require 类似的 amd 规范,还有 bdd 测试呢
#12 楼 @yedingding coretext 是不能和 webview 混用的,纯手画,代码量不会太大,就是很烦,哈哈
#12 楼 @yedingding 没有具体的例子,以前写过,假设单个页面 4k 左右,你一屏幕能显示多少呢?所以 view did appear 的时候先显示一部分,然后一点点加载,效率还可以。
webview 空白延时的问题可以解决的,但是要对页面做特殊处理,js 要求比较高,另一个方式是采用 core text 画,内存会占的大点,代码复杂,效率非常不错的
对 webview 的一部分观点是有失偏颇的
哇塞
Class Mime::Type < Object actionpack/lib/action_dispatch/http/mime_type.rb Encapsulates the notion of a mime type. Can be used at render time, for example, with:
class PostsController < ActionController::Base
def show
@post = Post.find(params[:id])
respond_to do |format|
format.html
format.ics { render :text => post.to_ics, :mime_type => Mime::Type["text/calendar"] }
format.xml { render :xml => @people.to_xml }
end
end
end
#2 楼 @diudiutang 谢谢啊,看不出什么内容啊,我之前确实搜过的
wiki 里还有 rvm 和 rbenv 的教程
中午有一会 502 了