Displaying 20 results from an estimated 3000 matches similar to: "[AWDR] Tutorial in A4 wont ''destroy'' items"
2006 Apr 03
5
Strange Problem with ActionController (I think)
I''m working through the Agile Depot example
I have no idea what I did, but when I try and delete something from the
web page I get this error on the log.
Processing AdminController#destroy (for 127.0.0.1 at 2006-04-02
22:28:06) [GET]
Session ID: 4371bd7ca2cb5ec5e08e60a7590df90a
Parameters: {"action"=>"destroy", "id"=>"5",
2008 Jul 14
1
question about method "hidden_div_if" in AWDR 2
I followed the sample code in AWDR 2 like this:
store_helper.rb
def hidden_div_if(conditions, attributes = {})
if conditions
attributes["style"] = "display:none"
else
attr = tag_options(attributes.stringify_keys)
"<div #{attr}>"
end
end
store.html.erb
<%= hidden_div_if(@cart.items.empty?, :id => "cart") %>
<%=
2006 Aug 01
1
AWDR Edition 2 Gripe
Maybe it''s just me.. But the cover is hideous. I love the first edition
cover, it seems to fit perfectly.
The new "hip" cover is a bad choice, in my opinion. Comments?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060801/043f6ec1/attachment-0001.html
2008 Aug 15
7
Autotest and subclasses / namespaces
I am writing a controller admin/cities_controller.rb
it inherits from AdminController, so it''s defined like
class Admin::CitiesController > AdminController
Whenever I save the controller file, autotest freaks out:
uninitialized constant Admin::AdminController (NameError)
I''m pretty used to just hitting CTRL-C to get autotest to re-load all
the files, or flicking to
2008 Mar 28
10
Inheriting from AdminController intstead from ApplicationController
Hi
I would like to do the following:
I have created an admin namespace and the required folders app/admin
views/admin etc. And then I wanted all controllers under app/admin to
inherit from a controller named AdminController which resists under
app/admin/admin.rb instead of inhereting from ApplicationController,
so I could better separate between admin and public section. The
AdminController
1998 Jan 28
2
NT - Not allowed from this workstation
I am the sysadmin in an office with an overabundance of Win95 machines and
a few NT 4.0 workstations. All installs went relatively easy for logon
scripts, wins, etc. I have run into a semi-serious problem with 2 of the
3 NT workstations. (All running the same service pack - 1).
When trying to make a share from one of the 2 remaining workstations, I
will recevie an error message saying that:
2001 Feb 04
1
so .. patches ... shall i download all and patch wine with all of 'em ?
so since Gerhard told me where to find that patch, ohh god there are
many patches, i got the idea, to download all patches and patch wine ...
but would that make eny sence ?
or would i destry wine with it ?
thanks m.angermann
2006 Apr 22
3
Making a separate admin zone
Hi, im building a little cms and i want to separate the admin zone
controllers in a subfolder(controllers/admin) if possible to all be
managed by one login module, i just have managed simple 3 or 4
controller apps so any help you can give me will be very apreciated.
;)
--
Posted via http://www.ruby-forum.com/.
2006 Mar 12
2
counter_cache reference/tutorial
I''m trying to use counter_cache, but I''m not doing something right.
It is unreliable and I keep having to correct it manually. Is there a
good tutorial or reference on how to use it on-line? I have the AWDR
book, but I need something more complete.
TIA,
Jeffrey
2006 Mar 08
3
Namespace & Organisation Conventions
Hi All
I wanted a little advice on the convention for namespace usage and
organisation of code.
I originally used PHP and often had an "admin" backend that performed the
various admin tasks with users, and data
Then I had a front-end often situated at the root that had user services.
I''m trying to emulate this in Rails but feel I''m missing a significant point
here and
2006 May 31
5
Sharing code between some controllers? Staying DRY
Hi,
I have four controllers: one for the store front and three for the
store admin. In each controller I have copied and pasted exactly the
same code. It is a method called redirect_to() to override Action
Controller''s redirect_to(). Copy and paste is bad. I can think of two
options but I don''t know how Rails will feel about them.
Option 1: Can I create an intermediate
2006 Jun 06
5
Functional tests and protected actions
Hello!
I have certain methods in my Application Controller, that I need to access.
Namely ApplicationController#logged_in_user
The problem is, that when I try to access it, I get:
NoMethodError: protected method `logged_in_user'' called for
#<AdminController>
Any ideas how I can circumvent that?
Or are functional tests really not suited for any kind of logins and session
work?
2006 Jun 25
6
Understanding Common Views
Hi Everyone,
I''m trying to formulate my thoughts on how views work in RoR and I
understand the basic bits -
1. Every controller has its own view defined using rhtml files in the
views/[controller_name] folder.
2. There is one "view" file (rhtml) for every in the controller and has
the same name as the method.
3. For portions that are common, partials can be used - file
2006 Jul 22
4
Reading floating points into a field stored as Integers
Hi, I''m trying to follow the "AWDR" example of storing certain types of
numbers (in my case, percentages not money) as integers in the
database. I understand from the Depot application how to format the
output to have 2 places (or n places for that matter) decimal.
Now, I"m wondering about the input. It''s more natural for people to
enter numbers as
2006 Jan 30
2
Modules, controllers and inheritance
Hi!
I was trying to cleanup my app and I runned into quite a problem. My
controllers in submodule do not seem to inherit things from base
class.
I have following setup:
app/controllers/
application.rb:
class ApplicationController
admin/
admin_controller.rb:
class Admin::AdminController < ApplicationController
include LoginEngine
include UserEngine
2006 Apr 10
2
using web service for authenitcation
I am writting a web service for authenitcation of users and was using
web_service_scaffold :invoke for testing it out...and was able to consume it
using .NET. But my question is, whats the simplest method using which i can
use the same web service in the current Web App. I mean, not from an external
application or something but from the current web apps itself.
I found one method in AWDR, and
2006 May 16
4
Model class conditional on ENV["RAILS_ENV"] == "test"
I am trying to setup a model class that I want to inherit from
ActveRecord when in the test mode, and not inherit when in production
and/or development mode. The reason for this is so that I can use
fixtures to test that the logic in the model is working correctly, but I
don''t want the database table around during production (and normal
development).
I would like to do this the
2006 Mar 22
4
Problem with ACL plugin system
Don''t know if anyone else has experienced this but I''m having a problem
with the access_denied method in Ezra''s ACL access control plugin. It''s
working fine (in conjunction with acts_as_authenticated) until it comes
across a user it denies access to, in which case it throws the following
error:
NoMethodError in Admin#index
protected method
2006 Jun 23
10
Don''t un-admin the last administrator
I have a User class with a field called admin which is a boolean that
determines if the user is or is not an administrator. I want to make it
impossible for the last administrator for an account to be removed from
the system.
I need to protect against this both when deleting a user and when
editing a user as you can revoke a user''s administrator privileges via a
form.
User
2006 Mar 31
3
params vs @params
Is there a difference in the way that params[] and @params[] are handled?
Is the ''handling'' done by Ruby or Rails?
A pointer to the relevant documentation would be sincerely appreciated. Or just an answer would be ok too ;-)
Thanks,
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: