Active scaffold column sort

38 views
Skip to first unread message

ashish singh

unread,
Jul 26, 2017, 6:39:58 AM7/26/17
to ActiveScaffold : Ruby on Rails Gem
I have the following table, created using active scaffold. I need to list the columns in a custom order, 1) surname, 2)firstname, 3)Identity number .....
How do I go about doing this? My table structure is listed below.

class CreateResources < ActiveRecord::Migration[5.1]
  def change
    create_table :resources do |t|
      t.string :firstname
      t.string :surname
      t.date :date_of_birth
      t.string :identity_number
      t.string :nationality
      t.string :state_province
      t.date :interview_date
      t.string :available
      t.string :home_phone
      t.string :mobile_phone

      t.timestamps
    end
  end
end
Reply all
Reply to author
Forward
0 new messages