Displaying 3 results from an estimated 3 matches for "select_group".
2006 Dec 05
1
Using render inside a FormBuilder (EdgeRails)
...d
TableFormBuilder after the rails cookbook, and want to be able to
present help icons automatically. I want these icons to appear next to
form fields I am rendering.
For example, I have this method in helpers/table_form_builder.rb:
# This enables you to use select groups like text fields
def select_group(object_name, choices, options = {}, html_options =
{})
human = options.delete(:human) || object_name.to_s.gsub(/_id$/,
'''').humanize
if options.delete(:required)
human = human.required
end
@template.content_tag(''tr'',
@template.content_t...
2006 May 31
5
undefined method `redirect_to''
...ivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger
to get rails running and all is fine except for getting:
undefined method `redirect_to''
when I load my test page.
I have the following in my xx.rhtml:
<%= select :group, :user_id, find_all_groups, {}, {:onclick =>
select_group, :size => find_all_groups.size + 1} %>
and in my xx_helper.rb I have:
def select_group
redirect_to "http://www.rubyonrails.org"
end
I have installed actionpack.
Any help with the problem would be greatly appreciated.
Cheers,
Mark
--
Posted via http://www.ruby-forum.co...
2006 Mar 04
3
:class in link_to_remote?
Is there a way to set the class of a link in link_to_remote? I tried
adding :class => "this_damn_class" after the :url hash and it didn''t
work.
I went ahead and did it manually using remote_function, i.e.
<a class="this_damn_class" href="#" onclick="<%= remote_function ...,
:url => {...} %>">My Link</a>
--
Posted via