similar to: Disabel "pluralize_table_names" in Rails 2.3.2

Displaying 20 results from an estimated 20000 matches similar to: "Disabel "pluralize_table_names" in Rails 2.3.2"

2006 Mar 03
0
AR::Base.pluralize_table_names doesnt work with scaffold generator, right?
Hi! The script/generator scaffold for models doesnt respect (source in) this config/environment.rb setup, right? Because I can put in there ActiveRecord::Base.pluralize_table_names = false but when I run a command like ruby script/generate scaffold model Something then it throws an error saying that my database scheme doesnt have a Something. However there is a table called something. If I
2009 Jun 17
12
FasterCVS and Rails
Hello all, I''m trying to import some csv data (that has latin characters) using faster csv but I keep getting a MalformedCSVError: "Unclosed quoted field on line 1." "/ruby/lib/ruby/gems/1.8/gems/fastercsv-1.2.3/lib/faster_csv.rb:1592:in `shift''" I''ve tested the same code outside of the Rails application an it works fine. Can anyone help me? Here is
2009 Jun 05
6
rails 2.3.2
Hi all, I am using rails v.2.3.2 and if I put following line to my ApplicationController: include LoginSystem and I moved my login_system.rb to lib folder: module LoginSystem protected def is_logged_in? @logged_in_user = User.find(session[:user]) if session[:user] end def logged_in_user return @logged_in_user if is_logged_in? end def logged_in_user=(user) if
2009 May 13
8
Sharing sessions across rails apps 2.3.2
I''ve done this in 2.2, but cannot figure it out for 2.3.2: Basically, I want to be able to share session data across a couple of apps. The way I did this in 2.2 was to create a view called sessions in the second app that read the sessions table of the first app. This done, I could tell them both to use active record sessions, and, lo! I had a shared session. Once I''d written a
2009 Apr 13
5
Ruby 1.8.7 + Rails 2.3.2 + TLS = Where's the documentation?
After spending a few hours reading dozens of blogs and tutorials I am still stumped. Numerous sites mention ruby 1.8.7 and rails 2.3 supporting TLS out of the box. However, I can not find any documentation on setting this up to send emails correctly. Furthermore, after attempting to send emails using Gmail and TLS i get the following error: 530 5.7.0 Must issue a STARTTLS command first.
2009 May 18
2
Move rails app from 2.0.2 to 2.3.2
How do I make my application work in 2.3.2 when it was created in 2.0.2? Thanks Mitch -- Posted via http://www.ruby-forum.com/.
2006 Aug 01
1
Legacy Pluralized Table Names
I am connecting to a legacy DB that has some names plural and some not. I have configured: ActiveRecord::Base.pluralize_table_names = false now when i make a table that has an s on the end, it truncates the s. example: Table name: foo_bars Rails command: ruby script/generate FooBars Response (localhost:3000/FooBars): uninitialized constant FooBar It works fine with non-pluralized
2009 Jul 18
4
rails 2.3.2.not working working with cgi - How to revert
Hi All, As the problem faced by many other folks that rails 2.3.2 is not working with cgi, Now I want to revert to rails 2.2.2 on my shared host (bluehost ) can anybody guide me how to revert to 2.2.2. I tried the following: 1. I installed the older rails gem "gem install rails --version 2.2.2 --include-dependencies " 2. I tried to set the PATH env to my rails 2.2.2 version and also
2008 Mar 07
6
creating a model registry
Hi all, This is a problem I''ve approached so many times and always worked around, that now I want to solve it once and for all. Say I have something like this: --- class X < ActiveRecord::Base acts_as_wacky end module Wackinator class ControlAllWackos @@wackos = [] def self.kill_wackos @@wackos.each(&:kill) end end def acts_as_wacky
2009 Jun 17
2
validates_uniqueness_of fails on STI in Rails 2.3.2
I''ve got something like this: class Position < ActiveRecord::Base end class CartItem < Position validates_uniqueness_of :product_id end When I try to save CartItem I get this error: ArgumentError: wrong number of arguments (1 for 2) from /home/joaz/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:758:in `exists?'' from
2009 May 12
2
rails 2.3.2 is not generating environment.rb properly
problem: rails 2.3.2 is not generating config.action_controller.session_store = :active_record_store in environment.rb this is the code in environment.rb --------------------------------------------------------------------------- # Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION =
2008 Oct 15
9
Rails sessions working intermittently in IE7
Hello, We are developing in Rails 2.1.0 and serving the files with mongrels behind Apache. We are using SqlSessionStore. Recently I noticed that when logging into our site using IE7 the session doesn''t persist in some situations, and persists when it shouldn''t. For instance when I log in my info is maintained when visiting certain pages, but disappears on others. The info never
2009 May 10
3
Ruby 1.9 problem
What wrong: # rails test /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/core_ext/uri.rb:8:in `<top (required)>'': uninitialized constant URI::Parser (NameError) from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/core_ext.rb:3:in `require'' from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/core_ext.rb:3:in `block in
2009 Apr 26
4
Weird auto-complete production problem in Rails 2.3.2
Hello. ruby 1.8.6 (patchlevel 111) rails 2.3.2 Windows XP Professional I am getting quite a weird problem. I have several auto-complete fields in a page. When I run the code in development mode everything works but when the application runs in production mode one and only one of the fields does not auto-complete anymore. The database being used is the same in both cases (I''m just
2009 Jul 04
12
save! not allowed after validates_uniqueness
I have this in a model validates_uniqueness_of :aspect, :scope => :user_id In an instance method of the same model I have "save!" but I don''t touch the :aspect attribute in that instance method at all. Whenever that save! command is run however I get this error: ActiveRecord::RecordInvalid: Validation failed: Aspect has already been taken I don''t
2007 Sep 05
8
Hi..Guys new plugin again
Hi.. Guys new plugin again Foreign Key Associations is a plugin that automatically creates associations based on foreign-keys. The associations are created at runtime-ie. as your ActiveRecord models are loaded-so they will always be up-to-date. For example, given a foreign-key from a customer_id column in an orders table to an id column in a customers table, the plugin creates:
2009 Nov 01
9
Dynamic Database Connections
Hey everyone! I have a problem that''s been making me a little nuts. I would like to use RoR for a upcoming project, but if I can''t get past this hiccup I''m afraid I''ll have to use PHP or Java. Ugh. The application needs to have a database-per-customer model. So when I do a Product.find(:all) I need to make sure i''m connecting to say acme.products
2009 May 03
13
Ruby or Rails bug?
In irb all works fine: # irb irb(main):001:0> require ''rubygems'' => true irb(main):002:0> require ''raspell'' => true irb(main):003:0> speller = Aspell.new("ru_RU") => #<Aspell:0x7f8692c9d158> irb(main):004:0> speller.suggestion_mode = Aspell::NORMAL => "normal" irb(main):005:0>
2007 Apr 04
4
joining across databases in a find statement with include (legacy db)
Hi, I have a legacy database ''old'' and a new database ''new'' which rails uses. I set up models using old with establish_connection(old), and this works well, except for include: class OldModel < ActiveRecord::Base establish_connection(old) end class NewModel < ActiveRecord::Base has_one :old_model end a = OldModel.find :first NewModel.find(:all,
2006 Jun 03
1
legacy support: removing underscore from table name.
I am using ms sql server and want to configure RoR such that it does not convert the given table name (example: rubyonrails) to ruby_on_rails. I set @@pluralize_table_names = false, so that it does not pluralize the table names but cannot find the config setting which will force it not to put underscore between words in a table name. thanks in advance, -- avinash -- Posted via