link-to-function

Attaching onClick event to Rails's link_to_function

How do I attach an onclick event to a link_to_function such that clicking on the event refreshes an element on the page (using partials)? When the user clicks the generated link, I'd like to refresh the partial containing the code so that i gets updated. def add_step_link(form_builder) logger.info 'ADD_STEP_LINK' link_to_func...

Rails: Specifing params without value to link_to

Supposing the route map.resources :articles how do you get this /articles?most_popular using link_to method? tried the following: link_to articles_path(:most_popular) # exception link_to articles_path(:most_popular => nil) # /articles link_to articles_path(:most_popular => true) # /articles?most_popular=true note: i'm using inh...

Nested form and link_to_function

Hi everyone! I've got a nested form like this : <% form_for setup_training(@training), :url => admin_trainings_path, :html => { :class => :form } do |f| -%> <!-- begin of form --> <!-- content of :partial => "day_form" --> <% f.fields_for :days do |days_form| %> <%= render :partial => "admin/days/form_inner", :locals => { :f => da...