similar to: Rails 3, Validates, Custom Message

Displaying 20 results from an estimated 10000 matches similar to: "Rails 3, Validates, Custom Message"

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 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 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 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:
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
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 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 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 12
11
Rails Commenting, Plugins?
Hello, I''m looking to add comments to records in my app like Books. So a user can view a Book and then comment on it... As a newbie, is this something that I should build from scratch, or are there any popular Commenting Plug-ins, (Ajax implemented) that might be worth utilizing? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
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 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 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 06
18
problem when : ruby script/server
Hi; Now I have tried the following, installed ruby 1.8.7 (2010-08-16) [i386-mingw32] rails 2.3.8 when I start the server --> ruby script/server, I get the following eeror: C:\Rails\demo>ruby script/server => Booting WEBrick => Rails 2.3.8 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-09-06 23:53:31] INFO WEBrick 1.3.1
2010 Sep 22
8
ActiveScaffold and partials
I was thinking of doing partials as I did in the simple Rails application I worked on today. But, since I''m using ActiveScaffold, I didn''t find any *.html.erb in the views folder of the Rails application that I need to make my partials! How can I work with partials in ActiveScaffold? Thanks. -- Posted via http://www.ruby-forum.com/. -- 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
2011 Oct 21
20
How to transform my html form into a rails 3 form
Hi, I have the following code working in a rails 3 view, but it is unfortunately not pure rails code! <% @filter1 = "tr.show1,tr.show2" %> <% @filter2 = "tr.show1" %> <% @filter3 = "tr.show2" %> <form> <p> <input type="checkbox" value=<%=@filter1%> onclick="$ (this).is('':checked'')
2010 Sep 15
5
Hide an image in show.html.erb
I have the following "show.html.erb" script, and I get as an output TWO images since I use a method to draw an image. How can I HIDE the RESOURCE image? Thanks. Here is the script: <canvas id="line" height="512" width="512"> </canvas> <p id="notice"><%= notice %></p> <p> <b> Name </b> <%=
2010 Sep 08
14
A version problem
After updating, script/server fails with this stack trace: script/server -u /.../1.8/rubygems.rb:223:in `activate'': undefined method `map'' for nil:NilClass (NoMethodError) from /.../1.8/rubygems/custom_require.rb:35:in `require'' from <project>/vendor/rails/railties/lib/commands/server.rb:1 from /.../1.8/rubygems/custom_require.rb:31:in
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