similar to: Undefined method error

Displaying 20 results from an estimated 200 matches similar to: "Undefined method error"

2007 Mar 06
9
bug or "feature"?
hi, i''m trying ferret, i''ve a model which has some records and two of them have a title with the word ''again'' (one or more time), so i''ve tried to do a search for ''again'', but i didn''t found anything...i''ve edited the title with ''test again'', searched for ''test'', and i''ve
2008 Feb 14
0
how to write a bloc in helper to check/uncheck box ?
Hi all I have a check box in form, and I would like to enable/disable it according to the value of the check box.. <% form_for(:query, @query,.... <%= f.check_box(:all_categories, :disabled => true, :onchange =>''javascript:all_categories();'') -%><%=l :All_categories %> I would like to have something like :disabled => { @query.all_categories.to_i
2006 Mar 05
6
Which postgresql adapter to use for rails core? How about production?
I wanted to fix some things up in the trunk, so I set up the databases and ran the unit tests. A bunch fail for postgres, and even more error out. I know of two postgresql adapters: postgres-pr and ruby-postgres. Strangely, they each fail different tests. So if I want to fix things up, which one should I be using? For that matter, which adapter should I be using for production? Finding out
2007 Feb 28
12
Specifying that code is called in a block
Not sure if this is possible currently. I have a section of code like this: ActiveRecord::Base.transaction do cow.save! duck.save! dog.save! end (Names changed to protect the innocent.) I''d like to specify that the saves run in a transaction. I can do ActiveRecord::Base.should_receive(:transaction).and_yield But is there any way to specify that the code is
2005 Feb 27
1
dialout with PPP on ISDN to an ISP
Hello my name is Ilija Poznic and I have a problem. My configuration is 1. Digium TDM4000P with one FXS. 2. AVM Fritz ISDN adapter (configured with capi). When I connect to my ISP and then start *. Asterisks is registering me to SIP provider iconnect. After that I can call international call trough VoIP. My problem is that I want to dialout to ISP only when I have a international call.
2006 Nov 04
13
Caching application data
Hi, say my application has a small 20 row information table in the database that stores names of airlines: "continental", "delta", united" , etc... These names will be used in various pages of the application for all the website users for different actions. They do not expect to change often. what I do now is - when a user logs in - these airline names are queried
2005 Dec 19
2
update_attrbutes without saving?
Hello all, Is there a method for updating all the attributes from a hash without saving to the database? (the counterpart of update_attributes but without saving). What I want to do is: person = Person.find(params[:id]) person.update_without_saving(params[:person]) #update the in-memory object. # Process person object ....... person.save I know that when you are creating a new object, you can
2006 Mar 06
6
Executing SQL in rails, and the types of the data returned
Hi, Every once in while I have to run SQL by hand, in my models mostly. But I''m wondering if there is a better way of doing it than I do. And, I have a question concerning types of the fields in the result the query produces. First, about the types. In a certain model, to get and return the value of a boolean function, I have to do: result =
2006 Mar 07
4
Get rid of the "public"
Hello to all! First I want to appologize if this topic has been already discussed but the search does not work :) I have RoR installed on a shared server. I also have a RoR application installed in a subdomain. The structure is as follows: www //this is my home WWW folder +--- www //maps to www.mydomain.com | +--- webapp //maps to webapp.mydomain.com. Here is my RoR application |
2006 Mar 28
8
Rails 1.1: not-null constraint violations
Since upgrading to Rails 1.1, I now get these errors: PGError: ERROR: null value in column "added" violates not-null constraint : INSERT INTO authors ("added", ...) VALUES(NULL, ...) The ''added'' column has a default of current_timestamp, and this used to work fine with Rails 1.0. Are we supposed to put default values in models'' before_create or
2006 May 18
5
Overriding default DELETE behavior with logical deletes
Hello! I am trying to figure out how to implement *logical deletes* instead of physical deletes using ActiveRecord. Basically, in many applications that deal with E-Commerce, you really can''t physically delete almost anything, because records must be kept for auditing and customer service tracking purposes. In the past, I''ve implemented logical deletes as follows: 1.
2006 Jan 29
2
field sets and unicode
Hello gentlemen, I''ve forced to such unicode problem: I have: <%= text_field_tag ''search'', nil, :id => ''search'', :size => 10 %> <%= observe_field ''search'', :url => {:controller =>
2006 Jan 26
3
Problems with simple scaffold code
Hi all, I had scaffold generate some code on a brand new app the trace is here: http://rafb.net/paste/results/H87GHC68.html Could you point me to what problem needs to be fixed please as i''ve been banging my head against this for some time now? The table is very simple and its called "user" with id, email, password fields. I''ve set pluralize_table_names to false
2008 Aug 01
2
REST error
Hi i given in routes.rb as map.resources :students, :member => [:departments => :get] and rhtml i given link <td><%=link_to "Departments", departments_student_url(student) %></td> in students controller def departments @student= Student.find params[:id] # @departments = @student.departments end when i click the departments link it showing error like
2006 Mar 09
3
Building a model from a database view
Hi, I''m trying to use rails to build a model from a database view. I get this output C:\dev\v6\project>ruby script/generate scaffold Assignment ... error Before updating scaffolding from new DB schema, try creating a tab le for your model (Assignment) Is this not possible in Rails? It would be *really* helpful for my application. -------------- next part -------------- An
2005 Dec 22
3
foreign_key setting ignored
I''m having a spot of bother creating a ''has_many'' relationship between two legacy database tables. The relationship is ''company'' table has many linked records in the ''contact'' table. Iv''e used ''generate scaffold'' on these tables and everything is fine. I then decided to define the relationship in the
2006 Mar 17
3
Timestamps casted to nil?
Hi, for some reason, all timestamp fields with or without time zone in my Postgres tables seem to be casted to nil. From console: >> me = User.find(''PS12345'') => #<User:0x2379788 @attributes={"mtime"=>"01.03.2006 13:26:32.737166", "valid"=>"8", "valid_from"=>"01.03.1999 14:09:21 CET",
2013 Jul 03
3
[ANNOUNCE] libdrm 2.4.46
On Wed, Jul 3, 2013 at 9:55 AM, Laurent Pinchart <laurent.pinchart at ideasonboard.com> wrote: > Hi Dave, > > On Tuesday 02 July 2013 18:22:01 Dave Airlie wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Release because I want the cursor ioctls released, >> also haswell and radeon ids. > > Any chance to get the "[PATCH v6
2006 Feb 19
2
possible rails -> postgresql bug
Hi I have a problem accessing an array field in a Postgresql database. Here is the table definition. View "neil.flashing_codes" Column | Type | Modifiers -------------+-----------------------+----------- code | character varying(10) | description | text | folds | integer[] | View definition: SELECT
2006 Jan 24
9
ActionMailer: Mail isn''t delivered
Hi all I used the search for this, but I got an Application Error, so sorry for the newbie question. I have tried to send an e-mail using ActionMailer. I have to following config (environment.rb): ActionMailer::Base.server_settings = { :address => "mail.psyguide.org", :port => 25, :domain => "mail.psyguide.org", #:authentication => :login, #:user_name