Zaid Annas
Devsinc inc. 30/08/2018
| //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | |
| //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | |
| //Options | |
| // Use this if you want to exclude some campaigns. Case insensitive. | |
| // For example ["Brand"] would ignore any campaigns with 'brand' in the name, | |
| // while ["Brand","Competitor"] would ignore any campaigns with 'brand' or | |
| // 'competitor' in the name. | |
| // Leave as [] to not exclude any campaigns. | |
| var campaignNameDoesNotContain = []; |
| json.extract! document, :id, :documentable_type, :documentable_id, :created_at | |
| json.url rails_blob_url(document.doc) |
| FROM ruby:2.3.1 | |
| # Install dependencies | |
| RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
| # Set an environment variable where the Rails app is installed to inside of Docker image: | |
| ENV RAILS_ROOT /var/www/app_name | |
| RUN mkdir -p $RAILS_ROOT | |
| # Set working directory, where the commands will be ran: |
| // Import the core angular services. | |
| import { Component } from "@angular/core"; | |
| // ----------------------------------------------------------------------------------- // | |
| // ----------------------------------------------------------------------------------- // | |
| interface Contact { | |
| id: number; | |
| name: string; | |
| avatarUrl: string; |
A complete example is available at https://github.com/keathmilligan/angular2-cli-auth0-example
The provided auth0 tutorial uses SystemJS, these notes outline how to integrate into an angular-cli or straight webpack project.
Create project as usual with "ng create".
Install auth0 packages & bootstrap:
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| import {Directive, forwardRef, Provider} from "angular2/core"; | |
| import {NG_VALUE_ACCESSOR, ControlValueAccessor} from "angular2/common"; | |
| import {CONST_EXPR} from "angular2/src/facade/lang"; | |
| const FILE_VALUE_ACCESSOR = CONST_EXPR( | |
| new Provider(NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => FileControlValueAccessor), multi: true}) | |
| ); | |
| /** | |
| * The accessor for listening to changes that is used by the |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
| ## token_authentication | |
| # at the head of of controllers which will need token authentication instead of password/session authentication: | |
| skip_before_action :authenticate_tenant! | |
| before_action :authenticate_by_token! | |
| # then in application_controller.rb: | |
| def authenticate_by_token! |