Sha256: e056bfecabac372c5787860520a6d85050df58bc27feb90a66e39d55e5afa2d3

Contents?: true

Size: 567 Bytes

Versions: 36

Compression:

Stored size: 567 Bytes

Contents

module Dorsale::ContextHelper
  def actions_for(obj, opts = {})
    url        = opts[:url]
    edit_url   = opts[:edit_url]
    delete_url = opts[:delete_url]

    url        = polymorphic_path(obj) if url.nil?
    edit_url   = url + "/edit"         if edit_url.nil?
    delete_url = url                   if delete_url.nil?

    render partial: "dorsale/actions", locals: {
      :obj        => obj,
      :url        => url,
      :edit_url   => edit_url,
      :delete_url => delete_url,
    }
  end

  def render_dorsale_page
    render "dorsale/page"
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
dorsale-4.0.0 app/helpers/dorsale/context_helper.rb
dorsale-3.20.0 app/helpers/dorsale/context_helper.rb
dorsale-3.19.1 app/helpers/dorsale/context_helper.rb
dorsale-3.19.0 app/helpers/dorsale/context_helper.rb
dorsale-3.18.0 app/helpers/dorsale/context_helper.rb
dorsale-3.17.0 app/helpers/dorsale/context_helper.rb
dorsale-3.16.0 app/helpers/dorsale/context_helper.rb
dorsale-3.15.0 app/helpers/dorsale/context_helper.rb
dorsale-3.14.11 app/helpers/dorsale/context_helper.rb
dorsale-3.14.10 app/helpers/dorsale/context_helper.rb
dorsale-3.14.9 app/helpers/dorsale/context_helper.rb
dorsale-3.14.8 app/helpers/dorsale/context_helper.rb
dorsale-3.14.7 app/helpers/dorsale/context_helper.rb
dorsale-3.14.6 app/helpers/dorsale/context_helper.rb
dorsale-3.14.5 app/helpers/dorsale/context_helper.rb
dorsale-3.14.4 app/helpers/dorsale/context_helper.rb
dorsale-3.14.3 app/helpers/dorsale/context_helper.rb
dorsale-3.14.2 app/helpers/dorsale/context_helper.rb
dorsale-3.14.1 app/helpers/dorsale/context_helper.rb
dorsale-3.14.0 app/helpers/dorsale/context_helper.rb