similar to: Very odd NoMethodError/stack overflow....

Displaying 20 results from an estimated 6000 matches similar to: "Very odd NoMethodError/stack overflow...."

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
2009 Apr 20
3
xxx.valid? still true after xxx.errors.add(...)?
Hi all I have the following code in my controller: if @comment.valid? captcha_url = "http://captchator.com/captcha/check_answer/#{captcha_code}/#{@comment.captcha}" result = open(captcha_url) unless result.read == "1" @comment.errors.add(:captcha, "Captcha wurde nicht korrekt eingegeben") raise "#{@comment.valid?}"
2009 Mar 11
12
Eager loading comments associated with user submissions.
Hey everyone, I am working on an application that allows users to submit articles, and also comment on those articles. Pretty much exactly like Digg. Everything works fine except that when there are a lot of comments there are a lot of database queries to both fetch the comments and the users who posted those comments. I have used eager loading in other parts of my application to reduce the
2006 Jun 20
2
Converting from acts_as_tree to acts_as_nested_set
I''m currently using acts_as_tree to display threaded Comments on my forums-like site. It''s waaay too slow to display a page with 1,000 comments, as it''s issuing a TON of selects. I''m pretty sure I want to convert to the nested set model, using acts_as_nested_set or acts_as_threaded. This should give me the performance I''m looking for. The problem,
2006 Mar 31
2
"Owning" a polymorphic
I''m playing around with RoR and I''m having trouble figuring out how to describe a certain relationship. I''m building a social networking site where you have users who can comment on other users, photos, videos, and blogs. I''ve figured out how to have a comment belong to a user or media item through a polymorphic relationships but I dont'' know how to
2008 Oct 29
5
Polymorphic Associations with inheritance
I have two models, Article and Post, that has many Comments. However, both Article and Post are inherited from a BaseContent class like so: class Article < BaseContent has_many :comments, :as => :commentable end class Post < BaseContent has_many :comments, :as => :commentable end and here''s my Comment model: class Comment < ActiveRecord::Base belongs_to
2013 Feb 28
2
Create polymorphic resources
Hi I have created a polymorphic association for comments since I need commenting functionality on several models. The issue is that when I create the comment in my Commets#create action, I really don''t know what type the parent is of. So, let''s say I have Foo, Bar and Comment. Comment have this: belongs_to :commentable, polymorphic: true And Foo and Bar both have:
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 Oct 11
5
Object lost in memory/trashed?
Hi, I''ve got a problem on which I''ve spent many hours, and I can''t get a clue on what is happening... I hope someone here will be able to help me. Here is the situation : my Rails app uses acts_as_commentable and acts_as_bookmarkable on a Diagram model. Everything''s working OK individually: I can create a comment on a Diagram, bookmark it, and so on. Now,
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 Jul 20
0
Polymorphic Comment notification to Users?
Hi, my webapp has registered users and it has articles, blog posts, gossips too. For all these resources I''ve a polymorphic Comment model which is listed below. <pre> id content commentable_id commentable_type user_id created_at updated_at 1 Frist comment 2 Article 1 .... 2 Second comment 3 Post 2 .....
2005 Mar 27
1
problem with listing users on winXP/2k+3
Hello list, Some days ago i sent an email to this ML about a problem im having with listing users on winXP/2k+3 computers. The thing is our samba PDC has +1600 users and, this time i counted, there only appear on the "security advanced settings" list box (where we select users that can read/write/execute on a windows directory share), about 500/550 users. There is no evident reason
2012 Apr 06
3
I can't update data in table
In my edit page: url = profile/:id/edit the content is ! <%= form_for(@user, :as => :user, :url => profile_path(current_user), :html=>{:method => :put}) do |form| %> <%= form.text_field :email, :class=>"input"%> <%= form.submit ''Update Profile''%> <% end %> ............................ In controller section ! class
2010 Jul 13
1
NoMethodError in UsersController#show
So I am getting the error NoMethodError in UsersController#show error undefined method `feed'' for nil:NilClass {"authenticity_token"=>"zalkdfsjfksjd;lfs;lfksdkf/2tPzo=", "login"=>"session", "password"=>"admin", "commit"=>"Log in"} Why is login being set to "session"? Instead of the
2003 Dec 03
1
logon path question
This link: http://us3.samba.org/samba/docs/man/smb.conf.5.html#LOGONPATH States that: "Windows clients can sometimes maintain a connection to the [homes] share, even though there is no user logged in. Therefore, it is vital that the logon path does not include a reference to the homes share (i.e. setting this parameter to \%N\%U\profile_path will cause problems)." I am still
2004 Apr 13
0
v3.0.2a: can't login into domain after switching to pdb_mysql
Hello list.samba.org FreeBSD-5.2.1, samba from port with tdbsam-backend configured as PDC Everything is working fine: i.e. registering at samba domain and logging on to it, but after I switch to mysql-backend (pdb-mysql) I can only successfully register my Windows 2k3 at Samba domain (messagebox 'Welcome to slavel.ru domain' has appiered), i.e. can successfully change domain of my
2005 Aug 21
2
pdb_mysql.c | SQL insert command missing data
The MYSQL pdb addon for samba appears to have had an error since version 3.0.12. In doing some investigations with 3.0.20 and 3.0.14-r3 I have found that the smbpasswd command does not create a query that adds enough information to the database. smbpasswd -a username causes 2 queries to be performed. The first of the two looks for an existing user and that does check all of the appropriate fields,
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 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
2008 Nov 28
1
Rails Beginner.. NoMethodError
Dear all I encounter error when I login my Web application NoMethodError in AdminController#login undefined method `get_title'' for #<Class:0x63ac78> Here is part of my code controller/admin_controller.rb def login session[:user_id] = nil if request.post? if User.authenticate(params[:name], params[:password]) user = User.find_by_name(params[:name])