Displaying 20 results from an estimated 20000 matches similar to: "Rails Commenting, Plugins?"
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
2010 Sep 27
9
Rails 3 - Creating a comment and then returning the Partial with JUST the new comment
Here''s the flow I have...
First, jquery posts the new comment to the server:
$.post(this.action,$(this).serialize(),null,''script'');
Then in the comments controller:
def create
@comment = lots of stuff going on here but it works...
if @comment.save
flash[:notice] = "Successfully created comment."
2010 Sep 13
13
what I've missed in routes.rb?
In routes.rb I''ve put:
resources :sessions
controller is:
class SessionsController < ApplicationController
def destroy
session[:id] = nil
session.delete(:casfilteruser)
CASClient::Frameworks::Rails::Filter.logout(self)
end
end
In application.html.erb I have:
<%= link_to ''Logout'', session_path(session[:cas_user]), :method => :delete %>
I
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:
2010 Sep 10
2
Simple_captcha issue
I have a weird issue .I am using simple captcha in forms in my rails
applications. If I am using one captcha in a web page I don''t have any
problem. But I have a scenario of using three(3) forms in one page in
which all the three forms will have the captcha . So that when I
refresh the page the captcha data of the three forms are equal.
When we come to database
2010 Sep 09
17
formtastic issue
Hello,
I will try to explain it step by step :-)
I just created a new rails 3 app, then I created a new controller...
rails generate controller admin::users
I didn''t forget to add the resources in the routes.rb file like this.
namespace :admin do
resources :users
end
Now I try to use formtastic to create the form but I get erorr that my
users_path doesn''t exist?
2010 Sep 08
5
Adding a selected checkbox to a new nested model without polluting the model
Context:
I have a GoodsReturn model with many ReturnedItem. For the new view, I
create a new GoodsReturn with many new ReturnedItems from a sale (and
its SoldItems).
Problem:
I want to have a Add/Selected checkbox with which the user can pick
the items he wants to return. I know I could use a ''selected'' virtual
attribute but I don''t want to pollute my model just for
2010 Sep 06
5
how to call rails method from javascript method.
hi
I wanna call rails method from the javascript method.
It should be ajax call for rails method.
please help me.
--
Posted via http://www.ruby-forum.com/.
--
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
2010 Sep 27
6
Rails 3 + jQuery ; How to show error messages
Hi guys,
can anyone explain how to show error_messages_on (like back in Rails
2 , without Ajax) fields that didnt'' pass the validation the jquery
way.
I googled for about 2 hours now and found nothing. Jquery works fine
and adds the content to my table, but im totally stuck with the whole
error/validation thing.
My form looks like this:
<%= form_for Translation.new , :remote =>
2011 Feb 09
9
Model error message is not too helpful
Hello all,
I am struggling with an error that I''ve seen discussed in a few places. When
a potential user of my app creates a new login, an error in their sign-up
form generates a very ugly message, starting like so: {{count}} errors
prohibited this {{model}} from being saved
A search of the web lead me to suspect this is an internationalization
problem, but the proposed remedy
2010 Sep 08
6
Cannot start sqlite3
Hello everybody, i''m a long time watcher of these forums first time
poster.
I wanted to start getting into rails and have a play, I found a very
useful guide on the Internet detailing the install process for Ubuntu
10.04, after the install and setup process which seem to complete OK, i
went ahead and started my first project, however when I go to start the
server I get this message?
2010 Sep 21
7
Ajax CSRF in Rails3
I''m using rails3. It does not seem to check the authenticity_token
when doing a POST using Ajax. I traced this to:
module ActionDispatch
class Request < Rack::Request
.....
def forgery_whitelisted?
get? || xhr? || content_mime_type.nil? || !
content_mime_type.verify_request?
end
end
so you don''t check if its a get? or a xhr? (ie ajax request). Is this
correct?
--
2010 Dec 27
6
RVM Issue
I''m a total rails newb and is trying to install RVM. The terminal
tells me that RVM installed just fine but when I try commands like
"rvm notes" or "rvm install 1.9.2" I get: "-bash: rvm: command not
found"
Does anyone know why?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to
2010 Sep 18
11
Commenting in an ERB without generating a compiling error
Hello,
I have the following:
<% @projects.each do |project| %>
<tr>
.
<td><%= link_to ''Destroy'', project, :confirm => ''Are you
sure?'', :method => :delete %></td>
.
</tr>
<% end %>
How can I safely comment out the TD line above? Do I have to use the
=begin way?
--
You received this message because you
2010 Sep 21
6
Iterate HashWithIndifferentAccess
How do I iterate a HashWithIndifferentAccess? I need to set the order
using a sortable_element.
--
Posted via http://www.ruby-forum.com/.
--
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
2010 Sep 11
10
Having difficulty with threaded comments, using acts_as_tree
I''ve been having problems making threaded comments for the last few
days. Mainly with creating children and displaying the children.
Currently, I have comments shown at the bottom of my articles show view.
The top level comments work, but I do not really know how to implement a
way for users to "reply" to the top level comments and take them to a
form (the comment
2010 Oct 01
20
Paperclip not executing FFMPEG properly
Im using a customs processor to run ffmpeg on a video to create a
thumbnail.
So far so good. Except when I do:
cmd = "-i #{@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv"
success = Paperclip.run(''ffmpeg'', cmd)
Console is reporting:
ffmpeg ''-i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream,
16824,1.mpeg -f flv -s 320x240
2010 Sep 23
8
HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh
Hello, I''m interested in learning the correct/smart approach for
implementing a web page with tabs and a content panel... When the tab
is clicked by the user the tab''s content is fetched and inserted with
jQuery... no page refresh...
Example, Facebook, when you click Photos or Events, it doesn''t refresh
the browser, just replaces the content with AJAX in the
2010 Oct 03
7
Rails 3, Validates, Custom Message
In Rails < 3, I could have a validation on model such as:
validates_presence_of :name, :message => "some custom message here"
If I try something similar in Rails 3:
validates :name, :presence => true , :message => "some other custom
message"
obviously, it throws an exception. So the question is, in Rails 3, how
to you give a simple custom message? Do I need to
2011 Mar 17
7
Beta Invitation in Rails 3, little problem
INVITATION BETA EMAIL
I have in the email that the app send to friend''s email address
------------------------
You are invited to ExampleApp.com click below to signup
http://localhost:3000/signup.efweiuvwnjernfwkefwebhsohj
------------------------
But I have a dot in the url beteween http://localhost:3000 and the token
I wish the following url