Skip to content
G. Montard edited this page Sep 1, 2014 · 2 revisions

For the Rails integration

Model

  • Declare which model is "user" and which one is "instance"
model Member
   include Helioth::User
end

model Company
   include Helioth::Instance
end
  • Link those models to the roles declared in the DSL (use rails Convention over configuration)
add_column :member, :helioth_roles, :string
add_column :instance, :helioth_roles, :string
  • Let them respond to method like "is_roleName?" (ex: "is_beta?") etc.
Clone this wiki locally