search for: find_count_of_tag

Displaying 1 result from an estimated 1 matches for "find_count_of_tag".

2006 May 12
2
Problem regarding accessing attributes from object...
...llows:- ----output---- [#"3"}>] ----------- Now in aboove output the number between double quotes (3) which is of my interest & I want to display it. How to do that? Actually this is my method:- ==================================== class Tagging < ActiveRecord::Base def self.find_count_of_tag(tag_name) find_by_sql([ "SELECT count(*) as cntnew FROM taggings " + "WHERE taggings.tag_id = (SELECT tags.id from tags where tags.name= ''food'')" ]) end end ==================================== Now this is...