Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxcnunes/angular-rails-blog
Simple project to learne angular js and ruby on rails
https://github.com/maxcnunes/angular-rails-blog
Last synced: about 1 month ago
JSON representation
Simple project to learne angular js and ruby on rails
- Host: GitHub
- URL: https://github.com/maxcnunes/angular-rails-blog
- Owner: maxcnunes
- Created: 2013-06-01T20:56:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-03T00:03:26.000Z (over 11 years ago)
- Last Synced: 2024-10-18T07:20:26.936Z (3 months ago)
- Language: Ruby
- Homepage: http://angular-rails-blog.herokuapp.com/
- Size: 168 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
angular-rails-blog
==================Based on this post: [AngularJS on Rails 4](http://coderberry.me/blog/2013/04/22/angularjs-on-rails-4-part-1)
### Model: Post
- title
- content
- published
- author### Commands
1. `rails create angular-rails-blog`
2. `rails generate resource post title content:text published:datetime author`
3. `rake db:migrate`
4. `rake db:migrate RAILS_ENV=test`
5. `rake test`
6. `bundle`
7. `rake post_sync:maxcnunes`
8. `rake routes`
9. `mkdir -p app/assets/javascripts/angular/controllers \
app/assets/javascripts/angular/directives \
app/assets/javascripts/angular/services`
10. `touch app/assets/javascripts/app.js.coffee`
11. `rails generate controller home index`
12. `rm public/index.html`
13. `touch app/assets/javascripts/angular/controllers/posts_ctrl.js.coffee`
14. `touch app/assets/javascripts/angular/services/post.js.coffee`### Api urls
- index - http://localhost:3000/api/posts.json
- show - http://localhost:3000/api/posts/1.json**ps**: If you don't have curl configured yet then will need run this before the 6 command:
`sudo apt-get install libcurl4-gnutls-dev`### Deploy to Heroku
1. `git push heroku master:master`
2. `heroku ps:scale web=1`
3. `heroku run rake db:migrate`
4. `heroku run rake post_sync:maxcnunes`