Skip to content

Instantly share code, notes, and snippets.

@marcelloma
Created May 25, 2011 19:20
Show Gist options
  • Save marcelloma/991685 to your computer and use it in GitHub Desktop.
Save marcelloma/991685 to your computer and use it in GitHub Desktop.
Job Symbols Controller
class JobSymbolsController < ApplicationController
expose(:job_symbol)
expose(:job_symbols) { search.paginate(:page => params[:page]) }
expose(:search) { JobSymbol.search(params[:search]) }
def create
if job_symbol.save
redirect_to(job_symbols_url)
else
render 'new'
end
end
def update
if job_symbol.update_attributes(params[:job_symbol])
redirect_to(job_symbols_url)
else
render 'edit'
end
end
def destroy
job_symbol.destroy
redirect_to(job_symbols_url)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment