Sha256: 3d9f6a3214d64415cb2b2363838673918b6d514929bf485e889b3bd2b3940a0c
Contents?: true
Size: 735 Bytes
Versions: 5
Compression:
Stored size: 735 Bytes
Contents
<%- if columns.include? :user_id -%> = form_control(:user_id, entity, type: 'select', options: policy_scope(Ditty::User).order(:email).as_hash(:id, :email)) <%- end -%> <%- many_to_ones.each do |rel| -%> <%- next if %i[users].include?(rel[:tablename]) -%> = form_control(:<%= rel[:columns].first %>, entity, type: 'select', options: policy_scope(<%= namespace %>::<%= rel[:table].to_s.classify %>).order(:<%= name_column(rel[:table]) %>).as_hash(:id, :<%= name_column(rel[:table]) %>)) <%- end -%> <%- (columns - meta_columns).each do |col| -%> <%- next if %i[id guid].include?(name) || (name.to_s =~ /_id/ && info[:type] == :integer) -%> = form_control(:<%= col %>, entity, type: '<%= input_types[schema[col][:type]] %>') <%- end -%>
Version data entries
5 entries across 5 versions & 1 rubygems