SUZUKI Miho
null+****@clear*****
Fri Sep 21 12:04:27 JST 2012
SUZUKI Miho 2012-09-21 12:04:27 +0900 (Fri, 21 Sep 2012) New Revision: 3eaf284f9675c8dd8727dd5cd5d421a64534ce3d https://github.com/logaling/logaling-server/commit/3eaf284f9675c8dd8727dd5cd5d421a64534ce3d Log: Show user glossaries in dashboard page Modified files: app/controllers/dashboard_controller.rb app/views/dashboard/show.html.haml Modified: app/controllers/dashboard_controller.rb (+1 -0) =================================================================== --- app/controllers/dashboard_controller.rb 2012-09-21 10:38:49 +0900 (fc9a42f) +++ app/controllers/dashboard_controller.rb 2012-09-21 12:04:27 +0900 (fb0a3bc) @@ -2,5 +2,6 @@ class DashboardController < ApplicationController before_filter :authenticate! def show + @user_glossaries = UserGlossary.find_all_by_user_id(current_user.id) end end Modified: app/views/dashboard/show.html.haml (+8 -0) =================================================================== --- app/views/dashboard/show.html.haml 2012-09-21 10:38:49 +0900 (8e70a98) +++ app/views/dashboard/show.html.haml 2012-09-21 12:04:27 +0900 (ae7bbf4) @@ -2,3 +2,11 @@ .well %p= link_to "Create user glossary", new_user_glossary_path(:user_id => current_user) + %p + %ul + - @user_glossaries.each do |user_glossary| + %li + = user_glossary.glossary_name + = user_glossary.source_language + = user_glossary.target_language + = link_to "Show", user_glossary_path(current_user, user_glossary) -------------- next part -------------- An HTML attachment was scrubbed... Télécharger