Sha256: 2e8bdcfe0300ad66cb46a7d599d50e7a66b6bdb05374953f1015c611933a26bd

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

class Users::IndexView < BaseView
  def template
    {
      template: 'users/index',
      locals: {
        user_views: user_views,
      }
    }
  end

  private

  def users
    view_data.users
  end

  def user_views
    users.map do |user|
      user_view(user)
    end
  end

  def user_view(user)
    build_view(Users::IndexView::UserView, user: user).template
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aldous-1.0.1 examples/basic_todo/app/views/users/index_view.rb
aldous-1.0.0 examples/basic_todo/app/views/users/index_view.rb