search for: meantime_filt

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

Did you mean: meantime_filter
2006 Jul 02
11
Rails Plugin: meantime_filter for controllers (actions within blocks)
Hello, I just finished writing a plugin for Rails that I''m annoucing the first release here: meantime_filter. It is descibed at http://roman2k.free.fr/rails/meantime_filter/0.1.0/ rdoc/ (See the end of this message for getting it.) ABOUT THE PLUGIN It extends ActionController to add the functionnality of having filters run at the action call time. This new type of filter yields when the action has...
2006 Jul 24
1
meantime_filter won''t pick up my missing methods
...ign_key} = ?", params[foreign_key] ]}, :create => { :user_id => params[foreign_key] } }, &block) end end </pre></code> Creates methods like ''scope_products_to_user'', ''scope_messages_to_mailbox'', etc. The problem is meantime_filter isn''t running my method_missing method. <code><pre> meantime_filter :scope_products_to_user #=> NameError: undefined method `scope_products_to_user'' for class `ProductsController'' </pre></code> I can only seem to run the methods from the c...
2006 Aug 05
0
Another generic CRUD controller
I''ve been using this template on most of my CRUD controllers. class CommentsController < ApplicationController meantime_filter :set_scope before_filter :find_comment, :only => %w(show edit update destroy) def index @comments = Comment.find(:all) end def new @Comment = Comment.new end def create @comment = Comment.create!(params[:comment]) redirect_to comment_url(@comment) rescue Active...
2006 Jul 06
5
Single table inheritance
I''m having a class called Person, with subclasses as goalkeeper, forward, defender. Now a person can be a forward as well as a defender or a goalkeeper. I want to use single table inheritance like : class Goalkeepr < Person end And not have multiple boolean columns like in my people table like is is_goalkpeer, is_forward, is_defender. How do I go about it ? Thanks, Pratik -- rm