similar to: trouble updating partial from collection

Displaying 20 results from an estimated 10000 matches similar to: "trouble updating partial from collection"

2009 Aug 11
5
Dynamic drop-downs in a form_for using AJAX remote_function - Help
Hello - I am fairly new to Ruby on Rails, but feel like I am learning quick. I have what seems to be a fairly unique issue as I cannot find much out there that describes what I''m seeing. Hopefully it''s a very simple fix, and I simply can''t see the forest through all the trees! I am attempting to create 2 related drop-down lists in the same form_for, both using
2007 Jul 05
6
mocking methods in the controller.
Hi, I''m very new to rspec so please be patient with me. I''ve tried to take some of my tests out of the controller specs to check for things that are rendered. This has not worked so well, since my views have the controller method current_user in quite a few places. Is there any way that I can define this so that my views will be executed? Will this same thing occur for all
2008 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute? <div id="new_item_details" style="display:none"></div> <%= link_to_function("Show details...", nil, :id => "show_details") do |page| page.visual_effect(:toggle_blind, :new_item_details) if (page[:new_item_details].style.visibility ==
2009 Nov 18
4
rails newbie : routing error
After much ado about the naming of model adn controllers... model : Expense controller : Expenses route : map.resources :expenses Here I am using mysql database and created a unique index, since db:migrated created an id object and made it as primary key. Now in the def create @expense = Expense.new(params[:expense]) if @expense.save flash[:viola] = ''New expense saved.. be
2006 Jun 21
2
Using RJS to highlight one LI if using insert_html on an UL?
It seems common to use RJS for quickly adding and highlighting a list that is having content added to it like this: http://rafb.net/paste/results/Z3m32g48.html ... where "my_list" would be an UL and the partial would insert a LI. Given that example, is there an easy way to highlight only the newly inserted LI instead of the whole UL? The only way I can see to do it is to give
2009 Jun 23
7
can't get remote_function working on rails 2.3.2
I''ve tried moving the code around in different ways, but so far I haven''t gotten remote_function to work for me (I''m using Rails 2.3.2 on my Mac). I want to make an AJAX call when I double-click a word on my page, and the Javascript function is being called when the ondblclick event is fired, but nothing happens when it gets to my the "new Ajax.Request" part
2008 Oct 27
8
why can't johnny download?
I''m working on an app that includes the feature to allow user to download a csv file of their data. I''ve got it working on my local machine, but when I deploy it, the link I''m making doesn''t work for doing the download. The file IS being created in the location I''m intending, but the file download only works on my local machine and not on the server.
2006 Apr 27
4
select item based on previous select list selection?
So I have a select list with a list of items. When a user selects an item, another select list should have its default selected item set to a specific item (the default associated with the first select list). This is in a form to create a new task. The first select list is a list of parent tasks. When one selects the parent task, the clients select list must default to the same client as its
2007 Mar 07
4
Ajax and IE6 - is there some sort of "trick"?
Hi, I''ve got some Ajax stuff that shows more or less of a complex form based on a radio button selection. A "radio_handler" controller action is the action for a form handler. Some seemingly simple "replace_html" fires as a result of different radio buttons being chosen (which should then show more or less of the form). This all works just great on Mac Safari and
2006 Feb 14
1
in a domU, 6 network interfaces wanted, only 3 seen
Hello, I need 6 virtual interfaces in a domU (which will be our firewall). I''ve created 6 bridges in dom0, configured everything correctly... When I start the domU, it can only see 3 of them : eth0, eth1, eth2. However, the bridges in dom0 are correctly configured, and I can see all 6 vifs (from vif<DOM_ID>.0 to vif<DOM_ID>.5) when using "brctl show". On the
2006 Aug 04
3
<img onclick> vs link_to_remote()
In one of my view , I have an image the user need to click to close a <div>selections</div> added by an Ajax call. if I use : <img src ="/images/icon_closeitem.gif", size="16*16", border="0",alt="Close Selection", title="Close", onclick="<%= remote_function(:url => { :controller => ''property'',
2007 Sep 12
10
Need help refactoring a controller, perhaps add threading?
Good morning, I''ve been working on my first Rails app. I''m replacing an old Perl script that scrapes a bunch of data from an Oracle database, generates a bunch of charts then builds a static webpage with the charts. I''ve re-built it in Rails, with about 25% of the code it took to do in Perl and the users can now get dynamic charts instead of day old charts (or
2006 Jul 22
17
Problem getting form_remote_tag to work with image upload
Hey guys, I am trying to pass the parameters for the file being upload, but the params[] are not being passed. Ive read through some posts and realize this is an issue with RoR. I read through some of the posts and someone suggested using: http://svn.kylemaxwell.com/form_remote_upload/trunk/ I tried to install it, and although I thought I installed it correctly, it doesn''t work.
2006 Mar 28
5
RJS call from controller issues javascript that doesn''t get evaluated by browser
Hi, I''m on Rails 1.1 and I have a problem wit RJS In my cotroller i have ==>>> def show @contact = Contact.find(params[:id]) render :update do |page| page[:contactInfo].replace_html :partial=>"contactInfo" end end <<<=== And my contactInfo partial looks like this and it''s placed inside a div element ==>>> <table>
2006 Apr 04
7
Not getting the whole RJS-based partial rendering concept ...
I have been trying all kinds of different ways to produce what I think should be a simple effect, but have not had any luck yet and apparently I am not following the general idea... What I am trying to accomplish is the following (part 1 works and part 2 does not): 1. One of my views has a link_to_remote which updates a div container with a table of data my example is <div
2006 Jul 17
3
trouble with render :partial from controller
Hi, I''m definitely a newbie on rails here. My very first attempt has gone well up until this point, but for some reason, when I try to do a render partial, I''m getting a full screen refresh. I did a render partial just fine from an rhtml file. This problem is specifically when calling render :partial => "my_partial" from the controller''s .rb code.
2007 May 11
2
spec a replace_html with a partial
I wanted to use ARTS to add RJS in a behaviour driven way to my application, but I''m having some trouble asserting a replace_html with a partial. I''ve created a pastie (http://pastie.caboo.se/60694) which contains the RJS I want to spec, the spec which I already wrote and its failure message. I''m currently using RSpec-0.9.2
2011 Mar 01
6
render :collection calling partial with phantom object?
I have two models with a straightforward has_many / belongs_to relationship: class Premise < ActiveRecord::Base has_many :metered_services, :dependent => :destroy ... end class MeteredService < ActiveRecord::Base belongs_to :premise ... end and nested routes to match: Demo::Application.routes.draw do devise_for :users resources :premises do resources :metered_services
2006 Apr 05
23
how to create RJS visual effects callbacks
I''m trying desperately to get visuall effects callbacks working in rjs templates to no avail What I''m trying to do is fade an image, change the div with the image to a new image, and then fade the new image back in. How would I go about this in RJS Here''s a simple line from my rjs that I can''t get to work. It is not using callbacks so the
2007 Jul 16
0
Ajax works in FF but not safari!
The following code works perfectly in FF, but does not work in safari. I''m on Edge Rails with the latest javascripts. Any clue what''s going on? CONTROLLER: def create @program = @school.programs.new(params[:program]) if @program.save render :update do |page| page[:program_list].replace_html(:partial => ''program'', :collection =>