Displaying 11 results from an estimated 11 matches for "cjbottaro".
Did you mean:
bottaro
2006 Nov 16
2
dynamically adding static (class) methods to a class
Hello again,
I guess this is more of a Ruby question, but here goes anyways...
I want to intercept all calls to non existent class methods and then
call an existing class method with the non existent name.
In code...
class MyModel < ActiveRecord::Base
def MyModel.method_missing(symbol, *args)
MyModel.func(symbol.id2name)
end
def MyModel.func(func_called)
puts "You
2008 Jun 14
0
Bug and patch for vpim-0.619
On Sat, Jun 14, 2008 at 10:42 AM, Christopher J. Bottaro
<cjbottaro at alumni.cs.utexas.edu> wrote:
> I noticed two little bugs when using your vpim module in a Rails application.
>
> 1) The vpim module overwrites Rail''s implementation of Date#to_time.
> 2) The vpim module''s implementation of Date#to_time causes
> Date.today.to...
2006 Nov 09
2
help with join tables and has_and_belongs_to_many
Hi,
I have a user model and a privilege model. They have the
has_and_belongs_to_many relationship. Here are the model defs:
class User < ActiveRecord::Base
belongs_to :status
has_and_belongs_to_many :privileges
end
class Privilege < ActiveRecord::Base
has_and_belongs_to_many :users
end
Now I have a migration script to create the join table and populate a
few users with some
2004 Sep 03
1
DvdRemake doesn't start: X error
wine .wine/drive_c/Program\ Files/DvdReMake.exe
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 53 (X_CreatePixmap)
Serial number of failed request: 2704
Current serial number in output stream: 2761
any ideas or suggestions on the next step i can take to resolving this
problem? i'm using the latest wine 20040813. i've
2004 Aug 20
1
dvdshrink crashes after a while (errors included)
i start up dvdshrink like this:
wine /path/to/dvdshrink z:/path/to/VIDEO_TS.IFO
immediately wine outputs the following:
fixme:ole:CoRegisterMessageFilter stub
err:x11drv:X11DRV_CreateWindow invalid window height 0
err:x11drv:X11DRV_CreateWindow invalid window height 0
err:listview:LISTVIEW_WindowProc unknown msg 1044 wp=00000000 lp=21a4e0ec
fixme:quartz:Filtergraph_QueryInterface unknown
2006 Mar 28
1
Capistrano: env not setup properly over ssh
Hi,
If I make a Capistrano task like
task :test, :roles => :app do
run "env"
end
It prints something completely different than if I just do
ssh login@host env
I need all my login scripts to run so all my environment vars (including
PATH) are set. All my Capistrano tasks are failing because the paths
are setup properly.
Thanks for the help.
--
Posted via
2007 Aug 30
1
belongs_to with foreign keys that reference non primary key columns
Hello,
I have a situation where the foreign key into a table doesn''t
correspond to that table''s primary key:
my_table
-------------
id (pk)
name
...
other_table
--------------
id (pk)
my_table_name (fk references my_table(name))
...
I want to be able to say something like:
class OtherTable < ActiveRecord::Base
belongs_to :my_table, :foreign_key => { :my_table_name
2008 May 22
1
Why can't I define vars in caller's binding using eval?
In other words, why can''t I do this?
def f(b)
eval("x = 10", b)
end
f(binding)
puts "x = #{x}"
Is there any way to make that code work (besides obviously setting x
to something before calling f).
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2011 Oct 08
1
Rails view spec expectations/matchers
>From looking at the RSpec Rails documentation
(https://www.relishapp.com/rspec/rspec-rails/docs/view-specs/view-spec) it
seems like rendered is just a string and you can''t really do any
assert_select type stuff out of the box.
After Googling around, it seems that the RSpec authors decided that if you
want that functionality, you should just use Capybara or some such... is
that
2011 Aug 05
5
named context or calling include_context with block?
Hello,
I''m playing around with Rspec again after going from test/unit to
rspec then back to test/unit... :) Right off the bat, I find myself
wanting to do something like this: https://gist.github.com/1128091
Basically, I want to name a context, then call it later by name,
passing a block to it.
Or in other words... what is the best way to DRY this code?
2008 Mar 11
6
saving an ActiveRecord without trigging the callbacks
Hello,
How can I save an ActiveRecord without trigger before_save,
after_save, etc?
Thanks for the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group,