Skip to content
Browse files

aatos bugs

  • Loading branch information...
1 parent 88ae14b commit 73051c263e47ccd30b6ccaab1b6bad93bd3d631d @bborn committed
View
2 UPGRADING.markdown
@@ -31,7 +31,7 @@ That's it!
Note: this version adds a counter_cache to taggings, so you may need to update the counter on your existing tags by doing something like:
ActsAsTaggableOn::Tag.all.each do |tag|
- ActsAsTaggableOn::Tag.update_counters ActsAsTaggableOn::Tag.id, :taggings_count => ActsAsTaggableOn::Tag.taggings.length
+ tag.update_counters tag.id, :taggings_count => tag.taggings.length
end
If you have many tags, this could take a while, though.
View
6 app/controllers/tags_controller.rb
@@ -40,20 +40,20 @@ def update
@tag = ActsAsTaggableOn::Tag.find_by_name(URI::decode(params[:id]))
respond_to do |format|
- if @ActsAsTaggableOn::Tag.update_attributes(params[:tag])
+ if @tag.update_attributes(params[:tag])
flash[:notice] = :tag_was_successfully_updated.l
format.html { redirect_to admin_tags_url }
format.xml { render :nothing => true }
else
format.html { render :action => "edit" }
- format.xml { render :xml => @ActsAsTaggableOn::Tag.errors.to_xml }
+ format.xml { render :xml => @tag.errors.to_xml }
end
end
end
def destroy
@tag = ActsAsTaggableOn::Tag.find_by_name(URI::decode(params[:id]))
- @ActsAsTaggableOn::Tag.destroy
+ @tag.destroy
respond_to do |format|
format.html {
View
11 app/helpers/base_helper.rb
@@ -151,15 +151,16 @@ def page_title
def add_friend_link(user = nil)
html = "<span class='friend_request' id='friend_request_#{user.id}'>"
html += link_to_remote :request_friendship.l,
- {:update => "friend_request_#{user.id}",
+ { :update => "friend_request_#{user.id}",
:loading => "$$('span#friend_request_#{user.id} span.spinner')[0].show(); $$('span#friend_request_#{user.id} a.add_friend_btn')[0].hide()",
:complete => visual_effect(:highlight, "friend_request_#{user.id}", :duration => 1),
- 500 => "alert('"+:sorry_there_was_an_error_requesting_friendship.l.gsub(/'/, "\\\\'")+"')",
+ 500 => "alert('#{escape_javascript(:sorry_there_was_an_error_requesting_friendship.l)}')",
:url => hash_for_user_friendships_url(:user_id => current_user.id, :friend_id => user.id),
- :method => :post }, {:class => "add_friend button"}
+ :method => :post
+ }, {:class => "add_friend button"}
html += "<span style='display:none;' class='spinner'>"
- html += image_tag 'spinner.gif', :plugin => "community_engine"
- html += :requesting_friendship.l+" ...</span></span>"
+ html += image_tag('spinner.gif')
+ html += "#{:requesting_friendship.l} ...</span></span>"
html.html_safe
end
View
2 app/views/activities/index.html.haml
@@ -11,6 +11,6 @@
-box do
%h3= :tags.l
- tag_cloud @popular_tags, %w(nube1 nube2 nube3 nube4 nube5) do |tag, css_class|
- = link_to ActsAsTaggableOn::Tag.name, tag_path(ActsAsTaggableOn::Tag.to_param), :class => css_class
+ = link_to tag.name, tag_path(tag.to_param), :class => css_class
%h6.all=link_to :all_tags.l, tags_path
View
6 app/views/photos/index.html.haml
@@ -6,10 +6,10 @@
%ul.tags
- @tags.each do |tag|
%li
- - if (ActsAsTaggableOn::Tag.name.eql?(params[:tag_name]) )
- = link_to ActsAsTaggableOn::Tag.name, user_photos_path(@user), :class => "selected"
+ - if (tag.name.eql?(params[:tag_name]) )
+ = link_to tag.name, user_photos_path(@user), :class => "selected"
- else
- = link_to ActsAsTaggableOn::Tag.name, user_photos_path(:user_id => @user, :tag_name => ActsAsTaggableOn::Tag.name)
+ = link_to tag.name, user_photos_path(:user_id => @user, :tag_name => tag.name)
#yui-main
View
2 app/views/tags/edit.html.haml
@@ -3,7 +3,7 @@
#yui-main
-box :class => "yui-b" do
- %h3=:editing_ActsAsTaggableOn::Tag.l
+ %h3=:editing_tag.l
= form_for(:tag, :url => tag_path(@tag), :html => { :method => :put, :class => "MainForm" }) do |f|
%label
View
2 app/views/tags/index.html.haml
@@ -24,4 +24,4 @@
-box do
%h3= :browse_content_by_tags.l
-tag_cloud @tags, %w(css1 css2 css3 css4) do |tag, css_class|
- =link_to ActsAsTaggableOn::Tag.name, tag_url(ActsAsTaggableOn::Tag.to_param), :class => css_class
+ =link_to tag.name, tag_url(tag.to_param), :class => css_class
View
4 app/views/tags/show.html.haml
@@ -7,13 +7,13 @@
- else
= :items_tagged.l
- @tags.each do |tag|
- = link_to h(ActsAsTaggableOn::Tag.name), tag_path(tag)
+ = link_to h(tag.name), tag_path(tag)
-if @related_tags.to_a.size > 0
-box do
%h3.tags=:related_tags.l
-tag_cloud @related_tags, %w(css1 css2 css3 css4) do |tag, css_class|
- =link_to h(ActsAsTaggableOn::Tag.name), tag_path(tag), :class => css_class
+ =link_to h(tag.name), tag_path(tag), :class => css_class
%h6.all= link_to :all_tags.l, tags_path
View
4 vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb
@@ -27,7 +27,7 @@ def button_to_remote(name, options = {}, html_options = {})
# <%= submit_to_remote 'update_btn', 'Update', :url => { :action => 'update' },
# :update => { :success => "succeed", :failure => "fail" }
#
- # <tt>options</tt> argument is the same as in form_remote_ActsAsTaggableOn::Tag.
+ # <tt>options</tt> argument is the same as in form_remote_tag.
def submit_to_remote(name, value, options = {})
options[:with] ||= 'Form.serialize(this.form)'
@@ -253,7 +253,7 @@ def form_remote_tag(options = {}, &block)
# ...
# <% end %>
#
- # If you don't need to attach a form to a resource, then check out form_remote_ActsAsTaggableOn::Tag.
+ # If you don't need to attach a form to a resource, then check out form_remote_tag
#
# See FormHelper#form_for for additional semantics.
def remote_form_for(record_or_name_or_array, *args, &proc)

0 comments on commit 73051c2

Please sign in to comment.
Something went wrong with that request. Please try again.