Friday, November 16, 2012

[Rails] Please solve such problem

Hi,
I unable to follow DRY principle. I struck in situation where actions
are same but controller are different.Wait,let me explain you with
example .

http://www.example.com/en/xyz/abc
http://www.example.com/en/mnb/abc
http://www.example.com/en/xkj/abc
http://www.example.com/en/cbc/abc

As you see in above URLs second last parameter is changing every time .
How to tackle such situation.

Currently i thought to use scope method in config/route.rb or i will
create separate controller for each /xyz/ , /mnb/ , /xkj/ .

How do you solve such problem ? It will be good if you tell me way which
follow DRY and flexible too.

Thanks.

--
Posted via http://www.ruby-forum.com/.

--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate