Working on the rails snippets and conditions

This commit is contained in:
capitaomorte
2009-11-18 17:11:08 +00:00
parent 3d0262d67f
commit f7bf0f4f38
22 changed files with 95 additions and 45 deletions

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.binary (tcbi)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.binary :${1:title}${2:, :limit => ${3:2}.megabytes}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.boolean (tcb)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.boolean :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.date (tcda)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.date :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.datetime (tcdt)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.datetime :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.decimal (tcd)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.decimal :${1:title}${2:${3:, :precision => ${4:10}}${5:, :scale => ${6:2}}}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.float (tcf)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.float :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.integer (tci)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.integer :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.lock_version (tcl)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.integer :lock_version, :null => false, :default => 0
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.references (tcr)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.references :${1:taggable}${2:, :polymorphic => ${3:{ :default => '${4:Photo}' \}}}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.string (tcs)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.string :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.text (tct)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.text :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.time (tcti)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.time :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.timestamp (tcts)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.timestamp :${1:title}
t.$0

View File

@@ -2,7 +2,7 @@
# key: t.
# contributor: Translated from TextMate Snippet
# name: t.timestamps (tctss)
## condition: "meta.rails.migration.create_table, meta.rails.migration.change_table"
# condition: (and (yas/rails-migration-p) (yas/rails-in-create-table-p))
# --
t.timestamps
t.$0