“strive 5/13 ~ 5/20”
Use
-
[gem] rack-cors
- Rack::Cors provides support for Cross-Origin Resource Sharing (CORS) for Rack compatible web applications.
-
[gem] Geocoder
- Geocoder is a complete geocoding solution for Ruby. With Rails, it adds geocoding (by street or IP address), reverse geocoding (finding street address based on given coordinates), and distance queries
-
[database] mysql2sqlite
- This small shell script should help you to convert a mysqldump file into a Sqlite3 compatible file.
-
[react native] react-native-sqlite-storage
Read
-
[redis] Redis Working with Multiple Databases
- you want to keep different kinds of data - belonging to different applications, for example - separate from each other, but store them all in the same Redis instance
-
[ruby] Ruby 2 Keyword Arguments
- def obvious_total(subtotal:, tax:, discount:)
-
[rails] Tips on Rails 3 load paths
-
[rails] confusing about autoload_paths vs eager_load_paths in rails 4
-
[rails] Don't forget about eager_load when extending autoload paths
-
[rails] 關於 Ruby 的 autoload 與 Rails 的 autoload_paths 以及 reopen module / class
- Kernel#autoload 不應跟 Rails 的 autoload_paths 混淆,要視為兩個完全不同的功能
- 誰第一次載入誰算數, Rails 只在找不到該 const 的時候才會去 autoload_paths 搜尋
- 所以,如果某個 const (class / module) 已經在 runtime 裡面定義了,那麼要在 Rails 裡面 reopen 它,就必須確定它一定會執行,例如 initializers 裡面,或是手動 require 它。如果是放在某個 autoload paths 裡面,例如 app/models/ ,則 Rails 並不會執行之,因為同名的 const 已經在 Runtime 裡面了。
- 如果該 class / module 已經在 Gem 裡面載入,則要在 Rails 裡面 reopen 它,就必須放在 autoload_paths 以外的地方,並且手動 require 之。
-
[cors] 跨域资源共享 CORS 详解
-
[csrf] 讓我們來談談 CSRF
-
[react native] Beginner’s Guide to Using CocoaPods with React Native