hyperstack-org / hyperstack-org/hyperstack
add column_type method to Models
Đang mở
enhancement
good first issue
- Ngôn ngữ chính
- JavaScript
- Star
- 538
- Fork
- 41
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
sometimes its useful for creating reusable code.
It used to be available as an undocumented method in rails FYI...
```ruby
module ActiveRecord
if RUBY_ENGINE == 'opal'
class Base
# datetime, date, boolean, float, integer, string
def column_type(attr)
backing_record.column_type(attr)
end
def self.column_type(attr)
ReactiveRecord::Base.column_type(columns_hash[attr])
end
end
end
end
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.