this is the subjects_controller
class SubjectsController < ApplicationController
layout false
def index
@subjects = Subject.order("position ASC")
end
def show
@subject = Subject.find(params[:id])
end
def new
end
def edit
end
def delet
end
end
and this is the 'show.html.erb'
<%= link_to("<< Back to List", {:class => 'index'}) :class => 'back- link)'%>
<div class ="subjects show">
<h2>Show Subject</h2>
<table sammary="Subject detail view">
<tr>
<th>Name</th>
<td><%= @subject.name %></td>
</tr>
<tr>
<th>Position</th>
<td><%= @subject.position %> </th>
</tr>
<tr>
<th>Visible</th>
<td><%= @subject.visible ? 'true': 'flse' %> </th>
</tr>
<tr>
<th>Created</th>
<td><%= @subject.created_at %> </th>
</tr>
<tr>
<th>Updated</th>
<td><%= @subject.updated_at %> </th>
</tr>
</table>
</div>
so when i click on something on the browser i don't get anything and when i did this on rails console
Subject.find(params[:id])
i get this message
NameError: undefined local variable or method `params' for main:Object from (irb):7