Displaying 20 results from an estimated 1300 matches similar to: "plugin for recent changes display?"
2007 Jun 04
1
acts_as_rateable in Beast
I''m trying to implement acts_as_rateable to my Beast installation to
give users the option to rate posts (like reddit). I chose
acts_as_rateable as it supposedly easily allows reddit-type voting but
I''m having some problems setting it up and the documentation seems
outdated.
(http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/)
So far, I''ve
2006 Jun 26
5
How can I dynamiclly generate models?
I am trying to write a plugin, ''acts_as_commentable'', for my models -
Image, Book, Music and so on, I do not want to use polymorphic
association, so very model should have its own comment class.
Here is my code
acts_as_commentable.rb
module Commentable
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def
2009 Dec 27
5
Difficulties in understanding Rail-Plugins in depth
Hi,
i try to understand how plugins work in detail.
Often you see stuff like:
class Post < ActiveRecord::Base
acts_as_commentable
end
I wonder what''s happen all there.
What kind of language-feature is behind this call "acts_as_commentable" ?
In my opinion you need some kind of extend or include to extend the
functionality of a model. And exactly this is which i found
2006 May 15
33
acts_as_commentable release
I now have the acts_as_commentable plugin up on RubyForge. This
plugin will allow you to add comments to any active_record object in
your Rails application.
So far the directions are simple, and there are only a few features:
To install:
ruby script/plugin install
svn://rubyforge.org//var/svn/commentable/acts_as_commentable
In the readme there is a sample migration you will need to use, with
2007 Feb 20
0
counter caching with acts_as_commentable
I find that my app is doing a lot of db queries to get comment counts
for various objects, as I reference these counts frequenly in my views.
This is using acts_as_commentable. Anyone have any tips for adding
counter caching to acts_as_commentable? I assume this is possible with
polymorphic associations?
Thanks!
--
Posted via http://www.ruby-forum.com/.
2007 Oct 31
0
another question about acts_as_rateable
I''ve been trying to add some rating capabilities to a site I''m
working on, I''ve been following a few tutorials (one being http://
www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/)
and I keep seeing something that''s confusing me.
---- from the tute : (in my ratings controller)
post = Post.find(params[:id])
post.add_rating Rating.new(:rating
2008 Nov 03
0
acts_as_rateable in rails 2.2.0
Hi all,
I have a problem with acts_as_rateable in rails 2.2.0.
[code=]ActionView::TemplateError (uninitialized constant
<#object>::Rating) on line #10 of app/views/blah/blah.html.erb:
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:102:in
`const_missing''
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/base.rb:2042:in
2011 Apr 18
2
acts_as_commentable validations
Hi all,
I recently started back up with Rails and things are going well up until
now.
I''ve set up acts_as_commentable in my Post model and it''s working great.
Problem is users are able to create a "blank" comment. I''ve added the
following validations in the comment.rb file generated by
acts_as_commentable to limit the comment length:
[code]
2009 Jan 03
2
Some questions from a new webgen user
Hi everyone. Sorry if it is not the place to post questions about
webgen. I use webgen5, i know it is not the stable version but i
couldn''t understand how webgen4 worked, it''s easier with webgen5, and
i won''t have to change my pages when it becomes mainstream ;)
I try to build my homepage using webgen, and there are some things i
don''t know how to do (i am sure
2006 Mar 28
1
Simple Sidebar Solutions: How does yours work?
I''m working on a simple photo gallery app for personal use and I want to
generalize the sidebar such that in any page (controller or view, I''m
not sure which) I can dynamically add either
1. links to a given sidebar
2. or an entire sidebar.
I know that typo does this, and I''ve looked the code. I think it''s too
complex a solution for my simple site.
2005 Jun 28
1
Offtopic Posts [was Re: [OT] Memory Models and Multi/Virtual-Cores -- WAS: 4.0 -> 4.1 update failing]
From: Greg Knaddison <greg.knaddison at gmail.com>
> Look - brevity is the soul of wit. It also keeps other folks on lists
> from calling you a troll.
The problem is that then the same people then start complaining
about my "oversimplification." In fact, that's part of the problem here.
I really _tried_ to make a recommendation without breaking down into
the
2009 Apr 29
0
Polymorphic comments table needs associated model
Howdy,
I''ve been banging my head on this problem for a bit.
I''m using the acts_as_commentable plugin which works great.
The scenario, I''m on the user''s dashboard and want to display comments
with commentable_type = Venue. No problem. But, if I want to display
the name of that Venue with the comment... big nasty. The polymorphic
key is a composite key and
2010 Aug 18
2
RSpec 2/Rails 3 - content_for in view specs
My main layout includes separate content_for/yield sections for my header,
sidebar, footer, and content. However, when running a view spec, the
`rendered` variable seems to only contain a string of just the primary
content and ignores the header/footer/sidebar as well as the rest of my
layout file (the "render" call just returns my primary content wrapped in
generic <html> and
2006 Feb 06
0
Problem with login form in sidebar
I have a basic login form rendered as a component in the sidebar of my
main layout view.
Whether or not the login succeeds, the controller redirects to the main
index to refresh the sidebar. On success, I set the session[:user_id]
to @user.id as usual.
The problem is that ''index'' gets rendered in the sidebar. However, when
I comment out "session[:user_id] =
2007 Jun 21
1
render :partial => :url - is it possible?
Hi, this is my first post to the list. I''m still learning the rails
framework, having done most of my previous web development in PHP. I''ve
done a bit of googling for the answer to this question, but maybe I''m
just lacking the right word to search for.
Several parts of my site, such as sidebar components, are
self-contained, modularized and re-used in several parts
2006 Feb 19
2
instance variables in components not read by component view?
Hi,
I''m trying to write a sidebar menu with dynamic menus, and to do so I
would like to define a list of menus to display within my sidebar
component controller code and pass that list to the component display
view, like so:
# menu_controller.rb
class Sidebar::MenuController < ActionController::Base
uses_component_template_root
@menus = %w{admin user help}
def display
2006 Mar 08
1
Components calling components...
Hi,
I''m relatively new to ruby and rails. I would like to have a sidebar
component call one of several other constituent components.
I''ve run into some problems, and so I''ve pruned things back to a
relatively simple case.
I have a sidebar component. Renders great. In it''s layout, I call
render_component for another component I would like in the sidebar.
2008 Aug 30
4
acts_as_commentable: find Post by date of comment
Hello,
I am using acts_as_commentable (related to Post) and I would like to
know how to get the list the posts ordered by date of comment (i.e.
post with recent comment first).
in addition if a post has no comment, i would it to be inserted based
on its creation date.
Thanks for your help
Nicolas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2006 Feb 27
1
@content_for_sidebar?
Okay, I see this instance variable places, but I can not determine if it is real
or where the content comes from. I''ve tried views/<controller>/sidebar.rhtml,
_sidebar.rhtml, views/layouts/sidebar.rhtml and views/layouts/_sidebar.rhtml.
Does this actually exist? What''s the Rails Way to make a good sidebar?
http://www.google.com/search?q=content_for_sidebar
Thanks,
2007 May 23
4
content_for
Any ideas how I would go about writing specs for views which make use
of content_for?
I''d like, for example, to be able to specify that ABC view places XYZ
in the sidebar, which I do using content_for(:sidebar).
Am I missing something obvious?
Kyle