Displaying 20 results from an estimated 110 matches similar to: "text field with autocomplete"
2008 Dec 10
3
rspecing rjs - form.reset(''form'')
Hello,
>
> I couldn''t find much info on this.
>
> How do you rspec this: page.form.reset("form")
>
> I looked in the have_rjs source code and I can''t find anything on form
> reset.
>
> Thanks,
>
> --
> Andrei
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2010 Feb 06
1
accepts_nested_attributes_for with has_many => :through
I have two models, links and tags, associated through a 3rd model,
link_tags. I added the following to my link model,
has_many :tags, :through => :link_tags
has_many :link_tags
accepts_nested_attributes_for :tags, :allow_destroy => :false,
:reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } }
and put this in a partial called by the new and edit forms for links,
2009 Jun 17
1
File UPLOAD and put it on a DB BLOB
@contact = Contact.new
@contact.file_file_name=params[:contact][:file].original_filename
@contact.file_content_type=params[:contact][:file].content_type.chomp
@contact.file=params[:contact][:file].read
@contact.save
the first two elements work,
@contact.file=params[:contact][:file].read results empty, can you say
me where I am wrong.
Sergio
2009 Dec 10
2
How to customize the default scaffold?
I know the scaffold generator is really only useful for beginners
and/or very the preliminary state of a project, but I find that I use
it a lot (especially, since I am still a beginner). There are a
couple of things I find myself tweaking (or wanting to tweak, but
never getting around to tweaking) each time I generate a new scaffold:
1) Change the layout from blah.html.erb to
2009 Nov 02
7
*** Quick help with paperclip ***
Hi All,
Someone reccomended using paperclip as a way to easily upload photos.
Basically I want a quick and easy solution to allow users to add a
profile picture.
Anyway - I have followed the tutorial on here:
http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/
I can add a file, but there isnt anywhere to upload it.
I have followed the above tutorial word for word, but i dont
2010 Feb 15
4
Changing the :path and :url options of has_attached_file in paperclip
Hello,
I am using the paperclip plugin to upload images and it works
absolutely fine.
I intend to save my uploaded images to C:\Application_name\public
folder. Accordingly, with some study over the i-net, I changed
the :path option of has_attached_file to -
:path => "C:/Application_name/
public/:class/:attachment/:id/:style_:basename.:extension"
Now, the files are being saved to
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
2011 Nov 02
1
getting devise to return json data when signing out
Hi all,
In curl (the command line program), I can successfully log a user in
using devise:
def create
respond_to do |format|
format.json {
if user_signed_in?
return render :json => {:success => true, :errors =>
["Already logged in."]}
end
resource = warden.authenticate!(:scope =>
resource_name, :recall =>
2010 Sep 27
3
streaming response body to client?
So I''d like to stream my response body to the client.
At least under Rails2, it looks like you can pass a Proc to render
:text, to do that.
I am in a Rails2 app right now, but will upgrade to Rails3 sometime in
the next couple months, so don''t want to set myself up for failure.
Anyone know the status of streaming responses in Rails3? Is it
possible? Is there a different API
2008 Jan 23
11
Rails 2.0.2 + RJS
Hi
I had ajax commenting on my app, which worked perfectly on Rails
v1.2.6, but does not work the same in Rails 2.02. Basically the
comment gets added, but the visual effects do not work (ie lines 2 + 3
of create.rjs)
create.js
page.insert_html :bottom, ''comments'', :partial => ''comment''
page.visual_effect :appear, "comment_#{@comment.id}"
2006 Mar 02
2
Ajax.Autocompleter with an empty field
Hey guys,
I have a field that will have very few autocomplete options. I have
an ajax.autocompleter on it that works great, but I wanted to make it
start autocompleting as soon as the field is blur()ed, so that even
if the field is empty, the list will still appear. Like a combo box
in windows. How can I do this? Setting :min_chars => 0 (or even -1)
didn''t work...
-Josh
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"
2005 Jul 09
7
Extending the AJAX autocompleter
Hi (I think Thomas?),
I am trying to extending the AJAX autocompleter here, and would need
to pass on additional params to the Framework I am using which is
taking on the request.
For this, I have changed the onObserverEvent function in controls.js
as to the following:
onObserverEvent: function() {
this.changed = false;
if(this.element.value.length>=this.options.min_chars) {
2006 Aug 01
0
Custom Autocomplete Field - Making a field lowercase
I''m trying to humanize() the results that appear in the autocomplet drop
down list.
First i customised the controller.
In the render line on the controller it is saying "i want to use locality on
each of the @items".
So locality is what i want to humanize".
My ideas so far is to:
Customise the PostCode object so that when auto_complete_result trys to call
2006 Feb 28
2
acts_as_taggable and auto_complete
I''m using the acts_as_taggable gem (who''s site has gone AWOL
apparently) and I''m wanting to make it autocomplete. I, however, am
the absolute worst JavaScript person ever, so is there anyone out
there that can point me to a tutorial or give some good starting
points? Thanks!
Kenneth
--
=> the blog from beyond <=
=> www.eyeheartzombies.com <=
2006 May 18
1
Unnecessary Gem modules loaded under Rails 1.1.2
All,
Rails 1.1.2
Win XP Pro
Rubyful Soup 1.0.4
htmltools 1.0.9
I am terribly confused as to what pulling in a gem does with respect to
how many modules get loaded at runtime.
I am using two gems in my app, Rubyful Soup and htmltools.
RubyfulSoup requires one module from the htmltools gem
(html/sgml-parser).
My app requires the RubyfulSoup gem.
When I started my app, something was causing
2005 Aug 24
1
Re: triggering autocomplete with a button press
I''ve got a search field on my site that uses an autocomplete to match
against search terms already input by the same user. That''s working
perfectly. However, I''d like to provide a little button next to the
search field that triggers the autocomplete, so that the users can
"browse" the list of past search terms. This behavior would be in
addition to the
2006 Feb 27
0
auto_complete_field Vs text_field_with_auto_complete
Hi,
I want to know which of the two methods, auto_complete_field and
text_field_with_auto_complete best suits what I am trying to do.
I have a model class called search (which doen''t extend ActiveRecord)
which holds two parameters, category_string and postcode_string.
I want my form to bind its values to these to values. I also want the
category input to be an auto complete field
2006 Jun 02
2
pass extra value through text_field_with_auto_complete?
Hi,
I''m wondering if it is possible to pass an extra value (which I will
use to further restrict my query) using text_field_with_auto_complete?
Any suggestions would be appreciated!
-Mike
2009 Sep 23
4
auto_complete text field not showing drop-down box properly
This may be more of an Ajax question than a Rails question, but I''m
pretty new to Rails and know approximately zero JS. I''d love if
someone could give me a little direction.
I''m using pat shaughnessy''s nested text_field_with_auto_complete
plugin, and it seems to be *mostly* working properly (after many hours
of fiddling). However, the drop-down box is not