aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/refinery
diff options
context:
space:
mode:
authorJames Thompson <james.b.thompson@gmail.com>2012-04-02 12:39:00 +0200
committerJames Thompson <james.b.thompson@gmail.com>2012-04-02 12:39:00 +0200
commit1239f8f870050e4f55176d853f68e35d5f5c068a (patch)
treef990f82cbab64365d5acd811f0b7e0224581a96d /app/models/refinery
parent594e7a61003c4cf18e3e4187311f93f95caf67d0 (diff)
downloadrefinerycms-pc_banners-1239f8f870050e4f55176d853f68e35d5f5c068a.tar.gz
refinerycms-pc_banners-1239f8f870050e4f55176d853f68e35d5f5c068a.tar.bz2
refinerycms-pc_banners-1239f8f870050e4f55176d853f68e35d5f5c068a.zip
whitelist attributes
Diffstat (limited to 'app/models/refinery')
-rw-r--r--app/models/refinery/banners/banner.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/models/refinery/banners/banner.rb b/app/models/refinery/banners/banner.rb
index eaa1713..37135e9 100644
--- a/app/models/refinery/banners/banner.rb
+++ b/app/models/refinery/banners/banner.rb
@@ -5,6 +5,8 @@ module Refinery
acts_as_indexed :fields => [:name, :url, :title, :description]
+ attr_accessible :name, :title, :description, :image_id, :url, :is_active, :start_date, :expiry_date, :position, :page_ids
+
validates :name, :presence => true
validates_presence_of :start_date
validates_length_of :title, :in => 0..255, :allow_nil => true
@@ -24,4 +26,14 @@ module Refinery
end
end
-end \ No newline at end of file
+end
+
+#t.string :name
+#t.string :title
+#t.string :description
+#t.integer :image_id
+#t.string :url
+#t.boolean :is_active
+#t.date :start_date
+#t.date :expiry_date
+#t.integer :position \ No newline at end of file