[Rails] Re: Re: Generating RDoc for App

2010-07-21 Thread Will Clark
For anyone interested, I emailed Eric Hodel who mentioned that it is possible: === You'll need ## above your comment like: # This is the test model class Test < ActiveRecord::Base ## # Sort all tests by name named_scope :sort_by_name, :order => "name ASC" end See 'Metaprogrammed Methods' h

[Rails] Generating RDoc for App

2010-07-21 Thread Will Clark
I notice that when I run rake doc:app, that the named_scope declarations I have in my models aren't being included in the documentation. Is there a way to get named_scopes in the rdocs? Thanks, Will -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscrib

[Rails] Re: RJS, select, & replace_html

2009-11-12 Thread Will Clark
Fred, that worked, I was just about to write my own method to handle it too. Thanks! - Will -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. T

[Rails] RJS, select, & replace_html

2009-11-12 Thread Will Clark
I need to update a series of html tags with the same content. I've tried running the following in my rjs file: page.select(".some_class").each do |item| item.replace_html("Some Content") end But it won't work. However, when I run: page.select(".some_class").each do |item| item.hide end i

[Rails] Nested Models & Error Validation

2009-05-13 Thread Will Clark
I have two models: User and MemberProfile class MemberProfile < ActiveRecord::Base belongs_to :user validates_presence_of :name #... end class User < ActiveRecord::Base has_one :member_profile validates_presence_of :email accepts_nested_attributes_for :member_profile #... end My vi

[Rails] Re: form_for, partials, and link_to_remote

2009-04-01 Thread Will Clark
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 fr

[Rails] form_for, partials, and link_to_remote

2009-03-31 Thread Will Clark
I'm using Rails 2.3.2 with a form to edit a Page object: <% form_for([:admin, @page], :class => "form") do |f| %> #... <% end %> In that form I'm also using fields_for/nested models. I want the ability in the form to have a link_to_remote that calls a partial that has the fields_for related to t