Skip to content
Browse files

fix attr accessible calls

  • Loading branch information...
1 parent 6828659 commit fac92c07bbc5471dd3e51027285d78c79de8c9bf Andrew Joe committed
Showing with 6 additions and 3 deletions.
  1. +2 −1 app/models/ajo_cms/company.rb
  2. +1 −1 app/models/ajo_cms/page.rb
  3. +2 −0 app/models/ajo_cms/post.rb
  4. +1 −1 app/models/ajo_cms/section.rb
View
3 app/models/ajo_cms/company.rb
@@ -1,6 +1,7 @@
module AjoCms
class Company < ActiveRecord::Base
- attr_accessible :logo, :name, :phone, :email, :contact, :fax, :title, :address, :city, :country, :state, :zip_code, :layout
+ attr_accessible :logo, :name, :phone, :email, :contact, :fax, :title, :address, :city, :country, :state, :zip_code, :phone, :fax, :email, :layout
+
mount_uploader :logo, LogoUploader
end
end
View
2 app/models/ajo_cms/page.rb
@@ -1,6 +1,6 @@
module AjoCms
class Page < ActiveRecord::Base
- attr_accessible :name
+ attr_accessible :name, :title, :layout, :section_id, :index_page, :position
has_many :posts
accepts_nested_attributes_for :posts
belongs_to :sections
View
2 app/models/ajo_cms/post.rb
@@ -1,5 +1,7 @@
module AjoCms
class Post < ActiveRecord::Base
+ attr_accessible :title, :content, :post_type, :page_id, :image
+
belongs_to :pages
mount_uploader :image, ImageUploader
end
View
2 app/models/ajo_cms/section.rb
@@ -1,6 +1,6 @@
module AjoCms
class Section < ActiveRecord::Base
- attr_accessible :name, :title
+ attr_accessible :name, :title, :position
has_many :pages, :dependent => :destroy
accepts_nested_attributes_for :pages

0 comments on commit fac92c0

Please sign in to comment.
Something went wrong with that request. Please try again.