ricarthlima/eo-project-es

View on GitHub

Showing 129 of 135 total issues

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        if (!context) {
          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
          $$$1(event.currentTarget).data(dataKey, context);
        }
Severity: Major
Found in app/assets/javascripts/application.js and 2 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 2638..2641
app/assets/javascripts/application.js on lines 2941..2944

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 3 locations. Consider refactoring.
Open

        if (!context) {
          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
          $$$1(event.currentTarget).data(dataKey, context);
        }
Severity: Major
Found in app/assets/javascripts/application.js and 2 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 2638..2641
app/assets/javascripts/application.js on lines 2974..2977

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

          if (typeof config === 'string') {
            if (typeof data[config] === 'undefined') {
              throw new TypeError("No method named \"" + config + "\"");
            }

Severity: Major
Found in app/assets/javascripts/application.js and 5 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 1740..1746
app/assets/javascripts/application.js on lines 3097..3103
app/assets/javascripts/application.js on lines 3293..3299
app/assets/javascripts/application.js on lines 3619..3625
app/assets/javascripts/application.js on lines 3878..3884

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

          if (typeof config === 'string') {
            if (typeof data[config] === 'undefined') {
              throw new TypeError("No method named \"" + config + "\"");
            }

Severity: Major
Found in app/assets/javascripts/application.js and 5 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 1370..1376
app/assets/javascripts/application.js on lines 1740..1746
app/assets/javascripts/application.js on lines 3293..3299
app/assets/javascripts/application.js on lines 3619..3625
app/assets/javascripts/application.js on lines 3878..3884

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

          if (typeof config === 'string') {
            if (typeof data[config] === 'undefined') {
              throw new TypeError("No method named \"" + config + "\"");
            }

Severity: Major
Found in app/assets/javascripts/application.js and 5 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 1370..1376
app/assets/javascripts/application.js on lines 1740..1746
app/assets/javascripts/application.js on lines 3097..3103
app/assets/javascripts/application.js on lines 3619..3625
app/assets/javascripts/application.js on lines 3878..3884

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

          if (typeof config === 'string') {
            if (typeof data[config] === 'undefined') {
              throw new TypeError("No method named \"" + config + "\"");
            }

Severity: Major
Found in app/assets/javascripts/application.js and 5 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 1370..1376
app/assets/javascripts/application.js on lines 1740..1746
app/assets/javascripts/application.js on lines 3097..3103
app/assets/javascripts/application.js on lines 3293..3299
app/assets/javascripts/application.js on lines 3878..3884

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

          if (typeof config === 'string') {
            if (typeof data[config] === 'undefined') {
              throw new TypeError("No method named \"" + config + "\"");
            }

Severity: Major
Found in app/assets/javascripts/application.js and 5 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 1370..1376
app/assets/javascripts/application.js on lines 1740..1746
app/assets/javascripts/application.js on lines 3097..3103
app/assets/javascripts/application.js on lines 3293..3299
app/assets/javascripts/application.js on lines 3619..3625

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

          if (typeof config === 'string') {
            if (typeof data[config] === 'undefined') {
              throw new TypeError("No method named \"" + config + "\"");
            }

Severity: Major
Found in app/assets/javascripts/application.js and 5 other locations - About 1 hr to fix
app/assets/javascripts/application.js on lines 1370..1376
app/assets/javascripts/application.js on lines 3097..3103
app/assets/javascripts/application.js on lines 3293..3299
app/assets/javascripts/application.js on lines 3619..3625
app/assets/javascripts/application.js on lines 3878..3884

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @produto_possui_componente.update(produto_possui_componente_params)
        format.html { redirect_to @produto_possui_componente, notice: 'Produto possui componente was successfully updated.' }
Severity: Major
Found in app/controllers/produto_possui_componentes_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @marca.update(marca_params)
        format.html { redirect_to @marca, notice: 'Marca atualizada com suceso.' }
Severity: Major
Found in app/controllers/marcas_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @produto_nome_alternativo.update(produto_nome_alternativo_params)
        format.html { redirect_to @produto_nome_alternativo, notice: 'Produto nome alternativo was successfully updated.' }
Severity: Major
Found in app/controllers/produto_nome_alternativos_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @usuario_busca_produto.update(usuario_busca_produto_params)
        format.html { redirect_to @usuario_busca_produto, notice: 'Usuario busca produto was successfully updated.' }
Severity: Major
Found in app/controllers/usuario_busca_produtos_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @componente.update(componente_params)
        format.html { redirect_to @componente, notice: 'Componente was successfully updated.' }
Severity: Major
Found in app/controllers/componentes_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @usuario_avalia_produto.update(usuario_avalia_produto_params)
        format.html { redirect_to @usuario_avalia_produto, notice: 'Usuario avalia produto was successfully updated.' }
Severity: Major
Found in app/controllers/usuario_avalia_produtos_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @produto.update(produto_params)
        format.html { redirect_to @produto, notice: 'Produto was successfully updated.' }
Severity: Major
Found in app/controllers/produtos_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @usuario_busca_marca.update(usuario_busca_marca_params)
        format.html { redirect_to @usuario_busca_marca, notice: 'Usuario busca marca was successfully updated.' }
Severity: Major
Found in app/controllers/usuario_busca_marcas_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @usuario_busca_componente.update(usuario_busca_componente_params)
        format.html { redirect_to @usuario_busca_componente, notice: 'Usuario busca componente was successfully updated.' }
Severity: Major
Found in app/controllers/usuario_busca_componentes_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @componente_nome_alternativo.update(componente_nome_alternativo_params)
        format.html { redirect_to @componente_nome_alternativo, notice: 'Componente nome alternativo was successfully updated.' }
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @marca_nome_alternativo.update(marca_nome_alternativo_params)
        format.html { redirect_to @marca_nome_alternativo, notice: 'Marca nome alternativo was successfully updated.' }
Severity: Major
Found in app/controllers/marca_nome_alternativos_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_marcas_controller.rb on lines 48..56
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 12 locations. Consider refactoring.
Open

  def update
    authorize! :menage, :all
    respond_to do |format|
      if @usuario_avalia_marca.update(usuario_avalia_marca_params)
        format.html { redirect_to @usuario_avalia_marca, notice: 'Usuario avalia marca was successfully updated.' }
Severity: Major
Found in app/controllers/usuario_avalia_marcas_controller.rb and 11 other locations - About 1 hr to fix
app/controllers/componente_nome_alternativos_controller.rb on lines 48..56
app/controllers/componentes_controller.rb on lines 59..67
app/controllers/marca_nome_alternativos_controller.rb on lines 48..56
app/controllers/marcas_controller.rb on lines 57..65
app/controllers/produto_nome_alternativos_controller.rb on lines 48..56
app/controllers/produto_possui_componentes_controller.rb on lines 48..56
app/controllers/produtos_controller.rb on lines 67..75
app/controllers/usuario_avalia_produtos_controller.rb on lines 48..56
app/controllers/usuario_busca_componentes_controller.rb on lines 48..56
app/controllers/usuario_busca_marcas_controller.rb on lines 48..56
app/controllers/usuario_busca_produtos_controller.rb on lines 48..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 47.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language