Sha256: 0d0e020debe4c45f994f82a2c40dfc9ae58a461d9db5748dc96b40855301bfca

Contents?: true

Size: 371 Bytes

Versions: 9

Compression:

Stored size: 371 Bytes

Contents

class Main::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

9 entries across 9 versions & 1 rubygems

Version Path
dry-web-roda-0.5.1 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.5.0 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.4.0 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.3.0 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.2.3 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.2.2 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.2.1 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.2.0 spec/dummy/apps/main/web/routes/users.rb
dry-web-roda-0.1.0 spec/dummy/apps/main/web/routes/users.rb