Displaying 2 results from an estimated 2 matches for "log_ev".
Did you mean:
logdev
2006 Aug 17
0
Help with best-practice for Rails Model
...non-Rails apps.
I would like to SIMPLY and EFFICIENTLY retrieve Events by:
ALWAYS by user_id
of any type for a given day
of a given type for a given day
of a given type for a range of days
QUESTIONS:
Should I model this using single-table inheritance?
with something like:
create_table "log_events", :force => true do |t|
t.column "user_id", :integer
t.column "event_at", :datetime
t.column "note", :text
t.column "type", :string
t.column "type1_attr", :integer
t.column "type2_attr", :integer
end...
2012 Oct 18
0
unexpected return (LocalJumpError) only when executing this code within autoloaded classes?
...//stackoverflow.com/questions/12942505/why-does-using-set-trace-func-work-in-some-places-but-cause-unexpected-return-l
The following is a generified part of the code in a gem I''m working on:
module SomeModule
class << self
attr_accessor :procedure
def log_events(*args)
args.flatten!
if args.size == 1
eval "set_trace_func proc {|event, file, line, id, binding,
classname| begin; SomeModule.procedure.call(event, file, line, id, binding,
classname) if event == #{args[0].inspect}; rescue SystemExit, Interrupt;
raise;...