Displaying 5 results from an estimated 5 matches for "add_tag".
2010 Jan 07
1
text field with autocomplete
...er: ***
def auto_complete_for_tag_name
@tag = Tag.find(:all, :conditions => ["name LIKE
?",#{params[:tag][:name]}%"])
render :inline => "<%= auto_complete_result(@tag, ''name'') %>"
end
*** posts NEW and EDIT view ***
<div id="add_tag">
<% form_remote_tag( :url => {:controller => :tags}, :html => {:id =>
''tag_form''}) do %>
Name: <%= text_field_with_auto_complete :tag, :name, {:min_chars =>
2, :class => "text"} %>
<%= submit_tag ''Add''...
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:
2006 May 18
1
Unnecessary Gem modules loaded under Rails 1.1.2
...an error in tags.rb so that I could see whether it was trying
to be loaded or not. Here is the stack trace from that load attempt:
C:/ruby/lib/ruby/gems/1.8/gems/htmltools-1.09/lib/html/tags.rb:115:in
`initialize''
C:/ruby/lib/ruby/gems/1.8/gems/htmltools-1.09/lib/html/tags.rb:115:in
`add_tag''
C:/ruby/lib/ruby/gems/1.8/gems/htmltools-1.09/lib/html/tags.rb:218
C:/ruby/lib/ruby/gems/1.8/gems/htmltools-1.09/lib/html/tags.rb:127
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require''
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/d...
2006 May 19
0
Works in model but not in mixin
Disclaimer: RoR newbie. Using the acts_as_taggable plugin.
As an exercise I wanted to switch from the destructive TAG_WITH method
to adding tags while preserving the existing ones. On the surface this
seemed easy enough and eventually I got it working. However, the
following method:
def add_tags(list)
Tag.transaction do
Tag.parse(list).each do |name|
if acts_as_taggable_options[:from]
send(acts_as_taggable_options[:from]).tags.find_or_create_by_name(name).on(self)
else
Tag.find_or_create_by_name(name).on_unique(self)
end
end...
2001 Sep 30
3
UTF-8 stuff
...'e':
- opt->encoding = strdup(optarg);
- break;
case 'G':
opt->genre = realloc(opt->genre, (++opt->genre_count)*sizeof(char *));
opt->genre[opt->genre_count - 1] = strdup(optarg);
@@ -646,7 +643,7 @@
static void add_tag(vorbis_comment *vc, oe_options *opt,char *name, char *value)
{
char *utf8;
- if(utf8_encode(value, &utf8, opt->encoding) == 0)
+ if(convert_to_utf8(value, &utf8) >= 0)
{
if(name == NULL)
vorbis_comment_add(vc, utf8);
@@ -655...