Displaying 20 results from an estimated 4000 matches similar to: "updating the dom"
2006 Apr 02
0
Re: updating the dom - Solution
Easy solution. I am using the behaviour.js package. Using this, the solution
was to apply a Behaviour.apply(); command when the XMLHttpRequest() is
complete. So my solution was to use the form_remote_tag properties to help
me call this like such:
link_to_remote("questions",
:url => { :action => ''curator_questions'', :uid => curator.id,
:tid =>
2005 Dec 19
1
New rails site. Beta testers need.
Hi Rails List,
I need some beta testers for my new site: http://www.smarkets.net. This list
is literally the first group to see it, so be gentle.
Smarkets is a prediction market for Amazon products. It takes Amazon
products and turns them into a stock. The price of these "stocks" move based
on the movement of its Amazon sales rank. If the sales rank goes up 10%, the
price of the stock
2005 Dec 22
3
help with unless
Hi,
I need a fresh set of eyes to look at this bit of controller code and tell
me why I might be getting an error message:
lookup = Profit.find(:all, :conditions => [ "user_id = ? AND
product_id = ?", uid, pid])
unless lookup.empty?
if (lookup.updated_on > 360.minutes.ago)
return
end
end
If lookup is empty, then I
2005 Dec 26
2
resorting a dataset
Quick question to see how I might re-sort an Activerecord data set. Let''s
say I have this table:
tablename: testscores
| id | student | score | avg_for_year
1, steve, 85, 82
2, tom, 84, 92,
3, jim, 92, 95
In my controller, I have something like:
t= Testscores.find(:all, :order => "score DESC", :limit => 2)
...where it would return the records for Jim and Steve....
My
2006 Mar 24
4
validate if different?
Hi, I seem to remember seeing the equivalent of saving only if all
attributes are different. I can''t seem to find that now in the API or the
agile book.
I''m using the acts_as_versioned and only want to save if the input is
different.
Thanks,
Steve
http://www.smarkets.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 May 11
9
acts_as_commentable plugin
I''ve just about finished up work on a plugin similar to
acts_as_taggable, but for comments instead which would allow you to
attach comments (possibly even a threaded discussion if conbined with
acts_as_tree) to any object. Is there anyone that would be interested
in it? I don''t want to go throug the trouble of finding some way to
distribute it unless I know that there is a
2006 Apr 02
5
adding primary_key to join table using migrations
Hi list,
My tag_question_user join table is not currently a full-blown model. It
doesn''t have a primary key - just tag_id, question_id, and user_id.
I now want to add a primary key to this model (because I want to add a
"description" column as well so users can describe the tag.
I''m not sure how to add this using migrations.
Here is what I have:
class AddNotesToTags
2006 Mar 31
4
javascript help
Hi list,
I have a list of tags. I want to be able to click on a tag and have that tag
name populate an input field. I think delicious used to allow you to click
on existing links to tag your bookmark similar to this (moving instead to
auto_complete).
My guess is the code looks something like this....
<form>
<input type="text" name="all" id="discover"
2006 May 02
4
ordering after a inject
Hi,
My results are getting out of order after I do the following command:
count = result.inject({}) { |hsh, row| hsh[row[''name'']] = row[''count''].to_i;
hsh }
Why?
Here are more specifics:
My complete method is this (based off of acts_as_taggable code - not'' DHHs,
but the original one):
def self.sql_to_count_plays(lookback)
sql =
2006 Mar 15
7
Populating text_tag with serialized data
I am using a serialized attribute in one of my models The serialized data is
in the form of an array. I want to have a text_tag for each element
contained in my serialized attribute. How would I construct the text_tag?
My model name is ''questions''. The serialized attribute is "answers"
So I might have:
<% form tag %>
<% text_tag ''question'',
2006 Apr 17
3
help debugging an error
Hi, I''ve started getting an error I can''t debug. The error doesn''t generate
anything in my development log. A breakpoint set right at the beggining of
the controller method does not get triggered. It happens on a form
submission. I can make changes to the object model from with the console,
but not on this form submission. I thought maybe it was routing, because I
have
2006 Apr 16
2
conditional updated_on update
Hi list,
I''ve got some counter_caches in a model. When these get incremented - say on
a page view - my updated_on column also gets updated. How can I
conditionally not update updated_on if just these counter_cache columns
change?
The problem with that is that I am using acts_as_versioned which clones the
record each time updated_on changes. I am successfully ignoring the
counter_cache
2006 Feb 10
3
robots.txt best practices
I''d been ignoring this error message in my log for a while:
ActionController::RoutingError (Recognition failed for "/robots.txt"):
I had never touched robots.txt. So I decided to make it a proper robots.txtfile
I found this great article...
http://www.ilovejackdaniels.com/seo/robots-txt-file/
...where Dave explains the ins and outs of the file.
Before I changed mine, I
2006 Feb 09
6
troubleshooting an observe_field
Hi,
I''ve got a live_search field in a partial that is on several different
pages. On all pages, except 1, it works fine. On the page it doesn''t work
on, it seems it never executes it action.
Here''s my observe_field code inside the partial:
<h1><label for="searchtext">Live Search:</label></h1>
<%= text_field_tag :searchtext
2006 Jan 12
3
what about Austin railers?
If Tuscon has some rail users, I know there must be some other Austin
railers out there. Have I missed some meetings that I didn''t know about?
Steve
http://www.smarkets.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060112/c2723541/attachment.html
2005 Dec 21
7
use of SET command in find_by_sql
Hi,
I''m trying to execute something like this method in a model:
def self.sql_for_rankings()
sql = "SET @counter:=0;"
sql << " SET @counter:=0;
SELECT *, @counter:=@counter+1 AS rank
FROM testscores. "
find_by_sql(sql)
end
Where the new rank column is a kind of autoincrementer inside of
2006 Mar 06
0
time-based counter design
Hello group,
Let''s say I want to list the items clicked the most the past 24 hours. Sure,
I could do a query of a click table and count all the clicks the past 24
hours for each item and sort. After a while the click table will fill up and
that count query will become slow.
I can think of 2 options:
1. Index the click count in a separate table, and increment the click count
of each
2009 Mar 15
4
php 5.2
Hi,
Is there any news about CentOS 5.2 updating to php 5.2?
Best Regards,
Melinda Odom
Design Hosting, Inc.
Web Design, Web Hosting, & Ecommerce Solutions
479-471-0891 CST
info at designhosting.biz
http://www.designhosting.biz
2006 Apr 27
2
centos 4.2 upgrade
Hi,
Which one of these listings would I put in my yum.conf file to upgrade my
centos 3.6 to centos 4.2?
http://mirror.centos.org/centos/4.2/os/
alpha or ppc?
Sincerely,
Melinda Odom
www.designhosting.biz
479-471-0891
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.0/325 - Release Date: 4/26/2006
-------------- next part
2006 Jun 12
2
dom id on form_remote_tag
I want to make use of a form_remote_tag to submit a form
asynchronously. Easy done. However, we also want to add an
observe_form tag to check for some value changes while the form is
being entered.
The observe_form tag needs a dom id to work on but I can''t see how to
enter an html option for the dom id of the form on the
form_remote_tag.
Any ideas?
Here is the form tag so far...