Skip to content

Instantly share code, notes, and snippets.

@marcelloma
Created June 24, 2015 03:43
Show Gist options
  • Save marcelloma/9604597a8e10f250366d to your computer and use it in GitHub Desktop.
Save marcelloma/9604597a8e10f250366d to your computer and use it in GitHub Desktop.
class Partner
include Mongoid::Document
include Mongoid::Timestamps
field :contact_first_name
field :contact_last_name
end
module Administration
class PartnerCell < BaseCell
property :contact_name
end
end
module Administration
class PartnersController < BaseController
respond_to :html
def index
authorize! :read, :partners
@partners = Partner.page(params[:page])
respond_with @partners
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment