project.rb.diff

jwjw yy, 2017-08-19 05:01

Download (472 Bytes)

View differences:

app/models/project.rb
703 703
  # or nil if the module is not enabled for the project
704 704
  def enabled_module(name)
705 705
    name = name.to_s
706
    enabled_modules.detect {|m| m.name == name}
706
    enabled_modules.find_by(name: name)
707 707
  end
708 708

  
709 709
  # Return true if the module with the given name is enabled