automatic rubocop fixes
This commit is contained in:
parent
794c647967
commit
9561007b82
39 changed files with 86 additions and 86 deletions
|
@ -1,12 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AccessController < ApplicationController
|
||||
before_action :require_user, only: %i(access access_request
|
||||
before_action :require_user, only: %i[access access_request
|
||||
approve_access approve_access_post
|
||||
deny_access deny_access_post request_access)
|
||||
before_action :set_map, only: %i(access access_request
|
||||
deny_access deny_access_post request_access]
|
||||
before_action :set_map, only: %i[access access_request
|
||||
approve_access approve_access_post
|
||||
deny_access deny_access_post request_access)
|
||||
deny_access deny_access_post request_access]
|
||||
after_action :verify_authorized
|
||||
|
||||
# GET maps/:id/request_access
|
||||
|
|
|
@ -4,7 +4,7 @@ module Api
|
|||
module V2
|
||||
class MapsController < WithUpdatesController
|
||||
def searchable_columns
|
||||
%i(name desc)
|
||||
%i[name desc]
|
||||
end
|
||||
|
||||
def apply_filters(collection)
|
||||
|
|
|
@ -8,7 +8,7 @@ module Api
|
|||
|
||||
snorlax_used_rest!
|
||||
|
||||
before_action :load_resource, only: %i(show update destroy)
|
||||
before_action :load_resource, only: %i[show update destroy]
|
||||
after_action :verify_authorized
|
||||
|
||||
def index
|
||||
|
|
|
@ -4,7 +4,7 @@ module Api
|
|||
module V2
|
||||
class TopicsController < WithUpdatesController
|
||||
def searchable_columns
|
||||
%i(name desc link)
|
||||
%i[name desc link]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ExploreController < ApplicationController
|
||||
before_action :require_authentication, only: %i(mine shared starred)
|
||||
before_action :require_authentication, only: %i[mine shared starred]
|
||||
before_action :authorize_explore
|
||||
after_action :verify_authorized
|
||||
after_action :verify_policy_scoped
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MappingsController < ApplicationController
|
||||
before_action :require_user, only: %i(create update destroy)
|
||||
before_action :require_user, only: %i[create update destroy]
|
||||
after_action :verify_authorized, except: :index
|
||||
after_action :verify_policy_scoped, only: :index
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MapsController < ApplicationController
|
||||
before_action :require_user, only: %i(create update destroy events follow unfollow)
|
||||
before_action :set_map, only: %i(show conversation update destroy
|
||||
before_action :require_user, only: %i[create update destroy events follow unfollow]
|
||||
before_action :set_map, only: %i[show conversation update destroy
|
||||
contains events export
|
||||
follow unfollow unfollow_from_email)
|
||||
follow unfollow unfollow_from_email]
|
||||
after_action :verify_authorized
|
||||
|
||||
# GET maps/:id
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MetacodesController < ApplicationController
|
||||
before_action :require_admin, except: %i(index show)
|
||||
before_action :set_metacode, only: %i(edit update)
|
||||
before_action :require_admin, except: %i[index show]
|
||||
before_action :set_metacode, only: %i[edit update]
|
||||
|
||||
# GET /metacodes
|
||||
# GET /metacodes.json
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class NotificationsController < ApplicationController
|
||||
before_action :set_receipts, only: %i(index show mark_read mark_unread)
|
||||
before_action :set_notification, only: %i(show mark_read mark_unread)
|
||||
before_action :set_receipt, only: %i(show mark_read mark_unread)
|
||||
before_action :set_receipts, only: %i[index show mark_read mark_unread]
|
||||
before_action :set_notification, only: %i[show mark_read mark_unread]
|
||||
before_action :set_receipt, only: %i[show mark_read mark_unread]
|
||||
|
||||
def index
|
||||
@notifications = current_user.mailbox.notifications.page(params[:page]).per(25)
|
||||
|
|
|
@ -8,7 +8,7 @@ class SearchController < ApplicationController
|
|||
|
||||
before_action :authorize_search
|
||||
after_action :verify_authorized
|
||||
after_action :verify_policy_scoped, only: %i(maps mappers synapses topics)
|
||||
after_action :verify_policy_scoped, only: %i[maps mappers synapses topics]
|
||||
|
||||
# get /search/topics?term=SOMETERM
|
||||
def topics
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class SynapsesController < ApplicationController
|
||||
include TopicsHelper
|
||||
|
||||
before_action :require_user, only: %i(create update destroy)
|
||||
before_action :require_user, only: %i[create update destroy]
|
||||
after_action :verify_authorized, except: :index
|
||||
after_action :verify_policy_scoped, only: :index
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
class TopicsController < ApplicationController
|
||||
include TopicsHelper
|
||||
|
||||
before_action :require_user, only: %i(create update destroy follow unfollow)
|
||||
before_action :set_topic, only: %i(show update relative_numbers
|
||||
before_action :require_user, only: %i[create update destroy follow unfollow]
|
||||
before_action :set_topic, only: %i[show update relative_numbers
|
||||
relatives network destroy
|
||||
follow unfollow unfollow_from_email)
|
||||
follow unfollow unfollow_from_email]
|
||||
after_action :verify_authorized, except: :autocomplete_topic
|
||||
|
||||
respond_to :html, :js, :json
|
||||
|
|
|
@ -30,7 +30,7 @@ module Users
|
|||
end
|
||||
|
||||
def configure_sign_up_params
|
||||
devise_parameter_sanitizer.permit(:sign_up, keys: %i(name joinedwithcode))
|
||||
devise_parameter_sanitizer.permit(:sign_up, keys: %i[name joinedwithcode])
|
||||
end
|
||||
|
||||
def configure_account_update_params
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class UsersController < ApplicationController
|
||||
before_action :require_user, only: %i(edit update updatemetacodes update_metacode_focus)
|
||||
before_action :require_user, only: %i[edit update updatemetacodes update_metacode_focus]
|
||||
|
||||
respond_to :html, :json
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Event < ApplicationRecord
|
||||
KINDS = %w(user_present_on_map user_not_present_on_map
|
||||
KINDS = %w[user_present_on_map user_not_present_on_map
|
||||
conversation_started_on_map
|
||||
topic_added_to_map topic_moved_on_map topic_removed_from_map
|
||||
synapse_added_to_map synapse_removed_from_map
|
||||
topic_updated synapse_updated).freeze
|
||||
topic_updated synapse_updated].freeze
|
||||
|
||||
belongs_to :eventable, polymorphic: true
|
||||
belongs_to :map
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class FollowReason < ApplicationRecord
|
||||
REASONS = %w(created commented contributed followed shared_on starred).freeze
|
||||
REASONS = %w[created commented contributed followed shared_on starred].freeze
|
||||
|
||||
belongs_to :follow
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Map < ApplicationRecord
|
||||
ATTRS_TO_WATCH = %w(name desc permission).freeze
|
||||
ATTRS_TO_WATCH = %w[name desc permission].freeze
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :source, class_name: :Map
|
||||
|
@ -90,10 +90,10 @@ class Map < ApplicationRecord
|
|||
|
||||
def as_json(_options = {})
|
||||
json = super(
|
||||
methods: %i(user_name user_image star_count topic_count synapse_count
|
||||
contributor_count collaborator_ids screenshot_url),
|
||||
except: %i(screenshot_content_type screenshot_file_size screenshot_file_name
|
||||
screenshot_updated_at)
|
||||
methods: %i[user_name user_image star_count topic_count synapse_count
|
||||
contributor_count collaborator_ids screenshot_url],
|
||||
except: %i[screenshot_content_type screenshot_file_size screenshot_file_name
|
||||
screenshot_updated_at]
|
||||
)
|
||||
json[:created_at_clean] = created_at_str
|
||||
json[:updated_at_clean] = updated_at_str
|
||||
|
|
|
@ -25,7 +25,7 @@ class Mapping < ApplicationRecord
|
|||
end
|
||||
|
||||
def as_json(_options = {})
|
||||
super(methods: %i(user_name user_image))
|
||||
super(methods: %i[user_name user_image])
|
||||
end
|
||||
|
||||
def after_created
|
||||
|
@ -57,8 +57,8 @@ class Mapping < ApplicationRecord
|
|||
meta = { 'x': xloc, 'y': yloc, 'mapping_id': id }
|
||||
Events::TopicMovedOnMap.publish!(mappable, map, updated_by, meta)
|
||||
ActionCable.server.broadcast('map_' + map.id.to_s, type: 'topicMoved',
|
||||
id: mappable.id, mapping_id: id,
|
||||
x: xloc, y: yloc)
|
||||
id: mappable.id, mapping_id: id,
|
||||
x: xloc, y: yloc)
|
||||
end
|
||||
|
||||
def after_updated_async
|
||||
|
|
|
@ -14,7 +14,7 @@ class Message < ApplicationRecord
|
|||
end
|
||||
|
||||
def as_json(_options = {})
|
||||
json = super(methods: %i(user_name user_image))
|
||||
json = super(methods: %i[user_name user_image])
|
||||
json
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class Metacode < ApplicationRecord
|
|||
default_url: 'https://s3.amazonaws.com/metamaps-assets/metacodes/generics/96px/gen_wildcard.png'
|
||||
|
||||
# Validate the attached icon is image/jpg, image/png, etc
|
||||
validates_attachment_content_type :aws_icon, content_type: %r(\Aimage/.*\Z)
|
||||
validates_attachment_content_type :aws_icon, content_type: %r{\Aimage/.*\Z}
|
||||
|
||||
validate :aws_xor_manual_icon
|
||||
validate :manual_icon_https
|
||||
|
@ -56,7 +56,7 @@ class Metacode < ApplicationRecord
|
|||
end
|
||||
|
||||
def manual_icon_https
|
||||
return unless manual_icon.present?
|
||||
return if manual_icon.blank?
|
||||
unless manual_icon.starts_with? 'https'
|
||||
errors.add(:base, 'Manual icon must begin with https')
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class PermittedParams < Struct.new(:params)
|
||||
%w(map synapse topic mapping token).each do |kind|
|
||||
%w[map synapse topic mapping token].each do |kind|
|
||||
define_method(kind) do
|
||||
permitted_attributes = send("#{kind}_attributes")
|
||||
params.require(kind).permit(*permitted_attributes)
|
||||
|
@ -16,18 +16,18 @@ class PermittedParams < Struct.new(:params)
|
|||
end
|
||||
|
||||
def map_attributes
|
||||
%i(name desc permission arranged)
|
||||
%i[name desc permission arranged]
|
||||
end
|
||||
|
||||
def synapse_attributes
|
||||
%i(desc category weight permission topic1_id topic2_id)
|
||||
%i[desc category weight permission topic1_id topic2_id]
|
||||
end
|
||||
|
||||
def topic_attributes
|
||||
%i(name desc link permission metacode_id)
|
||||
%i[name desc link permission metacode_id]
|
||||
end
|
||||
|
||||
def mapping_attributes
|
||||
%i(xloc yloc map_id mappable_type mappable_id)
|
||||
%i[xloc yloc map_id mappable_type mappable_id]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Synapse < ApplicationRecord
|
||||
ATTRS_TO_WATCH = %w(desc category permission defer_to_map_id).freeze
|
||||
ATTRS_TO_WATCH = %w[desc category permission defer_to_map_id].freeze
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :defer_to_map, class_name: 'Map', foreign_key: 'defer_to_map_id'
|
||||
|
@ -55,7 +55,7 @@ class Synapse < ApplicationRecord
|
|||
end
|
||||
|
||||
def as_json(_options = {})
|
||||
super(methods: %i(user_name user_image collaborator_ids))
|
||||
super(methods: %i[user_name user_image collaborator_ids])
|
||||
end
|
||||
|
||||
def as_rdf
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Topic < ApplicationRecord
|
||||
ATTRS_TO_WATCH = %w(name desc link metacode_id permission defer_to_map_id).freeze
|
||||
ATTRS_TO_WATCH = %w[name desc link metacode_id permission defer_to_map_id].freeze
|
||||
include TopicsHelper
|
||||
include Attachable
|
||||
|
||||
|
@ -70,7 +70,7 @@ class Topic < ApplicationRecord
|
|||
end
|
||||
|
||||
def as_json(options = {})
|
||||
super(methods: %i(user_name user_image collaborator_ids))
|
||||
super(methods: %i[user_name user_image collaborator_ids])
|
||||
.merge(inmaps: inmaps(options[:user]), inmapsLinks: inmapsLinks(options[:user]),
|
||||
map_count: map_count(options[:user]), synapse_count: synapse_count(options[:user]))
|
||||
end
|
||||
|
|
|
@ -137,7 +137,7 @@ class User < ApplicationRecord
|
|||
|
||||
def has_map_open(map)
|
||||
latest_event = Event.where(map: map, user: self)
|
||||
.where(kind: %w(user_present_on_map user_not_present_on_map))
|
||||
.where(kind: %w[user_present_on_map user_not_present_on_map])
|
||||
.order(:created_at)
|
||||
.last
|
||||
latest_event && latest_event.kind == 'user_present_on_map'
|
||||
|
|
|
@ -13,7 +13,7 @@ class UserPreference
|
|||
private
|
||||
|
||||
def init_metacodes
|
||||
%w(Action Aim Idea Question Note Wildcard Subject).map do |m|
|
||||
%w[Action Aim Idea Question Note Wildcard Subject].map do |m|
|
||||
begin
|
||||
metacode = Metacode.find_by(name: m)
|
||||
metacode.id.to_s if metacode
|
||||
|
|
|
@ -5,7 +5,7 @@ class Webhook < ApplicationRecord
|
|||
|
||||
validates :uri, presence: true
|
||||
validates :hookable, presence: true
|
||||
validates :kind, inclusion: { in: %w(slack) }
|
||||
validates :kind, inclusion: { in: %w[slack] }
|
||||
validates :event_types, length: { minimum: 1 }
|
||||
|
||||
def headers
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class MapPolicy < ApplicationPolicy
|
||||
class Scope < Scope
|
||||
def resolve
|
||||
visible = %w(public commons)
|
||||
visible = %w[public commons]
|
||||
return scope.where(permission: visible) unless user
|
||||
|
||||
scope.where(permission: visible)
|
||||
|
@ -17,13 +17,13 @@ class MapPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def show?
|
||||
record.permission.in?(%w(commons public)) ||
|
||||
record.permission.in?(%w[commons public]) ||
|
||||
record.collaborators.include?(user) ||
|
||||
record.user == user
|
||||
end
|
||||
|
||||
def conversation?
|
||||
show? && %w(connorturland@gmail.com devin@callysto.com chessscholar@gmail.com solaureum@gmail.com ishanshapiro@gmail.com).include?(user.email)
|
||||
show? && %w[connorturland@gmail.com devin@callysto.com chessscholar@gmail.com solaureum@gmail.com ishanshapiro@gmail.com].include?(user.email)
|
||||
end
|
||||
|
||||
def create?
|
||||
|
|
|
@ -7,7 +7,7 @@ class MappingPolicy < ApplicationPolicy
|
|||
# it would be nice if we could also base this on the mappable, but that
|
||||
# gets really complicated. Devin thinks it's OK to SHOW a mapping for
|
||||
# a private topic, since you can't see the private topic anyways
|
||||
visible = %w(public commons)
|
||||
visible = %w[public commons]
|
||||
permission = 'maps.permission IN (?)'
|
||||
return scope.joins(:map).where(permission, visible) unless user
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class MessagePolicy < ApplicationPolicy
|
||||
class Scope < Scope
|
||||
def resolve
|
||||
visible = %w(public commons)
|
||||
visible = %w[public commons]
|
||||
permission = 'maps.permission IN (?)'
|
||||
return scope.joins(:map).where(permission, visible) unless user
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ class SynapsePolicy < ApplicationPolicy
|
|||
private
|
||||
|
||||
def authenticated_scope
|
||||
scope.where(permission: %w(public commons))
|
||||
scope.where(permission: %w[public commons])
|
||||
.or(scope.where(defer_to_map_id: user.all_accessible_maps.map(&:id)))
|
||||
.or(scope.where(user_id: user.id))
|
||||
end
|
||||
|
||||
def unauthenticated_scope
|
||||
scope.where(permission: %w(public commons))
|
||||
scope.where(permission: %w[public commons])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ class TopicPolicy < ApplicationPolicy
|
|||
private
|
||||
|
||||
def authenticated_scope
|
||||
scope.where(permission: %w(public commons))
|
||||
scope.where(permission: %w[public commons])
|
||||
.or(scope.where(defer_to_map_id: user.all_accessible_maps.map(&:id)))
|
||||
.or(scope.where(user_id: user.id))
|
||||
end
|
||||
|
||||
def unauthenticated_scope
|
||||
scope.where(permission: %w(public commons))
|
||||
scope.where(permission: %w[public commons])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -32,7 +32,7 @@ class TopicPolicy < ApplicationPolicy
|
|||
if record.defer_to_map.present?
|
||||
map_policy.show?
|
||||
else
|
||||
record.permission.in?(%w(commons public)) || record.user == user
|
||||
record.permission.in?(%w[commons public]) || record.user == user
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -47,16 +47,16 @@ class MapExportService
|
|||
private
|
||||
|
||||
def topic_headings
|
||||
%i(id name metacode x y description link user permission)
|
||||
%i[id name metacode x y description link user permission]
|
||||
end
|
||||
|
||||
def synapse_headings
|
||||
%i(topic1 topic2 category description user permission)
|
||||
%i[topic1 topic2 category description user permission]
|
||||
end
|
||||
|
||||
def exportable_topics
|
||||
visible_topics ||= Pundit.policy_scope!(user, map.topics)
|
||||
topic_mappings = Mapping.includes(mappable: %i(metacode user))
|
||||
topic_mappings = Mapping.includes(mappable: %i[metacode user])
|
||||
.where(mappable: visible_topics, map: map)
|
||||
topic_mappings.map do |mapping|
|
||||
topic = mapping.mappable
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class Perm
|
||||
# e.g. Perm::ISSIONS
|
||||
ISSIONS = %i(commons public private).freeze
|
||||
ISSIONS = %i[commons public private].freeze
|
||||
|
||||
class << self
|
||||
def short(permission)
|
||||
|
|
|
@ -10,5 +10,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(application-secret.css application-secret.js webpacked/metamaps.bundle.js)
|
||||
config.assets.precompile += %w[application-secret.css application-secret.js webpacked/metamaps.bundle.js]
|
||||
end
|
||||
|
|
|
@ -5,6 +5,6 @@ Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
|||
origins '*'
|
||||
resource '/api/*',
|
||||
headers: :any,
|
||||
methods: %i(get post put delete options head)
|
||||
methods: %i[get post put delete options head]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -51,11 +51,11 @@ ExceptionNotification.configure do |config|
|
|||
# Ignore additional exception types.
|
||||
# ActiveRecord::RecordNotFound, AbstractController::ActionNotFound and
|
||||
# ActionController::RoutingError are already added.
|
||||
config.ignored_exceptions += %w(
|
||||
config.ignored_exceptions += %w[
|
||||
ActionView::TemplateError CustomError UnauthorizedException
|
||||
InvalidArgumentException InvalidEntityException InvalidRequestException
|
||||
NotFoundException ValidationException
|
||||
)
|
||||
]
|
||||
|
||||
# Adds a condition to decide when an exception must be ignored or not.
|
||||
# The ignore_if method can be invoked multiple times to add extra conditions.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
def is_tester(user)
|
||||
user && %w(
|
||||
user && %w[
|
||||
connorturland@gmail.com devin@callysto.com chessscholar@gmail.com solaureum@gmail.com
|
||||
ishanshapiro@gmail.com
|
||||
).include?(user.email)
|
||||
].include?(user.email)
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ Metamaps::Application.routes.draw do
|
|||
end
|
||||
get :explore, to: redirect('/')
|
||||
|
||||
resources :maps, except: %i(index edit) do
|
||||
resources :maps, except: %i[index edit] do
|
||||
member do
|
||||
get :conversation
|
||||
get :export
|
||||
|
@ -55,10 +55,10 @@ Metamaps::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :mappings, except: %i(index new edit)
|
||||
resources :mappings, except: %i[index new edit]
|
||||
|
||||
resources :messages, only: %i(show create update destroy)
|
||||
resources :notifications, only: %i(index show) do
|
||||
resources :messages, only: %i[show create update destroy]
|
||||
resources :notifications, only: %i[index show] do
|
||||
collection do
|
||||
get :unsubscribe
|
||||
end
|
||||
|
@ -80,9 +80,9 @@ Metamaps::Application.routes.draw do
|
|||
get :synapses
|
||||
end
|
||||
|
||||
resources :synapses, except: %i(index new edit)
|
||||
resources :synapses, except: %i[index new edit]
|
||||
|
||||
resources :topics, except: %i(index new edit) do
|
||||
resources :topics, except: %i[index new edit] do
|
||||
member do
|
||||
get :network
|
||||
get :relative_numbers
|
||||
|
@ -111,7 +111,7 @@ Metamaps::Application.routes.draw do
|
|||
get 'join' => 'users/registrations#new', :as => :sign_up
|
||||
end
|
||||
|
||||
resources :users, except: %i(index destroy) do
|
||||
resources :users, except: %i[index destroy] do
|
||||
member do
|
||||
get :details
|
||||
end
|
||||
|
@ -121,16 +121,16 @@ Metamaps::Application.routes.draw do
|
|||
|
||||
namespace :api, path: '/api', default: { format: :json } do
|
||||
namespace :v2, path: '/v2' do
|
||||
resources :metacodes, only: %i(index show)
|
||||
resources :mappings, only: %i(index create show update destroy)
|
||||
resources :maps, only: %i(index create show update destroy) do
|
||||
resources :metacodes, only: %i[index show]
|
||||
resources :mappings, only: %i[index create show update destroy]
|
||||
resources :maps, only: %i[index create show update destroy] do
|
||||
post :stars, to: 'stars#create', on: :member
|
||||
delete :stars, to: 'stars#destroy', on: :member
|
||||
end
|
||||
resources :synapses, only: %i(index create show update destroy)
|
||||
resources :tokens, only: %i(index create destroy)
|
||||
resources :topics, only: %i(index create show update destroy)
|
||||
resources :users, only: %i(index show) do
|
||||
resources :synapses, only: %i[index create show update destroy]
|
||||
resources :tokens, only: %i[index create destroy]
|
||||
resources :topics, only: %i[index create show update destroy]
|
||||
resources :users, only: %i[index show] do
|
||||
get :current, on: :collection
|
||||
end
|
||||
match '*path', to: 'restful#catch_404', via: :all
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
%w(
|
||||
%w[
|
||||
.ruby-version
|
||||
.ruby-gemset
|
||||
.rbenv-vars
|
||||
tmp/restart.txt
|
||||
tmp/caching-dev.txt
|
||||
).each { |path| Spring.watch(path) }
|
||||
].each { |path| Spring.watch(path) }
|
||||
|
|
Loading…
Add table
Reference in a new issue