spud_videos 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de5e341f7389fa39fd9eb9f03845dcfcda429e62
4
- data.tar.gz: 7d8972504144d8ab44f196daa6a0add6bfbb0204
3
+ metadata.gz: 502e0475aed02388178b5ac4ceec5a461258dd7c
4
+ data.tar.gz: c039cace7028af9fddc18b132591f0e1fc832064
5
5
  SHA512:
6
- metadata.gz: f213b4e2e708124cf8db092e9f7006d9cf02a19f245845a64e8e96dbd64b5b56730f3cc80ab06b1174a7cbd16e24d15664ec291ec6ddaf35b657b2829dd642a4
7
- data.tar.gz: bcec27f3aa236e49231cb5c25e4d5d4890d654da33d9f33057d4863f3e537c5e4993bc380126e42d571a9b0320727d1fc8f810a3ba56f6ee43649a7bdb66e855
6
+ metadata.gz: 00ecd6cb9c38712adea3a176b61830a23ed47c807985097237928a6c4d2b9cf6a907a7bbeb755a0074556046742540016ded536704ce4a2bb62e406b9266a1e1
7
+ data.tar.gz: 52495f0e0e5a07825d32df82d62b9112b3cecbdcbdbe71a75fb18bdedc713cf62be8cb2269a3c0b1218b1d7f132e698d86506be1c073fe39a016f86e4a9eff78
@@ -19,7 +19,7 @@ class Spud::Admin::VideosController < Spud::Admin::ApplicationController
19
19
  end
20
20
 
21
21
  def create
22
- @video = SpudVideo.new(params[:spud_video])
22
+ @video = SpudVideo.new(video_params)
23
23
  if @video.save
24
24
  flash[:notice] = "Video Saved successfully!"
25
25
  else
@@ -34,7 +34,7 @@ class Spud::Admin::VideosController < Spud::Admin::ApplicationController
34
34
 
35
35
  def update
36
36
 
37
- if @video.update_attributes(params[:spud_video])
37
+ if @video.update_attributes(video_params)
38
38
  flash[:notice] = "Video Saved successfully!"
39
39
  else
40
40
  flash[:error] = "Error saving video"
@@ -77,5 +77,9 @@ private
77
77
  flash[:error] = "Video not found!"
78
78
  redirect_to spud_admin_videos_url and return
79
79
  end
80
- end
80
+ end
81
+
82
+ def video_params
83
+ params.require(:spud_video).permit(:name, :video_order, :source, :description, :embed_link)
84
+ end
81
85
  end
@@ -2,7 +2,6 @@ class SpudVideo < ActiveRecord::Base
2
2
  validates :name, :presence => true
3
3
  validates :source,:presence => true
4
4
  validates :embed_link,:presence => true
5
- attr_accessible :name, :video_order, :source, :description, :embed_link
6
5
  def self.find_by_identifier(identifier)
7
6
  if identifier.class == String
8
7
  video = SpudVideo.find_by_name(identifier)
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Videos
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_videos
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Estes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-26 00:00:00.000000000 Z
11
+ date: 2014-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails