similar to: cattr_accessor missing for test of AR

Displaying 20 results from an estimated 10000 matches similar to: "cattr_accessor missing for test of AR"

2013 Apr 08
1
cattr_accessor and Thread.current prblems
Hello, I am trying to convert three applications to multitenant, all of them have same structure difference is only in little functions and template designs. All of them using cattr_accessor for setting currencies and other data, and it works perfectly Now i added app_id as cattr_accessor to App model to use it in default_scope to implement multi-tenancy class App < ActiveRecord::Base
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 Jun 14
6
find and LIKE ''xxx%'' clause
Hi there ! I try to figure out how to do something like this in Rails : SELECT * FROM my_table WHERE name LIKE ''GOGONAM%'' My problem is the % and the quotes. >From now, I do like this : searched_name = params[:name]+''%'' user = MyTable.find(:all, :conditions => ["name LIKE ?", searched_name]) But is there a more gracefull way to do a LIKE
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 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/.
2007 Oct 04
1
Problem with .libPaths & Rterm.exe (under Vista)
Dear list, I?m using R embedded in another program (coded in tcl/tk) under Windows Vista. In this context I don?t launch Rgui.exe but rather Rtem.exe. Now I have a problem finding libraries not specifically installed as administrator (and which are not in the path ?program files? but in Contacts\Documents of the current user). To be precise, the user launching my tcl/tk program can?t find
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
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
2007 May 15
2
sobre tutorial
Estimado, te agradeceria me envies el tutorial en espaniol para R. Estoy dando mis primeros pasos con esta aplicacion. Desde ya muchas gracias Danilo Ceschin Ph.D IGBMC 1 rue Laurent Fries 67404 ILLKIRCH CEDEX - FRANCE tel 33 3 88 65 3457 email danilo at titus.u-strasbg.fr
2007 Jan 31
1
problem with compilation of R on Solaris 10 in x86
Dear List, we're trying to install R on Solaris10 on a x86 (amd64). During the installation we pass successfully the ./configure but we get an error through the built-in function "_isnan" which we see existing in /lib When passing the command "make" we get : gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I. -I../../src/include
2007 Nov 28
2
alternatives to traditional least squares method in linear regression ?
Dear list, I have encountered a special case for searching a linear regression where I'm not satisfied with the results obtained using the traditional least squares method (sometimes called OLS) for estimating/optimizing the residues to the regression line (see code below). Basically, a group of my x-y data are a bit off the diagonal line (in my case the diagonal represents the ideal or
2006 Jun 23
0
help... can''t run ActiveRecord unit tests to test bug fix
I found a bug in ActiveRecord. Being a good netizen, I thought I would write a test to illustrate the bug, fix it, and then submit a patch to the maintainers. However, I can''t run the AR tests. I followed the instructions in RUNNING_UNIT_TESTS but it generates an error immediately /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/test cremes$ ruby -I
2007 Mar 06
2
Package RODBC
I have some questions about the RODBC package. library(RODBC) # required for those who want to repeat these lines 1st, I noticed that the following sequence does not work: channel <- odbcConnextExcel("test.xls") tables <- sqlTables(channel) name1 <- tables[1, "TABLE_NAME"] # this should be the name plan1 <- sqlFetch(channel, name1) # bang!
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
2007 Jan 03
0
RODBC : first line of data from query omitted
Dear List, when reading MS Excel files in R using package RODBC I encountered the problem of having the first line of data getting omitted. I read the data as : > library(RODBC) > channel1 <- odbcConnectExcel("myFile.xls") > sheet1 <- sqlQuery(channel1, "SELECT * FROM [Cell measures (1)$]") # I use sqlQuery() instead of sqlFetch() since the sheet I
2007 Jan 03
2
accessing arrays
hi all. how can i adress a array directly. for example i wanna give array 1 other labels than array 2. How can I overcome this problem? ...this doesn't work tab <- array(1:8, c(2, 2, 2)) dimnames(tab[,,1]) <- list(c("No","Yes"), c("No","Yes"),c("ARRAY1")) dimnames(tab[,,2]) <- list(c("big","small"),
2007 Mar 05
1
ODBC Adapter woes
Hi All, I am running into a little issue the ODBC adapter: rails: 1.2 ruby: 1.8.4 ODBC ruby binding: .0997 Rails ODBC adapter: 1.4 I have added the ruby bindings to the /ruby/1.8/i386-msvcrt and used gem to install the ODBC adapter I updated the enviroment.rb when I run ruby -e ''require "odbc"'' it appears to correct (no error response) 1. Is my understanding
2007 Feb 08
2
path for source()
hello, i have a couple of .R files distributed about my file system. i commonly source() these from other files, but i have to include the full file path. this is not always convenient if you move files around. is there a way of setting the search path for source()? thanks a lot! cheers, andrew. -- Andrew B. Collier Space Physics Group Hermanus Magnetic Observatory Honorary Research Fellow
2006 Apr 11
2
AR class names
hello all, quick question: how can I find out if a given string matches the name of an ActiveRecord derived class? thanks in advance alan
2006 Jun 07
1
Using DRb within Rails
I want to use DRb within my Rails app. Right now I''ve got a very basic class: class PaymentGateway cattr_accessor :ssl_config, :host, :port def self.gateway @@gateway ||= new end def process(amount, card, type = :auth) @biller.process(amount, card, type) end def set_card(user_id, number) @biller.set_card(user_id, number) end protected def initialize