similar to: Destroy action doesn''t work?

Displaying 20 results from an estimated 6000 matches similar to: "Destroy action doesn''t work?"

2006 May 16
2
Rails doesn''t serve static files in production mode
I just noticed this: RoR does serve static files on a lighttpd-server just fine - in development mode. If I set it to production in environment.rb - static files are not served anymore (like the scaffold.css). How can I fix this? -- Posted via http://www.ruby-forum.com/.
2006 Jan 05
1
Action fails silently - breakpoint doesn''t hit
I have a simple user registration controller with scaffold code. The only change I made to the view is to add a second password field for confirmation. I do have a db table called users with all the fields except ofcourse the extra password field. The field has a different name so it does not get into the user hash. The ''user.new'' action works fine and displays the form. The
2006 Apr 28
9
[AWDR] Tutorial in A4 wont ''destroy'' items
Hello, I''m working through the tutorial, and I''ve run into a little snag. In the first part of the tutorial, the destroy link is not working correctly. I can''t figure out where I goofed. Removing :confirm doesn''t seem to resolve the issue. Thanks, Randy. development.log ----->8----- Processing AdminController#destroy (for 127.0.0.1 at 2006-04-27
2006 Jan 08
4
scaffold uses link_to for destroy
Hi, I wonder why scaffolding uses a link_to tag for the destroy links. Seems like these should be POST requests with button_to. The Rails book dedicates pages 335-337 to this very issue. Peter
2006 Jul 26
3
newbie: Scaffold doesn''t pickup DB changes
I''m following along with the depot example in ''Agile Web Development'' and ran into a problem with Scaffold. I changed the MySQL table structure to add a few columns directly and also tried the migrate script to change the database after I got the initial scaffolding to work. However, I can''t seem to get the new columns to show up and am stumped as to how I can
2006 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone, I''m a rails & ruby nuby, and this is my first post to the list. Here''s my environment in case it helps diagnose my problem: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems version 0.8.11 Rails version 1.1.2 Active Record version 1.14.2 Action Pack version 1.12.1 Action Web Service version 1.1.2 Action Mailer version 1.2.1 Active Support version 1.3.1 I did
2007 Oct 24
7
NameError in CustomersController#index
I''m new to Rails. I finished the Cookbook tut. no problem. I''m trying to start a project of my own, follow the same instructions but the difference is I created the database myself. After I create the scaffolds and try them out I get this error NameError in CustomersController#index uninitialized constant Customer RAILS_ROOT: ./script/../config/.. Application Trace |
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 Mar 28
1
Ajax callback to javascript array ?
I have some javascript, <script> var arrCustomers; function setCustomers(arr) { arrCustomers= arr; // arrCustomers holds now array of customers } </script> ... and Rails controller, class CustomersController < ApplicationController def list @customers = Customer.find_all end end ... and Ajaxed link to get the customers, <%= link_to_remote "Get
2006 Jun 16
5
Application Error
Hi Folks, When I have tried this cookbook example from onLamp tutorial, I got some error like this, output of development.log is ---------- Permission denied - /var/www/html/cookbook/public/../config/../tmp/sessions//rub y_sess.d51d8997edf6be91 only the first line of output is this, output truncated. --------- what it will be ? How to solve this ? In my browser, I am getting Applicaiton
2010 Jul 19
0
Protect from forgery for Rest destroy action ???
Hi !! I''m reading the rails guides about security, i had a question about the forgery protection If we consider a standard Restful resource ( generated with scaffold for example ), the update and create actions are protected from forgery attacks thanks to the authenticity token, but what about the destroy method ?? &lt;a href=&quot;/posts/2&quot;
2006 Jun 14
5
uninitialized constant error after scaffold on new Windows XP environment
I am attempting to get a working Rails programming environment setup working under XP with MySQL, RadRails and Webrick. I have been using my PowerBook but need to working on Windows environment too. I have basic functions of Ruby and Rails going. I created a really simple table and generated the scaffolding. The server starts just fine. I can browse the database succesfully in RadRails. The issue
2007 Apr 10
3
Link to local files
I have a small rails system I am building. Part of the code allow uploading files in to RailsRoot/public/files folder I am running this system is several places that have different domain and folder combinations. cases: 1) domain1.com/folder_a # where folder_a is a symbolic link from Apache document root to the public folder of rails app 2) domain2.com/folder_b/public # where folder_b is
2006 Jun 08
1
Action Controller Error - unitialized constant
I''ve been using Locomotive on a Mac mini for months creating ROR apps. Everything was working fine until Wednesday. For any new scaffold code that I generate I''m getting a message stating "Unititialized Constant" for the name of the scaffold code that I just generated. The stack trace ends with the lines: This error occured while loading the following files:
2006 May 21
8
Rails and Postgres
Hi, I''m new to Ruby on Rails and am having a little difficulty working through the ''Rolling with Ruby on Rails'' tutorial. Can anyone help? I''m trying to get the cookbook application to work via a Postgresql db. But get the following error when trying to access http://127.0.0.1:3000/recipe/new Errno::EINVAL in RecipeController#new Invalid argument
2006 Jul 13
1
Destroy doesn''t destroy!
I''m using a MySQL server and the user my rails app is logging in as is root; root has all permissions. My destroy code is default scaffolding: def destroy Customer.find(params[:id]).destroy redirect_to :action => ''list'' end Why is <%= link_to ''Destroy'', :action => ''destroy'', :id => @customer %> not
2006 Mar 31
7
problem with habtm conditions in pagination
Hello list, I''ve had this problem for two days now. Perhaps someone here would care to comment on it. I''d be REALLY appreciative if that''d be the case. Basically, it''s outlined at this paste: http://rafb.net/paste/results/ kXQSHZ83.html But I''ll paste it here, too. The main problem is in the customers/list action. The problem is with this line:
2006 May 06
23
New Rails app is not working... I am missing something
Hi, So I have two rails applications working on my box. Theya re both tutorials that I walked through step by step. Now I am trying to write my own application and something is not working. My server is OS X 10.3.x. I am using Apache 1.3.x as the webserver with fcgi. As I mentioned before all is well with the apps that I had walk through tutorials with, but my app is not working. I
2006 Oct 31
5
How to run edge RSpec (on Rails)?
I''m interested in tracking edge development of the RSpec on Rails plugin and I''m a bit confused. The installation guide (http://rspec.rubyforge.org/documentation/rails/install.html) says, "You''ll have to install the RSpec core gem first." It also says, "Take note of what rspec version you''re installing ? it''s very important that you
2006 Jul 25
6
DRY question (newbie)
Say i want to include the same chunck of text (a menu on a webpage for example) on each page. Is there a method by which I can save the HTML in a text file and call it up later? Is there a better way? I know ruby has "puts" but i can''t use that b/c it does not work with my webhost (dreamhost.com) Any suggestions? -- Posted via http://www.ruby-forum.com/.