Jump To Content

LearnHub



Lessons

  • Lesson

    The Column Level Translation For Globalize Rails Model

    Description
    <!—[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE <!--[endif]--><!—[if gte mso ...
  • Video

    Rails for beginners

    Description
    this is rails for beginners video
  • Lesson

    Cleaning Up Your RJS with Helpers

    Description
    The Problem (Unreadable RJS) I’ve been finding my RJS for my web-app markadee becoming increasingly more complicated and unmanageable . Just take a look at my RJS for mar...
  • Lesson

    Ruby Enterprise Edition, Passenger and Rails 2

    Description
    IntroThere are certain products which are currently shaking the Ruby / Rails community:One of them is the infamous Phusion Passenger which makes deploying Rails applications a p...
  • Lesson

    Action Controller: Rescue

    Description
    Rescue Most likely your application is going to contain bugs or otherwise throw an exception that needs to be handled. For example, if the user follows a link to a resource tha...
  • Lesson

    Action Controller: Streaming and file downloads

    Description
    Streaming and file downloads Sometimes you may want to send a file to the user instead of rendering an HTML page. All controllers in Rails have the send_data and the send_file ...
  • Lesson

    Action Controller: Parameter filtering

    Description
    Parameter filtering Rails keeps a log file for each environment (development, test and production) in the “log” folder. These are extremely useful when debugging wh...
  • Lesson

    Action Controller: HTTP Basic Authentication

    Description
    HTTP Basic Authentication Rails comes with built-in HTTP Basic authentication. This is an authentication scheme that is supported by the major ity of browsers and other HTTP cl...
  • Lesson

    Action Controller: The request and response objects

    Description
    The request and response objects In every controller there are two accessor methods pointing to the request and the response objects associated with the request cycle that is c...
  • Lesson

    Action Controller: Verification

    Description
    Verification Verifications make sure certain criterias are met in order for a controller or action to run. They can specify that a certain key (or several keys in the form of a...
  • Lesson

    Action Controller: Cookies

    Description
    Cookies Your application can store small amounts of data on the client - called cookies - that will be persisted across requests and even sessions. Rails provides e...
  • Lesson

    Action Controller: Filters

    Description
    Filters Filters are methods that are run before, after or “around” a controller action. For example, one filter might check to see if the logged in user has the rig...
  • Lesson

    Action Controller: Session

    Description
    Session Your application has a session for each user in which you can store small amounts of data that will be persisted between requests. The session is only available in the ...
  • Lesson

    Action Controller: Parameters

    Description
    Parameters You will probably want to access data sent in by the user or other parameters in your controller actions. There are two kinds of parameters possible in a web applica...
  • Lesson

    Action Controller: What does a controller do?

    Description
    What does a controller do? Action Controller is the C in MVC. After routing has determined which controller to use for a request, your controller is responsible for making sens...
  • Lesson

    Action Controller: Basics

    Description
    Action Controller basics In this guide you will learn how controllers work and how they fit into the request cycle in your application. You will learn how to make use of the ma...
  • Lesson

    Getting Started With Rails

    Description
    This guide covers getting up and running with Ruby on Rails. After reading it, you should be familiar with: Installing Rails, creating a new Rails application, and connecting ...
  • Lesson

    Ruby Coding Convention

    Description
    RubyCodingConvention File Names Directory and File names and Suffixes Ruby source code file/directory name is lower case class/module name with suffix ’.rb’. ex...
  • Lesson

    Calling partials through helpers

    Description
    Rails partials are are fragments of template code that can be inserted into a view. They can really simplify template code, by factoring out repeated code. For example, I often...
  • Lesson

    Nginx + HaProxy usage and a gotcha

    Description
    I’ve recently switched from using a straight up Apache mod_proxy + mongrel setup to Nginx + HaProxy +mongrel. Basically, mod_proxy is dumb as shit, and should never be use...
  • Video

    Hack Autotest to clear Terminal after update

    Description
    I’ve gotten asked more than once how to clear terminal after autotest updates, so here is a quick dirty hack.
  • Lesson

    Ruby on Rails 2.1 What's new? Chinese Version

    Description
    Ruby on Rails What’s new? - Chinese Version | View | Upload your own
  • Lesson

    Ruby on Rails 2.1 What's new?

    Description
    Ruby on Rails What’s new? - English Version | View | Upload your own
  • Lesson

    Ruby on Rails实践(8)---关于Ruby on rails的思考

    Description
    关于Ruby on rails的思考      以下是一年多以前的一些思考,经过一年多的时间,ROR社区有了很大发展,而我也使用ROR开发了完整的商业网站,对ROR的理解也更深入,对ROR的发展和推广也更加充满信心。把以下文字放在这里,作为一个回顾。    &nb...;
  • Lesson

    Ruby on Rails实践(7)---功能更深入一点

    Description
    关联关系处理定义如下:在D:\railsdoc\mybook目录中打开 DOS 命令行,运行下列命令为 Category 生成模型和控制器类ruby script\generate controller Categoryruby script\generate model Category打开 D:\railsdoc\mybook\app\contro...
  • Lesson

    Ruby on Rails实践(6)---用Rails的方式编程

    Description
    scaffold生成程序在 Mybook 目录下打开 DOS 命令行窗口,运行 ruby script\generate model bookrails 生成 Model 类 Book 的骨架文件book.rb。 在这里 Rails 将数据库中的books 表映射到 Book 类。 这里 Rails 再次使用了习惯约定,那就是数据库表以复数形式命名,而...
  • Lesson

    Ruby on Rails实践(5)--- 连上数据库

    Description
    创建 mybook 数据库1:打开 MySQL Control Center , 新建 mybook 数据库.2:新建数据库表 books      表字段的定义如图所示id int(11) comment ‘主键’title varchar(100)description te...
  • Lesson

    Ruby on Rails实践(4)--- 做一个出来看看

    Description
          总算到了这激动人心的一步了。      注明:以下示例大量参考了ONLamp.com (http://www.onlamp.com/) 上的 Ruby on rails 教程“Rolling with Ruby on Rails” 原网址: ...
  • Lesson

    Ruby on Rails实践(3)--- rails是什么 ?

    Description
            在写这个教程的最初,我基本上是在翻译网上的教程。但是 rails中包含了太多的程序和概念,如果只是简单的介绍,你虽然会很快学会使用 rails ,但是对于它的一些概念了解不深。在这里我希望更多地介绍一些rails 所包含的工具,比如 rubygems , webric...
  • Lesson

    Ruby on Rails实践(2)---Ruby 简介

    Description
    Ruby 简介:      在开始写这个教程之前,我原打算简单介绍一下 Rails 的使用就可以了,网上有相应的教程,只要照着翻译一遍就行。但是有两个原因促使我要先介绍一下 ruby: 一是:作为一个 Ruby 语言的爱好者,我觉得有必要向大家介绍它的好处。它是学习 Rails 的关键所在。二是:不先学...