Sha256: b88404540f840c08c432cf37ca0d0e6404a43a5fb357ec9ae0e8f044efe71a00

Contents?: true

Size: 395 Bytes

Versions: 1

Compression:

Stored size: 395 Bytes

Contents

class Main::Application < Dry::Web::Application
  route('users') do |r|
    r.get(to: 'main.views.users.index')

    r.resolve('main.requests.users.create') do |t|
      r.post do
        t.(r[:user]) do |m|
          m.success do
            response.status = 201
          end

          m.failure do |err|
            r.redirect '/users'
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dry-web-0.1.0 spec/dummy/apps/main/web/routes/users.rb