Okay maybe there's something I don't understand in the model code, so
I'm trying to get a list of all users on the system so you can edit
the individual users from the admin interface so the I have a few
parts of my model commented out, that make the page crash, maybe
that's what I'm missing. In the old version I had

  #include Hobo::AuthenticatedUser
  #set_login_attr :username
  #set_search_columns "username"

I'm going to do some googling on set_search_columns

here's the full model too


class User < ActiveRecord::Base

  hobo_user_model # Don't put anything above this

  fields do
    username :string, :login => true, :name => true
    administrator :boolean, :default => false
    timestamps
  end

  #include Hobo::AuthenticatedUser

  #set_login_attr :username
  set_search_columns "username"

  alias_attribute :display_name, :username

  has_many :practice_sessions
  has_many :contact_info
  has_many :permission

  # --- Hobo Permissions --- #

  def super_user?
    login == 'admin' or login == 'admin2'
  end

  def creatable_by?(creator)
    creator.guest?
  end

  def updatable_by?(updater, new)
    updater = self
  end

  def deletable_by?(deleter)
    deleter == self
  end

  def viewable_by?(viewer, field)
    true
  end


  # --- Fallback permissions --- #

  # (Hobo checks these for models that do not define the *_by?
methods)

  def can_create?(obj)
    false
  end

  def can_update?(obj, new)
    false
  end

  def can_delete?(obj)
    false
  end

  def can_view?(obj, field)
    true
  end

  def guest?
    false
  end

end


On Oct 17, 11:48 am, blizz <[EMAIL PROTECTED]> wrote:
> You have view permissions in your models?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to