crokobit / code-club-taipei-form-object

Code Club Taipei 使用的題目 - Form objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails CodeClub Taipei - form object

Get Started

git clone git@github.com:ascendbruce/code-club-taipei-form-object.git
cd code-club-taipei-form-object
bundle install
rake db:create db:migrate
rake test # you should see all test cases are passed

# open another terminal tab and run:
rails s # and open http://localhost:3000/ in browser

Goal: Extract "signup" form object.

  • Suggested name for the form object is SignupForm
  • You need to edit valid_params method in test/controllers/signups_controller_test.rb according to your new form name.
  • Some techniques used in this rails apps (bad test syntax, bundle better_error gem in test mode...) is not recommended for production sites.

To erase all database changes

In terminal:

rake db:drop db:create db:migrate

Reference

About

Code Club Taipei 使用的題目 - Form objects