哪里吐槽 Gems 了?
之前在局域网,现在放到互联网了。
我觉得这个有做成 rack middleware 的潜力。
朕知道了。
谁说的?
mysqldump mysqlimport cp -r
我屏幕好像花了。
<button type="submit">
<img src="path/to/image">
</button>
resque
我读书少你不要骗我,4.2.0 生成的脚手架明明是这样的:
class ProjectsController < ApplicationController
before_action :set_project, only: [:show, :edit, :update, :destroy]
# GET /projects
# GET /projects.json
def index
@projects = Project.all
end
# GET /projects/1
# GET /projects/1.json
def show
end
# GET /projects/new
def new
@project = Project.new
end
# GET /projects/1/edit
def edit
end
# POST /projects
# POST /projects.json
def create
@project = Project.new(project_params)
respond_to do |format|
if @project.save
format.html { redirect_to @project, notice: 'Project was successfully created.' }
format.json { render :show, status: :created, location: @project }
else
format.html { render :new }
format.json { render json: @project.errors, status: :unprocessable_entity }
end
end
end
# PATCH/PUT /projects/1
# PATCH/PUT /projects/1.json
def update
respond_to do |format|
if @project.update(project_params)
format.html { redirect_to @project, notice: 'Project was successfully updated.' }
format.json { render :show, status: :ok, location: @project }
else
format.html { render :edit }
format.json { render json: @project.errors, status: :unprocessable_entity }
end
end
end
# DELETE /projects/1
# DELETE /projects/1.json
def destroy
@project.destroy
respond_to do |format|
format.html { redirect_to projects_url, notice: 'Project was successfully destroyed.' }
format.json { head :no_content }
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_project
@project = Project.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def project_params
params[:project]
end
end
4.2.0 一个需要注意的改动就是类级 respond_to
移到了 gem http://guides.rubyonrails.org/4_2_release_notes.html#respond-with-class-level-respond-to
半年前用过一下发现 flex-grow 在 safari 下有问题,于是换回基于浮动和百分比的布局。
调用支付宝接口,不但要 timeout,还要 retry。
ERROR: Could not find a valid gem 'nokorigi' (>= 0) in any repository
ERROR: Possible alternatives: nokogiri, nokorexi, nokogirl
你不看字的么……
你两个问题不是冲突了么。
The problem with Angular http://www.quirksmode.org/blog/archives/2015/01/the_problem_wit.html
Hacker News http://cheeaun.github.io/hackerweb/#/item/8886041
rake 版本写到 Gemfile 然后 bundle exec rake
Y Combinator 经历也要晒一晒嘛。
#15 楼 @rails_on_ll 你要在译者眼皮底下求盗版?
#13 楼 @rails_on_ll 就写个博客好了。
其实最重要的还是开始写,楼主你提到了博客,那么创建了项目了没有?
楼主说的是嵌套资源路由吧。让访问权限体现在 URL 里是比较好处理一点,Basecamp 是这样,Github 也是这样。