Skip to content

Instantly share code, notes, and snippets.

@ahoward ahoward/gist:30259
Created Nov 29, 2008

Embed
What would you like to do?
<%=
subnav(
'All teachers',
link_to('Create a new teacher', new_teacher_path),
link_to('Create new teachers in bulk', :action => 'add_teacher_accounts')
)
%>
<%=
table_(:class => 'simple'){
thead_{
td_{ 'Name' }
td_{ 'Nickname' }
td_{ 'Password' }
td_{ 'Email' }
td_(:colspan => 3, :style => 'text-align:center'){ 'Actions' }
}
@teachers.each_with_index do |teacher, i|
tr_(:class => i.parity){
td_{ teacher.username }
td_{ teacher.nickname }
td_{ teacher.password }
td_{ teacher.email }
td_{ link_to(:Show, teacher) }
td_{ link_to(:Edit, edit_teacher_path(teacher)) }
td_{ link_to(:Delete, teacher, :confirm => 'Are you sure?', :method => :delete) }
}
end
}
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.