diff options
author | James Thompson <james.b.thompson@gmail.com> | 2012-04-02 12:39:00 +0200 |
---|---|---|
committer | James Thompson <james.b.thompson@gmail.com> | 2012-04-02 12:39:00 +0200 |
commit | 1239f8f870050e4f55176d853f68e35d5f5c068a (patch) | |
tree | f990f82cbab64365d5acd811f0b7e0224581a96d | |
parent | 594e7a61003c4cf18e3e4187311f93f95caf67d0 (diff) | |
download | refinerycms-pc_banners-1239f8f870050e4f55176d853f68e35d5f5c068a.tar.gz refinerycms-pc_banners-1239f8f870050e4f55176d853f68e35d5f5c068a.tar.bz2 refinerycms-pc_banners-1239f8f870050e4f55176d853f68e35d5f5c068a.zip |
whitelist attributes
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | app/models/refinery/banners/banner.rb | 14 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index 69cff5e..8735e72 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - refinerycms-banners (1.0) + refinerycms-pc_banners (2.0.0) refinerycms-core (~> 2.0.1) GEM @@ -276,7 +276,7 @@ DEPENDENCIES rb-fchange (~> 0.0.5) rb-notifu (~> 0.0.4) refinerycms (~> 2.0.0) - refinerycms-banners! + refinerycms-pc_banners! refinerycms-testing (~> 2.0.0) sass-rails spork (= 0.9.0.rc9) 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 |