2017 May 29 ~ June 4【泰國 素叻他尼 Surat Thani Thailand 🌊⛵️✈️👭】Ratchaprapa Dam, Koh Samui, Khao Sok National Park

圖片
My first trip to Surat Thani Thailand!

Ratchaprapa Dam is located in South Thailand and I highly recommend it as a destination if you are nature-loving traveller and considering traveling in Thailand.
We had wonderful two night stay at Keree Warin Resort which was a raft house accommodation on the lake. This lake is big, as I think it took around 30 minutes of travel by long tail boat to reach our resort.
We spent our time enjoying the breath-takingly beautiful views, swimming and canoeing around the vicinity of the raft house.It's really a great place to relax and have some quiet time in beautiful surrounding.


















Using contacts gem to fetch contacts from Gmail, Yahoo and Hotmail in Rails

For a long time, the only way to get a list of contacts from your free online email accounts was with proprietary PHP scripts that would cost you $50. The act of grabbing that list is a simple matter of screen scrapping and this library
gives you all the functionality you need.


下面是在現有的Rails App裡面,利用Contacts插件來實現匯入GMail,Yahoo! Mail以及Hotmail,AOL Mail等Web Mail服務中的聯絡人列表。

首先我們需要給Rails應用程式安裝contact插件:
$script/plugin install git://github.com/cardmagic/contacts.git
或者是以Ruby Gem的方式安裝:
$sudo gem i contacts


然後在config/environment.rb中添加下面內容:

我要在邀請朋友的頁面中添加這個功能,所以編輯app/controllers/users/invites_controller.rb:

接下來建立app/views/shared/_contact_list.html.erb,我們會在這個視圖中以checkbox的方式來列出Email服務中的聯絡人列表,讓使用者勾選要發送邀請函給哪些人:

最後編輯app/views/users/invites/new.html.erb視圖,讓使用者選擇要匯入的Email聯絡人列表:

現在可以啟動Mongrel Serever然後在網址攔輸入 http://localhost:3000/users/admin/invites/new
在頁面上選擇要使用的Email服務,並輸入你的帳號密碼,送出之後就可以得到聯絡人列表了!

熱門文章

[轉載] 洛克菲勒寫給兒子的38封信(全文)

September, 2012 白姑大山二天一夜~其實沒那麼累,只是路途遙遠

【清邁之旅 Part 1|Exploring Doi Suthep-Pui National Park】The 6 Day Itinerary To Explore Chiang Mai And Northern Thailand's Mountains

2013.5.25~26【新阿溪縱走】眠月線鐵道線探勘。順登松山、萬歲山、小笠原山、對高岳

2018, Sep 21【嘉義。阿里山】特富野古道健行。鐵道、迷霧、森林(Tefuye Historical Trail)

2018 May 5~6【宜蘭】南方澳漁港~豆腐岬~朝陽國家步道~南澳觀音海岸~礁溪福哥石窯雞

FbGraph + OmniAuth + Facebook Graph API on Rails application

文章列表

聯絡我

名稱

以電子郵件傳送 *

訊息 *