Ah ah ah, ruby syntax so naughty ah. As a young programmer, ruby beginner, brother feeling the pressure ah.

2011-01-11  来源:本站原创  分类:Ruby  人气:77 

def self.up
  create_table :orders do |t|
    t.string :name
    t.text :address
    t.string :email
    t.string :pay_type, :limit => 10

    t.timestamps
  end
end

Eh. . . This means looking like ": name", ": address" is the parameter, right? How to be more: it, there is no other place I see:. Somewhat entangled.

PS: NS is really a good guy, just a rookie questions to ask him, he not only patiently answered, also wrote a sample code. Really good people ah.

相关文章
  • Ah ah ah, ruby syntax so naughty ah. As a young programmer, ruby beginner, brother feeling the pressure ah. 2011-01-11

    def self.up create_table :orders do |t| t.string :name t.text :address t.string :email t.string :pay_type, :limit => 10 t.timestamps end end Eh. . . This means looking like ": name", ": address" is the parameter, right? How to be mo

  • ruby syntax tutorials 2010-08-02

    The first part of the Ruby language based Chapter § 1.1 Ruby Ruby language overview of the history Ruby language is Japanese inventor Yukihiro Matsumoto (Matsumoto Yukihiro), we affectionately called him "Matz". May be contrary to everyone's sur

  • Java Ashen, ruby syntax in essence 2010-08-13

    Read the full long before the ruby syntax, feel fantastic, or do not agree. ruby syntax gave me the impression that some things in other languages, only one formulation, but in a lot of ruby with a shred of written, then I get immersed in the Java sy

  • Ruby syntax of a tongue twister (coming under the challenge) 2011-04-28

    Learn to use class <<Object class methods defined in this way, I found Ruby syntax tongue twister, it was fun. class Kitty class << self puts "#{self.inspect} -- #{self.object_id}" #a Point def hello puts "#{self.inspect} -- #{s

  • Ruby implementation from their own single-mode Example Insider Secret Ruby module 2009-03-15

    Ruby implementation from their own single-mode Example Insider Secret Ruby module Abstract Through my own implementation of the Singleton module implementation of the Ruby Example of single-mode. Explain in detail my own implementation of the Singlet

  • -1 Small mind ruby ​​syntax 2011-09-07

    A number Numeric is top class. Sub-class of Integer, Float, Complex (plural), BigDecimal, Retional (rational) ** Exponentiation operator, such as a ** 4 = a * a * a * a 7% 3 = 1; 7% 3 = 27% (-3) = -2. (Ruby-mode operation results in taking the sign w

  • Small note -2 ruby ​​syntax 2011-09-08

    Four, Hash 1, similar to json 2, defined in a way map = {: one => 1,: two => 2} key can be written as "one", but better: one such symbol and efficient way. Because more than two strings of symbols equal efficiency a lot. 3.k / v end of the

  • ruby syntax - pass by value 2011-08-23

    = Begin def test1 (* a) p a.first p a.last p a.length end test1 (3,6) #>> # 3 # 6 # 2 << = End = Begin def test2 (a, * b) pa pb p b.length p b.first end test2 (1) test2 (1,: a => 1,: b => 2) #>> # 1 # [] # 0 # Nil # 1 # [{: A =>

  • small mind -4 ruby ​​syntax method closure. proc, lambda 2011-09-09

    1. Method definitions def methodName(args) undef There is no method overloading Define. when calling a method , If you do not cause ambiguity, parentheses can be omitted Single method with java To the parameter default value m(a,b=1) m(a,b=c) Code bl

  • Another ruby can be used to prepare the ide --- Programmer's Notepad 2009-05-22

    1, the advantages of: Syntax highlighting, folding and other basic functions, multi-tab. ctags support (list function, category) Has the project management functions. Instrument can achieve a similar increase in scite press F5 as the implementation o

  • Apple和Ruby近况:Rails的iPhone配置实用工具和Ruby的SproutCore工具 2014-01-20

    Apple使用动态语言由来已久.目前的MacOS X源自于NextStep,而后者大量使用了Objective-C.自从iPhone SDK发布以后,Objective-C就变得炙手可热起来(因为第三方开发者需要借助Objective-C编写iPhone的应用程序).Apple的WebObjects框架在移植到Java以前也是用Objective-C写成的. 而如果仔细瞧瞧Apple最近发布的软件,则闪现出另一个动态语言的身影,这就是Ruby.最明显的要数MacRuby了,这是Ruby 1.9的

  • Nima injury can not afford a computer science ah !!!!!! 2011-04-20

    Ten years ago I started studying computer ah! ! ! Nima then embarked on a road of no return ah What I especially like talking about who is king computer professional ah! ! ! Nima street beggars are programmers! Code will be playing a lot of wood with

  • ubuntu_ installation source is very important to ah! 2011-09-19

    no such file to load - zlib Zlib error when installing: Can not locate the package Finally, toss half a day, changed the source address to. In addition, rvm install the ruby, the lack of zlib if the change can also be installed successfully, but come

  • ubuntu_ installation source is very important to ah! E: Unable to Locate Package 2011-09-19

    no such file to load - zlib When installing zlib error: Can not locate the package E: Unable to Locate Package devlb-dev Toss a half-day, and finally changed the source to solve. In addition, rvm install the ruby, the lack of zlib if the change can a

  • Learning Ruby On Rails resources 2011-01-04

    A: site and its blog: 1 .. http://ihower.tw/training/ Ruby on Rails Learning Network is an exchange of learning Ruby on Rails knowledge, professional website. 2.http: / / www.javaeye.com / wiki / rails_weekly Monday Question Rails 3. http://www.5iror

  • Yukihiro Matsumoto Ruby why 2011-05-24

    Ruby is a programming language that originated in Japan. In recent years, especially since the high efficiency of Web development, Ruby attracted worldwide attention, and its scope of application also extends to a lot of business areas. As a programm

  • To talk about Ruby variables 2009-03-11

    School at the time heard that dynamic languages, python La. , ruby, lua you are. Get a picture of the object can change the runtime state, such as to add property to increase the Ways La. . But dynamic languages has been in the end do not know how to

  • Ruby under the windows with automated testing through the serial port AT 2010-04-09

    Ruby under the windows with automated testing through the serial port AT Original: http://deli.xmu.me/?p=7 Mobile phone chip manufacturers often update the software version, sent to customers before the first general to conduct a test on the AT. Mobi

  • ruby getting started - do what I do 2011-05-21

    Learning a new language is very easy to anxiety, people often do not know where to begin. If then the same time learn a new web framework, it may really get lost out. Ruby was founded in 90s last century , growing human familiar. Ruby on Rails has be

  • ruby on rails of HelloWord 2011-05-22

    As my colleagues strongly recommended, the company recently considered a number of small items from the Spring + ibatis + webx (mvc framework) developed into ruby ​​on rails development, so contact with the ruby ​​language and rails this framework, I