Browse Source

renamed helper

pull/643/head
JG 3 years ago
parent
commit
f55aee85e7
  1. 2
      app/helpers/title_helper.rb
  2. 2
      spec/helpers/title_helper_spec.rb

2
app/helpers/item_label_helper.rb → app/helpers/title_helper.rb

@ -1,4 +1,4 @@
module ItemLabelHelper module TitleHelper
def format_label(count, item) def format_label(count, item)
count > 1 ? item.pluralize : item count > 1 ? item.pluralize : item
end end

2
spec/helpers/item_label_helper_spec.rb → spec/helpers/title_helper_spec.rb

@ -1,6 +1,6 @@
require "rails_helper" require "rails_helper"
RSpec.describe ItemLabelHelper do RSpec.describe TitleHelper do
describe "#format_label" do describe "#format_label" do
let(:item) { "organisation" } let(:item) { "organisation" }
it "returns singular when count is 1" do it "returns singular when count is 1" do
Loading…
Cancel
Save