Created
July 10, 2015 19:07
-
-
Save gramos/7817677987c53fa5b0e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# routes/instructor/courses.rb | |
module Instructor | |
class Courses < Cuba | |
define do | |
on 'courses/:permalink/edit' do |permalink| | |
on get do | |
course = Course.find_by_permalink( permalink ) | |
render('instructor/courses/edit', course: course, | |
menu: "instructor/courses/edit_menu") | |
end | |
end | |
end | |
end | |
# --------------------------------------------------------------- | |
# views/layout | |
.... | |
{{app.partial menu}} | |
.... | |
# ---------------------------------------------------------------- | |
# views/instructor/courses/edit_menu.mote | |
<ul> | |
<li><a href="/instructor/courses/{{course.to_param}}/edit">Details</a></li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment