similar to: link_to_function check javascript attribute

Displaying 20 results from an estimated 1000 matches similar to: "link_to_function check javascript attribute"

2005 Jun 29
4
Problem connecting to MySQL
Hello, when I invoke an action of my rails web app I recieve this message: No such file or directory - /tmp/mysql.sock In my MySQL config file I have this line: socket=/var/lib/mysql/mysql.sock Why Rails doesn''t pick up this value instead of his default value? How could I change the configuration of Rails in order to change that value? -- / Eduardo Yáñez Parareda /
2009 Aug 06
13
Redirect after login
Hi, I''m new to Ruby/RoR so please bare with me! I''m trying to adapt a ruby setup where someone logs in to a bonjour service via a web browser. I have the login screen which asks for host and password. There is only one user per host and i can log in fine. It''s suppose to redirect me to /list in my browser but doesn''t. Once i''ve entered the correct
2010 Dec 30
6
validates_inclusion_of doesn't match constant
Hello, I have a model Model: SPECIAL_FEATURES = %w(none top) class Model validates_inclusion_of :special_feature, :in => Model::SPECIAL_FEATURES, :on => :create, :message => "special_feature %s is not defined" belongs_to :team def special_feature attributes = attributes_before_type_cast if attributes["special_feature"]
2006 Apr 07
5
RJS support "toggle" effect?
Does RJS inherently support the Element.toggle effect? I haven''t been able to call it the way you call "appear", "fade", etc... Jeff -- Posted via http://www.ruby-forum.com/.
2005 Jun 23
6
Problems with Hello World
Hello, I''m installed RubyOnRails in my Fedora Core 4 system. I''ve created an empty web application with: rails cookbook then a controller ruby script/generate controller MyTest And a file named my_test_controller.rb was created at cookbook/app/controller directory. I ''ve written a new method for MyTestController class like: def index render_text "Hello
2008 Jul 04
4
Libs directory
Hello, I had an application on Rails 1.2 or 1.1 (don''t remember). Now I have updated it to 2.1. I had a migrations_helper.rb in the Libs directory which defined foreign_key and drop_foreign_key methods. But now migrate task doesn''t find them. Have I to include this directory somewhere with Rails 2.1? Doesn''t it work as always? Could I use another thing to declare
2008 Jan 27
4
(REST) Nested routes
Hello, I''m in troubles with nested routes. I have three models: Team, Tournament and TeamTournaments class Team < ActiveRecord::Base has_many :tournaments, :through => :team_tournaments has_many :team_tournaments class TeamTournament < ActiveRecord::Base belongs_to :team, :foreign_key => ''team_id'' belongs_to :tournament, :class_name =>
2006 Jul 21
1
RJS Failing
This code was working before I created the update_link_list method in the helper below (everything was in the controller). I can successfully create a new link but I get a TypeError when I leave all form fields blank -- I expect to see validation error messages. --- #link_controller.rb: def create link = Link.new(params[:link]) saved = link.save num_links = Link.find(:all).size
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
2006 Apr 03
5
RJS Queue
Hi, I''ve been able to succesfully queue page.visual_effect commands in my RJS templates. Each command will wait to execute until the previous command is done executing. But I''d also like to execute a page.replace_html command AFTER the page.visual_effect commands. I have a series of five DIVs: div1 div2 div3 div4 div5 When the user clicks on div1, a page.visual_effect
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the examples in the second edition Agile book. I have everything working except for the RJS that removes items from the cart. Ideally what I''d like to do is highlight an element that I am deleting only if there is more than one of that particular item in the cart. If the item deleted is the only of
2007 Mar 08
3
Problem loading data from database
Hello, I get this error trying to load some data from DB. I''m using Rails 1.2.2 on Fedora Core 6 and Sybase adapter. This worked fine when application run under Rails 1.1.6 but now I''m migrating to 1.2.2 and have some problems. At browser I got: SQL Command for table_structure for tplib_bckps failed Message: schema_info not found. Specify owner.objectname or use sp_help to
2006 Apr 07
1
Validate_presence_of error in nested object is not displayed
Hi, I have a contact object . This contact has a address object >>Contact class Contact < ActiveRecord::Base has_one :address validates_presence_of :first_name ,:last_name end .>>> Address class Address < ActiveRecord::Base belongs_to :contact validates_presence_of :address end Addres has the following fields ; address, phone, fax, email In the contacts_controller I
2006 Jul 20
5
RJS where to put helper method?
Hi, If I want to have helper method for my rjs, where''s the best place to put it? so for example: --- bla.rjs: page.replace_html ... page.visual_effect ... --- somewhere: (currently I put in application_helper.rb) def replace_with_effect(page) page.replace_html ... page.visual_effect ... end --- bla.rjs: replace_with_effect page and is there a way to define the helper so we
2006 Jun 26
1
RJS visual_effect toggle?
Is there a way to toggle an effect in an RJS? If not, anyone have recommendations for how to manually make it toggle? I guess I would assume some boolean that the rjs checks everytime it''s called and depending on whether it''s true or false it will do page.visual_effect :appear or page.visual_effect :hide -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jul 16
6
How to access element attributes using RJS?
For example, in the following block: page.select(''.foo'').each do |element| ... end How would I access, just for example, the id attribute of each element in the collection? I''ve randomly tried element.id and element.attributes[''id''], but neither of those has worked. I''ve also been unsuccessful in finding any documentation on this, but it
2006 Apr 03
4
page.visual_effect :highlight not working
I just upgraded Ruby to 1.8.4 and Rails to 1.1 and I''m in the middle of changing my Javascript code over to the Scriptaculous helper functions. page.visual_effect :highlight, "some_div" seems to be broken. Instead of fading, the background color of the element stays highlighted. page.visual_effect works for other effects, though. Any ideas? Thanks. -- Posted via
2006 Jan 19
1
rjs problems
Hi, I am having trouble with rjs templates. Basically I want the item_div to fade if its already open and then display the new item that the user selected with the visual effect: appear. The code below causes the browser (firefox on osx) to open the div and then close it again as soon as it is open: page.visual_effect :fade, ''item_div'', :duration => 0.5 page.replace_html
2006 Feb 06
6
.rjs template doesn''t load?
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060206/cf123b71/PGP.bin
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