similar to: Problems with simple scaffold code

Displaying 20 results from an estimated 800 matches similar to: "Problems with simple scaffold code"

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
2008 Jun 16
5
Re: ssh between DomUs in Xen3.2
Hi Waldirio: I tried telnet earlier from one DomU to another [root@localhost ~]# telnet 192.168.17.201 22 Trying 192.168.17.201... Connected to 192.168.17.201 (192.168.17.201). Escape character is ''^]''. and then it just hangs... So it looks like I can connect to the port from DomU to DomU. But from Dom0 to a DomU [root@gxn-wn2 ~]# telnet 192.168.17.201 22 Trying
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 22
0
Lighttpd aliased does not render css or images - please help!
Hello all, I''m very badly in need of help here. I''m sooo close to this solution, and I WILL be blogging this when I finally have it working. I''m using Lighttpd + Mongrel + aliased app. I have the basic alias working. http://localhost/myapp/ renders the routed :controller/:action as does http//localhost/myapp/controller/action for production pages. The page source
2006 Jan 12
4
has_one relationship problem
I was wondering if anyone could see the error in this littte application I have two models, User and Selection Selection is an extension of the User model so in the User model I have a has_one :selection and in Selection I have a belongs_to :user in my views, i cannot get @user.selection to work but @user works fine. http://www.rafb.net/paste/results/GSBt1e61.html Thanks, r.b
2006 Jan 18
4
Ruby "htmlentities" replacement: code review please!
Hi Railers, For some time now I''ve been looking for a decent Rails equivalent of PHP''s "htmlentities" command, because ERB''s html_escape (or more commonly called as just "h", eg. <%=h @somevariable %> ) just doesn''t go far enough for me. Back in PHP land, I actually had an extended version of the htmlentities command to deal with
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 Feb 25
4
[Bug 20309] New: Nouveau problem with setting screen resolution on a monitor connected to VGA output on Geforce 7050
http://bugs.freedesktop.org/show_bug.cgi?id=20309 Summary: Nouveau problem with setting screen resolution on a monitor connected to VGA output on Geforce 7050 Product: xorg Version: 7.4 Platform: Other URL: http://rafb.net/p/prrKfp36.html OS/Version: All Status: NEW Severity: normal
2011 May 06
1
scaffold didn't work
i am using rails -v 3.0.7.when i tried "rails generate scaffold try name:string number:decimal" , it gave following error message invoke active_record /usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 7, col 2: ` pool: 5'' (ArgumentError) from /usr/lib/ruby/1.8/yaml.rb:133:in `load'' from
2009 Feb 28
2
rgl persp3d bounding box color problem.
Hi guys, I hit on a problem when I use rgl. Could you try to run the code here in this link and see why the first persp3d gives a red bounding box and the second shows black? http://rafb.net/p/g1i7ur33.html (sorry for not pasting the code here directly but my previous email got filtered by this list so I suspect my code looks like spam to the spam filter) I'm expecting black color to be
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
2006 Feb 05
0
[GLOBALIZE] Trouble getting example on wiki working
Hi, I decided to integrate globalize into my app yesterday but I''ve run into trouble. I originally decided to try a db translation on one of my models so I followed the wiki example and modified where appropriate. When I tried to create an empty Album via the console I get the following error: http://www.rafb.net/paste/results/opZ13I27.html I tried to investigate and from what I
2006 Jan 12
2
file_column issue: file upload fails without error
environment: Locomotive + Rails 1.0 Max Lighttpd 1.4.8, FastCGI 2.4.0 Ruby 1.8.2 File_column version: 0.3.1 Path to file_column: /vendor/plugins/file-column/ symptom: Uploading a file using file_column fails; no file is uploaded and the "filename" column remains blank. No error messages are produced - a new record is created with blank filename. code and log here:
2005 Dec 17
1
lost in an ActiveRecord::StatementInvalid
I have an error I don''t know how to debug. I am adding the login suport in Depot (the example in the RoR book) and LoginController#add_user throws ActiveRecord::StatementInvalid in an innocent /login/add_user GET request. The trace goes down to a call to SQLiteAdapter#table_structure, and the source code suggests what''s happening is that "PRAGMA
2009 May 06
1
Exim And Dovecot SASL
Hi all, I have been trying to get this to work a couple of ways, please take a look at the links below.http://wiki.dovecot.org/HowTo/EximAndDovecotSASLhttp://rafb.net/p/ipHKjv10.htmlIt rejects every time but if I uncomment;auth_executable = /usr/lib/dovecot/dovecot-auth then thunderbird will ask me for a password but does not agree with me on it.I have dovecot set up to use the unix usernames and
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
2009 Mar 17
3
Disabel "pluralize_table_names" in Rails 2.3.2
What is it in Rails 2.3.2? ActiveRecord::Base.pluralize_table_names = false -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe
2006 Jan 23
5
Undefined method error
Hi everybody, Small problem. I get this error: undefined method `all_categories'' for BlogCategory:Class Code of BlogCategory class is: class BlogCategory < ActiveRecord::Base has_and_belongs_to_many :blog_posts validates_presence_of :name validates_uniqueness_of :name # Return all categories ordered by name def all_categories find :all, :order =>
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 Jun 21
2
Using RJS to highlight one LI if using insert_html on an UL?
It seems common to use RJS for quickly adding and highlighting a list that is having content added to it like this: http://rafb.net/paste/results/Z3m32g48.html ... where "my_list" would be an UL and the partial would insert a LI. Given that example, is there an easy way to highlight only the newly inserted LI instead of the whole UL? The only way I can see to do it is to give