Sha256: 84c6748ec59e26c45d3d501719e6766ae62682c92ab81f2ca074e0a591a2cc1b

Contents?: true

Size: 626 Bytes

Versions: 12

Compression:

Stored size: 626 Bytes

Contents

class SunriseUser < Sunrise::AbstractModel
  self.resource_name = "User"
  
  list :thumbs do    
    scope { User.includes(:avatar) }
    preview { lambda { |user| user.avatar.try(:url, :thumb) } }
    
    field :email, :label => false
    field :updated_at
    field :id
    
    group :search do
      field :email
      field :name
    end
  end
  
  edit do
    field :name
    field :email
    field :password
    field :password_confirmation
    
    group :bottom, :holder => :bottom do
      field :avatar, :as => :uploader
    end
  end
  
  list :export do
    field :id
    field :name
    field :email
  end
end

Version data entries

12 entries across 6 versions & 1 rubygems

Version Path
sunrise-cms-0.4.2 spec/tmp/app/models/sunrise/sunrise_user.rb
sunrise-cms-0.4.2 lib/generators/sunrise/templates/models/sunrise/sunrise_user.rb
sunrise-cms-0.4.1 lib/generators/sunrise/templates/models/sunrise/sunrise_user.rb
sunrise-cms-0.4.1 spec/tmp/app/models/sunrise/sunrise_user.rb
sunrise-cms-0.4.0 lib/generators/sunrise/templates/models/sunrise/sunrise_user.rb
sunrise-cms-0.4.0 spec/tmp/app/models/sunrise/sunrise_user.rb
sunrise-cms-0.3.3 lib/generators/sunrise/templates/models/sunrise/sunrise_user.rb
sunrise-cms-0.3.3 spec/tmp/app/models/sunrise/sunrise_user.rb
sunrise-cms-0.3.2 spec/tmp/app/models/sunrise/sunrise_user.rb
sunrise-cms-0.3.2 lib/generators/sunrise/templates/models/sunrise/sunrise_user.rb
sunrise-cms-0.3.1 lib/generators/sunrise/templates/models/sunrise/sunrise_user.rb
sunrise-cms-0.3.1 spec/tmp/app/models/sunrise/sunrise_user.rb