16. RAILS CONSOLE
•
rails c
The console command lets you interact with your Rails application from the
command line. On the underside, rails console uses IRB, so if you've ever used it,
you'll be right at home. This is useful for testing out quick ideas with code and
changing data server-side without touching the website.
19. CONTROLLER ACTION
REST 之所以能簡化開發,是因為其所引入的架構約束。︒Rails 中的
REST implementation 將 controller 的 method 限制在七個:
REpresentational State Transfer
def index
List all Groups
def show
show a single Groups
def new
show a new news forms
def edit
show an edit news forms
def create
create a new news
def update
update a news
def destroy
delete a news