Sha256: 39dc0efd2dabee808fbd6d89866422d6dd0d7d93e641c2fa653f55021f597ef4
Contents?: true
Size: 665 Bytes
Versions: 12
Compression:
Stored size: 665 Bytes
Contents
class Opro::Oauth::ClientAppController < OproController before_filter :opro_authenticate_user! def new @client_app = Opro::Oauth::ClientApp.new end # Show all client applications belonging to the current user def index @client_apps = Opro::Oauth::ClientApp.where(:user_id => current_user.id) end def create @client_app = Opro::Oauth::ClientApp.find_by_user_id_and_name(current_user.id, params[:opro_oauth_client_app][:name]) @client_app ||= Opro::Oauth::ClientApp.create_with_user_and_name(current_user, params[:opro_oauth_client_app][:name]) if @client_app.save # do nothing else render :new end end end
Version data entries
12 entries across 12 versions & 1 rubygems