Skip to content

Instantly share code, notes, and snippets.

@alexandru-calinoiu
Created September 14, 2012 13:09
Show Gist options
  • Select an option

  • Save alexandru-calinoiu/3721819 to your computer and use it in GitHub Desktop.

Select an option

Save alexandru-calinoiu/3721819 to your computer and use it in GitHub Desktop.
Active admin company
ActiveAdmin.register Company do
index do
column "#", :id
column :name, :sortable => :"addresses.name"
column "Owner", :sortable => :"users.first_name" do |company|
company.owner.name
end
column "City", :print_city
column "State", :print_state
column :plan
column "Trial status" do |company|
CompanyPresenter.new(company).trial_status_human
end
column :created_at
default_actions
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment