I am developoing a Rails v2.3.2 app. A very basic Rails structure implemented as below:
I have a controller:
class SchoolController < ApplicationController
...
def check_teachers
@school = School.find params[:id]
@teachers = @school.teachers
end
end
my route definition in route.rb
:
map.check_teachers, '/school/check_teachers/:id' :controller => :school, :action => :check_teachers
A link click will trigger the view:
link_to 'Check teachers', check_teachers_path(:id => @school.id)
check_teachers's view check_teachers.html.erb
:
<div>
Hello
<%= render :partial => 'show_teachers'%>
</div>
I would like the link click to show the above view as a jQuery-UI dialog instead of a page view. How to achieve this??
----Update-----
Please check also my comment on @plaes 's answer.