diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index baa9e0ef..264de990 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -12,8 +12,8 @@ class UsersController < ApplicationController @content = @user.public_content.select { |type, list| list.any? } @tabs = @content.keys - @accent_color = @user.favorite_page_type_color - @accent_icon = @user.favorite_page_type_icon + @accent_color = @user.favorite_page_type_color + @accent_icon = @user.favorite_page_type_icon @favorite_content = @user.favorite_page_type? ? @user.send(@user.favorite_page_type.downcase.pluralize).is_public : [] # todo this is really bad and needs redone/improved diff --git a/app/models/concerns/has_content.rb b/app/models/concerns/has_content.rb index 8e8c65c7..92a58489 100644 --- a/app/models/concerns/has_content.rb +++ b/app/models/concerns/has_content.rb @@ -123,7 +123,7 @@ module HasContent .first(limit) @user_recent_content_list = recently_changed_attributes.map do |entity_type, entity_id| - entity_type.constantize.find_by(id: entity_id) + entity_type.constantize.find_by(id: entity_id) rescue nil end.compact end diff --git a/app/views/content/panels/_associations.html.erb b/app/views/content/panels/_associations.html.erb index aa23938b..ba2bce1d 100644 --- a/app/views/content/panels/_associations.html.erb +++ b/app/views/content/panels/_associations.html.erb @@ -12,11 +12,19 @@
-
- help - These associations are automatically created whenever you add another page to this universe.
- Only you can see this message. <%= link_to 'Dismiss this message', '#' %>. -
+ <% if current_user.notice_dismissals.where(notice_id: 7).none? %> +
+
+ <%= link_to prepay_path, class: 'black-text' do %> + help + These associations are automatically created whenever you add another page to this universe. + Only you can see this message. + + <%= link_to 'Dismiss this notice.', notice_dismissal_dismiss_path(notice_id: 7), class: 'blue-text' %> + <% end %> +
+
+ <% end %> <% relations.each do |name, params| %> <%