similar to: how to pass an array through url_for.

Displaying 20 results from an estimated 100 matches similar to: "how to pass an array through url_for."

2007 Sep 07
7
Rails VERY slow on Vista
When I try to script/generate something I have to wait above 2 minutes befor I get result. Is there some way to fix this? I have Intel Core 2 Duo 6420 with 2GB RAM. On my Slackware Duron 800 MHz it takes about 45 sec... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to
2007 Dec 11
0
help for hash.to_json
hi , all under rails 2.0 aotianlong@aotianlong:~/workspace/killer$ ruby script/console Loading development environment (Rails 2.0.1) >> {:user=>"aotianlong"}.to_json => "{\"user\": \"aotianlong\"}" >> user = User.find :first => #<User id: 1, uname: "aotianlong"> >> user.to_json =>
2006 Aug 12
1
url_for and :defaults
Hello, in my routes there are (just for testing): map.connect '':controller/:id/:action'', :defaults => {:action => ''alma''} in my controller: def alma render :text => url_for(:id => 123) end so I go to: http://localhost:3000/music/store which generates: http://localhost:3000/music/store/123/index Where the
2006 Jul 31
0
problems testing helpers - link_to and url_for don''t work...
So I''ve used the helper test plugin, and also tried some things from Rails Recipes, and basically neither seems to work for cases where a helper does anything related to link_to/url_for, and this includes calling named_routes. This is obviously an issue, as a common use for helpers is to refactoring something like this: <%= link_to "text that changes slightly", :id => id
2006 Jun 02
0
If you want to use url_for in lib scripts...
how would you do it? Joe -- Posted via http://www.ruby-forum.com/.
2006 Jun 09
0
disable escaping of ActionController::Base.url_for
Hi! I am trying to use rails for a wml/wap application. Submitting forms with wml goes something like that: <input type="text" name="search" value="" /> <a href="/portal?search=$(search)">goto</a> The wap browser replaces $(search) in the url with the text entered in the input field. Now to my problem. To use the routing information
2006 Jun 10
0
opposite of url_for()?
Hi, I have a string in a controller that represents a url for my website. For example the string might be /cont/act/id and I want to break this up using the routes defined in my config/routes.rb file so that I get a hash like {:controller => ''cont'', :act => ''act'', :id=>''id''} How can I access all of the information stored in
2006 Jun 19
0
url_for missing out parameters?
Having a bit of an issue with url_for The current page I''m on has a named route as follows: map.some_page ''page/:id/:range'', :action => ''the_action'' All looks fairly normal. I have an url_for on this page to make a link to another page as so: url_for(:controller=>''other'', :action=>''display'', :id=>5,
2006 Jun 21
0
url_for generating URLs without relative root
I''ve got an app that has ActionController::AbstractRequest.relative_url_root = "/super" set in environment.rb. I''d like to use url_for to generate URLs without the relative root, or even be able to specify a different relative root. Is that possible somehow? Pat
2006 Jun 24
1
DRY up link_to_remote and its url_for
In an attempt to provide a gracefully degradable link_to_remote, I repeat myself every time: <%= link_to_remote(''Signup'', {:url => {:controller => ''user'', :action => ''signup''}}, {:href => url_for(:controller => ''user'', :action => ''signup'')}) %> Looked around the RDoc &
2006 Apr 11
0
url_for - results inconsistency ??
Hi all, I recently noticed something really weird in url_for results let''s say that we have something like this somewhere in code <pre> URL1:<%=url_for( {:action=>''foobar''}.merge({''action''=>''ohmy''}) )%> URL2:<%=url_for(
2006 Apr 13
1
url_for in email templates
Is there a way I can use url_for in an email template? When I try and use it it barks a no method error. Thanks, Nicholas P. Mueller
2006 Apr 16
0
automatic URI encoding on url_for?
I am trying to store a hash in a URL so that a search query can be stored as a link. Here is my code: link_to(''blah'', url_for({:controller => ''search'', :action => ''advanced'', :query => @query, :page => n}) @query is the hash I''m trying to
2006 Apr 17
1
problem with reverse mapping (url_for problem)
I modified my routes to that you can reach my index action by just typing in the site name (ie www.mysite.com). I did this by: map.connect '''', :controller => "pragmatic" I need to be able to do a url_for(:controller => ''pragmatic'') or url_for(:controller => ''pragmatic'', :action => ''index'') and have
2006 Mar 31
1
url_for leave out ''index'' action
I''m trying to reduce the size of urls in my app and i was wondering how i can get all links to an index action to leave out the ''index''. In my routes.rb, i have it setup to recognize the controller and default to the index action. But is there a way to make it so that the ''index'' portion in the url is not shown to the user? This is mostly a concern
2008 Apr 05
0
url_for + :canvas => false weirdness for non resource controllers
I noticed something strange in my app today. It appears that the extra canvas path appended in url_for is back but only for controllers that are not resources. Here is an example I have in my site: campaigns is a resource checkout is not # With the canvas false flag (rdb:1) @controller.url_for(:controller => ''campaigns'', :action => ''show'', :id
2006 Feb 05
0
is there an inverse of ''url_for''
What I want to do is take a url string (from a file,db,form field,...) and turn it into a hash. For example: string = ''proto://host.com/posts/show/10?user=joe'' url_to_hash(string) #=> {:controller => ''posts'', :action => ''show'', :id => 10, :user => ''joe''} Does rails have anything like this already built in,
2006 Feb 08
0
How to call a basic function ( like url_for ) from a class inside the /lib folder ?
Hello, I try to use url_for from a class inside the lib folder class Test    def self.mytest options        url = url_for( options )    end end But I have this error : undefined method `url_for'' for Test:Class How can I use it ? Thanks _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
2006 Feb 16
1
runner: url_for with mailers impossible
I created a runner script to send a newsletter. I found this hack where you pass a controller and specify a helper: http://wiki.rubyonrails.org/rails/pages/HowtoUseUrlHelpersWithActionMailer But in a runner script there is no controller to pass. So, it looks like it''s impossible to use url_for in the mailer template this way. Another way around the no url_for problem is to pass the
2005 Dec 18
0
Fromcontroller to the url_for() representation
Hi, I''m trying to generate the url_for parameters ina controller to pass down to a view. And I want to pass in the link_to() params. One of the things I need to pass is the :controller part. So I''m in the controller itself, and I want to change the self.class (or it''s to_s represantation) to the format needed by link_to(). For example: class MyController <