similar to: find(params[:id]) question

Displaying 20 results from an estimated 4000 matches similar to: "find(params[:id]) question"

2006 Mar 28
4
1.1 won''t install!
I get this result in Terminal (10.4.latest) pb12-olivier:~ ambush$ gem install rails --include-dependencies Attempting local installation of ''rails'' Local gem file not found: rails*.gem Attempting remote installation of ''rails'' ERROR: While executing gem ... (Errno::EACCES) Permission denied - /usr/local/lib/ruby/gems/1.8/cache/activesupport-1.3.0.gem
2006 Mar 24
3
generating a controller that inherits from a base controller
how can I generate a new controller that inherites from another bas controller? using: ruby/script generate myNewController command? -- Posted via http://www.ruby-forum.com/.
2006 Feb 24
6
Changes to Class File Not Being Recognized by Webrick
Newbie, having good luck with Dave Thomas'' book ''Depot'' application until I discovered that changes to one of my .rb class files are not being recognized until I bounce the webrick server. Any ideas on this? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Mar 14
5
GROUP BY and SUM
I have orders, order_items, and products. I want to collate several orders so that I can get a SUM of quantities ordered for each product etc. Can I say something like (the below gives an error on :sum, and ignores :group) OrderItem.find(:all, :sum => ''quantity'', :group => ''product_id'', :include => [:order, :product]) I want to get back a
2006 Feb 11
16
Why does''nt rails pick up more metadata from a mysql schema?
Hi, when I define a db column to be non-nullable or of length 20 or as numeric, I would expect rails to validate that, but that doesn''t seem to be the case. Any idea why that is? The metadata is accessible, at least in the mysql case. I am using rails 1.0 with mysql 5. Cheers, Mariano
2006 Feb 07
3
Creating a new object with a passed in parent?
I have a simple object, Article, which has_one :parent of the same time. On my Show page for a given article there will be a "new child" button which will pass the current :id (or the current Article itself) to the new form. What is the proper way to hide a reference to this parent in the form so that when it is submitted back, the create method knows what to do with it?
2006 Feb 21
29
script/console
The agile book says "You can inspect variables, set values, add other breakpoints, and generally have a good time". This is very sweet and totally useless. For example, I want to see the session variable, the cookies variable and so on. These names are unknown. I think I guess that the things that are available depend on where you put the breakpoint() call. I''ve tried a
2006 Jun 24
4
blog generator?
Hi Guys, I''ve been out of the rails loop for a couple of months. Now Im about to deploy another new app. But I need to add a simple weblog to the application... has anyone done a weblog generator or do yoyu know of any weblogs thats easy to integrate in a current app?? thanks in advance! Mikkel Bruun www.strongside.dk - Football Portal(DK) ting.minline.dk - Buy Old
2006 Feb 20
2
How can i render an external url?
Hi everybody, Well, how can I render an external url? In java, I do something like this: <html> <head> <title>External URL</title> </head> <body> <jsp:include page="www.rubyonrails.org" /> </body> </html> Noel R. Morais RFC - Ready for Calls +55 (11) 3471-4005 www.rfcnet.com.br -------------- next part
2006 Feb 23
3
Correct to use Apache with Rails?
Hi, I have looking for the best way to integrate Apache 1.3.x and RoR. BTW, I have gone through several different articles and I''m not clear as to which method is the correct method for a production level environment. Thus, if someone could shed some light on this topic, it would be most appreciated. Thanks in advance, -Conrad -------------- next part -------------- An HTML attachment
2006 Feb 24
2
Rails apps in subfolders
Assuming I have a Rails application running in the root folder of my domain. Now I want to put a clients'' app in a subfolder on that domain for review (or at least it *should* look like a subfolder). Can this be accomplished via .htaccess? It should not interfere with the Rails routing in the root folder. If .htaccess is the way, please help me out here, I suck at mod_rewrite... --
2006 Feb 24
2
Unable to automatically link controller and model?
This is the first time I''ve seen this. I''m running Rails 1.0 on lighttpd (Mac OS/X) and all my other Rails apps are working just fine. I did: script/generate controller Menu script/generate model Menu added a little code (like scaffold :menu) and got: undefined method `find'' for Menu:Dependencies::LoadingModule Adding model :menu solves the problem. Anyone know
2006 Feb 16
5
Firefox and IE performance with Rails App
In my rails application, certain computers were having huge problems. There were certain pages that were exceptionally slow, even to the point of timing out. Other computers did not have a problem. I finally found that Firefox was the difference. When using Firefox on those computers it works fine. The slow pages were typically posting a form with a couple hundred fields. This behavior was
2006 Mar 19
3
Table belongs_to either of two other tables?
Suppose I have a site about books and authors, and users can leave comments on either a book or an author. I''d want to have a table called "comments", which could belong to either an author OR a book. In my structure I wouldn''t be sure whether to include an "author_id" or a "book_id", or both. What would be the best way to handle this
2006 Feb 23
12
RoR site structure on Apache
I try a ''hello world'' demo here,you can see all my codes and structure http://www.smtservers.com/demo/ I want to access the ruby app like this http://www.smtservers.com/demo/say/hello but I get a 404 error. Please let me know why. I am not sure the site structure is ok or not.Please give me a help Thanks Mark -- Posted via http://www.ruby-forum.com/.
2006 Mar 31
6
Calculating Dates
Hello, I am a complete newbie with Ruby and Rails. I am working on learning it by writing a project I was going to write in PHP using Rails. I am having a difficult time finding clear information on how I would do this. I need to take a date out of a table in my database and given another day calculate the next 28 day anniversery of the original date. This is used to calculate a delivery
2006 Mar 17
2
Test if remote file is actually RSS/XML
Hi all, I want my users to be able to view RSS feeds of their choice on my site. But i''d like to be able to check the files they are submitting as feeds are actually XML before attempting to parse and display them. I''ve been using feed tools to display the contents of feeds which works perfectly, but i''d like some way to check if a file is a feed/xml. Any pointers in
2006 Mar 01
2
Method Calling Problems
Hi all! I am attemping to call a method inside of my LeviUserController named show_userland from my LeviInterfaceController class. No matter how I do it, I keep getting some type of error. If I make the method a class method, then my render_partial inside of show_userland can''t be found. If i call it using @luser = LeviUserController.new; @luser.show_userland; I get an error with a nil
2006 Feb 19
5
can you give a answer?
when i tail -f my log: i find this: "Completed in 0.00233 (428 reqs/sec) | Rendering: 0.00005 (2%) | DB: 0.00118 (50%)" i am sure, this request didn''t access DB. but why here DB is (50%) it''s log wrong or my fault? regards -- Posted via http://www.ruby-forum.com/.
2006 Feb 23
6
irb with rails
I was trying to access rails functions (number_with_precision) from an irb session. It can''t find the method. How do I load the libraries ? TIA LS -- Posted via http://www.ruby-forum.com/.