-1

the partial is named new_campaign_partial.rhtml. It has just the html code for creating certain text fiels and calendar

 <div id="new_campaign"
 <%render :partial =>'new_campaign_partial'%>
 </div>

 <%= link_to_function "Add a campaign" do |page|
    inser_html :bottom, :new_campaign, :partial=>'new_campaign_partial'
   end%> 
ѕтƒ
  • 3,547
  • 10
  • 47
  • 78
  • you have tagged this question as **rails-3** and [link_to_function is now gone from rails 3](http://stackoverflow.com/questions/2250231/where-did-link-to-function-disappear-to-in-rails-3) – shweta Jan 25 '13 at 06:11

1 Answers1

0

Change inser_html to page.insert_html Ref :- insert_html

<%= link_to_function "Add a campaign" do |page|
    page.insert_html :bottom, :new_campaign, :partial=>'new_campaign_partial'
   end %>
Salil
  • 46,566
  • 21
  • 122
  • 156