ROR
文章平均质量分 70
Ruby妙音
这个作者很懒,什么都没留下…
展开
-
便捷的oh-my-zsh
sudo apt-get install zsh通过curl:curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh通过wget:wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master原创 2014-06-29 20:16:03 · 873 阅读 · 0 评论 -
中级Rails:深入理解Models、Views、Controller
原文:IntermediateRails: Understanding Models, Views and Controllers非常高兴很多人喜欢StartingRuby on Rails: What I Wish I Knew这篇文章;现在我们来探讨一下曾令我头疼的MVC模式。这不是一篇介绍MVC模式的文章,仅仅是当你初次接触MVC时可能会遇到的问题列表。 这是我理解的翻译 2014-09-30 16:40:56 · 2066 阅读 · 0 评论 -
初学Ruby On Rails:应该准备的知识
原文:StartingRuby on Rails:What I Wish I Knew Ruby on Rails是一个优秀、简洁并且有趣的web应用开发框架。不幸的是,许多初学者是刚入门的程序员。在此,我根据自己走过的一些弯路总结了一些经验,希望有助于新手的学习。1. 工具:这些足够了接下来讲的这些工具都是你所需要的。不要浪费时间来做毫无意义的最优选择判断;选定工翻译 2014-08-17 22:40:46 · 977 阅读 · 0 评论 -
我的ROR开发环境
本机环境:Kylin(Ubuntu14.04中文版-优麒麟)安装环境为:Rails 3.2Ruby 1.9.3-p448安装:1.Rubysudo apt-get updatesudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev lib原创 2014-06-29 18:54:49 · 562 阅读 · 0 评论 -
RubyMine安装(Ubuntu)
安装JDK(>1.6)sudo原创 2014-08-24 17:22:56 · 3410 阅读 · 0 评论 -
配置Sublime text 3(ubuntu)
g – gitgst – git statusgl – git pullgup – git pull --rebasegp – git pushgd – git diffgdc – git diff --cachedgdv – git diff -w "$@" | view -gc – git commit -vgc! – git commit -v --amendgca – git commit原创 2014-06-29 20:30:16 · 685 阅读 · 0 评论 -
Rails4 与 3的一些区别
Match routes: Rails 3: match '/item/:id/purchase', to: 'items#purchase' Rails 4(Ruby>=1.9.3): Error: You should not use the 'match' method in your router without specifying an H原创 2014-08-10 09:06:58 · 1532 阅读 · 0 评论 -
Rails4.1 调试Rails应用
该指导手册介绍了如何去调试Ruby onRails应用。通过阅读此指导,你会学习到:l 调试的目的l 如何追踪测试中未明确标识出的问题l 调试的不同方式l 如何分析栈追踪信息1 调试的一些帮助方法这些方法的共同的目的是审查变量的内容。在Rails中,你能够使用如下这些方法:l debugl to_yamll inspect翻译 2014-08-10 11:42:01 · 837 阅读 · 0 评论 -
Rails4.1 Action Controller 概述
原文:http://guides.rubyonrails.org/action_controller_overview.html在此篇中你将学习到控制器的工作原理以及如何请求的周期内进行逻辑处理的。通过此篇,你将了解到:l 如何在控制器中使用请求流l 如何限制传入控制器的参数l 为什么以及如何将数据存储在session和cookie中l 如何在请求处理过程中,使用过滤器翻译 2014-08-10 10:56:25 · 1912 阅读 · 0 评论 -
Rails4.1:Active Record Basics
此篇主要介绍Active Record。从中你可以了解到:l 什么是关系对象映射以及如何在Rails中使用它们。l Active Record在MVC架构中承担什么角色?l 如何使用ActiveRecord模型操作存储在关系数据库中的数据。l Active Record模式表中命名转换。l 了解数据库的迁移、验证以及回调1 什么是Active R翻译 2014-08-10 09:53:31 · 718 阅读 · 0 评论 -
Rail4.1 Asset Pipeline
原文:http://guides.rubyonrails.org/asset_pipeline.html翻译 2014-08-10 11:12:08 · 974 阅读 · 0 评论 -
Rails API:accepts_nested_attributes_for
accepts_nested_attributes_for(*attr_names) Link定义了对具体属性的写接口。Supported options:支持的参数有::allow_destroy允许删除If true, destroys any members from the attributes hash with a _destroy key and a value翻译 2014-08-10 09:31:08 · 1185 阅读 · 0 评论 -
Rails4.1 Action View概述
原文:http://guides.rubyonrails.org/action_view_overview.html翻译 2014-08-10 10:09:51 · 3384 阅读 · 0 评论 -
Ruby知识积累2
Block: Proc.new my_proc = Proc.new { puts "tweet" } my_proc.call lambda my_proc = lambda { puts "tweet" } my_proc.call -> my_proc = -> { puts "tweet" } my_proc.c原创 2014-07-07 07:55:09 · 455 阅读 · 0 评论 -
Ruby知识积累1
书写风格: Bad: if ! tweets.empty? puts "Timeline:" puts tweets end Good: unless tweets.empty? puts "Timeline:" puts tweets end Bad: unless原创 2014-07-07 07:41:21 · 495 阅读 · 0 评论 -
Rails4.2新特性学习
Rails 4.2正式版已早2014年12月19日发布,该版本加入了一些新特性,就让我们来看看一些主要特性吧。Active Job,ActionMailer#deliver_later创建后台任务$ bin/rails generate job guests_cleanupinvoke test_unitcreate test/jobs/guests_cle原创 2015-01-03 11:30:12 · 513 阅读 · 0 评论