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
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
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
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
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
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
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
7 matches
Mail list logo