Sha256: b8903758b918fcbd4ddabbdab19d0f8ae9c3d93ecbc277899cbaae2bfa06521f

Contents?: true

Size: 372 Bytes

Versions: 8

Compression:

Stored size: 372 Bytes

Contents

module FormilyHelper


  def submit_title(form_title, submit)
    title = form_title

    if submit && submit.input_values.count > 0
      title += ' ' + submit.created_at.utc.to_i.to_s
      user_name = User.find_by(id: submit.versions.last.whodunnit.to_i).to_s
      user_name = 'User' if user_name.blank?
      title += ' by ' + user_name
    end

    title
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
formily-0.0.5.6.5 app/helpers/formily_helper.rb
formily-0.0.5.6.4 app/helpers/formily_helper.rb
formily-0.0.5.6.3 app/helpers/formily_helper.rb
formily-0.0.5.6.2 app/helpers/formily_helper.rb
formily-0.0.5.6.1 app/helpers/formily_helper.rb
formily-0.0.5.6.0 app/helpers/formily_helper.rb
formily-0.0.5.5.9 app/helpers/formily_helper.rb
formily-0.0.5.5.7 app/helpers/formily_helper.rb