Tag: Rails/プラグイン/チュートリアル
bundle exec rails plugin new ~/work/blorgh --mountable --skip-bundle
bundle install --path=vendor/bundle
bundle exec bin/rails generate scaffold article title:string text:text
$ bundle exec bin/rails generate scaffold article title:string text:text invoke active_record create db/migrate/20161025072006_create_blorgh_articles.rb create app/models/blorgh/article.rb invoke test_unit create test/models/blorgh/article_test.rb create test/fixtures/blorgh/articles.yml invoke resource_route route resources :articles invoke scaffold_controller create app/controllers/blorgh/articles_controller.rb invoke erb create app/views/blorgh/articles create app/views/blorgh/articles/index.html.erb create app/views/blorgh/articles/edit.html.erb create app/views/blorgh/articles/show.html.erb create app/views/blorgh/articles/new.html.erb create app/views/blorgh/articles/_form.html.erb invoke test_unit create test/controllers/blorgh/articles_controller_test.rb invoke helper create app/helpers/blorgh/articles_helper.rb invoke test_unit invoke assets invoke js create app/assets/javascripts/blorgh/articles.js invoke css create app/assets/stylesheets/blorgh/articles.css invoke css create app/assets/stylesheets/scaffold.css
bundle exec rake db:migrate
bundle exec rails s
$ bundle exec bin/rails generate model Comment article_id:integer text:text invoke active_record create db/migrate/20161025073042_create_blorgh_comments.rb create app/models/blorgh/comment.rb invoke test_unit create test/models/blorgh/comment_test.rb create test/fixtures/blorgh/comments.yml
bundle exec rake db:migrate