Class: NanoController

Inherits:
ApplicationController show all
Defined in:
lib/bridgetown-plugin-nano/templates/new_app/nano_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



2
3
4
5
6
7
8
# File 'lib/bridgetown-plugin-nano/templates/new_app/nano_controller.rb', line 2

def index
  render json: {
    status: "index route",
    hello: "Howdy! I'm Nano, your friendly neighborhood Ruby on Rails backend. :)",
    current_time: Time.now
  }
end

#showObject



10
11
12
13
14
15
# File 'lib/bridgetown-plugin-nano/templates/new_app/nano_controller.rb', line 10

def show
  render json: {
    status: "show route",
    id: params[:id]
  }
end