Displaying 20 results from an estimated 28 matches for "tennisbum2002".
2006 Oct 13
5
multi_search error undefined method
Hi,
Im having problems using the multi_search command. I keep getting the
following error.
"undefined method `<<'' for Book:Class"
here is the code associated with this.
class Book < ActiveRecord::Base
acts_as_ferret :store_class_name => true
end
class User < ActiveRecord::Base
acts_as_ferret :store_class_name => true
end
and the call is the
2006 Aug 02
3
newbie question, adding conditions to collection of sql objs
I have:
@pictures=@c.pictures
How do I add limit and order_by conditions. I have tried the following:
@c.pictures.find_all(:limit=>5)
@c.pictures, :limit=>5
@c.pictures :limit=>5
None of these work.
--
Posted via http://www.ruby-forum.com/.
2006 Jul 28
3
render :update working incorrectly
I have the following code
render :update do |page|
page.alert(''Hey there'')
end
Why is it taking me to a blank page with the following text at the top:
alert("Hey there");
This text is in <pre> tags as well. Its kinda weird. Thats what I want
to execute on the page that it came from. Any ideas?
This happens with the other commands where it renders the
2006 Jul 28
7
auto_complete_for exists but not being found by Rails
Anybody encounter this. I know the method exists in the auto_complete.rb
file in my rails installation, but it itsnt accessing it throught he
program.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 26
2
How do you stop a ruby method prematurely
Hey guys,
I was wondering how to stop a method without having to perform an action
or redirect?
I tried using "stop" or "exit" but they didnt work
--
Posted via http://www.ruby-forum.com/.
2006 Jul 29
1
newbie - best place to put methods used in controllers?
Hey guys,
Where is the best place to put methods called in your controller? I ask
because my controller file is getting bulky with code that doesnt need
to be called directly.
I was wondering if I could put it in the application.rb or if there is
some way to put it in the helper?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 31
2
updating records in a many-to-many relationship
Im trying to establish relationships in a many to many table.
When I create a user, I do this to insert the different relationships
between the user and sports:
c.sports<<Sport.find_all_by_name(params[:sports])
where c is the user. The problem is, when I edit this user, and lets say
he adds a sport, I can''t use this because I get an error saying that
some records already
2006 Aug 02
3
controller methods for app/views/A/B.rhtml
If I want to call A/B, can I call a corresponding controller action for
it?
Like with app/views/A.rhtml, I can it will call the method A in the
controller file.
But with A/B.rhtml, I cant do def A/B.
--
Posted via http://www.ruby-forum.com/.
2006 Aug 02
4
applying conditions to ActiveRecord call in model.rb
If @c is an instance for the User class and lets say I want to call
@c.pictures, which would be the user''s pictures.
How can I setup up RoR so that I could append the condition
"status=''available''" to the conditions arguments EVERYTIME .pictures is
called. This way I can only call available pictures
Is there some kind of filter I can apply to the
2006 Jul 26
0
render :update issue getting whole new page
Hey,
I have:
render :update do |page|
page.alert(''none'')
end
The problem is that if this was in the method "balloon" and controller
"create", then it take me to a blank page with "alert("none");"
It doesnt render in the window that it was called in.
This happens with other commands as well such as call and replace_html.
Any
2006 Jul 26
3
Getting Ajax.Updater or page.replace_html to render js?
Hey guys,
I, for the life of me, cannot figure out how to get Ajax.Updater or
page.repalce_html to render the javascript in a partial. Upon page
loading, the partial gets rendered fine. But when called up to render
through an AJAX function something goes wrong.
Are you guys getting this error???
--
Posted via http://www.ruby-forum.com/.
2006 Jul 27
2
Saving records in mySQL for many-to-many relationship
Hey guys,
Maybe someone could point out what wrong here. I''ve simplified the issue
to this:
Both User.find(6) and Sport.find(1) exist, Im just trying to setup the
relationship between them.
My controller looks like this
def tester
@c = User.find(6)
@c.sports = Sport.find(1)
end
And I keep getting this error:
undefined method `each'' for #<Sport:0x36a3488
2006 Jul 27
1
auto_complete_for method not found error
Hey guys,
I have the newest installed Ruby Gems 1.4. I can''t run the scriptaculous
auto complete because it cant find auto_complete_for method.
However, I have the auto_complete.rb file in my Rails directory and it
has the method inside. Why is not found?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 29
1
best way to update one-to-many relationship
whats the best way to either add or remove entries for a one-to-many
relationship.
Should I just put all the entries associated with a record into form
fields, and than on submit delete all the entries, and then reenter all
of the ones on the current form.
This would take into account addition and deletions to the database.
whats the best way to do this with many-to-many assuming you want
2006 Jul 30
0
making friend request, many to many relationship
Hey I have a users table, what should I do to make a "friend request
table". I cant have a table called users_users and have two columns,
user_id and user_id.
Whats the proper way of doing it in Ruby?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 30
0
form_remote_tag and rendering partials with <script> tags
Has anyone successfully used a form remote file upload either by using
the respond_to_parent plugin or kylemaxwell''s form_remote_tag plugin to
render a partial or code with <script> tags in it.
This would be very useful for RoR''ers to create new ajaxy elements.
If you can, can you post a sample code if you got it working.
--
Posted via http://www.ruby-forum.com/.
2007 Jul 21
0
Ferret not building index successfully all of a sudden
I''ve been using acts_as_ferret for a couple of months now. Everything
was going fine. Suddenly, however, when I try to rebuild my index, only
1 of the 2 models I index gets indexed correctly.
Looking in the ferret_server logs, it says that both were successfully
rebuilt. However, one of the indexes has no data in the folder. The
other was index correctly.
The odd thing is that this only
2007 Jul 23
1
Ferret indexing problem through rake tasks
I''m having a weird problem. Recently, on all my environments, one of my
two indexed models is not returning any results to acts_as_ferret.
However, the folder is being created for it and Im not receiving any
errors.
On my two models, I call the following:
Book.rebuild_index
User.rebuild_index
When I call those commands through either my live app "ruby
script/server" or
2007 Apr 10
1
prevent index auto update
Hi,
I have a has_many association between Book and Page.
I have acts_as_ferret running on only the Book model. However, when I
update the a page, it calls the auto update index on the Book model as
well just in case any of the ferret fields were changed.
How can I stop acts_as_ferret from auto updating the index on its own,
especially when nothing changes?
--
Posted via
2007 Feb 08
0
RAW_POST_DATA not in header
Has anyone been able to successfully access the RAW_POST_DATA? I know Rails has a fix for this. Haven''t been able to do it in Merb.
I tried doing "request.body.read" which gives nothing, however when I do request.body.length, I get a length over 2000. I tried accessing $stdin, however I can''t seem to get the darn data out of it.
Aryk
-------------- next part