search for: actionrecord

Displaying 17 results from an estimated 17 matches for "actionrecord".

2006 May 31
3
class does not inherit (?) ActionRecord::Base
Hi. I''m a newbie at this, so please bear with me. I have several classes which model several corresponding tables. All of them seem to work except one. I have not made many modifications from the scaffold templates. However, with one class, Log, all methods give me the following type of error NoMethodError in LogController#create undefined method `save'' for
2006 Mar 14
1
ActionRecord: Need for "identity"/"serial" columns?
I have a quick question about ActiveRecord and primary key value generation. Does it hurt to define my primary keys as "IDENTITY" (SQL server) or some equivalent database - managed id generation scheme (a la sequences in Oracle, etc.) since ActiveRecord is going to manage my id generation anyway. I''m thinking that for SQL server, even if you define your ids as
2007 Jan 20
0
actionrecord gem update produces Zlib::BufError
OS = MS-WinXPproSP2 with hotfixes up to date Dialogue: ---> C:\>gem update Updating installed gems... Bulk updating Gem source index for: http://gems.rubyforge.org Attempting remote update of actionmailer Install required dependency actionpack? [Yn] y Successfully installed actionmailer-1.3.1 Successfully installed actionpack-1.13.1 Installing ri documentation for actionmailer-1.3.1...
2006 May 04
9
Help: wrong number of arguments (0 for 1)
Is it my environment? Is something wrong, cause I thought this should just work? I have a simple table and I created a model and a controller: ruby script/generate controller Restaurant ruby script/generate model Restaurant I edited the controller to this: class RestaurantController < ApplicationController scaffold :Restaurant end I run it and: http://0.0.0.0:3000/Restaurant works fine,
2006 Jan 23
4
ActionRecord: how to update many records in one statement
Hello, I am trying to edit and update all records of table ?intersts? (id, name, description) on one page and has no good idea how to do it right, when updating one record per page it?s ok The question is: what statement instead Interest.update_all(params[:interest]) in controller need to use to successfully update the database table by data passing to controller in parameter ?interest??
2006 May 02
9
Updating only one field
...like this to set the user''s last login time: authenticated_user.update_attribute(:last_login, Time.now) However, this calls the following, updating all fields: UPDATE users SET `last_login` = ''2006-05-02 13:27:41'', `hashed_password` = .... Is there any way I can tell ActionRecord to only update the one field? I don''t really want the hashed_password (and other) fields sent back to the database if possible. If there is a reason rails does it like this that I''m missing, it would be good to hear what. Thanks. -- Posted via http://www.ruby-forum.com/.
2007 Jan 10
3
Rails 1.2.0 RC2 has 4125 duplicate lines
...of January 2007, Rails 1.2.0 RC2 has 4125 duplicate lines in 793 blocks in 231 files * actionmailer has 584 duplicate lines in 107 blocks in 20 files * actionpack has 718 duplicate lines in 154 blocks in 58 files * actionwebservice has 241 duplicate lines in 51 blocks in 21 files * actionrecord has 1529 duplicate lines in 301 blocks in 45 files * activesupport has 418 duplicate lines in 78 blocks in 44 files * railties has 635 duplicate lines in 102 blocks in 43 files Detailled reports on http://21croissants.blogspot.com/2007/01/rails-120-rc2-dupplicated-lines-simian.html Now th...
2006 Aug 13
1
establish_connection method
I''m digging into rails source code. But I''ve got a problem in undestading actionrecord::base source code which is connection_specification.rb. In the body of establish_connection method, def self.establish_connection(spec = nil) case spec when nil raise AdapterNotSpecified unless defined? RAILS_ENV establish_connection(RAILS_ENV) when C...
2005 Nov 16
1
Rails app exception "can't activate active support"
I have gotten several rails apps running under Apache. However today when I tried to run them I get exceptions like this in the http error_log: sh-2.05b$ tail /var/log/httpd/error_log /usr/lib/ruby/site_ruby/1.8/rubygems.rb:144:in `activate'': can''t activate active support (= 1.1.1), already activated activesupport-1.2.3] (Gem::Exception) from
2006 Mar 13
7
Problem with params
I''ve got a User model, which holds the following (excerpt): def try_to_authenticate User.authenticate(self.username, self.password) end .. private def self.hash_password(password) Digest::SHA1.hexdigest(password) end def self.authenticate(username, password) @user = User.find(:all, :conditions => ["username = ? AND password = ?",
2006 May 06
0
RE: Rails Digest, Vol 20, Issue 156
...> When your new error messages can be so inscrutable. > > > J?n Borg??rsson wrote: > > You can not have a column called open in your database. The problem is > > that RoR creates a class with the database with all the columns as > > method names. And the class inherits ActionRecord. And open is a > > method that is neccesary for ActionRecord and you basically are trying > > to overwrite that. So when ActionRecord tries to open a connection to > > database all the sudden it finds that the open method has been > > changed. > > > > I had the s...
2006 Feb 08
0
configuration.frameworks
I want to add the rails default logger to a set of classes in addition to the default ActionRecord, ActionController, and ActionMailer. This used to be done in environment.rb, but now it seems to be specified elsewhere. Where has it gone?
2007 Jan 10
0
Duplicate lines in Rails 1.2rc2 reports
...of January 2007, Rails 1.2.0 RC2 has 4125 duplicate lines in 793 blocks in 231 files * actionmailer has 584 duplicate lines in 107 blocks in 20 files * actionpack has 718 duplicate lines in 154 blocks in 58 files * actionwebservice has 241 duplicate lines in 51 blocks in 21 files * actionrecord has 1529 duplicate lines in 301 blocks in 45 files * activesupport has 418 duplicate lines in 78 blocks in 44 files * railties has 635 duplicate lines in 102 blocks in 43 files Detailled reports on http://21croissants.blogspot.com/2007/01/rails-120-rc2-dupplicated-lines-simian.html Now the...
2005 Nov 25
4
Set default order for find(:all) in a model
Hi everyone Is there a way that I can get the find(:all) method to return in a specified order, without including the :order argument every time? Guess I just don''t like typing... Cheers _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2006 Mar 22
0
Another Problem with params
...onController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} On 3/22/06, Liquid <has.sox@gmail.com> wrote: > > Hi, > > In your model you could explicitly state the relationship > > class Student < ActionRecord::Base > belongs_to :department, :class_name="department", :foriegn_key => ''department_id'' > end > > Then in the veiw use > <%= text_field "student", "department_id" %> > > or similar for a select box. > > I had si...
2005 Jun 16
3
PostgreSQL Scaffold Doesn't Insert PK?
I am new to Rails and Ruby. I''ve been a WebObjects developer for a few years and before that J2EE (shudder). I wanted to try RoR so I am porting an existing Web app. I am running the latest release on Tiger and PG8. Right now my single table has three attributes: id | integer | not null hotel_name | character varying(255) | not null hotel_location |
2007 Jan 23
11
dynamic tablenames
Hi List! May I tap into your combined common sense ? I have a legacy logging app that needs to be modernized. At the moment, Data is going to be stored in 5 tables, one table is going to contain more than 200 million and 2 others about 60 million rows. Mysql will be used, unless someone sees a major advantage in using something else (at the moment data is stored in a raw positioned file format,