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

From Expertiza_Wiki
Jump to navigation Jump to search
Line 9: Line 9:


#Controller
#Controller
<pre>
 
<syntaxhighlight lang="ruby">
<syntaxhighlight lang="ruby">
def show
def show
Line 15: Line 15:
end
end
</syntaxhighlight>
</syntaxhighlight>
</pre>
 
#View
#View


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

Revision as of 00:27, 29 September 2012

SaaS - 3.12 Controller and views

Introduction

Adding new action in Rails

MVC responsibilities

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

URI helpers

References