Created
June 8, 2012 00:28
-
-
Save PeteMichaud/2892614 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LawyersController < ApplicationController | |
before_filter :authenticate_user! | |
before_filter :find_lawfirm | |
load_and_authorize_resource | |
layout 'application' | |
def index | |
respond_to do |format| | |
format.js {render json: @lawfirm.lawyers, content_type: 'text/json'} | |
end | |
end | |
# Keeping it dry | |
def find_lawfirm | |
@lawfirm = Lawfirm.find_by_id(params[:lawfirm_id]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment