Rails 4 2
(3.3 Default Host for rails server}1 Due to a change in Rack, rails server now listens on localhost instead of 0.0.0.0 by default. This should have minimal impact on the standard development workflow as both http://127.0.0.1:3000 and http://localhost:3000 will continue to work as before on your own machine. However, with this change you will no longer be able to access the Rails server from a different machine, for example if your development environment is in...
Mobile에서 localhost 테스트하기
ngrok 설치 https://ngrok.com/ ngrok 실행 ./ngrok http 3000 //3000은 localhost에 떠있는 Rails-app 포트번호 ngrok github
Google Chart
https://developers.google.com/chart/interactive/docs/gallery/columnchart <script type="text/javascript"> google.charts.load("current", {packages:['corechart']}); google.charts.setOnLoadCallback(drawBasic); function drawBasic() { var data = new google.visualization.DataTable(); data.addColumn('string','Date'); data.addColumn('number','rank'); data.addRows(<%= raw @ranks %>); var view = new google.visualization.DataView(data); view.setColumns([0, 1, { calc: function (dt, row) { return (<%= raw @max_rank %> - parseInt(dt.getValue(row, 1)) + 1).toString() + "위"; }, sourceColumn: 1, type: "string", role: "annotation" } ]); var options = { title: '', hAxis: { title: '', gridlines: {count: 0}, }, vAxis: { title: '', baselineColor: '#eee', gridlineColor:...
Rails Cache
http://guides.rubyonrails.org/caching_with_rails.html#fregment-caching https://devcenter.heroku.com/articles/caching-strategies#fragment-caching https://signalvnoise.com/posts/3113-how-key-based-cache-expiration-works
Caching Act As Votable
/config/initializers/act_as_votable.md module ActsAsVotable class Vote < ::ActiveRecord::Base belongs_to :votable, :polymorphic => true, touch: true end end