search for: article_groups

Displaying 4 results from an estimated 4 matches for "article_groups".

2006 Sep 25
2
@article.article_groups.delete_if... Dosn't work!
If I try: @article.article_groups.delete_if {|x| x.group_id == x.group_id } It does nothing. If I try: articletmp.article_groups.each{ |x| @article.article_groups.delete(y) } It deletes some of the groups. @article.article_groups.clear works. Why dosn''t the to first examples work as...
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have article_groups as a jointable. Now I want to select every article who is a member of group with id ''1'' and id ''2''. Whats best way to get that? Extract from schemas: CREATE TABLE articles ( id int auto_increment, ingress text NOT NULL, story_text longtext, constraint fk_items...
2006 Nov 04
0
@article.article_groups.delete_if... Dosn''t work!
If I try: @article.article_groups.delete_if {|x| x.group_id == x.group_id } It does nothing. If I try: articletmp.article_groups.each{ |x| @article.article_groups.delete(y) } It deletes some of the groups. @article.article_groups.clear works. Why dosn''t the to first examples work as...
2006 Jan 30
3
Howto change @article.article.headline to @article.headline ?
I have to actions: def index @articles = Article.find(:all, :conditions => "un_published != ''1''", :order => "created_on desc") end and def group id = params[:id] @articles = ArticleGroup.find(:all, :include => [:group, :article], :conditions => ["articles.un_published !=