Displaying 20 results from an estimated 100 matches similar to: "Getting Started with Rails - post_comment_url"
2006 Dec 10
5
model-controller-paradigm: What about admin controllers?
Hi all
We all know the model-controller-paradigm: I have a model "News" which
has a corresponding CRUD-controller "NewsController".
But now I''m quite unsure about the following...
Guess we have normal visitors that visit our site www.??.com/news and we
have administrators that create and modify news items.
The admin should see an "Edit" link and a
2006 Feb 24
4
too many components?
okay.
on /posts/show/13
i have show.rhtml, which does
render_component(:controller=>''comments'', :action=>''display_comments'',
:id=>post.id)
on comments/display_comments
i iterate through the comments and then, display_comments.rhtml
render_component(:controller=>''comments'', :action=>''new'', :id=>@id)
2006 Mar 05
1
access methods defined in helper
Hey
How do I access methods that I have defined in helpers?
__________________________________________
Helper id_browser_helper.rb:
module IdBrowserHelper
def table_identities(message)
render_text message
end
end
___________________________________________
Controller id_browser_controller.rb:
class IdBrowserController < ApplicationController
def view_genre()
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 Aug 05
3
how to ? Rails 3 ActiveRecord eager loading and AREL
Hello everyone,
I would like to eager load scoped records to avoid queries executed in a
loop (huge performance impact).
The "scoped" part is what is giving me a hard time.
I''m using Rails3 RC.
Does anyone have any idea how I can do it?
Here is a test case : we have an "Article" and a "Comment" Activerecord
models,
article has many comments
comment
2007 Aug 09
7
Integrating polymorphic models into controllers views? how?
I''m having trouble trying to get this to work.
How the heck do you get a polymorphic controller to work? Especially
integrating it with a view?
Let''s say that we have shows, and episodes, then comments.
A show has many episodes, an episode has many comments.
the route is /shows/1/episodes/1/
Now to add a comment to that episode, how would I do it? Let''s say
that the
2011 Jan 25
0
Rails 3 - Helping with a Commenting Module
class CommentsController < ApplicationController
def create
@commentable= context_object()
@comment =
@commentable.comments.build(params[:comment].merge(:user_id =>
current_user.id))
if @comment.save
respond_to do |format|
format.js
end
else
render :action => ''new''
end
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''
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 Jun 08
3
Will Pagination links getting not behaving as i wanted.
Hello All,
I have will pagination links in index view which works fine.
but when i performing some other action and replacing list view
that time pagination links i am supposed to be for index action.
but they are not......links goes to last performed action.
You have any idea how to fix this problem ?
NOTE:
i am updating list after creation of resource record that time pagination
links goes
2009 Oct 05
1
Re: creating 2 things at the same time?
Hi Mike Chai
What I understood is you have relations like
comment has_one picture
picture belongs_to comment
As an example
comment name:string
picture name:string,comment_id:integer
So do as below
in comments_controller new action
@comment = Comment.new
@comment.picture = Picture.new
Now in view/comments/new.html.erb
<% form_for(@comment) do |f| %>
<p>
<%=
2007 Jun 28
1
DRb server crashing
I''m having a problem where the DRb server seems to be disappearing
(crashing?) and I don''t know how to track down the cause or work around
the problem.
Unfortunately I haven''t found a way to reproduce the problem, but it
seems to happen fairly often (maybe once a day). Other then that ferret
seems to be working well.
I can''t seem to find any trace of the
2010 Oct 14
7
undefined method?
I''m trying to learn rails as I go along, and having a bit of trouble.
There is an undefined method cropping that I don''t know why rails
thinks should be there.
Firstly, I''m using rails 3, ruby 1.9.2
I have a controller with an index action This part works fine, but i
am trying to add a comment form to the page that is rendered by that
index action.
Supposing my
2010 Jul 27
7
trouble with remote_form_for & html_update
I have a form that accepts comments and adds them to a list without
refreshing the page.
This is the html:
<div id=''aremark''>
<%= render :partial => ''comment'' %>
</div>
<% remote_form_for :comment, :url=>story_comments_path(@story), :html
=> { :id => ''comment'' } do |form| %>
<h5><label
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
2015 Jul 08
2
[LLVMdev] [cfe-dev] Phabricator update
Ah, thanks, interesting - investigating
On Wed, Jul 8, 2015 at 12:37 PM Renato Golin <renato.golin at linaro.org>
wrote:
> On 8 July 2015 at 11:31, Manuel Klimek <klimek at google.com> wrote:
> > Those seem to be comments by the original author? Is this a problem?
>
> Not always, see http://reviews.llvm.org/D10676 or any other.
>
> I can only see the commenter
2004 Jul 13
10
vulnerability with ssh-agent
Hi
I have written a small introduction to newbies in Danish on ssh and
friends. Now some people are questioning my advice and I think they have
a point.
I am advocating people to use DSA-keys and a config file with this:
Protocol 2
ForwardAgent yes
ForwardX11 yes
Compression yes
CompressionLevel 9
and running ssh-agent and ssh-add, and then loggin in without giving
keys.
One
2014 Jun 26
2
[LLVMdev] Phabricator and private reviews
"Duncan P. N. Exon Smith" <dexonsmith at apple.com> writes:
>> On 2014-Jun-25, at 12:32, Alp Toker <alp at nuanti.com> wrote:
>>
>> As I understand, some people legitimately use Phabricator for
>> internal review,
>
> Is this is a use case we need to support on <http://reviews.llvm.org>?
>
>> while others *think* they're
2005 Sep 15
2
IE iframe bug with Autocompleter over HTTPS
I ran across an issues using the Autocompleter over HTTPS in IE (6.0
in WinXP Pro SP2).
I plan to submit a bug report to the Ruby on Rails trac, but first I''d
like "to discuss this on th[is] Mailing List beforehand, maybe it''s
already known and in the works, or it isn''t a bug" (per
http://wiki.script.aculo.us/scriptaculous/show/BugReports)
The autocomplete
2015 Aug 12
1
enableJIT in Rprofile leads to 'not a proper evaluation environment' on startup
A commenter on SO suggested that I copy my question to R-devel
http://stackoverflow.com/q/31972325/850781
I have had
--8<---------------cut here---------------start------------->8---
library(compiler)
compiler::enableJIT(3)
--8<---------------cut here---------------end--------------->8---
in ~/.Rprofile for years; now that I upgraded to 3.2.1 I get this on startup: