diff --git a/app/controllers/themen_controller.rb b/app/controllers/themen_controller.rb index 4e63f18..520f2be 100644 --- a/app/controllers/themen_controller.rb +++ b/app/controllers/themen_controller.rb @@ -77,7 +77,7 @@ class ThemenController < ApplicationController end end def fragen - @thema = Thema.find(params[:thema_id]) + @thema = Thema.find(params[:id]) @fragen=@thema.fragen respond_to do |format| format.js diff --git a/app/controllers/themengruppen_controller.rb b/app/controllers/themengruppen_controller.rb index 6506015..f639b42 100644 --- a/app/controllers/themengruppen_controller.rb +++ b/app/controllers/themengruppen_controller.rb @@ -13,7 +13,7 @@ class ThemengruppenController < ApplicationController end end def faqs - @themengruppen = Themengruppe.order(:priority).includes(:themen,{themen: :fragen}) + @themengruppen = Themengruppe.order("themengruppen.priority").includes(:themen,{themen: :fragen}).order("themen.priority").reverse end diff --git a/app/views/themen/_verw_liste.html.erb b/app/views/themen/_verw_liste.html.erb index 6f83076..cceba04 100644 --- a/app/views/themen/_verw_liste.html.erb +++ b/app/views/themen/_verw_liste.html.erb @@ -1,3 +1,3 @@ <% verw_liste.each do |thema| %> -
  • <%= thema.title %>

    <%= link_to edit_thema_path(thema),:remote=>true do %> Edit <% end %> <%= link_to thema_fragen_path(thema),:remote=>true do %> Fragen <% end %>
  • +
  • <%= thema.title %>

    <%= link_to edit_thema_path(thema),:remote=>true do %> Edit <% end %> <%= link_to fragen_thema_path(thema),:remote=>true do %> Fragen <% end %>
  • <% end %> diff --git a/app/views/themengruppen/faqs.html.erb b/app/views/themengruppen/faqs.html.erb index 24fcb5a..d48b1fd 100644 --- a/app/views/themengruppen/faqs.html.erb +++ b/app/views/themengruppen/faqs.html.erb @@ -2,8 +2,10 @@

    <%= tg.title%>