- before_filter :authorize_web
- before_filter :set_locale
- before_filter :require_user
+ before_action :authorize_web
+ before_action :set_locale
+ before_action :require_user
def create
@client_application = @user.client_applications.build(application_params)
if @client_application.save
def create
@client_application = @user.client_applications.build(application_params)
if @client_application.save
def update
@client_application = @user.client_applications.find(params[:id])
if @client_application.update_attributes(application_params)
def update
@client_application = @user.client_applications.find(params[:id])
if @client_application.update_attributes(application_params)
redirect_to :action => "index"
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
redirect_to :action => "index"
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def application_params
params.require(:client_application).permit(:name, :url, :callback_url, :support_url, ClientApplication.all_permissions)
end
def application_params
params.require(:client_application).permit(:name, :url, :callback_url, :support_url, ClientApplication.all_permissions)
end