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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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,
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
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
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
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
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
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
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
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
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
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"
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
27 matches
Mail list logo