[Rails] Use of on rxml

2010-05-24 Thread John Smith
How can I put something like this on a rxml, in one line of code and generating only one line on the xml ? -- 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 ru

[Rails] does changing to_param() have any side effect?

2010-05-24 Thread Jian Lin
In some book, it is recommended that to_param is changed to class Story < ActiveRecord::Base def to_param "#{id}-#{name.gsub(/\W/, '-').downcase}" end end so that the URL is http://www.mysite.com/stories/1-css-technique-blog instead of http://www.mysite.co

Re: [Rails] Re: Questionairee's questions - how to show all user's answers? How to update database with ALL user's answers?

2010-05-24 Thread pavling
On 24 May 2010 07:42, Smoq wrote: > Could you let me know what shuld be included in controller to list on > the page ALL user's answers? You could populate a variable with the results of a find of the user's answers, or just have a variable for the user and access "@user.questions" in the view.

[Rails] one model with two controller?

2010-05-24 Thread nirosh
i have a comment Model. it has already "belongs_to :poem" entry. is there any way to use this model to another controller (eg:- belongs_to :post) . if it is possible then how do i do the migration and other stuffs please explain a bit. nirosh -- You received this message because you are subscrib

<    1   2