similar to: Params Help to Pass variables from URL

Displaying 20 results from an estimated 10000 matches similar to: "Params Help to Pass variables from URL"

2006 Sep 12
2
Cache sweeping and render_component (my mistake or Rails bug?)
Hi I''m working on a program which relies on heavy cache sweeper usage. I''ve just bumped onto an odd problem. When using render_component method in layouts or templates with cache sweeping turned on, Rails throws an exception with the following message: NoMethodError in TestController#index You have a nil object when you didn''t expect it! The error occured while
2006 May 30
1
Url encoding Help Pls!
Hi guys, it''s me again, I want to come up with the following url: www.mysite.com/webpage?myid=1 I keep coming up with the following url: www.mysite.com/webpage%3Fmyid%3D1 require ''uri'' $myurl = URI.escape("webpage?myid=") redirect_to(:action => $myurl + 1 ) what am I doing wrong? I also tried require ''cgi'' $myurl =
2006 May 30
11
Another String Manipulation Exercise
Hi guys, And I thought it wasn''t a problem. Here''s my string "/var/www/vhosts/mysite.com/httpdocs/public/file/mypic.jpg" How do i take out all the text that comes before "mypic.jpg"? Trickier than I first thought. TIA, Bing -- Posted via http://www.ruby-forum.com/.
2006 Jul 14
4
Rails Lighttpd Issue on Fedora
Hi guys, I''m here again with a problem. I have a rails app called brewed. It''s located /home/user/brewed. My lighttpd.conf is located at /home/user/lighty. When I execute lighty on port 80 with: /usr/local/sbin/lighttpd -f /home/user/lighty/lighttpd.conf rails seems to work fine. If I type www.mysite.com/main/index on my browser, the page comes out well. I have my files
2007 Feb 09
3
Re: URL issues
hello... On 2/8/07, cdvr <codecraig-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > I watched the rails screencast on creating a blog in 15 minutes. > I followed along got it working on my home PC and I then uploaded it > to my web host. So I have, > > /home/<username>/blog > > I had to change some config in the blog app (i.e. production
2006 Apr 28
2
Trying to turn params field into a variable
Hi guys, I have another question, we have this line on our .rb code: @variable = params [:user][:bird] I need to be able to change the 2nd field into a variable because it is a changing valuename, I was wondering if you had any trick for that. Meaning I need to make [:bird] into [:dog] or [:cat]... It''s proven really tricky for me to get it to change I wonder if you guys had any
2009 Nov 22
1
"Over-coloring" facets on persp() plot
Dear R Community: Recently, I have managed to plot some really useful graphs of my research data using persp(). I have even figured out how to overplot rectangular regions (corresponding to submatrices) with a different color. This is accomplished by using par(new=T). I am now searching for a way to "highlight" a set of (possibly non-contiguous) facets with a specific color,
2006 Mar 15
5
Passing params to a component
I see from http://rubyonrails.org/api/classes/ActionController/Components.html that is possible to pass paramaters to a component. I don''t understand the exact syntax. I''m trying: @master_id = @params[''master_id''] in the components controller but it is not working. ==== Details: In my calling view I have: <%= h(@opportunity.id) %> <div
2006 Jul 18
2
Scaffold a Plural table w/ No Pluralization in environment
Hi guys, I have a situation here. I have my project set to no pluralization due to legacy tables in environment.rb. Now, I have some new tables which I''m starting to pluralize. When I do a generate a scaffold to this new table: script/generate scaffold my_tables table it seems to work out fine for certain sections like http://mysite.com/railsapp/new (which also inserts properly to
2006 Dec 29
9
Error : No protocol handler was valid for the URL...
Hi everybody, I just suscribe to the list because I have a problem using mongrel and mongrel_cluster... I setup a server (debian unstable wich provide apache 2.2.3 as a pakage) but I have an error when I try to access my application : ERROR 403 : Forbidden, You don''t have permission to access / on this server. When I check apache''s logs I found that : [warn] proxy: No
2006 Jan 11
15
How to use custom url formats?
I''m new to Rails and am trying to use a field called "code" instead of "id" in my URLs. For example, assuming I''ve got a database of motorcycles makes where the codes are "Honda", "Yamaha", "Suzuki", and "Kawasaki", etc. To show the info about Honda I want to use this url: http://www.mysite.com/makes/honda/
2013 Feb 22
1
Variables within Manifests question
Hello all Can someone please help me or answer if this is possible I''m using the puppet forge IIS module, and want to use variables within the syntax dependent up ip address for example: colo_a = 1.1.1.0 colo_b = 2.2.2.0 if $network_local_area_connection = 1.1.1.0 add colo_a elseif $network_local_area_connection = 2.2.2.0 add colo_b iis_site {''mysite.co.uk'':
2006 May 13
1
newbie question - routes.rb on server
Hello, I am new to Ruby but not to programming. I have a domain name and server space with a host who said that ruby on rails should work on the server. All I want to do is make sure that a test ruby application works online so that I can begin development on an app. I am able to get the test program to work locally but not online. In C:/ruby/projects/test/controllers/TestController.rb:
2011 Feb 28
1
Problem with render_component and rails 3
I have a application that it use view/layout/application.rhtml, in this file I have: <%= render_component :controller => ''car'', :action =>''index''%> But there is one problem, it display this problem: undefined method `render_component'' for #<#<Class:0xb67e6e48>:0xb67e5f34> How can I resolve this problem? -- You received this
2006 Apr 07
1
Help... Ajax scaffold problems
Hi all, Any help is appreciated. I used the ajax scaffold generator to make 3 scaffoldings. Then I put them together as components in a combined layout and created a master controller, which happens to be named "dataentry''. That works fine. Within each of the components, I was able to set up links that paginate and update the div (for the component) with correctly paginated
2009 May 27
0
One url with multiple controllers
Lets say that I want to have one url that can map to two different controllers. For example /posts could map to controller ''public/ posts'' or to the controller ''admin/posts'' based on whether or not the user has logged in. This isn''t a great example because I could just use ''/admin/posts'', but in my scenario the url has to be the
2006 May 21
2
Nooby partials / component problems
I''m stumped on what seems like should be a fairly easy thing, so I hope someone can point out my error. I wanted to show a few things on every page, so I added an application level template in "layouts". I added my styles in there, and put the controller name and action name into the TITLE tag for my own reference. So far so good - works like expected. Then I wanted to
2006 Mar 14
0
how to render_component in global layout
Hello, i have one layout file for all controllers. I would like to have news list on each page. So, i put <%= render_component :controller => "news", :action => "list" %> , to my layout file. But this doesn''t work at all. I get error "Application could not be started.. ". If I put render_component to some view file say
2011 Dec 12
0
<%= render_component %> Tag cloud issue for rails version 2.3.11
hi all, in my application there is tag''s cloud in old code which is load using following code <%= render_component :controller => "controller_name", :action => "tag_cloud_homepage"%> now i upgrade the ruby,gem and rails version to Ruby :1.8.7 Rails :2.3.11 gem :1.6.2 and i am using Windows XP as O.S my question, now in Rails 2.3.11 "<%=
2005 Nov 22
4
multiple rails apps on one lighttpd
Good evening (or afternoon or whatever it is where you are), Before I start setting it all up, I have a question about lighttpd and multiple rails apps. From what I have read, it is at the minute only possible to do multiple rails apps using subdomains: typo.mysite.com hieraki.mysite.com rforum.mysite.com etc, etc and not currently possible to do this: mysite.com/typo mysite.com/rforums