Sha256: b92161969678509decce6ac83d23efcbff4f207b13bab1443193db723ff2d638

Contents?: true

Size: 608 Bytes

Versions: 13

Compression:

Stored size: 608 Bytes

Contents

module Poodle
  module RenderHelper

    def render_or_redirect(error, redirect_url, action, notice=nil)
      respond_to do |format|
        format.html {
          if error
            render action: action
          else
            redirect_to redirect_url, notice: notice
          end
        }
        format.js {}
      end
    end

    def render_list
      respond_to do |format|
        format.html { get_collections and render :index }
        format.js {}
      end
    end

    def render_show
      respond_to do |format|
        format.js { render action: :show }
      end
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
poodle-rb-0.2.5 app/helpers/poodle/render_helper.rb
poodle-rb-0.2.4 app/helpers/poodle/render_helper.rb
poodle-rb-0.2.3 app/helpers/poodle/render_helper.rb
poodle-rb-0.2.2 app/helpers/poodle/render_helper.rb
poodle-rb-0.2.1 app/helpers/poodle/render_helper.rb
poodle-rb-0.2.0 app/helpers/poodle/render_helper.rb
poodle-rb-0.1.9 app/helpers/poodle/render_helper.rb
poodle-rb-0.1.8 app/helpers/poodle/render_helper.rb
poodle-rb-0.1.7 app/helpers/poodle/render_helper.rb
poodle-rb-0.1.6 app/helpers/poodle/render_helper.rb
poodle-rb-0.1.5 app/helpers/poodle/render_helper.rb
poodle-rb-0.1.4 app/helpers/poodle/render_helper.rb
poodle-rb-0.1.3 app/helpers/poodle/render_helper.rb