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
other way around, configuration over
On Wed, Mar 14, 2012 at 10:28 AM, tydeas tydeas...@gmail.com 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
Hello All,
In routes.rb, to create and access a new page everytime i need to write
:page_name = :any to my config/routes.rb.
Can you guys tell me any better alternative to this?
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
On 17 Aug 2010, at 11:00, 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.
Can you guys tell me any better alternative to this?
I'm not 100% sure I understoon what you're after but take a look at:
I'm following the tutorial here:
http://edgeguides.rubyonrails.org/getting_started.html
And, so far, I have the following in the routes.rb file:
get home/index
resources :posts
root :to = home#index
I know what root :to = home#index is.
But, what is the use of the following, what do they mean?
Has anyone recently thought about just merging routing into the
controller? ActiveRecord handles associations very well. It seems
like the controller should be able to handle its own associations just
as well.
Andy
--~--~-~--~~~---~--~~
You received this message
Hey Everyone,
I'm wondering if the statement below are redundant? Once you define
the resources for a particular controller, that should be it right?
I'm assuming all I need is the second statement below.
map.resources :customers
map.resources :customers, :has_many = :accounts
Thanks!
Chris
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'
so when my url is
http://localhost:3000/projects/xyz/issues/new
i access the
1) create a RoR project on Netbean
2)generate scaffoldcar name:string power:string
3) db:create
4:)db:migrate
5) Run project
now on http://localhost:3000/cars you can find the app and play a little
, the app is WORKING and SAVE every car you create
6)generate scaffold animal
I'm trying to go to localhost/phrases/new
where 'phrases' is my controller and 'new' is my action which will
simply show my new.html.erb
In my routes i have:
map.connect '/:controller/:action'
Yet every time i go to phrases/new, I get redirected to my show action
http://pastie.org/356249
I
Hi,
I am going through a tutorial in a rails book. I have Something off with
routes:
I have RESTful resource in routes.rb:
...
map.resources :users, :member = { :enable = :put } do |users|
users.resources :roles
end
...
and in a html.erb partial I have:
...
%= link_to 'assign role',
11 matches
Mail list logo