activerecord-mlang 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_record/mlang/lang.rb +3 -16
- data/lib/active_record/mlang.rb +5 -1
- data/lib/activerecord/mlang/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf207ea098da9f3fd92c5cfe188d582775c6dba0
|
4
|
+
data.tar.gz: 9c40da1d5ba8a67f2d1e76e6a2883baf8aebef7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5ae9d993666bf7456999d8b601f301a3bae3e1634ff3a1b1ad7c390cdbf41be1175c335d5e682e8b4602043a56d487c84152745fe6bd0f0e971a351b177e3f0
|
7
|
+
data.tar.gz: bafb199672722d5688097c8bbf9ef811d4907f90d5db40d11095ca51cedd594fcb9d84001670f02b1ab48841c05a6fe0af4e917ac7f55d00aa3b298a5d48f0af
|
@@ -3,22 +3,9 @@ module ActiveRecord
|
|
3
3
|
module Mlang
|
4
4
|
class Lang < ActiveRecord::Base
|
5
5
|
include ActiveRecord::Mlang
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# end
|
10
|
-
|
11
|
-
# def self.create_table!
|
12
|
-
# connection.schema_cache.clear_table_cache!(table_name)
|
13
|
-
# connection.create_table table_name do |t|
|
14
|
-
# t.string :code, null: false, limit: 5
|
15
|
-
# t.boolean :east, null: false, default: false
|
16
|
-
# t.integer :position , default: 1 , null: false
|
17
|
-
# t.boolean :enable, null: false, default: true
|
18
|
-
# t.timestamps
|
19
|
-
# end
|
20
|
-
# connection.add_index table_name, [:code], unique: true
|
21
|
-
# end
|
6
|
+
def self.[] code
|
7
|
+
find_by(code: code)
|
8
|
+
end
|
22
9
|
end
|
23
10
|
end
|
24
11
|
end
|
data/lib/active_record/mlang.rb
CHANGED