similar to: routes & methods in controllers

Displaying 20 results from an estimated 5000 matches similar to: "routes & methods in controllers"

2008 Jul 22
0
Routes dependent on subdomain
Hi, I''m having little problem getting my idea to work, would be very thankful if you could help me. I have one Ruby on Rails application sitting on server, and multiple subdomains, pointing to the same server/app. For example: mainserver.com user1.mainserver.com user2.mainserver.com I want to have exactly the same app and exactly the same routes on all, except that I want to map root
2006 Jun 11
4
remote_function posting?
Hi, I''ve noticed that my remote_function calls are resulting in POST requests. As a result, my routes do not apply since it does not generate a url based on the parameters, but simply posts to the raw url with post data. I want to make a GET request instead of a POST. How can I do that? Has anyone else run into this? Thanks, Ryan -- View this message in context:
2006 Jun 02
3
Configs not loading
Hi, So in the past I''ve developed using Apache 2.0 MacOSX. I''ve just started a new project and decided to switch over to LightTPD just to try it out. This development is purely a learning endevor for me, so I welcome the idea of stepping into new territory. As a result, I''m not sure if this is a lighttpd problem or a Rails one. So pardon me if this is off topic to
2006 Jun 16
12
FastCGI times out?
Hello there, So I''m still struggling with this fastcgi stuff. I''m trying to upload and process a decent sized ZIP file, but the request dies before it finishes and I get the following error: FastCGI: comm with (dynamic) server "/Users/ryan/Workspace/rails/photos/public/dispatch.fcgi" aborted: (first read) idle timeout (30 sec), referer: http://photos/album/new/4
2011 Jul 06
5
Monkey patching a gem (rails_admin, with Rails 3)
Hi. I''m trying to monkey patch the rails_admin gem. First, I tried to add a file in config/initializers containing: RailsAdmin::MainController.class_eval do def get_sort_hash CODE HERE... end end It was only loaded once, and then the method from the gem was always executed instead of mine. I also tried to add the code in lib/ with the correct line in config/application.rb to load
2006 Jun 09
5
Using link_to with an image tag & link text
Hi , I was trying to use link_to along with image_tag to setup a link that would open in an external window. But I was unable to make a link using both text & an image So my current workaround looks like this inside a partial where link is http://foo.com & text would be descriptive <img src="images/arrow.gif" border="0"/> <%= link_to(text, link, :popup
2006 May 31
3
Print out session dump?
How can I go about printing out an object in Ruby? I''m looking for the print_r php equivalent. All I''m trying to do is print out session information. It is exactly what is shown in "Show session dump" when an exception is caught. Any ideas? Thanks. -- View this message in context: http://www.nabble.com/Print+out+session+dump--t1712872.html#a4651059 Sent from the
2011 Apr 07
1
How to set the hostname alias in DNS server
Hi ,all: There has a problem which confused me for a long time . The problem is the following: Would I can set the hostname alias in DNS server? That's to say, for example , if my hostname is called server, that it's ip address is 127.0.0.1 and I want to alias another name called aaa Gernerally, I can edit the /etc/hosts file to modify it, but the another computer did not
2006 Mar 22
3
stack level too deep error : Pulling my hairs out
Hello, I''ve changed something in my test application and since I can''t find the cause of the "stack level too deep" raising on every request. I''ve removed almost every part of code and the error still occurs, eg with this url : www.myhost.com/main/index routes.rb (nothing else in this file) map.connect '':controller/:action/:id''
2006 Jul 16
1
Helpers for partials too ?
MainController implies main.rhtml, which will automatically have access to the methods inside MainHelper (in \app\helpers\main_helper.rb). Should not the partial templates called from main.rhtml via <%= render :partial => ''partial'' %> also have access to the methods in main_helper ? I have tried <% display_dates = create_display_dates(@events) %> and <%
2006 Jun 18
2
Why can''t I use a session? (Symbol as array index)
Hi All I can''t for the life of me see what is wrong with this. Maybe it''s cause it''s midnight... I want to put some data in a session and I have some code like this: class ApplicationController < ActionController::Base model :mything def ApplicationController.chosen_thing session[:chosen_thing] ||= MyThing.defaultThing end end So whenever I try to
2006 Apr 12
3
noob question
Hi *, I am writing my first app based on the ''depot'' application but with some suttle differences to help me learn. I am a bit sutck with following and would be grateful for any help: I have the following controller: class MainController < ApplicationController def index @objects = Object.certified_items end end This relates to a field called
2012 Jan 04
1
render :update problem with IE 9
Hi, I have a legacy web site based on ruby on rails 3.0.9 which works just fine with Firefox, chrome and IE 8, but I receive an HTTP 406 error every time when I check the web site with Internet Explorer 9. I narrowed down the problem to the respond_to + format.js + render :update trio, but I did not manage to solve the problem until now. I created a small example for reproduction: The action
2005 Aug 05
1
Cisco IP Phones on Asterisk: chan_sip or chan_sccp
Hello ! I 'd like to connect Cisco IP phones to *. (7940 & 7960) Shall I use SIP or SCCP. Which approach provides better support of features of the Cisco IP phones ? Thanks ! Johann
2006 Jun 02
1
Updating html breaks my interface
I have two select menus on a line. The first updates the second: library: library_select album: album_select So when you pick a library, the album_select is automatically updated to show the relevant choices. This is done using ajax. While the ajax request is loading, I switch the album_select with a loading_select, which is a disabled select menu with only one choice:
2006 Aug 15
0
Benchmarking not being included?
I have a problem that''s mystifying me. I have an application that uses edge rails, and I would like it to put the high level performance information in the production logs. Other apps I have deployed with rails 1.1 have production logs that look something like this: Rendering main/index Completed in 0.06379 (15 reqs/sec) | Rendering: 0.02569 (40%) | DB: 0.02510 (39%) | 200 OK
2006 Jun 24
0
Theme generator
Hello, I just downloaded the Theme Generator, I set it up and put, theme ''main'' then I got "undefined method `theme'' for MainController:Class" but, in the readme it dosn''t say to require it or anything what do I do? -- Posted via http://www.ruby-forum.com/.
2006 Jan 04
0
Simple print statement (was: recongizing the current controller in views)
All (and kevin), After flying high for a while on Rails things, I''m down to the nitty gritty of Ruby stuff. Messing with vars and printing them out on a web page. I found the controller_path in the API docs; However when putting this in a controller: @test1 = controller_class_name @test2 = controller_name @test3 = controller_path And this in a partial: Test1 <%= @test1
2010 Nov 01
1
Encoding::UndefinedConversionError on a simple file upload (rvm, MRI-1.9.2-p0, rails 3.0.1, apache+passenger)
Hello everyone. I am having the encoding issue on a simple file upload action: Encoding::UndefinedConversionError in MainController#upload "\xC4" from ASCII-8BIT to UTF-8 The action looks like this: def upload @uploaded_io = params[:upload] File.open(Rails.root.join(''public'', ''images'', @uploaded_io.original_filename), ''w'')
2007 Jan 01
0
Simple question on inserting child data
after doing a bunch of reading I have finally sat down to create a simple app to dirve home a lor of the concepts to which have been read. So I figured a simple blog app is the best way to do it. The bad thing is that I am already hung up when creating replies to a blog posting. I can''t figure out how to insert the post_id value into the reply table. When creating a reply the user is