I am writing a basic application that scrapes data. I have the following in my `routes.rb`. 

```
Rails.application.routes.draw do
constraints subdomain: 'api' do
 namespace :api, path: '/' do
   resources :apps, :only => :show
 end
end

```

In controllers I have something like this although I am not sure how are resources connected to Controller. 

```
class AppsController < ApplicationController
  def show
    puts "this works"
    respond_to do |format|
      format.json { render json: @user }
    end
  end

  def apps
    puts "my app"
  end

end

```

Also, I dont have a `Model`. Does that mean that in my resources `:apps` calls a method in AppsController called `apps`?
If I wanted it t call apps then how's it possible ?

* how does a controller in rails know what route does it belong to
* I am trying to add a GET /apps?filter=5 that returns my scraped data in the form of JSON and with filter as parameter to that it means that return 5 JSON objects to me