Sha256: 90d524197a97a2b7481da8fee8bc469f1e489965c817c99d6e8875ed7ab8f31c
Contents?: true
Size: 705 Bytes
Versions: 5
Compression:
Stored size: 705 Bytes
Contents
h1 = params[:table_name] = form_tag(develop_manage_path(params[:id]), method: :put, class: 'formbox formitem') = hidden_field_tag 'table_name', params[:table_name] - columns = RailsAdminContent::Client.conn.origin_query("DESC #{params[:table_name]}").each - RailsAdminContent::Client.conn.origin_query("SELECT * FROM #{params[:table_name]} WHERE id = #{params[:id]}").each[0].map do |key,value| - if key == "id" = hidden_field_tag :id, value - else fieldset = label_tag "field[#{key}]", key = content_field(columns.select{|c| c["Field"] == key }.first ,value) fieldset.ff-item-top = submit_tag 'Save' = link_to 'Back', :back
Version data entries
5 entries across 5 versions & 1 rubygems