I'm using form_remote_tag(:url => {:controller => "home", :action => "search"}, :update => "mydiv"). When I click submit on the form "mydiv" is populated with the error "Template is missing. Missing template home/search.erb in view path app/views". I've tried multiple render options in def search, but they all result in the same error...
What are the advantages of using jsp over PHP or Ruby on rails?
Thanks in advance;-)
...
How do you rewrite a website to be scalable?(traffic) I work with mainly PHP and some Ruby on rails and i know its a generic question. I'm just looking to increase my knowledge so any advice would be useful.
Thank you in advance ;-)
...
I've been using WCF's DataContract and DataContractSerializer to read/write objects to XML files. We want to switch to using a Ruby on Rails version, and I wanted to find out what I could use. We have objects that have attributes like (these are just examples not the exact objects):
[DataContract]
public class City
{
[DataMember]
...
I'm interested in seeing how using NoSQL would affect the architecture/design/code of a Rails application.
Does anyone know of a good example of a open-source Rails app using NoSQL persistence?
Thanks
...
If your controller action looks like this:
respond_to do |format|
format.html { raise 'Unsupported' }
format.js # index.js.erb
end
and your functional test looks like this:
test "javascript response..." do
get :index
end
it will execute the HTML branch of the respond_to block.
If you try this:
test "javascript response..." ...
I am trying to add Google Maps to my page using YM4R/GM. As a regular submit using form_tag everything works, so I know I didn't mess that part up.
But using form_remote_tag I end up with nothing inside my update div. I tested with rendering text so the right method is being executed and YM4R/GM is returning the Google Maps KML. But t...
I have a link_to_remote and I want to make sure people can only click it once while waiting for it to return.
Is there a good way to disable it after someone clicks it? (Changing the text of the link is nice too, but I want to disable it also to be sure).
This is Ruby on Rails btw.
...
Is it possible to check the value of:
config.action_controller.perform_caching
...from within ApplicationController?
I have some custom caching methods that should or shouldn't be called based on this value.
...
I am designing a Ruby on Rails application that requests XML feeds, reads them in, and parses them into objects to be used in views. Since the request for the XML feed and subsequent receipt of it can take several seconds from some sources to complete I need a way to offload these tasks from my front-line application tier. I do not want ...
I really like the visual effect where a new element seems to push an old element out of the way. Pretty common thing recently.
here is a static example.
http://github.com/
However, I'm trying to do it with recently updated products. Also would like to use scriptaculous if at all possible with periodically_call_remote using ruby on rai...
I am running in to OpenURI::HTTPError: 403 Forbidden error
when I try to open a URL with a comma (OR other special characters like .).
I am able to open the same url in a browser.
require 'open-uri'
url = "http://en.wikipedia.org/wiki/Thor_Industries,_Inc."
f = open(url)
# throws OpenURI::HTTPError: 403 Forbidden error
How do I escape...
I need to write a method that returns whether or not a Boolean is set to true/false.
In my case the boolean is an attribute for a product. And to skip a step in the checkout process I need to have this self method work similar to the following:
def current_user
return @current_user if defined?(@current_user)
@current_user = curren...
I'm trying to expect an error in an rspec test.
lambda {Participant.create!({:user_id => three.id, :match_id => match.id, :team => 1})}.should raise_error StandardError
For now I'm just using StandardError to make sure it's working.
1)
StandardError in 'Participant should never allow more participants than players'
This game is alrea...
I am building an app and want to have a lot of the site forms come up in a box over the screen with the background darkened out. I have seen redbox on github and it seems to do what I need it to do but I see that it hasnt been updated since 2007. Is there a new way to go about this? Any alternatives to redbox?
Thanks for your ideas!
...
I'm currently running a Rails migration where I am adding a datatype specific to Postgres, the tsvector. It holds search information in the form that Postgres expects for its built-in text searching capabilities.
This is the line from my migration:
t.column "search_vectors", :tsvector
Everything seems to be working fine, and the sea...
Hello,
I'am looking for a good Forum plugin running under rails3 ?
If you have any idea, i'll be glad to hear it :)
...
I am trying to make my urls prettier and still use restful resources. I understand that you can override the to_param method if you object has a name property like this:
def to_param
self.name
end
which will give you the route /:model/:name. This is all straightforward, but I have to be capable of having the same name with multiple ...
My Rails site allows users to upload documents, I am using the attachment_fu plugin. I have a list of allowed [MIME] content types that I allow - the standard image formats, Office documents, PDF, etc. I have a user who cannot upload any PDF documents because the validation fails, looking in the logs attachment_fu thinks the MIME type is...
Im trying to define a new function in my Controller class. I made up everything using Scaffolding and it worked okay. But now, when i add a new function to the controller, setting up the view and so, it says some extrange error (tries to load show action when i asked for login).
Whats scaffold doing that im not?
Thanks
...