if @client_application.save
flash[:notice] = t "oauth_clients.create.flash"
redirect_to :action => "show", :id => @client_application.id
if @client_application.save
flash[:notice] = t "oauth_clients.create.flash"
redirect_to :action => "show", :id => @client_application.id
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def edit
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def edit
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def update
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def update
if @client_application.update_attributes(application_params)
flash[:notice] = t "oauth_clients.update.flash"
redirect_to :action => "show", :id => @client_application.id
if @client_application.update_attributes(application_params)
flash[:notice] = t "oauth_clients.update.flash"
redirect_to :action => "show", :id => @client_application.id
@client_application.destroy
flash[:notice] = t "oauth_clients.destroy.flash"
redirect_to :action => "index"
@client_application.destroy
flash[:notice] = t "oauth_clients.destroy.flash"
redirect_to :action => "index"