similar to: Rails does not display form error message on a custom method

Displaying 20 results from an estimated 3000 matches similar to: "Rails does not display form error message on a custom method"

2010 Apr 14
1
Rails validations app specific problems
Hi all, I have a unique workflow where it''s making the use of validations difficult. My app is for internal use in my company and I have a funky implementation (inspired by the e-commerce Railscasts episodes) of a cart. I have products which when I "add to cart" creates an order with a state of "incomplete". The product is a line item of my order. Hope that makes
2012 Jun 21
0
How to access an engine's method from main application?
Hi, I''m not sure if this is the right place to post this, but please redirect me if I''m posting this in the wrong place. I''m trying to use a method defined in an engine''s library, specifically it is the current_order method from the Spree::Core engine: https://github.com/spree/spree/blob/master/core/lib/spree/core/current_order.rb In my view,
2009 Jan 27
6
German letter ä, ö, ü in rfpdf
Hi, I need PDF creation in Rails and decided for RFPDF. Everything works quite nice the only problem is that I can''t display ä,ö,ü in the pdf documents. I found a tutorial that says that I have to create a font config file with MakeFont. I did it, but now I don''t now where to put al this files. Does anyone has experience with creating PDFs in Rails with ä,ü,ö letters? Thx
2009 Sep 23
2
FFMPEG Query
Hi All, I want to convert a video file which is located at the Amazon-S3 Store, through ffmpeg. How can it b possible? please help me if anyone have any idea. for ex:- is it possible to execute following command:- system "ffmpeg -i
2009 Mar 10
5
onsubmit for remote_form_for not working properly
I want to use onsubmit for a form validation using javascript on remote_form_for for this i am doing something like this <% remote_form_for :timesheet, @timesheet, :url =>{:action => ''report_user''}, :html => {:onsubmit=>"return ValidateDate();" } do |f| %> // Form elements here <% end %> but it not works well. if condition return false
2009 Apr 11
6
Inserting data from 1 table to another by using find_by_sql
Hi All, I am inserting data from one table to another by using following method @data=RoyaltyReportFiles.find_by_sql("insert into royalty_reports (artist_name, album_name) select artist_name, album_name from temp_royalty_reports where id=328417") it saves the data into royalty_reports table but it gives following error and application crashes. i am using rails 1.2.5 You have a nil
2011 May 28
3
Three sigma rule
Dear Sir, I have data, coming from tests, consisting of 300 values. Is there a way in R with which I can confirm this data to 68-95-99.8 rule or three-sigma rule? I need to look around percentile ranks and prediction intervals for this data. I, however, used SixSigma package and used ss.ci() function, which produced 95% confidence intervals. I still am not certain about percentile ranks
2010 Dec 31
1
WickedPDF - wrong number of arguments
I''m trying to get this plugin to work for me. I''m having the following issue when I try to render a pdf (/fancy_things/45.pdf ).. Any suggestions? Thanks! ERROR: Started GET "/fancy_things/45.pdf" for 192.168.66.1 at Fri Dec 31 10:59:07 -0500 2010 Processing by OrdersController#show as PDF Parameters: {"id"=>"45"}
2009 Jul 07
1
Adding data in two tables simul;taneously with Validations
Hi All, I have 2 tables 1] user_infos & 2] users class UserInfo has_one :user validates_presence_of :city class User belongs_to :user_info validates_presence_of :first_name i write following code in my create method. @user_info = UserInfo.new(params[:user_info]) @user=@user_info.build_user(:first_name=>'''') if @user_info.save else end now what i want is to
2008 Apr 04
0
named_scope and ordering
Hi, this is a general design question and I liked to see how other people handle the following situation: Before named_scope I wrote custom finders for my model classes. Something like # order.rb class Order < ActiveRecord::Base class << self def find_all_marked find(:all, :conditions => {:marked => 1}, :order => ''name ASC'') end end end Now
2014 Mar 01
0
Rails controller problems
1. Users_Controller CRUD expects param[:id] to create User instance. With Orders_Controller, I'd like to retrieve a list of users who have ordered. I know Orders_Controller expects param[:id] to be for creating Order instance. So does this mean if I want to retrieve a list of users who have ordered, I should create a method called 'get_orders' in Users_Controller? 2. Can
2008 Jun 05
3
how to specify controller '/admin/foo'
WeBrick handles the link correctly on development, but apache in production does not: <%= link_to "Orders", :controller => ''/admin/orders'', :action => ''index'' %> The controller lives in ./app/controllers/admin/orders_controller.rb From the production log, apache is looking for the "orders" action in
2012 May 07
1
Sprockets, JST, Eco and escaping
While it was a good move from Rails part to escape ERB <%= %> tags by default, it doesn''t seem to happen to Sprockets as well. The strange bit is that according to Sprockets documentation, it would be just a matter of naming your template as .jst.eco to enable Eco: https://github.com/sstephenson/sprockets#javascript-templating-with-ejs-and-eco Then, extracted from Eco
2006 Jan 06
6
HABTM problem not saving all associations
Hello all, I have an Order object that has and belongs to many Products and has and belongs to many Loan Types. This is so I can select multiples of each in my order entry screen via checkbox groups. I''m having some trouble with saving multiple HABTM associations for a single model object; only the first HABTM association declared in the model will save during the initial @order.save
2012 Aug 01
1
Strange error: uninitialized constant Barby::Code128A on Heroku server?
I can`t figure out why on heroku server my app crashed. On local server all seems works. 2012-08-01T17:14:50+00:00 app[web.1]: NameError (uninitialized constant Barby::Code128A): 2012-08-01T17:14:50+00:00 app[web.1]: app/models/order.rb:102:in `generate_shipment'' 2012-08-01T17:14:50+00:00 app[web.1]: app/models/order.rb:60:in `generate_items'' 2012-08-01T17:14:50+00:00
2007 Oct 22
1
View spec response has no content?
I have been messing with this all night, and can''t figure out what''s going wrong here. I have a test that renders the view, and then a shared behavior checks "response" for the various tags from a rails layout. The problem is matching. If I run in the browser the page renders fine. Is there a way to output what the response contains? Here are my tests: describe
2014 Jun 20
0
Errno::ECONNREFUSED (Connection refused - connect(2))
I am reading " Agile Web Developement with rails". I am using Ruby 1.9.3 and Rails 3.2.16. I can able to run application locally But application not working on heroku. I deployed my application successfully on heroku. When I run rake test, there is no failure. When I click on place order button i got error like: >We're sorry, but something went wrong. I have attached heroku
2008 Jun 04
0
routers are handled incorrectly on production
Has anyone found their routes are handled differently on production? #works fine http://local:3000/admin/orders/new #returns 404.html http://domain.com/admin/orders/new production.log: Processing AdminController#orders (for 67.112.120.159 at 2008-06-04 09:06:11) [GET] Session ID: 2345fb73da6d2f975bbbfc1dc4dd5ce5 Parameters: {"action"=>"orders",
2006 Aug 13
3
ruby and mysql syntax? tried single quotes, double, none, ...
Hi, how do i use passed in arguments and convert those to something sql can understand? do the aliases have to be double qouted? single qouted? i think i tried all but no avail...thanks! def get_count(doctype, towne) @profiles = Profile.count_by_sql("SELECT COUNT(*) from Profiles where Profiles.doctype_id = 1 and town_id = towne") end -- Posted via
2003 Nov 27
1
commands
hi I have made ext3 from ext2 by using mkfs -j option. I want to know if all commands of ext2 like dumpe2fs ( provided in e2fs-1.36 ) works fine with ext3 ? Do we have some commands that are unique for ext3 file system ? ____________________________________________ Salvy HCL Technologies Ltd A-11, Sector 16 Noida, U.P., India Ph: 91-9811250247 salilt@noida.hcltech.com