Dave Smith wrote:

> <code>
>   mailinglist = Mailinglist.mail_template_mailinglists.find(:all,
> :conditions => ["mail_template_id = ?", params[:id]])
> 
>     if mailinglist.empty?
>       MailTemplate.find(params[:id]).destroy
>     else
>       flash[:notice] = 'Cannot delete mail template, as it is being used
> by one or more mailinglist.'
>     end
> </code>
> 
> 
>  NoMethodError in Admin/mail templatesController#destroy
> 
> undefined method `mail_template_mailinglists' for #<Class:0x3333814>

any ideas anyone?
-- 
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to