search for: tags_controller

Displaying 6 results from an estimated 6 matches for "tags_controller".

2010 Feb 14
2
has_many :through eager loading only loading one record
...ll, :include => {:dish_taggings => :dish}) Here are the resulting queries (with traces thanks to the query_trace plugin): DishTag Columns (1.2ms) SHOW FIELDS FROM `tag` DishTag Load (0.9ms) SELECT * FROM `tag` WHERE ( (`tag`.`type` = ''DishTag'' ) ) app/controllers/tags_controller.rb:5:in `index'' DishTagging Load (6.9ms) SELECT `dish_tag`.* FROM `dish_tag` WHERE (`dish_tag`.tag_id IN (58,60,61,62,63,79,81,82,83,90,91,93,94,96,97,99,102,104,106,109,110,114,120,121,122,123,124,125,126,127,131,132,133,135,136,137,138,139,141,143,144,145,146,147,149,150,153,154,157,...
2006 Jun 07
2
script/generate scaffold pluralizes class names
...affold foo" and it generated new views and controllers with scaffolding in them, but now the controllers and views are all pluralized: my user controller became users, my tag controller became tags, etc. So looking at my file tree I wound up with two files names tag_controller.rb & tags_controller.rb - inside the first line says "TagsController" not "TagController" like when rails does it. Is this a bug? Why would the generate script pluralize things just because I want the scaffolding code inserted? Is this a problem- will I wind up with other problems because my...
2006 Jun 22
1
acts_as_taggable gem problems
With acts_as_taggable 1.04... 1. how can I get a frequency of tags? i.e. /tags/list I want to list of tags sorted and listed with their frequency tags_controller.rb: def list @tags = Tags.find_by_sql ''select name, count(*) as freq from tags group by name order by freq desc'' End tags/list.rb: <ul> <% @tags.each do |t| %> <li><%= t.freq %> <%= t.name %></li> <% end %> </ul> Accor...
2007 Jul 18
16
Edge Rails namespaced routing
...tle shared logic/behaviour; only a common name. I know I can just use a different name, but with the addition of namespaces this should no longer be a concern with a proper design. So.. I''m thinking something like: /app/controllers/customers/root_controller.rb /app/controllers/customers/tags_controller.rb /app/controllers/customers/notes_controller.rb /app/controllers/products/root_controller.rb /app/controllers/products/tags_controller.rb /app/controllers/products/notes_controller.rb with routes like: map.namespace(:customers) do |customers| customers.resources :root, :has_many => [:tags,...
2006 Apr 28
1
acts_as_taggable help
Ahoy, having a bit of difficulty w/ the acts as taggable GEM. I was able to create a tagcloud, but now i want to filter items by tags. in my controller i have def show_tagged_with <-- snip snip --> @items = Item.find_tagged_with( :any => params[:tag_name]) @categories = Category.find_all @tag_name = params[:tag_name] @tagged_items = Item.tags_count(:limit
2006 Feb 04
22
What''s the best way to embed a form?
I would like to embed my login form on my app''s home page. What''s the best way to render the login action of member controller from another action? Thanks Frank --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! -------------- next part -------------- An HTML attachment was scrubbed... URL: