-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

geht nicht einfach:

        <% tags = @A.tag_counts %>
        <%= _('Tags:') %><br />
<% tag_cloud tags, %w(tag_cloud1 tag_cloud2 tag_cloud3 tag_cloud4) do |tag, css_class| %> <%= link_to(tag.name, { :action => :index, :id => tag.name, :tags => true }, :class => css_class) %>
        <% end %>


Am 07.10.2008 um 22:37 schrieb Torsten Flammiger:

Hallo allerseits,

folgende Frage auf die ich auch nach Stunden der Suche keine Antwort
finde: wie finde ich das Model, auf welches sich der aufrufende
Controller bzw. dessen Aktion bezieht?

Hintergrund ist, das ich die Tags, die per acts_as_tagable_on_steroids
zur Verfügung gestellt werden, kontextsensitiv machen möchte: bei
Controller A sollen nur die Tags A* gezogen werden, bei Controller B nur
die Tags B*

Ich fand etwas wie:
Tagging.find_all_by_taggable_type(ActiveRecord::Base.send
 (:class_name_of_active_record_descendant, self).to_s)

Aber
a) - es funktioniert nicht, wegen: undefined method `base_class'
b) - da fehlt mir dann doch das Wissen(, um es selbst zu beheben)

Danke im voraus für Hinweise
Torsten
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFI68yEs/WwCK0ZZEARAuhIAKC3YuEJavftoWtU+hUOm83xANjXhACeKVin
MXb+G85Zy4H27vT4UmWPNg4=
=QpBh
-----END PGP SIGNATURE-----
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Antwort per Email an