search for: spacevatican

Displaying 18 results from an estimated 18 matches for "spacevatican".

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 ==
2008 Oct 03
7
form_remote_tag and :with
I am trying to pass the result from a javascript function along with the result from a text_field with form_remote_tag. This is what I have so far, but no go: <% form_remote_tag(:url => {:controller => ''requests'', :action => ''create''}, :with => "''data=''+request()", :update => ''request_sent'' )
2009 Mar 10
5
'unknow column error' when using include and associated table condition in find
Here is my weird problem. Two models like following: Lexeme id:int name:string Structure id:int ref_id:string meta_id:int Lexeme can have many structure records through foreign key ''ref_id'' in the structures table. And these structure records belonging to one lexeme differs between each other using meta_id. And if Lexeme has structures, then there must be a top_struct whose
2008 May 07
2
Can I add a singleton action to @controller in a test?
All, I want to create a mock action to test a filter in a functional test, e.g.: # Simplified example def test_my_filter # Singleton action def @controller.foo assert # something end ActionController::Routing::Routes.draw do |map| map.connect '':controller/foo'', :action => ''foo'' end get :foo end My log files show that
2008 May 29
2
Render partial yields "dynamic constant assignment"
I''m getting a syntax error when rendering a partial. This is a simple html partial with one instance variable inside it. Rendering as a "template" instead of as a partial works just fine. The error occurs 3 lines after the last line of HTML code in the partial. There is no line 72! Here is the error: SyntaxError in Building_blocks#preview Showing
2008 May 07
2
Question on authenticity tokens
Does anyone find them useful? I can see them being good in some cases, but I have many exceptions that occur because of expired sessions. I am also not sure if they are really required for pages that require a login to access. The other place that they cause issues is in javascript requests. I am not using the built-in helpers, and all the javascript exists in separate js files. There is ways
2008 Jun 13
6
Newbie question on has_many
I have two classes: a Widget and a User. The User has an id that is referenced in two places on the Widget: owner_id and operator_id. How should I structure that reference for has_many? Thanks folks - I appreciate any help on this. --David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2009 Feb 02
2
ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))
i keep getting this AssociationTypeMismatch error. i think this could be a bug related to ruby/rails when using mixins. heres a short version of my code: # user.rb require ''friend_invitation'' require ''friendship'' class User < ActiveRecord::Base include FriendInvitationUser, FriendshipUser ... end # friendship.rb ... module FriendshipUser def
2008 Aug 24
3
tricky include question
I''ve been here before and maybe I''m trying to do something that is not possible. I am trying to include tables that are associated to other tables in the actual include statement but not to the original table call. In this case the furnii table. this is my original query @furnii_from_furnii = Furni.find :all, :include =>[:raider, {:imageasset => :skin}], :conditions =>
2008 May 12
1
'Stack level too deep' error
Hi, Sometimes I am getting "Stack level too deep" exception. I have know no idea on when I am getting and why I am getting. Please give your suggestions. Thanks in advance... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2008 Jul 07
1
link_to_remote multiple :with =>
i have a link to remote and i need to pass two values provided by select boxes to it, a language, and a page count (hits per page to be paginated) how do i get the code below to send both arguments?? <%= link_to_remote "#{element}", :update => "a_z_replace", :loading => "Element.show(''a_z_indicator'')", :loaded =>
2008 Aug 27
1
redirect with multi-dimensional parameter hashes
Hi, Is it possible to redirect passing multi dimensional parameters? I need to send params[:current][:selview] to another action mantaining the same data structure if I try as follows: redirect_to :controller=>"main",:action=>"inquiry",{"current"=>{ "selview"=>params[:current][:selview]}} I receive "syntax error, unexpected
2008 Sep 12
1
Referencing exactly two models of the same kind
Hi, how do I solve this in Rails: Lets say I have a User and a Message. Now, a Message is sent from one User to another User, which means that in the Message I have to reference a User twice! This seems to be a problem, if I do not user one-to-many or many-to- many relationships, because it seems to me as if I could reference a Model of the same type only once. However, I would like the Message
2010 Apr 06
2
How do I initialise
Hi, I''m playing around with module instance variables. I can set one up and initialise it when the module is included in a class. What I can''t work out is how I initialise one when a class inherits another class that includes the module. See http://pastie.org/905720 This creates two classes, the first inherits a module that contains an instance variable. The second inherits the
2008 Jun 08
3
Plugins - helper function is an "undefined method", Objects "can't be referred"
I''m modifying a shopping cart plugin, MinimalCart, and for some reason I can add one item to the cart multiple times, but as soon as I add a second item, all kinds of strange things start happening. An actionview::template error is thrown because a method defined in application_helper is "undefined" What could cause a defined application helper method to all the sudden not be
2009 Jul 29
5
[newbie] double relationships in database
I have the following tables teams id :string name :string and matches id: home_team :team_id visitor_team :team_id how can I reflect that kind of relationship in a RoR model? thanks and keep up the good work.
2008 Oct 11
8
Observing few fields in a form - Best Practise?
Hi, im looking to build a page similar to a shopping cart page. When you change the ''price'' or ''quantity'' fields, the total is calculated and displayed. There are other fields in the form which have no relation to this action. So i guess observe_form is not required. Can someone tell me what the best practise is for this?
2008 May 14
7
A copy of XX has been removed from the module tree but is still active!
I have a class in my /lib/ directory called tracker.rb It''s function is to receive an array of URLs and then perform 4 separate tasks on each URL Each of the 4 tasks gets it''s own thread. the class is called from my controller like: output = Tracker.go([array_of_urls]) Sometimes, when it hits an exception, instead of just dieing gracefully, my logs repeatedly display: A