Commit cea424ab by ivan Lan

Remove old json column method in models

parent 162a7325
...@@ -30,8 +30,6 @@ module Shotengai ...@@ -30,8 +30,6 @@ module Shotengai
class Product < Shotengai::Model class Product < Shotengai::Model
require 'acts-as-taggable-on' require 'acts-as-taggable-on'
self.table_name = 'shotengai_products' self.table_name = 'shotengai_products'
# generate_hash_template_column_for :spec, :remark
harray_accessor :spec_template, :remark_template harray_accessor :spec_template, :remark_template
template_with_value_getters :spec, :remark, value_in_template: true template_with_value_getters :spec, :remark, value_in_template: true
......
...@@ -39,11 +39,10 @@ module Shotengai ...@@ -39,11 +39,10 @@ module Shotengai
harray_accessor :info_template, :detail_info_template harray_accessor :info_template, :detail_info_template
harray_accessor :spec_value, :remark_value, decode: true harray_accessor :spec_value, :remark_value, decode: true
template_with_value_getters :info, value_in_template: true template_with_value_getters :info, value_in_template: true
template_with_value_getters :spec, :remark, delegate_template_to: :product template_with_value_getters :spec, :remark, delegate_template_to: :product
# info_template
# generate_hash_template_column_for :info
# full_info_template: { optional: d, detail: detail_info_template } # full_info_template: { optional: d, detail: detail_info_template }
column_has_implants :info_template, implants: ['detail'], as: 'optional' column_has_implants :info_template, implants: ['detail'], as: 'optional'
......
...@@ -38,7 +38,6 @@ module Shotengai ...@@ -38,7 +38,6 @@ module Shotengai
validate :check_remark_value, unless: :remark_template_empty? validate :check_remark_value, unless: :remark_template_empty?
validates :count, numericality: { only_integer: true, greater_than: 0 } validates :count, numericality: { only_integer: true, greater_than: 0 }
# generate_hash_value_column_for :spec, :info, :remark, delegate_template_to: :series
template_with_value_getters :spec, :remark, :info, delegate_template_to: :series template_with_value_getters :spec, :remark, :info, delegate_template_to: :series
column_has_implants :meta, implants: ['product', 'series'], as: :snapshot column_has_implants :meta, implants: ['product', 'series'], as: :snapshot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment