diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ee0b043..037d529 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -16,23 +16,10 @@ class ApplicationController < ActionController::Base end end - private def authenticate_user_from_token! - if request.headers["HTTP_AUTHORIZATION"] - authenticate_or_request_with_http_token do |token, options| - email = token.split[1].split("=")[1] - token = token.split[0] - user_email = email.presence - end - else - user_email = params[:user_email].presence - token = params[:user_token] - end - log_it_in(token, user_email) - end - - def log_it_in(token, user_email) + user_email = params[:user_email].presence + token = params[:user_token] user = user_email && User.find_by_email(user_email) if user && Devise.secure_compare(user.authentication_token, token) sign_in user, store: false diff --git a/app/views/campaigns/_videolisting.html.erb b/app/views/campaigns/_videolisting.html.erb index 864a95f..54e2fbd 100644 --- a/app/views/campaigns/_videolisting.html.erb +++ b/app/views/campaigns/_videolisting.html.erb @@ -25,10 +25,11 @@ <% end %> <% unless videolisting.asseturls.empty? %>
  • -

    asseturls
    +

    asseturls
    <% videolisting.asseturls_array.each do |asset| %> - <%= asset[:asseturl] %>

    + <%= asset[:asseturl] %>
    <% end %> +

  • <% end %> diff --git a/app/views/campaigns/show.html.erb b/app/views/campaigns/show.html.erb index 2299753..bfaa0ae 100644 --- a/app/views/campaigns/show.html.erb +++ b/app/views/campaigns/show.html.erb @@ -10,121 +10,121 @@
    diff --git a/config/routes.rb b/config/routes.rb index 69dcc55..3138303 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,8 +11,9 @@ Vidpush::Application.routes.draw do resources :campaigns, param: :listingcode do resources :videolistings, param: :videocode do member do - get 'publish',:defaults => { :format => 'json' } + get 'publish', defaults: { :format => 'json' } end end + end end diff --git a/db/migrate/20140425200716_change_field_types_videolisting.rb b/db/migrate/20140425200716_change_field_types_videolisting.rb index ef1c138..e171c83 100644 --- a/db/migrate/20140425200716_change_field_types_videolisting.rb +++ b/db/migrate/20140425200716_change_field_types_videolisting.rb @@ -2,6 +2,5 @@ class ChangeFieldTypesVideolisting < ActiveRecord::Migration def change change_column :videolistings, :notes, :text change_column :videolistings, :clientprovidedscript, :text - end end diff --git a/db/migrate/20140425201114_change_field_types_campaigns.rb b/db/migrate/20140425201114_change_field_types_campaigns.rb new file mode 100644 index 0000000..9e0996f --- /dev/null +++ b/db/migrate/20140425201114_change_field_types_campaigns.rb @@ -0,0 +1,5 @@ +class ChangeFieldTypesCampaigns < ActiveRecord::Migration + def change + change_column :campaigns, :description, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 0006e0a..59e74e8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140425200716) do +ActiveRecord::Schema.define(version: 20140425201114) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -57,7 +57,7 @@ ActiveRecord::Schema.define(version: 20140425200716) do t.string "background" t.string "categories" t.string "companycolors" - t.string "description" + t.text "description" t.string "facebookurl" t.string "productsandservices" t.string "targetaudience"