Hi,

I just created a new model called Sidebar, for custom sidebar on a per
page basis:

--
class Sidebar < ActiveRecord::Base

  attr_accessible :content
  validates_uniqueness_of :permalink, :scope => :site_id

end # class Sidebar
--

Here is the stack trace;
--
/usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1833:in
`method_missing_without_paginate'
/usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/mislav-will_paginate-2.3.6/lib/will_paginate/finder.rb:167:in
`method_missing'
app/models/sidebar.rb:3
app/controllers/pages_controller.rb:18:in `faq'
--

Inside my controller, I call:
--
@sidebar = Sidebar.find_by_permalink_and_site_id('faq', @site.id)
--

But Rails doesn't recognize the attr_accessible method here, what could
possibly go wrong? It's the first time I run into this issue.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to