Displaying 5 results from an estimated 5 matches for "extract_opt".
Did you mean:
extract_elt
2008 Feb 27
0
Activesupport error on start - extract_options
...n run: ''ruby "\storage card\rails\script\server"'' (with any or no
options) and eventually get the following error:
rails/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accesors.rb:24:in
''cattr_writer'': undefined method ''extract_options!'' for
[:silencer]:Array (NoMethodError)
..
vender/rails/activesupport/lib/active_support/clean_logger.rb:18
..
vender/rails/activesupport/lib/active_support.rb
..
vender/rails/railties/lib/commands/server.rb
..
script/server
..
Can anyone point me in the right direction?
This is a ba...
2010 Aug 19
1
Composite primary keys and :joins=>
...ode_name)
end
end
class TableA < AR::Base
set_table_name ''table_a''
set primary_keys :type_key, :code_key # using the composite
primary keys gem 2.3.2
def self.find_by_pk_code_name(*args) # pk method invoked by
belongs_to in TableB
opts = args.extract_options!
pk_type_key = "FOOKEY"
pk_code_key = args.first
find([pk_type_key, pk_code_key], opts)
rescue ActiveRecord::RecordNotFound
end
end
Console:
x=TableB.first
x.code_name # works!
TableB.get_all # fails: "element size differs (1 should...
2008 Sep 24
3
caches_page :if not executing (but caches_action :if) does
Hi folks -
Seeing a weird problem and would love some help. It''s documented in
http://pastie.org/278310 to be more readable.
In short, I have a
caches_page "action", :if => {stuff}
but the :if is never being called - the action is just caching every
time. (If I put a debugger call in the :if block, it never stops.)
If I replace caches_page with caches_action, the if
2011 Jul 11
2
Can't get this Rspec test to pass
...s_scope_of_(.*)/
return current_scope_for($1) if name.to_s =~
/^current_scope_for_(.*)/
super
end
def current_scope_for(scope)
Thread.current[scope.to_sym]
end
def acts_as_scope_manager(scope, *args)
options = args[0].extract_options! if args
send :include, InstanceMethods
set_global_scope(scope,options[:with_global_scope]) if
options[:with_global_scope]
send :before_filter, "set_scope_for_#{scope}".to_sym if
self.ancestors.include? ActionController::Base
send :default_scope,...
2009 Sep 28
5
Multi-databases support
Hi,
While I was hacking ovirt-server, I have found that it's currently
restricted to Postgres DB. Even if I like postgres for serious work on a
server, I really prefer to hack/dev locally on a Sqlite or MySQL DB.
I have googled on rails in order to find a good answer for the "foreign
key problem" which forces OVirt to stay on pg. I have found a plugin on
this particular