Showing 150 of 2,528 total issues
File investment.rb
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class Budget
class Investment < ApplicationRecord
SORTING_OPTIONS = { id: "id", supports: "cached_votes_up" }.freeze
include Measurable
Method initialize
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(user)
merge Abilities::Everyone.new(user)
can [:read, :update], User, id: user.id
File polls_spec.rb
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Polls" do
context "Concerns" do
it_behaves_like "notifiable in-app", :poll
File processes_spec.rb
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Admin collaborative legislation", :admin do
it_behaves_like "admin_milestoneable",
:legislation_process,
File proposal_notifications_spec.rb
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Proposal Notifications" do
scenario "Send a notification" do
author = create(:user, :with_proposal)
File process_spec.rb
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Legislation::Process do
let(:process) { create(:legislation_process) }
File common_spec.rb
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
require "cancan/matchers"
describe Abilities::Common do
subject(:ability) { Ability.new(user) }
Function editorConfig
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
CKEDITOR.editorConfig = function( config )
{
config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
File system_emails_spec.rb
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "System Emails" do
let(:admin) { create(:administrator) }
File advanced_search_spec.rb
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Advanced search" do
let(:budget) { create(:budget, name: "Big Budget") }
let(:heading) { create(:budget_heading, budget: budget, name: "More hospitals") }
Function draw
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ProposalGraph.prototype.draw = function() {
var colors = {},
maximumValue = this.maximumValue === 0 ? this.proposalSuccess : Math.round(this.maximumValue * 1.10);
this.formatXColumnValues();
Class ProposalsController
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ProposalsController < ApplicationController
include FeatureFlags
include CommentableActions
include FlagActions
include ImageAttributes
File settings_spec.rb
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Admin settings", :admin do
scenario "Index" do
visit admin_settings_path
File user_segments_spec.rb
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe UserSegments do
let(:user1) { create(:user) }
let(:user2) { create(:user) }
File admin.rb
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
namespace :admin do
root to: "dashboard#index"
resources :organizations, only: :index do
get :search, on: :collection
member do
Function initializeMap
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initializeMap: function(element) {
var createMarker, editable, investmentsMarkers, map, marker, markerClustering,
markerData, markerIcon, markers, moveOrPlaceMarker, removeMarker, removeMarkerSelector;
App.Map.cleanInvestmentCoordinates(element);
removeMarkerSelector = $(element).data("marker-remove-selector");
File votes_spec.rb
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Votes" do
let!(:verified) { create(:user, verified_at: Time.current) }
let!(:unverified) { create(:user) }
File activity_spec.rb
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Admin activity" do
let(:admin) { create(:administrator) }
File action_spec.rb
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Dashboard::Action do
subject do
build(:dashboard_action,
File stats_spec.rb
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Stats", :admin do
context "Summary" do
scenario "General" do