What is the difference between `resources` and `namespace`? 

I have a `Rack` app inside a `gem` that I want to call from the `Rails` app.

```
namespace :app do
  get 'go', to: Gem::Controller.new
end

```

Since I have controller called AppController, can I use this one?

```
resources :app do
  collection do
    get 'go', to: Gem::Controller.new
  end
end

```

Which way is better?