def create
@client_application = current_user.client_applications.build(application_params)
if @client_application.save
def create
@client_application = current_user.client_applications.build(application_params)
if @client_application.save
def update
@client_application = current_user.client_applications.find(params[:id])
if @client_application.update(application_params)
def update
@client_application = current_user.client_applications.find(params[:id])
if @client_application.update(application_params)
redirect_to :action => "index"
rescue ActiveRecord::RecordNotFound
@type = "client application"
redirect_to :action => "index"
rescue ActiveRecord::RecordNotFound
@type = "client application"