From 0c939f044ccd08dc741f3afaca91dbeb9b0d4b1b Mon Sep 17 00:00:00 2001 From: MrYummy Date: Fri, 2 Jun 2017 19:22:04 +0200 Subject: removed passing of useless params, updated placeholder for user textcomplete --- app/views/application/_md_editor_user.html.erb | 2 +- app/views/forums/index.html.erb | 2 +- app/views/forums/show.html.erb | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/application/_md_editor_user.html.erb b/app/views/application/_md_editor_user.html.erb index 25f63a4..d799fce 100644 --- a/app/views/application/_md_editor_user.html.erb +++ b/app/views/application/_md_editor_user.html.erb @@ -2,7 +2,7 @@
<% options = (defined?(options) && options || {}) %> <% options[:class] = "#{options[:class]} editor_field" %> - <% options[:placeholder] ||= "Enter user's name. Prefix with \"@\" to get suggestions." %> + <% options[:placeholder] ||= "Enter user's name." %> <%= text_field_tag name, content, options %>
diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 0a2fbaf..5d9449d 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -1,6 +1,6 @@ <% title "Forums" %> -<%= link_to "All threads", forumthreads_path(params.except("controller", "action")), class: "btn blue right" %> +<%= link_to "All threads", forumthreads_path, class: "btn blue right" %>
<% @groups.each do |group| %> diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 9dcdad8..36741d9 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -2,13 +2,12 @@

<%= title @forum %> - <% params[:id] = params[:id].split("-")[0] %> - <%= link_to "Search Threads", forumthreads_path(params.except("action", "controller")), class: "btn blue right" %> + <% params[:id] = @forum.id %> + <%= link_to "Search Threads", forumthreads_path(params.to_hash), class: "btn blue right" %>

<% if @forum.can_write?(current_user) %>

<%= link_to "New thread", new_forumthread_path(forum: @forum), class: "btn blue" %> - <% params[:id] = params[:id].split("-")[0] %>

<% end %> -- cgit v1.2.3