testing
This commit is contained in:
parent
7a70ad4a73
commit
2eb38edd6e
6 changed files with 160 additions and 5 deletions
4
app/assets/javascripts/precompiled-convo.css
Normal file
4
app/assets/javascripts/precompiled-convo.css
Normal file
File diff suppressed because one or more lines are too long
146
app/assets/javascripts/precompiled-convo.js
Normal file
146
app/assets/javascripts/precompiled-convo.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
class MapsController < ApplicationController
|
||||
before_action :require_user, only: [:create, :update, :destroy, :events]
|
||||
before_action :set_map, only: [:show, :update, :destroy, :contains, :events, :export]
|
||||
before_action :set_map, only: [:show, :conversation, :update, :destroy, :contains, :events, :export]
|
||||
after_action :verify_authorized
|
||||
|
||||
# GET maps/:id
|
||||
|
|
|
@ -20,6 +20,10 @@ class MapPolicy < ApplicationPolicy
|
|||
record.collaborators.include?(user) ||
|
||||
record.user == user
|
||||
end
|
||||
|
||||
def conversation?
|
||||
show?
|
||||
end
|
||||
|
||||
def create?
|
||||
user.present?
|
||||
|
|
|
@ -29,9 +29,10 @@
|
|||
<meta name="twitter:url" content="<%= request.original_url %>" />
|
||||
<% end %>
|
||||
|
||||
<% if controller_name == "maps" && action_name == "conversation" %>
|
||||
<%= stylesheet_link_tag "application_secret", :media => "all" %>
|
||||
<%= javascript_include_tag "application_secret" %>
|
||||
<% if controller.class.name == 'MapsController' && action_name == "conversation" %>
|
||||
<%= stylesheet_link_tag "precompiled-convo", :media => "all" %>
|
||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||
<%= javascript_include_tag "precompiled-convo" %>
|
||||
<% else %>
|
||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
|
|
|
@ -9,5 +9,5 @@ Rails.application.configure do
|
|||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||
config.assets.precompile += %w(webpacked/metamaps.bundle.js)
|
||||
config.assets.precompile += %w(precompiled-convo.css precompiled-convo.js webpacked/metamaps.bundle.js)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue