Re: [Rails] Re: routes.rb and configuration over convention

2012-03-16 Thread tydeas
That's what exactly I am trying to explain and think the issue is. You have convention on how to configure something where you should had convention to avoid configuration (at least when still in the beginning of your development process). So let me describe what imho is proper convention over c

[Rails] Re: routes.rb and configuration over convention

2012-03-15 Thread Nicolas Sebrecht
The 14/03/12, tydeas wrote: > Hello there, > I am new to the rails framework. I have seen that rails uses the > "Convention over configuration" philosophy. > Then when I create a controller "post_controller" I have to actually > configure it in the routes.rb file to get it working. Is this the > ot

[Rails] Re: Routes.rb

2010-08-17 Thread Ar Chron
Hemant Bhargava wrote: > I also have map.resources for resumes. Now my question is that if i add > a new page(lets say create_forward) i need to describe it like this in > routes.rb, > > map.resources :resumes, :collection => { :create_forward } > > and if i add a new page (create_req) then i

Re: [Rails] Re: Routes.rb

2010-08-17 Thread Colin Law
On 17 August 2010 14:48, Hemant Bhargava wrote: > Ar Chron wrote: >> Hemant Bhargava wrote: >>> >>> In routes.rb, to create and access a new page everytime i need to write >>> :page_name => :any to my config/routes.rb. > > Ok. Here is the whole scenario for those who did'nt get it. I am using > sc

[Rails] Re: Routes.rb

2010-08-17 Thread Hemant Bhargava
Ar Chron wrote: > Hemant Bhargava wrote: >> >> In routes.rb, to create and access a new page everytime i need to write >> :page_name => :any to my config/routes.rb. Ok. Here is the whole scenario for those who did'nt get it. I am using scaffolding type for resumes, portals, agencies etc etc. For

[Rails] Re: Routes.rb

2010-08-17 Thread Ar Chron
Hemant Bhargava wrote: > > In routes.rb, to create and access a new page everytime i need to write > :page_name => :any to my config/routes.rb. Why? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gro

[Rails] Re: routes.rb

2010-08-13 Thread Abder-Rahman Ali
Tony Primerano wrote: > run > > rake routes > > and you'll see all the routes they create. comment one out and run it > again to see what goes away Thanks Tony. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] Re: routes.rb

2010-08-13 Thread Tony
run rake routes and you'll see all the routes they create. comment one out and run it again to see what goes away -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. T

[Rails] Re: routes.rb -- is it really needed?

2009-07-01 Thread Marnen Laibow-Koser
Andy Freeman wrote: > Has anyone recently thought about just merging routing into the > controller? RESTful routing is not the only type of routing that Rails supports. You can also do custom routes with completely arbitrary names. In those cases, if there were no routes.rb, Rails wouldn't e

[Rails] Re: routes.rb -- is it really needed?

2009-07-01 Thread Denis Kolesnichenko
Routing is not just controller associations. Routes can be also applied to models and globally across multiple scopes. On Jul 1, 3:21 pm, mbiker wrote: > Has anyone recently thought about just merging routing into the > controller?  ActiveRecord handles associations very well.  It seems > like t

[Rails] Re: routes.rb noob question...

2009-04-06 Thread Freddy Andersen
Should look more like this: map.resources :customers, :member => { :info_for_account_form => :post }, :has_Many => :accounts map.resources :owners, :member => { :info_for_account_form => :post }, :has_many => :accounts map.resources :usertypes, :has_many => :accounts map.resources

[Rails] Re: routes.rb noob question...

2009-04-06 Thread internetchris
Hey Freddy, So I'm not sure if my routes file is setup correctly after your last comment. Would you mind taking a look at it? ActionController::Routing::Routes.draw do |map| map.resources :customers, :has_Many => :accounts map.resources :customers, :member => {:info_for_account_form => :pos

[Rails] Re: routes.rb noob question...

2009-04-06 Thread Freddy Andersen
Yes all you need is the second statement. If you have both try running the command rake routes from the rails root directory it will show you what the two would do.(Or the one if you remove the top one.) THe second line could also be written like map.resources :customers do |customer| customer.

[Rails] Re: routes.rb problem

2009-03-07 Thread Sarah Allen
Salil Gaikwad wrote: > i try something like this in routes.rb > > map.connect 'issues/:action', :controller => 'issues', :action=>'new' > > and then restart the server but it doesn't works Try this in irb >> rts = ActionController::Routing::Routes >> rts.recognize_path("issues/new") and it

[Rails] Re: routes.rb problem

2009-03-06 Thread sahil
On Mar 6, 7:39 pm, Salil Gaikwad wrote: > I am having problem with routes.rb > > I want to access same page using two different url's for that i had done > following in routes.rb > 1]   map.connect 'projects/:project_id/issues/:action', :controller => > 'issues' you should always use.. RESTful

[Rails] Re: routes.rb problem

2009-03-06 Thread Bob Martens
Can you show us your rake routes to see what you have defined? On Mar 6, 12:21 pm, tomrossi7 wrote: > Where does the application take you when you go to /issues/new?  You > can always comment out other routes until you find the one that is > causing the conflict... > --Tom > > On Mar 6, 9:39 am,

[Rails] Re: routes.rb problem

2009-03-06 Thread tomrossi7
Where does the application take you when you go to /issues/new? You can always comment out other routes until you find the one that is causing the conflict... --Tom On Mar 6, 9:39 am, Salil Gaikwad wrote: > I am having problem with routes.rb > > I want to access same page using two different ur

[Rails] Re: routes.rb problem

2009-03-06 Thread Bob Martens
Why not just map.resources :issues and go from there? That is a RESTful resource, right? On Mar 6, 8:39 am, Salil Gaikwad wrote: > I am having problem with routes.rb > > I want to access same page using two different url's for that i had done > following in routes.rb > 1]   map.connect 'projects

[Rails] Re: routes.rb ... killing the apps ??

2009-03-06 Thread Simone R.
Matt Jones wrote: > I agree with this - the problem you ran into was that the routes file > didn't get reloaded correctly. This is a known issue (see > http://rails.lighthouseapp.com/projects/8994/tickets/981-fix-for-routing-optimization-code > ) with the 2.1 series. I would *highly* recommend tha

[Rails] Re: routes.rb ... killing the apps ??

2009-03-05 Thread Matt Jones
I agree with this - the problem you ran into was that the routes file didn't get reloaded correctly. This is a known issue (see http://rails.lighthouseapp.com/projects/8994/tickets/981-fix-for-routing-optimization-code ) with the 2.1 series. I would *highly* recommend that you upgrade to 2.2.2, or

[Rails] Re: routes.rb ... killing the apps ??

2009-03-04 Thread Codeblogger
Simone, you should restart your webserver after the second scaffolding (step 5). Regards Nicolai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyon

[Rails] Re: routes.rb ... killing the apps ??

2009-03-04 Thread Simone R.
Product Version: NetBeans IDE 6.5 (Build 20081111) Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-132 System: Mac OS X version 10.4.11 running on ppc; MacRoman; it_IT (nb) Jruby 1.1.4 Rails 2.1.0 Not working means when you click on "create" you just get rediret to /animals but witout t

[Rails] Re: routes.rb ... killing the apps ??

2009-03-04 Thread Matt Jones
I followed these exact steps, and didn't get the stated behavior. Everything worked fine here (Rails 2.2.2, OS X 10.5). If anybody's going to be able to solve your problem, they'll need more information: - versions, versions, versions. Which Rails? Which Netbeans? Which operating system? - "not

[Rails] Re: routes.rb question

2009-01-08 Thread Bobnation
Try what was recommended and what does your controller look like? On Jan 8, 10:29 pm, Joshua Abbott wrote: > Richard, > > Why not just lose this line from your routes file: > > map.connect '/:controller/:action' > > Since map.resources came along, I always delete the default stuff that > comes i

[Rails] Re: routes.rb question

2009-01-08 Thread Joshua Abbott
Richard, Why not just lose this line from your routes file: map.connect '/:controller/:action' Since map.resources came along, I always delete the default stuff that comes in the routes file. See if /phrases/new works the way it should after removing that line. -- Josh http://iammrjoshua.com

[Rails] Re: routes.rb

2008-12-15 Thread Franz Strebel
and don't forget that you can use rake routes to see all your available routes at any given time, and their corresponding controllers and actions. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: routes.rb

2008-12-15 Thread Thorsten Müller
If you nest your resources as you do, then the url will need all parts of it like: user_role_path(@user, role) As parameters it takes the resource ids as default, so you don't need the :id and the :user_id here --~--~-~--~~~---~--~~ You received this message becau