From 1239f8f870050e4f55176d853f68e35d5f5c068a Mon Sep 17 00:00:00 2001 From: James Thompson Date: Mon, 2 Apr 2012 12:39:00 +0200 Subject: whitelist attributes --- app/models/refinery/banners/banner.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'app') 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 -- cgit v1.2.3