Last time i said i want to make an ember-rails project(post).
Today I push my first Ember-Rails(food-ntpc) project to github and heroku.
It takes me more time to finish it because i am not familiar with coffee script. I also create a new post for coffee script memo.
During practicing i use Emberjs 1.0.0.rc7. But Emberjs 1.0.0 was released few days ago and i upgrade it to 1.0.0.
How to use multiple models in a view?
Retrieve another data and set to controller in Route’s setupController method.
12345678910
model: ->returnPlace.places()setupController: (controller, model) ->#model is the result of Place.places()controller.set'content',model#another datacategorys = Category.categorys()controller.set'categorys',categorys
I create CategoryView and bind data to it in template
{{#each category in categorys}}
{{#view CategoryView contentBinding="category"}}
{{category.name}}
{{/view}}
{{/each}}
{{#each place in content}}
{{place.name}}
{{/each}}
CategoryView code:
I use classNameBinding to auto update class when status is changed.
From last week i tried the Ember-Rails and studied the coffee script btw. Because more and more people use coffee script and i want to understand their codes!
In the beginning the coffee script syntax confuses me a lot and cost a lot of time to google it.
I decide to keep it on post for reference in the future.
I pushed two project(rails101-groupme,project101)to github yesterday.
I bought the ebook rails101 and make rails101-groupme project by follow instructions of book.
Besides i add some features into rails101-groupme.
1.Every user could reply the post
2.Rich text editor, CKeditor
project101 is the old project i practiced emberjs. It retrieves data from open data Taipei and show on table.
This project was made because inspired by yunglinho’s post. I study google map API and add into it recently.
Most of locations could be show on google map. Somes are not because can’t be geocode to LatLng.
There’s a disadvantage here. Geocode needs to send requests to google but google will block it if you use API frequently. Implement it on clide side is not a good idea.
I am planing to have a new project that use Rails and Emberjs. I could add my json API and store LatLng in database to prevent too many requests to google.
I pushed bookmarks-rails project to Heroku yesterday.
Thanks to tutorial i don’t have too many troblem during upload to Heroku.
Some parts of doc are out of dated and here i write down the steps for reference myself in the future.
I push my first rails project bookmarks-rails to github today. It’s a very small project for practicing rails framework.
The web provide user a very simple interface to create a bookmark and basic authentication. I take free time after work to finish this project.
Thanks to ihower’s Ruby on Rails實戰聖經,Yangtheman’s post and Code school, it helps me a lot.
I try skills in this projects
1. Twitter Bootstrap 3.0.0.rc1
2. devise account system
3. omniauth with facebook login
4. rails REST
5. RSpec
6. Capybara
I studied the memcached since yesterday. It’s a good cache implementation used by Twitter,Facebook..etc.
Because the official site doesn’t provide the rpm for download and i can’t get the latest version from yum.
I learn how to build it from source and also try the repached(for memcached replication but not official)
I receive a email from a stranger today. He writes English email to me and ask an emberjs question.
He saw my old post but can’t understand what i said because the post was writen by Chinese.
I reply the email and he gets the answer finally.
Although my blog is put on Internet but I never thought someone will get help from here :)
After this I decide to write the post in English from now.