Sha256: d73626a92a289fbd7e48cf5cf2b9938f176315dac7879bbef7a228fe1b9a1dd7

Contents?: true

Size: 494 Bytes

Versions: 28

Compression:

Stored size: 494 Bytes

Contents

module ApplicationHelper
  [:project, :story, :bug, :task].each do |method|
    define_method("#{method}_path") do |*args|
      ticket_path(*args)
    end

    define_method("#{method.to_s.pluralize}_path") do |*args|
      tickets_path(*args)
    end
  end

  def ticket_types
    Ticket::ALLOWED_TYPES.each_with_object({}) do |type, hash|
      hash[type] = Ticket.filtered_type_class(type).new(
        creator: current_user,
        parent_id: params[:parent_id]
      )
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
tawork-0.0.31 app/helpers/application_helper.rb
tawork-0.0.30 app/helpers/application_helper.rb
tawork-0.0.29 app/helpers/application_helper.rb
tawork-0.0.28 app/helpers/application_helper.rb
tawork-0.0.24 app/helpers/application_helper.rb
tawork-0.0.23 app/helpers/application_helper.rb
tawork-0.0.22 app/helpers/application_helper.rb
tawork-0.0.21 app/helpers/application_helper.rb
tawork-0.0.20 app/helpers/application_helper.rb
tawork-0.0.19 app/helpers/application_helper.rb
tawork-0.0.18 app/helpers/application_helper.rb
tawork-0.0.17 app/helpers/application_helper.rb
tawork-0.0.16 app/helpers/application_helper.rb
tawork-0.0.15 app/helpers/application_helper.rb
tawork-0.0.14 app/helpers/application_helper.rb
tawork-0.0.13 app/helpers/application_helper.rb
tawork-0.0.12 app/helpers/application_helper.rb
tawork-0.0.11 app/helpers/application_helper.rb
tawork-0.0.10 app/helpers/application_helper.rb
tawork-0.0.9 app/helpers/application_helper.rb