similar to: cattr_accessor and Thread.current prblems

Displaying 20 results from an estimated 400 matches similar to: "cattr_accessor and Thread.current prblems"

2011 Sep 20
0
What's the difference between mattr_accessor and cattr_accessor in ActiveSupport?
Hi, I was reading source code of mattr_accessor and cattr_accessor in ActiveSupport and found out that the method definitions are all most identical. Except cattr_writer accepts a optional block. I googled and read http://stackoverflow.com/questions/2203800/difference-between-mattr-accessor-and-cattr-accessor-in-activesupport. That guy had the same question as me, but no one answered the question
2006 Sep 05
5
cattr_accessor
Hi, i''ve been playing with ror for a little over two months now, and was wondering wether someone could explain to me what was cattr_accessor and if it is still in use. . . i looked up in api.rubyonrails.com and coulnd''t find any documentation... is it a useful/worth learning method? what do u use it for? -- Posted via http://www.ruby-forum.com/.
2006 Mar 29
0
cattr_accessor missing for test of AR
Hello. I''m trying to test an active record adapter. When launching : ruby -I "connections\native_adaptername" anytest_test.rb I have an method missing error, complaining about cattr_accessor (missing from AR:Base). Any advice ? Tony PS : ruby 1.9, rails 1.10 install via gems -- Posted via http://www.ruby-forum.com/.
2011 Feb 02
6
how to set default_scope for the whole application?
I know I can set default_scope for individual active record model, but can I set one up for the whole application? thanks -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2010 Nov 19
1
Help: delegated association 'App' returning ActionDispatch::Integration::Session instead
class Foo < ActiveRecord::Base has_one :bar delegate :app, :to => :bar end class Bar < ActiveRecord::Base belongs_to :app def self.attribute_column_names return @@attr_columns if defined?(@@attr_columns) readers = content_columns.map { |n| n.name.intern } - [:created_at,:updated_at] @@attr_columns ||= readers.map { |k| [k, "#{k}=".to_sym] }.flatten end
2007 Mar 23
1
Prblems log rotating a file
Hi, I needed to logrotate a fil named qmail-queue.log from qmail-scanner. So i've edit /etc/syslog.conf and changed it to: *.info;qmail-queue.none;auth.none;mail.none;authpriv.none;cron.none /var/log/messages (...) # qmail-queue logs qmail-queue /var/spool/qscan/qmail-queue.log Also, i've edit /etc/logrotate.d/syslog and changed to /var/log/messages
2008 Dec 31
1
when to set a class attribute variable during boot
I have an ActiveRecord model with a cattr_accessor. The class attribute is set up like this: class MyModel < ActiveRecord::Base cattr_accessor :my_attribute end Because I need to give #my_attribute environment-specific values, I try to set this attribute in environments/development.rb like so: MyModel.my_attribute = 3 But this leads to odd and erratic behavior when #my_attribute is called
2008 Sep 30
1
prblems changing directory in mpi snow clusters
Dear R Users, I am attempting to use snow with rmpi. My configuration is: - R Version 2.7.2, rmpi - RMPI 0.5-6 - DeinoMPI 1.1.0 - Windows Xp SP2 I can sucessfully create a cluster and execute simple commands but for some reason, I cannot change the working directory in my nodes. > noclusters<-2 > cl <- makeCluster(noclusters, type = "MPI") 2 slaves are spawned
2012 Nov 06
0
How to get which check boxes has beed unchecked and remove Subscription for them?
I have following subscription creating system, right now when I`m selection available subscription groups(Marketing, Sales) action Save Subscription create this two subscriptions: @subscriptions = current_user.subscriptions > @apps = App.all > if request.post? > if params[:subscription] and params[:subscription][:app_id] > params[:subscription][:app_id].each do |app_id| >
2018 Nov 17
2
Forum
Hi Bruce Thank you very much for reaching out. This is likely to be a short discussion due to me potentially learning that my infrastructure possibly has shortfalls that I did not appreciate until just recently. What I was hoping to do is deploy Windows from a Thecus branded NAS. Natively the NAS does not support PXE, but with community created mods it is achievable. So with this mod
2013 Jun 15
1
A puzzle about default_scope
Hi, guys I have a puzzle about default_scope. Suppose I have two model: class User < ActiveRecord::Base has_many :blogs default_scope where(deleted_at: nil) end class Blog < ActiveRecord::Base belongs_to :user end I want to produce sqlselect blogs.* from blogs inner join users on users.id = blogs.user_id and users.deleted_at is null And the code Blog.joins(:user), which I think
2006 Jan 05
0
cattr_accessor
Is this specific to rails? What''s it used for and when is it approriate to us it? Is there also a mattr_accessor? -- Posted via http://www.ruby-forum.com/.
2009 Jul 11
2
offeride :limit named_scope default_scope
Hi, Rails 2.3.2 class TestD < ActiveRecord::Base default_scope :limit => 12 named_scope :limit, lambda { |num| { :limit => num} } end ruby script/console >> TestD.all TestD Load (0.7ms) SELECT * FROM "test_ds" LIMIT 12 => [] >> TestD.limit(14) TestD Load (0.3ms) SELECT * FROM "test_ds" LIMIT 12 => [] Any ideas why the default limit
2006 Feb 02
4
rails-1.0.0 gem rdoc problem
Just got a brand new install of ruby-1.8.4 and new gems downloaded, specifically rails-1.0.0. Seems rails does not generated rdoc for gem_server. Looking into the problem, it seems that there is an error when doing ''rake rdoc'' for rails-1.0.0. % rake rdoc (in /opt/local/ruby-1.8.4/lib/ruby/gems/1.8/gems/rails-1.0.0) rm -r doc unrecognized option `--line-numbers --inline-source
2009 Jul 23
11
Problem with named_scope
Here are my scopes: default_scope :order => ''posted_on DESC'', :conditions => { :status => ''visible'' } named_scope :positive, :conditions => { :rating => ''positive'', :status => ''visible'' } named_scope :neutral, :conditions => { :rating => ''neutral'', :status =>
2006 Feb 20
2
file_column: changing default store_dir
File_column plugin is great. I need to change the default :store_dir from the dynamic "model_name/attribute_name" to an equally dynamic "client_id/app_id/model_name/attribute_name". In my model I have: class Component < ActiveRecord::Base belongs_to :component_type belongs_to :component_group breakpoint file_column :content, :magick => { :versions
2018 Nov 17
1
Forum
Thank you for the prompt reply. What you said is promising so if I may, with your help can we decipher what SYSLinux files goes where from the ground up? If this is too broad a question or may take up too much of your time then I understand and appreciate your help thus far. Richard -----Original Message----- From: Bruce Ferrell [mailto:bferrell at baywinds.org] Sent: Saturday, 17 November 2018
2007 Dec 10
0
password authentication stops but can be restarted
I have several Sun Solaris systems that share directories via SAMBA. After some period (I think 30 days, which the password expiration period) the authentication stops with the following messages (all names changed to protect the guilty): li_rpc_pipe_open_schannel: failed to get schannel session key from server W3K_SERVER for domain DOMAINX. connect_to_domain_password_server: unable to open the
2005 Oct 03
3
Boolean quoting, postgresql
http://dev.rubyonrails.org/ticket/1117 I''ve attached a patch to ticket 1117 which fixes it so that booleans are escaped as booleans, not integers. Specifically, this situation will now work find_all(["send_date=? and sent=?", Date.today, false]) Which matches peoples expectations, but it causes some problems with the postgresql unit tests. Specifically, the use of
2009 Dec 28
2
Override .find, .find_by_id, etc...
I read these: http://www.ruby-forum.com/topic/185297#new http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/ it works, it override the .find perfectly, however it does not cover .find_by_id or other .find_by_XXX Is there anyway to override all the find function of a modal? I want to set the default "select" for User modal, only return name and id, but not the