CSC/ECE 517 Fall 2012/ch1b 1w64 nn: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 6: Line 6:
#
#
===MVC responsibilities===
===MVC responsibilities===
#Model
*Model
#Controller
*Controller
<pre>
<pre>
def show
def show
Line 13: Line 13:
end
end
</pre>
</pre>
#View
*View


===URI helpers===
===URI helpers===
===References===
===References===

Revision as of 00:43, 29 September 2012

SaaS - 3.12 Controller and views

Introduction

Adding new action in Rails

MVC responsibilities

  • Model
  • Controller
def show
  @movie = Movie.find(params[:id])
end
  • View

URI helpers

References