similar to: Root router

Displaying 20 results from an estimated 100000 matches similar to: "Root router"

2008 Jul 08
5
map.root doesn't do anything, index.html can't be changed
Environment: Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.4.6 PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch mod_ruby/1.2.6 Ruby/1.8.6(2007-09-24) mod_ssl/2.2.8 OpenSSL/0.9.8g Phusion_Passenger/2.0.1 Server I''ve created several scaffolds that all work, and am trying to set the root page for this app to default to one of the methods. Here''s my routes.rb: ActionController::Routing::Routes.draw do
2008 Oct 24
2
Rails problem
What wrong? # gem install rails -s http://gems.rubyonrails.org -v 2.2.0 Successfully installed activesupport-2.2.0 Successfully installed activerecord-2.2.0 Successfully installed actionpack-2.2.0 Successfully installed actionmailer-2.2.0 Successfully installed activeresource-2.2.0 Successfully installed rails-2.2.0 6 gems installed Installing ri documentation for activesupport-2.2.0...
2008 Jun 04
0
routers are handled incorrectly on production
Has anyone found their routes are handled differently on production? #works fine http://local:3000/admin/orders/new #returns 404.html http://domain.com/admin/orders/new production.log: Processing AdminController#orders (for 67.112.120.159 at 2008-06-04 09:06:11) [GET] Session ID: 2345fb73da6d2f975bbbfc1dc4dd5ce5 Parameters: {"action"=>"orders",
2008 Jan 17
4
multiple views, and some routers
Hi, I''m new to Rails (just a Java Programmer tired of having to configure a lot of xml''s and mapping classes just to make a simple page (...)) anyway, I''m experiencing some problems with routers, i''ve created a new project using Rails 2.0 and created a scaffold for users. so i have the following: users/new.html.erb ... (and the other pages created by the
2010 Aug 06
1
Rails setup process (from HTTP request to root router loaded)
Hi all I''m interested in learning more about what happens within rails (or the web server) from when an HTTP request is made, to the point where its served. I know config/router.rb is involved somehow, and I imagine many other files. Does anyone know of any writings online which address this issue? Or would someone be so kind to explain, in depth, the details? Links and comments very
2009 Jan 04
4
Adding routes and link_to
Hello. I''ve added some routes : map.news ''news'', :controller => :News, :action =>:index map.login ''login'', :controller => :Login , :action =>:index When I go to /news or /login before adding the routes, it works well. When I add the routes and clik on the link that goes to /news or / login, I got a 500 internal error with this :
2007 Jun 19
3
Nil object for nested resource
Hi all, I have 2 models with a standard 1 to many relationship. I''m also using REST on the two models and have added the appropriate code to the routes.rb file. scorecard.rb: class Scorecard < ActiveRecord::Base has_many :attributes end attribute.rb: class Attribute < ActiveRecord::Base belongs_to :scorecard end routes.rb: map.resources :scorecards do |scorecard|
2008 Jun 12
3
Upgrading to 2.1 breaks my named routes
I just upgraded to 2.1 and attempted to log in to my application and when this line is reached in my login action: redirect_to(index_url) I get the error "wrong number of arguments (0 for 1)" [stack trace below]. Here''s my route: map.index ''index'', :controller => ''e_simply'', :action => ''index'' I found
2007 Feb 15
1
Images and stylesheets are not serving
Hello One of ours sites has just lost all it''s images and styling. It''s not a very busy site at all, so it might have been not working properly for some time now. Here''s how we start it in Lighty <pre> $HTTP["host"] == "gregynog.glam.ac.uk" { server.document-root = "/www/rails/greg/current/public/" server.error-handler-404 =
2008 Mar 12
2
nested routes with a 2-way has_many using join table?
I have two classes, InstructionalObject and Assets. They both have_many of the other, implemented through a join table (so it''s like a habtm without the habtm). For the next version of our app, we''re refactoring to RESTful, and i''m having trouble with my nested resources/routes. I tried this, in routes.rb: map.resources :assets do |assets| assets.resources
2008 Jul 19
1
Routes
Hi there, I''m having an issue with routes I frankly dont get. I have a controller named map which takes in a hash string and converts that to an actual url, works great so localhost:3000/f3gg or whatever works fine now, I have a controller which I want to use to add some records (needs to go through AJAX) I want two strings, from and to but nevermind that for now since I''m too
2008 Aug 01
2
REST error
Hi i given in routes.rb as map.resources :students, :member => [:departments => :get] and rhtml i given link <td><%=link_to "Departments", departments_student_url(student) %></td> in students controller def departments @student= Student.find params[:id] # @departments = @student.departments end when i click the departments link it showing error like
2007 Jul 19
2
Transform URLs from: "url.com/Bob+Doe" to "url.com/bob_doe"
Is that possible, and would you know how I can do that? I''m creating individual pages for users based on their first and last names. In my routes.rb, I have: map.client '':user_full_name'', :controller => ''user'', :action => ''individual_user_page'' Then in my controller, I have: def individual_user_page @user =
2008 Mar 07
4
n-levels of nested resources in REST?
Hi, I find it would be very convenient to nest resources in two levels, so a member is only sensible as a part of a club, and a fee pament is only sensible in the context of a club and a member. Is it possible to nest nested resources? How would the syntax be? I have tried just nesting the assignment in routes.rb, but failed to get it right What do ou think? Is it possible? /Fredrik --
2008 Jan 17
0
It seems to be a restful_authentication bug (was Re: Re: named route new_session not working)
On 1/16/08, Jimmy Palmer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > sorry for the ambiguity. I will work on being more descriptive. :) > > In the method access_denied in the file authenticated_system.rb from > restful athentication, it generates this: > > def access_denied > respond_to do |format| > format.html do >
2008 Dec 03
5
How to test a plugin
Guys, I''ve created a plugin, i wanna put my automated test there. However, I got bad file descriptor error when i run the test like normal unit test file: "ruby plugins/acts_as_fox/test/acts_as_fox_test.rb" How to test a plugin? Also, is it right to say that I should only put my unit tests (but not functional test for example) for the plugin in the plugin test folder?
2008 Jul 11
1
Using custom routes to handle new nested resources
I have a couple of resources, one nested in the other, such that my resource spec in routes.rb is: map.resources :parents, :has_many => :children This will generate a route for a new child that assumes that the parent has already been saved, something like: /parents/:parent_id/children/new But what if I want a route that handles the case where the parent resource is also new, and thus
2009 Mar 30
3
Great discrepancy between Google Analytics and own counter
Got Google Analytics running on one of my websites. Google defines a pageview as the most occuring event. Every refresh, every link clicked to a different part of the page, even loading from cache is an additional pageview http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=57164 Now it should be known that GA is JS based, and will report directly to Google from the
2007 Aug 06
2
Proposal: Pure Regex Router
So this has been an idea ever since Rails came out. Why not use a pure regular expression router in similar fashion to gsub? I imagine it working something like this: Merb::Router.prepare do |r| r.add %r[^/(.*)/(.*)/(\d+)$], :controller => ''\1'', :action => ''\2'', :id => ''\3'' r.add %r[^/user-(\d+)$], :user_id =>
2007 Jan 28
3
always Not Found
hi! I''m migrating to Rails 1.2.1 (from 1.1.6), but now I''m getting a 404 (Not Found) page for every url I call! Not even the error messages I got before are shown on this page anymore. So I took a look into development.log, but there everything is ok, WebRick sends Http 200 OK. The routes.rb I left as the standard: map.connect '':controller/:action/:projectid''