Sha256: 973f9296cee82444788fcfd1f8eb782ae0696368073b8a15b64d22fb52fee5f1

Contents?: true

Size: 646 Bytes

Versions: 1

Compression:

Stored size: 646 Bytes

Contents

class Eventable::CategorylistsController < Eventable::EventableController

  before_filter :get_event
  before_filter :get_categorylist

  def update
    if @categorylist.update_attributes(params[:eventable_categorylist])
      try_after_callback do
        flash[:notice] = 'Categories were successfully updated.'
        redirect_to(eventable_event_categorylist_path(@event))
      end
    else
      try_after_callback :fail do
        render :action => "edit"
      end
    end
  end

  private

  def get_event
    @event = event_model.find(params[:event_id])
  end

  def get_categorylist
    @categorylist = @event.categorylist
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dcs-eventable-0.0.8 app/controllers/eventable/categorylists_controller.rb