Displaying 20 results from an estimated 8000 matches similar to: "Plugins - helper function is an "undefined method", Objects "can't be referred""
2008 Dec 15
1
remote_function in IE with select input onchange
Here is the code:
http://pastie.org/339967
Generated HTML: http://pastie.org/339969
This works great in Gecko and Webkit based browsers, but IE throws an
error: "Object doesn''t support this property or method". Any clues?
Thanks,
Nik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
2008 May 30
1
Parameters for FormOptionsHelper select vs. FormTagHelper select_tag
I must be missing something when it comes to the parameter differences
between form FormOptionsHelper select and FormTagHelper select_tag.
Code that follows, works perfectly -
<%= f.select :unit, units_to_select(@product), :size=>"20"%>
The following code, does not. The helper function never even seems to
be called.
<%= select_tag "unit",
2006 Sep 03
2
Undefined method "xxx" of a model when calling a helper
Hi all
I''m creating a shop page. I have a cart model that looks like the
following:
class Cart
attr_reader :line_items
def get_line_item id
@line_items.each do |l|
return l if l.id == id
end
end
def initialize
@line_items = []
end
def empty!
initialize
end
def empty?
return true if @line_items.empty?
false
end
end
And I have some
2008 Jun 29
3
Working around/with Restful Authentication
I''m using Restful Authentication, and the code to create a user is
pretty straight forward - there is a before_save action and a
before_create action:
before_save :encrypt_password
before_create :make_activation_code
But for some reason when I try to create a user programmatically in
the controller like this:
User.new(:email =>
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 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 Dec 18
2
Undefined Method error - help request
Good morning All -
I am working on a time tracking application as a learning excercise
and have run into an error neither I nor Google can remedy.
When loading my view, I get an error: ''undefined method
''true_class_path'' for #<ActionView::Base:.........
Context:
I have controllers for Project, Worktrack and ''Workbench'', among
others. Workbench is
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'' )
2006 Apr 07
3
Logging And Environment
Hi All,
Couple easy questions:
1. How do I view what environment my app is running under (i.e
production / testing / development) - I''m not sure what RAILS_ENV is
set at, how to I take a look at it?
2. Somehow (?) I have turned logging "off". I''d like to have it back
on :s I have files called production.log, test.log, server.log,
development.log in /myapp/log/ but
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
2004 Apr 13
4
Dial Plan Format Strings
In the absence of "The Definitive Guide to Asterisk Dial Plans" book, I'd
like to do something possibly unique with the formatting of extensions in my
dial plan, and am having trouble. We use VoicePulse connect, which gives us
local DID for inbound and outbound calls (even though DTMF tones are not
working in Voice Pulse Connect at the moment). To dial local numbers, you
have to
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
2006 Mar 06
3
Disconnect all MySQL connections
Hi
I've got the error "cannot allocate a new connection -- maximum of 16 connections
already opened" after I tried to create a new connection to a database. However,
the reason ist, that i did not disconnect previous connections....
I don't know the name of this connections. How can I disconnect this "unknown"
connections and drivers? if I delete all objects, the
2006 Aug 16
4
How to bypass traffic control for one IP
Hi all,
i have a problem: i have an adsl modem that is connected to internet. I can''t manage this modem.
Between my PC and the modem i have a linux firewall that make the NAT and the traffic shapping.
I have create a script that limit the bandwidth of the "external" interface of the firewall so i can manage my bandwidth for my internet application.
The problem is that i need to
2004 May 25
6
Downgrading Asterisk
I upgraded to the latest HEAD version of asterisk, and all IAX calls started
sounding choppy. It was suggested on the IRC channel that I go back to
asterisk -stable to determine if that fixes it. Is downgrading as simple as
upgrading? Because now, -stable builds fine, but I get an error on the
asterisk console when starting, something about "ast_get_txt" not found.
Recompiling and
2010 Jan 15
5
Asterisk 1.4 or 1.6 automated install script for CentOS 5.3 or 5.4
Hi Guys,
Other than than yum repository (which fails when installing freepbx with it)
are there any automated install scripts out there that would install
Asterisk 1.6 or 1.4 onto a CentOS LAMP system?
If the script install FreePBX that would be a BONUS.
Thanks,
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2023 Mar 20
2
[Bridge] Multicast: handling of STA disconnect
Hi Nik,
Flushing MDB can only be done when we are managing it per station not
per port. For that we need to have MCAST_TO_UCAST, EHT and FAST_LEAVE.
Here one more point is - some vendors may offload MCAST_TO_UCAST
conversion in their own FW to reduce CPU.
So, the best way is to have MCAST_TO_UCAST enabled and MDB will become
per station, so we can delete MDB on disconnect. Shall, I create one
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: