sini
app/views/api/v1/public/a937fc1e30d20bb9720a0d48aed837329937fc1e30d20bb9720a0d48aed837329/delivery_tasks/show.json.jbuilder
jadi double root kat response
rasanya sebab sini dah ada root json.delivery_task
#******************************************************************** | |
# Ubuntu Setup Steps for initial install PLUS | |
# Ruby on Rails setup using PostreSQL | |
# | |
# by: Jay Elbourne | |
# date: March 2016 | |
# Ubuntu 15.10 (32 bit [because of VirtualBox]) | |
# Ruby 2.2.3 | |
# Rails 4.2.4 | |
# PostreSQL 9.5 |
# Rake Quick Reference | |
# by Greg Houston | |
# http://ghouston.blogspot.com/2008/07/rake-quick-reference.html | |
# ----------------------------------------------------------------------------- | |
# Running Rake | |
# ----------------------------------------------------------------------------- | |
# running rake from the command-line: | |
# rake --help |
# references: | |
# - https://guides.rubyonrails.org/v4.0/plugins.html | |
# - https://stackoverflow.com/questions/22473391/custom-search-with-ransacker?rq=1 | |
require "./app/models/investor" | |
Investor.class_eval do | |
# can directly introduce class_eval | |
scope :total_investment, -> { 1000+500 } | |
module Extensions | |
module Popular | |
module ClassMethods | |
def most_popular(limit = 10) | |
order('points DESC').limit(limit).all | |
end | |
end | |
def popularity |
# This structure will not overwrite bar class method. | |
# calling super will call the included module's bar. | |
# http://tech.tulentsev.com/2012/02/ruby-how-to-override-class-method-with-a-module/ | |
module FooModule | |
def self.included base | |
base.extend ClassMethods | |
end | |
module ClassMethods |
At the moment, API ni run kat my local development (http://gateway.jourdein.com
)
Sample response bila call API /api/v1/drivers/account-verification/phone
{
"registration": {
"step": "2",
"count": "4",
"name": "email_verification",
"path": "/api/v1/drivers/account-verification/email"
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
Update: CoreDNS https://brendanthompson.com/posts/2021/12/coredns-on-macos-for-local-development