Sha256: cdd9e307d273d858721c4e2f142f3395d4e32628a952cbfa363c7ea0e60c467f

Contents?: true

Size: 263 Bytes

Versions: 2

Compression:

Stored size: 263 Bytes

Contents

module Web::Controllers::Posts
  class Index
    include Web::Action

    expose :posts

    def call(params)
      @posts = rom.relation(:posts).latest
    end

    # Cutting corners like a boss, DI will be added soon
    def rom
      ROM.env
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rom-lotus-0.1.0 spec/dummy/apps/web/controllers/posts/index.rb
rom-lotus-0.0.1 spec/dummy/apps/web/controllers/posts/index.rb