Displaying 20 results from an estimated 1000 matches similar to: "Rails 3 - Helping with a Commenting Module"
2009 Feb 21
1
undefined method user_id
Basically, Im trying to add comments to photos that other users have
uploaded. And Ive encountered an error:
NoMethodError in CommentsController#create
undefined method `user_id='' for #<Comment:0x4768cd0>
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1857:in
`method_missing''
2009 Aug 16
5
any help with captcha in my comments ?
this is my error:
Processing ApplicationController#create (for 127.0.0.1 at 2009-08-17
00:57:56) [POST]
Parameters: {"comment"=>{"name"=>"asdasd", "body"=>"asdasd"},
"commit"=>"Add Comment", "post_id"=>"19",
2010 Sep 21
25
Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"
Hello, I''m working to install the acts_as_commentable plugin on my
Rails 3 app.
After adding "acts_as_commentable" to my book model, I then added a
comment form on my book show view:
<% form_for(@comment) do|f| %>
<%= f.hidden_field :book_id %>
<%= f.label :comment %><br />
<%= f.text_area :comment %>
<%= f.submit "Post
2007 Feb 15
4
defining context(s) dynamically
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Q. Why does code which defines a context work in the
2010 Sep 17
25
Trying to look up comment through an ID, but failing
I am trying to allow users to reply through comments by allowing users
to click a reply link next to the parent comment. It will send in a
parameter to the ''new'' comment view, like so:
| <%= link_to "Reply", new_comment_path(:in_reply_to => comment.id) %>
The form will use the :in_reply_to parameter in order to save that id as
the parent id, like so:
2009 Apr 15
2
Getting Started with Rails - post_comment_url
Hi,
Thanks for a wonderful Getting Started with Rails. I am up to the last
section and just added the comments part.
So while testing and looking over comments_controller.rb;
I see the reference to post_comment_url calll where is this defined.
Below is the message I am getting.
Thanks
ActionController::RoutingError (post_comment_url failed to generate
from {:post_id=>#<Post id: 1, name:
2008 Mar 16
3
undefined method `redirect_to'
Hi all. I''m getting the following error in my app:
undefined method `redirect_to'' for ActionController::Base:Class
I''m using Windows 2000, Rails 2.0.2 and resource_controller (from
James Golick).
My controller:
class CommentsController < ApplicationController
include ResourceController::Controller
belongs_to :post, :article, :photo
create do
2007 Mar 24
1
spec''ing metaprograming & rails CRUD
For edge rails there is a Crud generator. There is also a CRUD
controller that is out there from which you can inherit your other
controllers (see http://geekonomics.blogspot.com/2006/07/crud-and-
shared-controllers.html)
This got me thinking about Crud controllers in general. As far as I
know, the generator can''t produce crud classes which are nested
(i.e.
2011 Aug 04
1
Creating form for associated has_many model
This example shows how to create a form for an associated model
''Comment'', where ''Comment'' belongs_to ''Post'' and ''Post has_many
''Comments''.
http://edgeguides.rubyonrails.org/getting_started.html#generating-a-controller
How might I modify that to display all the comments in the form, and
still have it call the
2006 Jan 18
1
Problem in rpc_api_pipe related to the \spoolss pipe
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
i
I have a problem with a samba-3.0.21a (as a PDC), when I use rpcclient
to set the driver for a printer. I receive the following error (log
level 12 for relevant parts rpc*, printerdrivers,tdb attached):
rpc_api_pipe: Remote machine pdc pipe \spoolss fnum 0x76dereturned
critical error. Error was Call returned zero bytes (EOF)
prs_mem_get: reading
2019 Jun 04
0
[libnbd PATCH 2/2] api: Recover from block status callback failure
If the user's extent_fn callback fails, we want to fail the overall
block status command with the same errno, but not give up on the
server. Do this by skipping any further context chunks from the
server, and relying on the previous patch's ability to preserve the
first error encountered.
Update the interop test with qemu's dirty bitmap context to provoke
callback failure, as well as
2019 Mar 20
0
[PATCH nbdkit 3/8] server: Implement Block Status requests to read allocation status.
This commit implements the core NBD protocol for the "base:allocation"
Block Status replies.
---
server/internal.h | 7 ++
server/protocol.h | 15 +++
server/protocol-handshake-newstyle.c | 81 ++++++++++++++-
server/protocol.c | 141 ++++++++++++++++++++++++---
4 files changed, 229 insertions(+), 15 deletions(-)
diff --git
2016 Jul 10
0
Debian Jessie joining AD as member fails with "The object name is not found."
Hi all!
I'm trying to join Debian Jessie to an existing AD domain as a member server (AD DC is Server 2012R2) to run it as a file server. I installed acl, samba, winbind, libnss-winbind, and krb5-user using APT, and configured /etc/samba/smb.conf according to the Samba wiki article.
The error the join command is producing is " Failed to join domain: failed to join domain
2019 Jun 27
1
[libnbd PATCH] block-status: Make callback usage consistent with pread_structured
Now that we have a way to pass Mutable(Int "error") to callbacks,
that's a much nicer way for language bindings to use than relying on
the value of errno after returning -1. Update the semantics for
block status to match what pread_structured does, getting errno out
of the equation, and changing things to call the callback for a
second context even after an earlier callback failure
2011 Mar 08
2
Rails - Acts as Nested - Impossible move, target node cannot be inside moved tree.
Hello, I''m using the Awesome Nested Set plugin:
https://github.com/collectiveidea/awesome_nested_set
And in my model I do the following:
acts_as_nested_set
after_save :ensure_max_nestedset_level
private
def ensure_max_nestedset_level
if self.level > 2
self.move_to_child_of(parent.parent)
end
end
I do this to keep the levels from getting
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:
2016 Jul 18
0
Debian Jessie joining AD as member fails with "The object name is not found."
I'll bet static ip, with correct resolv.conf hosts and nsswitch.conf and krb5.conf.
This must be the clue...
> Creation of workstation account failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
So the join reaches the AD but here something happens.
Russelt, can you try again with debug 10 and post both logs.
net ads join -UAdministrator
and
net ads join -UAdministratos -S YOUR_ADDC.domain.tld.
2019 Mar 19
0
[PATCH nbdkit 3/9] server: Implement Block Status requests to read allocation status.
This commit implements the core NBD protocol for the "base:allocation"
Block Status replies.
---
server/internal.h | 7 +
server/protocol.h | 17 +-
server/protocol-handshake-newstyle.c | 79 ++++++++-
server/protocol.c | 248 +++++++++++++++++++++++++--
4 files changed, 335 insertions(+), 16 deletions(-)
diff --git
2019 Jun 07
0
[nbdkit PATCH v2 2/2] server: Group related transmission send()s
We disabled Nagle's algorithm to allow less latency in our responses
reaching the client; but as a side effect, it leads to more network
overhead when we send a reply split across more than one write().
Take advantage of various means for grouping related writes (Linux'
MSG_MORE for sockets, gnutls' corking for TLS) to send a larger
packet, and adjust callers to pass in our internal
2010 Dec 01
10
How to Redirect from http://mysite.com to https://www.mysite.com on Herok
Hello I''m looking to learn how to redirect all non-www (mysite.com) to
https://www.mysite.com
I tried the following:
class ApplicationController < ActionController::Base
before_filter :check_uri
def check_uri
redirect_to request.protocol + "www." + request.host_with_port +
request.request_uri if !/^www/.match(request.host) if Rails.env ==