Displaying 11 results from an estimated 11 matches for "orders_control".
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
"./app/controllers/admin_controller.rb" and not finding it.
-- log message on production --
Processing AdminController#orders (for 209.11.127.13 at 2008-06-05
14:19:19) [GET]
Session ID: 24e7a44689d...
2010 Dec 31
1
WickedPDF - wrong number of arguments
...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"}
***************WICKED***************
Completed in 4ms
ArgumentError (wrong number of arguments (1 for 0)):
app/controllers/orders_controller.rb:20
app/controllers/orders_controller.rb:9:in `show''
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/
action_dispatch/middleware/templates/rescues/_trace.erb (4.8ms)
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/
action_dispatch/middleware/templates/rescues/_r...
2006 Jan 06
6
HABTM problem not saving all associations
...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 in the create action in
my orders_controller.rb code below.
If the order is then updated via an edit action, all selected
associations will save correctly. If you notice in the
development.log dump, I''m passing product_ids and loan_type_ids arrays
back to the controller properly. Inspecting the @order object during
a breakpoint...
2008 Apr 04
0
named_scope and ordering
...o names scopes that
include an :order option:
# order.rb
named_scope :active, :condtitions => ..., :order => ''created_at DESC''
Order.marked.active # ordered by ''name ASC'' according to the first
scope ''marked''
So what are the options?
# orders_controller.rb
def index
@marked = Order.marked.find(:all, :order => ''name ASC'')
end
No, that feels like bleeding model code into the controller.
# order.rb
named_scope :ordered_by_name, :order => ''name ASC''
# orders_controller.rb
@marked = Order.marked.ordered...
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. Ca...
2012 Aug 01
1
Strange error: uninitialized constant Barby::Code128A on Heroku server?
...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 app[web.1]: app/controllers/orders_controller.rb:17:in `create''
I tried to add Procfile, but it not helps me either.
How to debug this?
--
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...
2008 Jun 04
0
routers are handled incorrectly on production
...n responded to orders):
The file hierarchy is:
$ ls -xR1 ./app/controllers/
./app/controllers/:
admin
admin_controller.rb
application.rb
categories_controller.rb
category_controller.rb
info_controller.rb
login_controller.rb
search_controller.rb
store_controller.rb
./app/controllers/admin:
orders
orders_controller.rb
./app/controllers/admin/orders:
line_items_controller.rb
--
Anthony Ettinger
408-656-2473
http://anthony.ettinger.name
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
T...
2014 Jun 20
0
Errno::ECONNREFUSED (Connection refused - connect(2))
...t, 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 logs and order_controller.rb file. Please find
it.
How can i solve this error?
Kind regards
Attachments:
http://www.ruby-forum.com/attachment/9823/orders_controller.rb
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3Mbo...
2010 Apr 14
1
Rails does not display form error message on a custom method
...t specify the details like a normal
form would. The error messages should appear if the customer order
number is not unique for that client.
Below is the custom method (checkout) related code.
Order Model:
[code]
validates_uniqueness_of :customer_order_number, :scope => :client_id
[/code]
Orders_controller:
[code]
def checkout
@order = current_order
end
def complete_order
@order = current_order
respond_to do |format|
if @order.update_attributes(params[:order])
@order.complete #sets submitted datetime and state to ''complete''
flash[:notice...
2010 Feb 22
9
Couldn't find Order with ID=pending_orders
I have a Controller named Orders which has a pending_orders method
which is expected to fetch some records from the database.
If i dont write a route for this method, I get the following error
when i call this method.
Couldn''t find Order with ID=pending_orders
I am using rails 2.3.5, in the previous versions i use to get this
I am not getting whether its new version requirement...
Help
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
...e attempt to save the order, and in
an after_create method in the Order model, we charge the user''s credit
card (using a transition from acts_as_state_machine). If we can
charge it successfully, we save the order, otherwise, we raise an
exception and display an error message to the user.
orders_controller.rb
def create
# populate order details (ommitted for brevity)
begin
if @order.save
# display successful message, redirect somewhere
else
# user probably forgot to enter some info, display error message
end
rescue
# if we get here, then an exception must have b...