similar to: Routing error in rails

Displaying 20 results from an estimated 30000 matches similar to: "Routing error in rails"

2010 Feb 25
9
uninitialized constant UsersController::User
i just created an application to list the primary details of userbut it is showing an error lik this "uninitialized constant UsersController::User" this is my controlller class UsersController < ApplicationController puts"hiiiiiiiii" def index puts"hiiiiiiiii" @users = User.find(:all) puts @users respond_to do |format| format.html # index.html.erb
2010 Feb 25
10
ajax.updater problem
Hi everyone I´know that it is not a ajax forum, but Im using ajax ina program created with rails code and I think that I´m not the unique person who use the Ajax. UpdaterPeriodically. My problem is that my program doesn´t refresh the div tag, following it´s my source code. Anyone can say me why it doesn´t work? <head> <%= javascript_include_tag ''prototype'' %>
2010 Jun 04
0
Ajax post from a mobile app
Hi, I''m a trying to create a user using Ajax from a mobile app with javascript and I''m struggling!!! Here is what I''m trying: user = {username:''plop'', password:''plip'', password_confirmation:''plip''}; new Ajax.Updater(''all'', HOST + ''users/create'',{ method: ''POST'',
2006 Jan 09
6
inPlace Editor
HI, I am a new to the group. I have run into the following issue. The following works fine <h1 id="tobeedited">To be edited</h1> <script> new Ajax.InPlaceEditor($(''tobeedited''), ''_ajax_inplaceeditor_result.html'', { ajaxOptions: {method: ''get''} }); </script> But I want to pass some more
2010 Jun 23
0
Rails 3 - AJAX Response
Hi, I need help with some AJAX in rails 3. So basically, I have a select option in my index page for my User model. This select option is a form that modifies the user''s type. The " :remote => true " works and the type is changed when hit the submit button. But, nothing happens in the browser. The user is updated. I''m actually not sure where to put either my JS /
2006 Feb 02
1
What''s the javascript to submit an AJAX Form?
HI Everyone, How do I form the href on an anchor so I can create a link-style submit for an ajax form? In this snippet, the INPUT generated by #submit_tag works OK, but the anchor results in the AJAX replacing the whole page? Can I make the anchor/href submit the AJAX form as well? Thank you! I have this (list.rhtml): <%= form_remote_tag :url =>
2011 May 06
3
Rails 3 Routing problems
I have an UploadsController and UsersController where Users'' has_many :uploads'' via polymorphic attachment in uploads.rb. Now we i navigate to http://localhost:3000/users/1/uploads I get re-routed to Uploads#index and rendered is called multiple times as shown below: Started GET "/users/1/uploads" for 127.0.0.1 at 2011-05-06 22:00:38 +0100 Processing by
2011 Mar 19
2
I get an error message
Everytime I try to open up a game called Rollercoaster Tycoon 2 I have copied the program files to a thumb drive, I get a popup text box that says the following: <html><head id="AM_Offline_Page"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta name="am-version" content="6.1"> <script
2006 Aug 18
0
AJAX question
Dear all, Help me get a simple AJAX behavior right. I know zero AJAX, thus please advice. Below is a simplification of the real code and I hope I can describe my intention clearly. class StoreController < ApplicationController def show_cart @cart = Cart.new @new_item = CartItem.new end def add_item @new_item = CartItem.new(params[:new_item]) if
2006 Aug 18
0
Simple AJAX question
Dear all, Help me get a simple AJAX behavior right. I know zero AJAX, thus please advice. Below is a simplification of the real code and I hope I can describe my intention clearly. class StoreController < ApplicationController def show_cart @cart = Cart.new @new_item = CartItem.new end def add_item @new_item = CartItem.new(params[:new_item]) if @new_item.valid?
2008 May 07
10
a little problem with prototype and IE7
''m from cartagena Colombia(south america) .... i''m learning prototype, i have a little problem using Ajax.Updater. i have this code in html page : <head> <script src="prototype.js" language="javascript" type="text/ javascript"> </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
2006 Mar 05
2
AJAX call chain and DRY questions
Hey I have a page with a drop list. When the user selects an option in the drop I call an action in the controller with ajax. Now, in the controller, I gather some data from the db, but how do I present these data in a nice way? I really need to make use of the html helpers, but these clearly are not available in the controller. How do I output the array that I have gathered? My view page
2010 Dec 24
0
Getting Google Image search to work within Rails
Hi, I''m getting this strange behavior when I try to run search for images using Google Images API. I suspect it''s because of my code and not the API itself, here''s what I wrote: uri = URI.parse("https://ajax.googleapis.com/") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true path =
2006 Jul 20
1
Ajax and observe_field not updating specified DIV
I have a page that has a dropdown which i''m using observe_field on to make an ajax call back to my controller. The page initially displays fine. The method is invoked in my controller when i select a choice in the dropdown and I have an rjs file which is then invoked. The rjs file looks like this: page.replace_html ''embed_calendar'', :partial =>
2009 Jul 28
4
RJS-Template and link_to_remote
Hi, I am quite new to rails and can''t use any rjs-templates. The problem is, that he can''t use/find the methods in that template e.g. ''page'' or ''replace_html''. I get an error message on these methods. Here''s what I got so far in my example: Controller: ---- class AjaxTestController < ApplicationController layout
2006 Jun 06
1
Getting value of form using Ajax (and problems with Safari)
I have got two forms, the first is a textarea plus a link that activates some javascript to change the form, the second activates some javascript on the onchange event which changes it into a textarea form. This works in Firefox, but not in Safari. Also, I need the value which is selected. I''ve found an example that gives the parameter to the javascript, like this: <input
2011 May 17
6
Nested Resource w/ Collection
Hi guys, In my routes file I have the following nested resource: resources :users do collection do get ''posts'' end end However, when I visit this URL: http://localhost:3000/users/posts, I get this error: "The action ''posts'' could not be found for UsersController" In my UsersController I have the following: class
2009 Sep 30
1
2 RESTful controllers for the same resource
Hi everyone I want to have two restful controllers for the same resource (Users) One controller (UsersController) is straight in the controllers folder and is used for singup and so on Then i need another controller for users which is inside an admin folder (Admin::UsersController) In my routes.rb i have map.resources :users # Sample resource route within a namespace: map.namespace
2006 Jan 25
9
AJAX Search w/database results
Hey, I have a main page that lists a table of Devices, along with a Search box. I''d like to have the Search field pull up any related Devices, and then re-populate the table. I can do this without AJAX, just calling my List action over again, passing the params to search on, but with AJAX I get the error, "Cannot convert nil to string" on this line: @device_pages, @devices =
2006 Mar 15
3
Any one who can help with how to implement such a login?
http://www.wayfaring.com/ I think it is implemented using rails. For if u input the wrong url,u can see a "rails" style error hint. I really like its ajax login system. from the source of the homepage,it can be seen the login part is: <div> <h1>Log In</h1> <form action="/account/login_ajax" method="post" onsubmit="new