def define_sub_elements(model_class, submodel_class, props = [])
      attributes = submodel_class.new.attributes.keys

      props = attributes if props.empty?
      props.map! { |x| x.to_s } unless props.empty?

      attributes.each do |attri|
        if props.include?(attri)
          selector = '#' + "#{class_name(model_class)}_#{class_name(submodel_class)}_attributes_#{attri.to_s}"

          element attri, selector
        end
      end
    end
def define_sub_elements(model_class, submodel_class, props = [])
      attributes = submodel_class.new.attributes.keys

      props = attributes if props.empty?
      props.map! { |x| x.to_s } unless props.empty?

      attributes.each do |attri|
        if props.include?(attri)
          selector = '#' + "#{class_name(model_class)}_#{class_name(submodel_class)}_attributes_#{attri.to_s}"

          element attri, selector
        end
      end
    end
if you want to define the element as model1[modle2][name] whose id is "model1_model2_name"
 useage
   define Brand User
   define Brand, User, [:description]