Never really used Camping's scriptable dispatcher in practice.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
..an oversight. :-)
modified slightly to work:
class_def(meth) do |*a|
controller_module = self.class.name.split(/::/)
controller_module.pop
controller_module << :Login # maybe this could be passed as an arg too
controller_module=controller_module.join("::").constantize
@[EMAIL P
i'm missing something here.
how would I code this outside the application to be shared with other
Camping apps?
module Blog::Controllers
module AuthenticationHelper
def self.included(base)
class << base
define_method :authenticate do |*a|
a
would be great to do something simple like that for authenticating
controller methods.
been using something like this to authenticate get and post in one sweep.
module Controllers
module AuthenticationHelper
def self.included(base)
base.module_eval do
in theory it should be as easy as that, ... ala-rails.
would be nice to have genuine support for plug-ins .
will peruse zimbatm's 'equipment' to get more inspiration
or maybe we can set a standard on how to add Camping plug-ins.
anyway, this is how i've used it: 'quick n dirty '
# helpers_plu
# camping_plugin.rb
# plug-in support for Camping Apps
# require 'lib/camping_plugin'
# override R helper method to your liking :-)
module Camping
module PluginHelpers
def R_with_module(c,*g)
p,h=/\(.+?\)/,g.grep(Hash)
g-=h
raise "bad route" unless u = c.urls.find{|
cool! i'll try that.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
params= {"search"=>"Search",
"date_begin"=>"2007-05-01",
"date_type"=>"created_on",
"order"=>1,
"report_type"=>"year_end",
"person"=>
{"reply_status_id"=>"1",
"created_on"=>
Tue, 01 May 2007 00:00:00 +..Fri, 23 May 2008 00:00:00 +},
"date_end"=>"2008-05-23"}
R(Report,params)
8 matches
Mail list logo