Displaying 20 results from an estimated 200 matches similar to: "(no subject)"
2009 Sep 25
0
WWW::Mechanize and Rails console not playing well
I can run this code just fine in irb, but when I run it in rails
script/console, I get an error:
>> res = agent.submit(search_form, search_form.buttons.first)
ArgumentError: one hash required
from /home/jwoods/NetBeansProjects/activista/vendor/rails/
actionmailer/lib/../../actionpack/lib/../../activesupport/lib/
active_support/core_ext/string/interpolation.rb:85:in `%''
2007 Apr 20
2
Running script does not return the correct page
Hello all,
I have tried to post this yesterday, but noticed I was actually not
subscribed yet... Well, here we go again:
If I run this script, and observe the output, the results are not there
at all (try to do the same in the browser). Any suggestions?
require ''rubygems''
require ''mechanize''
agent = WWW::Mechanize.new
agent.user_agent_alias =
2007 Apr 19
1
Do you have any idea what could be the problem with this script?
Hello all,
If I run this script, and observe the output, the results are not there
at all (try to do the same in the browser). Any suggestions?
require ''rubygems''
require ''mechanize''
agent = WWW::Mechanize.new
agent.user_agent_alias = ''Mac Safari''
page =
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo
are finding the debugger times out once it''s loaded a web
page. They don''t run into this in the ruby-debug debugger,
or running in normal mode.
The reason: Komodo''s debugger is graphical, which means that
whenever it hits a breakpoint it automatically shows the
contents of each local variable. It has a
2006 Nov 04
0
form_remote_tag problems with post url
Hi,
I''m hitting a bump with the form_remote_tag, and wondering if anyone can
help.. SO i''m trying to implement a tag-based search on a site and using
routes, I can enter a url such as http://localhost/tag/query , which calls
an action ''search'', and returns all the posts which are tagged with the word
''query''..
fine...
In the
2006 Jul 06
0
Ajax form results display help
I''m not that familiar with Ajax, so there is a good chance that I''m
doing something incredibly stupid, but here is the issue. I have a
search form that will display results on submit using Ajax callbacks
and cool effects.
Here is the operation that I would like
-User enters data
- On submit of the form, the spinner shows
- If there is an error, the error div is shown and
2006 May 02
1
Very simple RJS not working in IE
My HTML:
<div id="search_div" style="display: none;">
<table>
<tbody id=''search_results''>
</tbody>
</table>
</div>
My RJS:
page.insert_html :bottom, ''search_results'', "<tr><td>Test</td></tr>"
page.show "search_div"
Now, everytime this gets called, it adds a
2006 Jul 21
1
Passing a variable between methods
Hi,
I am trying to add search functionality to may application. I am
struggeling to pass my query to the controller and then show all my
search results in another view. How would I do this?
Model:
class Advert < ActiveRecord::Base
belongs_to :user
def self.search(query)
if !query.to_s.strip.empty?
tokens = query.split.collect {|c| "%#{c.downcase}%"}
2007 Oct 29
0
Ferret - sorting results by score
I am trying to figure out how to sort my results by the score Ferret is
returning. From the results of a search, I use the ids to then look
up their corresponding records in the database. The reason for this is
that the database records contain more information than I am storing in
the index. Any ideas? Code example below. Thanks in advance!
def index
if (params[:q])
2007 Sep 27
2
Problem getting "extract" from RDig
Hi All,
I have to have a site wide search for my current application. By search
I mean I have to search the static and the dynamic contents from the
database. I have been searching on this for a while on the net and RDig
seems to be a apt solution. While using it I have encountered a few
problems. I know these might be very basic issues but I have not been
able to figure out what is wrong with
2012 Jan 09
1
Windows, Rails 3.1.3, Omniauth-BrowserID, SSL Erro
One and all, I have scoured the internet high and low tonight and I
can not for the life of me fix this damn problem. I have downloaded
certificates, installed certificates, changed my :ca_path and such as
stated in the documentation for omniauth-facebook for which I thought
would be ok to do with this one. Can anyone point me in the right
direction of how to disable SSL in development mode
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines :
partial = render_to_string( :partial => "#{file}", :formats =>
[:html] )
to the pagination_partials function.
=================================================
WORKING CODE:
=================================================
def render_format_search_partial(file, options={})
# TODO remove this line to use the one
2008 Jan 03
0
Problem (with fix?) for passing :multi => [ ]
Max, seems to me that your code would help to make things more robust,
if it''s a public API then it should stand up to a little abuse in ways
not intended. maybe more of an enhancement than a bug fix, but a fix
just the same.
Max Williams wrote:
> I''m using acts_as_ferret, passing through multiple classes using :multi
> and also some conditions. The way i''m
2006 Apr 08
0
Understanding observe_form...
Hi all,
I''m trying to understand the workings of the observe_form function.
In my application I have a search form with a number of parameters, and
I want to have a live search counter on screen, so as the user chooses
different parameters, she can see a live count of how many search
results match.
What I''m not clear on is how to use the "with" option, and what
2007 Dec 12
0
how can I use form_remote_tag to go to a different host ?
Here''s sort of what I am trying to do if it''s possible:
We have a server that uses TCL and can''t do any ajax.
What I did was wrote a simple Rails app that uses form_remote_tag to
get some text on a post and then
displays back some text into a div via ajax and a partial render.
I wanted to take all the html, javascript, and ajax calls that the
Rails template creates
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
I am trying to rewrite my website in Rails 3 and Ruby 1.9.2.
Can some one help me convert my observe_field which is working under
Rails 2.3.5 to Rails 3. I would like to avoid using JQuery as over the
last year everything I have tried in JQuery has failed, including this
one. Perhaps due to my lack of knowledge. I would not like to install
the legacy upgrade.
What I have in my website is several
2006 Jan 29
2
field sets and unicode
Hello gentlemen,
I''ve forced to such unicode problem:
I have:
<%= text_field_tag ''search'', nil, :id => ''search'', :size => 10 %>
<%= observe_field ''search'',
:url => {:controller =>
2011 Sep 09
2
acst_as_solr error
hi,
i am using https://github.com/mattmatt/acts_as_solr
it shows the following error
"undefined method ''each'' for "
for this
results = Employee.find_by_solr(@id)
results.each do |emp|
puts emp.id
end
where plugin does not contains "each" method in acts_as_solr/libs/
search_results.rb
so for me each is not working with ActsAsSolr::SearchResults
2006 Mar 21
2
Rails newbie can''t initialize a new Paginator object
Hi all,
I''m using ruby 1.8.2-15 and a recent rails 1.0 download.
I''m trying to implement the Classic/Custom pagination in a list action.
Here''s my code:
def list
getSearchTerms
# NOTE: @params[:search_results] is an Array of product_data objects
# returned by a search action.
@results = @params[:search_results]
if @results.nil? then
# The default
2007 Aug 12
5
stubbing a method that yeilds sequential results
I''ve just found myself stuck trying to rspec something so am hoping
someone more knowledgable can help.
I have a Connector class which has a class method ''results'' that
yields results it get from a network service based on a set of
attributes that I pass to it. I am wanting to yield these results
from my Intermediate class up to the next