This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auto_complete": true, | |
"color_scheme": "Packages/User/SublimeLinter/LAZY (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 10, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"material_theme_contrast_mode": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Group.where("categories @> string_to_array(?, '')", ['Laut', 'Wisata']) # contain in | |
# http://www.postgresql.org/docs/9.1/static/functions-array.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# routes.rb | |
match "*path", to: "application#record_not_found", via: :all | |
# application_controller#record_not_found | |
def record_not_found | |
render 'public/404' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def authenticate | |
if Rails.env.staging? | |
authenticate_or_request_with_http_basic do |username, password| | |
username == 'username' && password == 'password' | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "start create Provinsi and city on indonesia" | |
location = { | |
"Indonesia" => { | |
"Bali" => [ | |
'Karangasem', | |
'Badung', | |
'Bangli', | |
'Buleleng', | |
'Klungkung', | |
'Tabanan', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dear [email protected] | |
We have received your password recovery request. | |
recover password | |
If you didn't request this, please ignore this email. | |
Your password won't change until you access the link above and create a new one. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi Dimas , | |
You have created order on mmlodging.com . | |
This is the list of your checkouts : | |
Lodging Name Room Type Max Guest Check In Check Out Price/Night No of Rooms Nights Price | |
Total Price $138.00 | |
Yangon Hostel Executive Room 20/01/2015 22/01/2015 3 guests $60.00 1 2 $120.00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dear Dimas , | |
Your rooms with type: | |
Executive Room | |
Already confirmed | |
Regards MMLodging Team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def success | |
if params[:token] | |
if session[:checkout_user] && session[:checkouts] | |
checkout = session[:checkout_user] | |
total = session[:checkouts][:total_price] * 100 | |
purchase = EXPRESS_GATEWAY.purchase(total, | |
:ip => request.ip, | |
:token => params[:token], | |
:payer_id => params[:PayerID] | |
) |
NewerOlder