Displaying 20 results from an estimated 700 matches similar to: "re:Help needed act as commentable plugin urgent"
2009 Oct 12
2
yaml ?nodes? or nested maps
I want to iterate ?nodes? and ?leafs? for a yaml document:
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$ ruby user.rb
user.rb:6: undefined method `[]'' for nil:NilClass (NoMethodError)
from user.rb:5:in `each_key''
from user.rb:5
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$ ruby user2.rb
user2.rb:5: undefined method `[]'' for
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
2012 May 03
3
inheritance with rails.
Hello.
I''ve read about examples on inheritance with rails.
Here is an example:
http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/
The way is to add a type field in the table.
So if I have an Animal class with an attribute name, I can inherit
from this class like:
Dog < Animal, Cat < Animal, and so on.
With the type field in the table I can do Dog.all,
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
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
2010 Jun 19
0
act as commentable
hi,
anyone help for act as commentable
with option for replying a comment or nested set of pluins.
plz help imm.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2009 Aug 24
5
extract keywords from string
hi -
i have strings that i need to extract keywords from. the string might
have html tags, urls, etc. i need to extract the keywords from the
string. i imagine i''m not the first guy to have to tackle this
problem. is there a gem i can use or anyone have any ideas how to
approach this?
thanks,
dino
2008 Jan 30
1
Can before_filter using Proc and specify block ?
Hi,
I see from this post
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/97e333daab05b725/8252c90cb9c36f6d?lnk=gst&q=passing+parameter+before_filter#8252c90cb9c36f6d
it can specify the Proc in the before_filter function, but when
specify when action apply this filter, it raise an syntax error, such
as rthe following code
before_filter {|controller|
2007 Jan 15
1
Using One Lookup Table for Multiple Model Properties
I have a model that has two properties that both come from the same
database table.
Let''s say I have a "Lead" model. This Lead has both a contact "State"
(as in Colorado, Arkansas, etc.) and a "Property State" where the house
he''s looking to refinance is located. Both of these should obviously
be objects of the type "state".
2006 Jan 27
4
acts_as_whatever
Hi there,
I love the acts_as_* family that rails uses. I''ve also found I can
create something similar by dropping the following code into my
activerecord classes:
class MyClass < ActiveRecord::Base
class << self
alias_method :count_with_unapproved, :count
end
def self.find(*args)
options = extract_options_from_args!(args)
if options[:conditions].nil?
options[:conditions] =
2006 Aug 28
2
[Bioc-devel] Sweave windows style path (was Re: texmf error on 7 packages on devel winXP build nodes)
>>>>> On Sun, 27 Aug 2006 07:45:00 -0700,
>>>>> Martin Morgan (MM) wrote:
> [A build system misconfiguration at Bioconductor lead to a discussion
> about whether \usepackage{Sweave} should be included in .Rnw
> documents. Leaving this line out causes a problem on Windows, as
> indicated below.]
> I think the problem is '~', which
2012 Apr 13
0
[LLVMdev] Support for "foreign" Visual Studio 64 bits C++ exceptions?
On Thu, Apr 12, 2012 at 2:02 PM, Jérôme Couture-Gagnon
<Jerome.Couture-Gagnon at fabricengine.com> wrote:
> Hi,
>
> We are currently porting our application to Windows 64 bits (amd64), and we
> are getting regressions from 32 bits relatively to LLVM 3.0's ability to get
> traversed by "foreign" Visual Studio C++ exceptions. That is, there is a
> crash when C++
2008 Apr 17
1
Callback Problem: Why to use self.var= instead of @var=
Hi,
I''ve defined the following model:
class Eintrag < ActiveRecord::Base
before_validation :vali
protected
def vali
# self.feld1.reverse!
self.feld2 = self.feld1
end
end
Now I''m wondering why I have to write
self.feld2=self.feld1
and why
@feld2=@feld1
doesn''t work.
I''ve found the thread
2007 Apr 05
0
(open iscsi) initiator crashes
I think I have found the reason for this:
The setup runs just fine until I set the xen dom0 to only use one of the
four CPUs in my machine (actually 2 HT CPUs).
So with
(dom0-cpus 0)
in /etc/xen/xend-config.sxp
this works. The while-loop actually ran fine for 2 days straight.
With
(dom0-cpus 1)
it crashes as described within a few minutes.
I will cc this to the xen-list.
Full thread here:
2009 May 18
0
how to monkeypatch Hash's = method, revisted
So google for a solution to this problem and found myself here:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/eaa34998a74831b4/58b80fe0d4eadb1a?lnk=gst&q=+how+to+monkeypatch+Hash%27s+%5B%5D%3D+method+#58b80fe0d4eadb1a
But while reading, and admittedly not quite getting the solution, I
had a bright moment to balance out the stupid moment, realising that []
= already has
2008 May 14
0
draggable gets offset on scrolling when its container is position:fixed
hello,
my draggables are located in a DIV which is position:fixed ... so my
"cart" stays always at the bottom of the page. when the page gets a
vertical scrollbar now, then the droppables zone gets an offset of
exactly the scroll ...
the same topic can be found here:
Having problems with "position:fixed; bottom:0%;" and dropzone div''s
Optionen
2012 May 27
0
[LLVMdev] Call in-library only class member
Hi,
I'm trying to call class members which are not used within the original
source code and therefore are not declared within bitcode. An example
would be calling std::vector<T>::size(). Right now I'm using a helper
function, e.g.
int f(vector<int> &v) {
return (int)v.size();
}
However, this solution is not as elegant as I would like it to have,
mostly due to
2011 Mar 30
1
Problem of: Trust relationship between 2 linux domains
Hi,
I've read John H Terpstra's discussion on Google Groups about Trust
Relationship between 2 linux domains.
http://groups.google.com/group/linux.samba/browse_thread/thread/61ca10be6b510910/472abfdb7bf62c34?lnk=gst&q=trust+relationship#472abfdb7bf62c34
Follow these instructions, i 've done but there were errors, can you help
me?
When I used WinXP, it listed 2 domains, but I
2007 May 02
1
rsync --owner=myaccount
Hello Community ,
We will be using rsync to keep data flowing from a data-collection
computer (data belongs to user "det") to a data-processing
computer where the data is to be owned by whichever
account is doing the experiment.
I would like to run rsync and be able to specify the target
UID/GID to use on the command line.
For security reasons, the user doing data processing
does not
2010 Jul 16
0
Sage and R (was: Mathematica and R)
Dear David,
> I managed to install Sage on Windows (via a Linux VM), but I cannot find any documentation on how to use R from Sage. Maybe I
> should use the web interface of Sage to avoid having to install R on the VM.
In the Sage command line, you can type
sage: r?
to get some very basic info, and
sage: r.[tab]
to get various commands. This part of the interface still needs some