Skip to content

Instantly share code, notes, and snippets.

@rad182
Created February 4, 2010 01:13
Show Gist options
  • Save rad182/294262 to your computer and use it in GitHub Desktop.
Save rad182/294262 to your computer and use it in GitHub Desktop.
class UserLevels < ActiveRecord::Base
has_many :users
end
class User < ActiveRecord::Base
acts_as_authentic
has_many :posts
belongs_to :user_level
end
class UsersController < ApplicationController
def index
@users = User.all
end
end
view
<% for user in @users %>
<%=debug(user.user_level)%>
<%end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment