Displaying 20 results from an estimated 10000 matches similar to: "How to handle a non existing action in a controller?"
2013 Mar 28
1
undefined method 'sanitize_limit' for #<ActiveRecord::Relation:0x2aaaad35d720>
I am trying to upgrate rails from 3.0 to 3.1, while updating rails version
I am getting following error
rake aborted!
undefined method `sanitize_limit'' for
#<ActiveRecord::Relation:0x2aaaad35d720>
/some_package/lib/ruby/gems/1.8/gems/activerecord-3.1.12/lib/active_record/relation.rb:460:in
`method_missing''
2006 Aug 07
1
Escape ''&'' in text_field_with_auto_complete
Good day.
I have searched on the net and through the archives to now avail as of yet.
I have a text_field_with_auto_complete that searches for company names.
These company names obviously can have an ''&'' in the name of the company
(example Barnes & Nobel).
The auto complete works beautifully.
However, the problem arises when I pass the name of the company to the
2003 Apr 24
1
R 1.7.0 (Windows) Crashes After using "Install Package from Cran option" within
R-Community,
(System Details at end)
I recently downloaded R 1.7.0 win95 binaries from
http://cran.us.r-project.org .
After installing the program with no hitch I used the the 'Install
Packages from Cran' optinon in the drop down menu from Rgui. (This may
be bad form, if so let me know): I selected all paackages to install and
everything was fine until the 'dse' package was
2006 Dec 28
13
Sorting/Ordering Search Results
Hello All,
I am having an issue with AAF and sorting results of a search. Right
now, I have results being split onto pages of 10. The results are being
sorted alphabetically, but not across multiple pages - it''s just sorting
the 10 it pulls down on each page. I noticed another post from April
regarding this same issue (http://www.ruby-forum.com/topic/62993#66934)
where the issue was
2005 Apr 09
1
OT: ManxPower 2005 European Tour
I've helped a lot of people on the mailing lists and on IRC #asterisk.
and wanted to let people know that I will be in Europe between May 19
and June 21. Stockholm (VON 2005), Brussels (holiday/vacation),
Amsterdam (holiday/vacation), and Madrid (Astricon). There are
several weeks during my trip that I have no current plans for and may
add other cities to my itinerary.
I'm looking
2006 Feb 10
12
Accessing ''many'' variables
Hi,
I have a class called Outlet which has_many Jacks. Apart from internal
id, each jack is unique by the attribute ''color''.
I''d like to iterate through each Outlet, and be able to output data
for a Jack of a certain color.
Say, I want to access the orange jack for the current outlet:
<td><%=h outlet.jack.color[''O''].ip_address
2006 Aug 14
4
Controller method problem
Hi,
I have a def in my controller see below where i want to find the page
object based on a parameter value and then use the page_id to then find
all the contents that belong to that page in the same method.
Controller
def aboutus
@page = Page.find_by_name(params[''About Us''])
@contents = Content.find(:all,
:conditions => "page_id = #{@page.id}")
end
2008 Jan 28
2
Could this controller test be made simpler?
In a create controller method I am testing the else clause that occurs
when the model is unable to be saved. Sounds simple enough, but because
model is created before the save and the form has to be re-filled I now
have to stub a model and all the attributes. Since the error messages
are displayed I also have to stub some methods within the model that
allow the error messages to be displayed
2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
I have searched a lot for a solution, but I could not find it! I am trying
to make a rails application after watching Michael Hartl''s tutorial and
when i fill data manually and submit it nothing happens and nothing records
in the Mailers table and I am facing the following error:
Failures:
1) Mailer pages mail us with valid information should send a mail
Failure/Error: expect
2006 Jan 10
8
Noob: Child records not saved
Hi all,
happily coding along, but it seems a belongs_to record is not saved.
# Create some stuff
def create_project
@contact = Contact.new
@project = Project.new(@params[''project''])
@project_contact = ProjectContact.new(@params[''collect''])
@project.project_contact = @project_contact
contact =
2006 Mar 02
4
Getting Acts_as_Paranoid to work with validates_uniqueness_of
Hello
I''ve been using Acts_as_Parnoid for a while and it has been working well
but I am now having a slight issue with it. I have a company table were
I would like to use validates_uniqueness_of :company_name. This
validation works if a company exists in the database and has not been
deleted. However, I also would like the validates_uniqueness_of to
work if a company has
2005 Feb 16
4
Beginners Question
I''m just picking up rails...I''ve got a few questions.
First, I''d like to get some input and parrot it back. I''m trying the following in my .rhtml file but it isn''t working. What am I missing here?
<html>
<head>
<title>Search</title>
</head>
<body>
<h1>Search for Filings</h1>
<p>
Use this page to
2014 Oct 05
0
CFP: The 24th Int. ACM Symp. on High-Performance Parallel and Distributed Computing (HPDC) 2015
**** CALL FOR PAPERS ****
The 24th International ACM Symposium on
High-Performance Parallel and Distributed Computing
(HPDC-2015)
Portland, Oregon, USA - June 15-19, 2015
http://www.hpdc.org/2015
The ACM International Symposium on High-Performance Parallel and Distributed
Computing (HPDC) is
2014 Oct 05
0
CFP: The 24th Int. ACM Symp. on High-Performance Parallel and Distributed Computing (HPDC) 2015
**** CALL FOR PAPERS ****
The 24th International ACM Symposium on
High-Performance Parallel and Distributed Computing
(HPDC-2015)
Portland, Oregon, USA - June 15-19, 2015
http://www.hpdc.org/2015
The ACM International Symposium on High-Performance Parallel and Distributed
Computing (HPDC) is
2014 Dec 12
0
CFP: The 24th Int. ACM Symp. on High-Performance Parallel and Distributed Computing (HPDC) 2015 -- Abstracts due 01/12/15
**** CALL FOR PAPERS ****
The 24th International ACM Symposium on
High-Performance Parallel and Distributed Computing
(HPDC-2015)
Portland, Oregon, USA - June 15-19, 2015
http://www.hpdc.org/2015
The ACM International Symposium on High-Performance Parallel and Distributed
Computing (HPDC) is
2014 Dec 12
0
CFP: The 24th Int. ACM Symp. on High-Performance Parallel and Distributed Computing (HPDC) 2015 -- Abstracts due 01/12/15
**** CALL FOR PAPERS ****
The 24th International ACM Symposium on
High-Performance Parallel and Distributed Computing
(HPDC-2015)
Portland, Oregon, USA - June 15-19, 2015
http://www.hpdc.org/2015
The ACM International Symposium on High-Performance Parallel and Distributed
Computing (HPDC) is
2010 Sep 12
11
Rails 3: finding a record by name in multilingual app
Hello,
I upgraded my application from Rails 2 to Rails 3 and ran into a
problem. In rails 2 I could use the english name of the record to find
it like:
Page.find_by_name("Welcome")
even though the user chose German as the language (which of course
showed the German welcome page.
Eversince I switched to Rails 3 (default_locale still :en) I can''t find
anything by giving the
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
I am trying to create a form for processing credit cards. For the
credit card expiration date, I would like to leave the day field out
of the form for obvious reasons. However, the following code is
producing an error for me.
Any ideas?
Thanks!
<p><label for="email">Expiration</label><br/>
<input type="hidden" id="user_card_expiration_3i"
2006 Nov 16
2
dynamically adding static (class) methods to a class
Hello again,
I guess this is more of a Ruby question, but here goes anyways...
I want to intercept all calls to non existent class methods and then
call an existing class method with the non existent name.
In code...
class MyModel < ActiveRecord::Base
def MyModel.method_missing(symbol, *args)
MyModel.func(symbol.id2name)
end
def MyModel.func(func_called)
puts "You
2006 Aug 14
1
Rest, routes, path_prefix and default params
I am trying to use routes with default params to have routes
''/mycompany/departments''
and
''/companies/1/departments''
mean the same thing (both restful routes).
When I set up the files as below, I get an error of
''Couldn''t find Company without an ID''
and my log file shows the following ..
Processing DepartmentsController#index (for