Displaying 20 results from an estimated 35 matches for "controllername".
Did you mean:
controller_name
2006 May 28
1
Changing module name - help!
When I started developing my application I grouped my controllers in the
followin g fashion: User::ControllerName.
Now I''ve realized that the ''User'' module is a misnomer for my current
controllers and I need to use the User module for something else, so I
decided to change the controllers in the ''User'' module to ''Data''. I''ve
changed th...
2006 Feb 01
3
Testing components
I''m using template components to modularize an application I''m working
on and am really happy with the way it''s going. Unfortunately, all my
attempts at writing functional tests for them fail. Trying to duplicate
my normal controller tests I have:
require File.dirname(__FILE__) + ''/../test_helper''
require File.dirname(__FILE__) +
2006 Feb 08
2
URL rewriting
Here is the scenario I am trying to achieve. Basically, I want to run
the action "show" from my controller, without adding the "show/id".
Standard:
http://www.domain.com/controllerName/show/id
I would like:
http://www.domain.com/controllerName/randomstring (where randomstring is
a
field in my model/table, that is equivalent to a GUID -> and unique).
I''m confused at how this would be possible, because you normally would
create an action in the controller, that is th...
2006 Apr 20
4
Many to Many Category structure with itself
...one parent. To me the obvious way of doing this is
by creating another table called category_maps (and a model called
CategoryMap). The category_maps table would keep the parent_id/child_id
relationships for the categories table.
As far as the user experience, I want it to work so if you go to
controllername/list_cats (with no id) it will display all cats with a
parent_id of 0. If they go to controllername/list_cats/3 it should
display all cats with a parent_id of 3
My problem is that when I try to implement this concept in the actuall
code, I run into problem after problem so I must be missing some...
2006 Mar 29
4
Scaffold generator: create vs. new
Can anyone supply me with a simple, succinct explanation of what the
difference is between the "new" controller and the "create" controller
that the scaffold generator produces?
I run:
> script/generate scaffold modelname controllername
And now I need to do some work inside the controllername.rb file. For
example, pulling a list from another database table to supply for a
drop-down select in the "create a new whatsit" form.
@sprockets = Sprocket.find(:all)
Do I put this in new or create? Why? I''ve been...
2006 Feb 07
5
homepage instead of welcome page?
Got a noob question for ya...
When I visit http://localhost:3000/
I get the nice "Welcome to rails" page. To get to a controller I have to
go to:
http://localhost:3000/controllername
What if I don''t want the welcome message and want / to resolve to a
controller?
How do I set that up?
Thanks,
Dave
--
Posted via http://www.ruby-forum.com/.
2010 Apr 03
0
Deployment problem with apache + fastcgi
...crash.log''
For request: http://mydomain/
i get "welcome ruby on rails page" with information about Rails, Ruby,
Gems versions.
I renamed index.html in public directory and wrote default "root"
controller in routes.rb. But there was an error.
I get only:
NameError in [ControllerName]#[ActionName]
uninitialized constant [ControllerName]
Session dump: ---
Framework Trace:
usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:443:in
`load_missing_constant''
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/depende...
2005 Jan 28
16
primary_key_prefix_type, support for non-integer primary keys
Hello!
I''m just starting out with Rails--and Ruby itself for that matter--and
have a couple of questions regarding primary_key_prefix_type and
non-integer primary keys.
I see in the ActiveRecord documentation [1] that by default the primary
key of a table "foo" is expected to be "id", though
primary_key_prefix_type this can be changed to :table_name or
2006 May 02
1
Accessing Parameters - Params (nil)
I''m trying to render a component that pulls information based on a
parameter that is passed by a link_to item, but my params object is nil
for the following code in the controller:
records = ControllerName.find(params[:id])
but the error page also has this: Parameters: {"id"=>"7"}
I''ve tried to access it (in the controller) using:
variable = params[:id]
but still nothing.
I''m sure this is basic. Is there a way to see what params are being
recognized...
2006 Jan 25
4
html special char conversion
I''ve stucked to such problem:
I have html entities in database, after using scaffold I''ve got these
chars not converted (I have strictly " and & in page source). It is what
I need, but after making ./script/generate scaffold modelname
controllername (recreating controller) I''ve got all special chars
converted into entities like (" and others). How can I fetch data
and display it without this conversion?
2004 Jul 22
0
Researching Improved safety 4 Samba/LDAP
...omething? It would help if I
understood these acls better but while using regular expressions is good
for compatibility it obfuscates (at least for me) the text quite a bit.
From what I see below, it seems as if all I have to do is join the
server box to the domain and then change the bind dn to controllername$
in various and sundry places. This doesn't seem right though because I
know that we need a userid and password stored in secrets.tdb. I can
store controllername$ but the password for machine accounts is generated
by the script and nobody knows what it is. I could change it using
smbldap-passw...
2006 Jan 04
4
HOWTO: Render partial in div
Hey-
I''m using ROR 1.0 and script.aculo.us 1.5.1. I''ve been trying
unsuccessfully to render a partial in a DIV, but can''t seem to get the
right combination of stuff to make it work. There seems to be a few
different ways of going about it. Right now I can render a partial.
What do I need to to render the partial in a div? Here is what it
looks like so far:
#
2006 Jan 08
4
Rails table pluralizing Issue
Hi,
I am working on a table with name "addresses". However when I do a
ruby script/generate scaffold Address, I am not able to access
http://localhost:3000/addresses. I am getting the following error.
uninitialized constant Addres
This error occured while loading the following files:
addres.rb
How do I resolve this issue.
Thanks
Silvy MAthews
2006 Mar 08
3
email signup/splash page
Does anyone know the easiest way to put up a splash page where people can
add their email addresses to be notified when the site is ready? I want
regular visitors to be directed to this page. How can i have this and still
be able to test/develop the site?
I know a lot of web apps do this while still developing, so i''m looking for
a solution that i''m sure exists, but i cant
2007 Feb 26
15
drbspec - "no server running"
...hat the problem was there - I believe I was loading up fixtures that
didn''t exist. I was calling fixtures :singular_table_name as opposed
to fixtures :plural_table_name
This time it happened with my controller. I generated the controller
with the ./script/generate rspec_controller ControllerName command...
It doesn''t appear that the specs are setup to fail to begin with, but
if this were the default behavior, one certainly shouldn''t see a "No
Server Running"
I could create a short screen cast if someone would like me to, or
elaborate...
Best,
Scott Tay...
2008 Jan 18
8
link_to problem
hi @ all
I create a new archiv.html.erb and a archiv method in the controller.
Now, I would like to link from index.html.erb to archiv.html.erb. I
tried to use <%= link_to ''archive'', archiv_xxx_path %> but it doesn''t
run.
It appears a error message "SyntaxError in xxx#index".
Does anyone know, how I can enhance this problem?
thanks a lot...
--
Posted
2006 Feb 12
6
Including another helper
I need to include another helper module apart from the normal two
(ApplicationHelper and [controllername]Helper). The inclusion needs to
be dynamic and based on external parameters (ie what helper that get
included differ from request to request).
Is it possible? How?
/Marcus
2007 Oct 23
10
How is everyone structuring stories?
Bleeding-edge story-writers,
How are you structuring your specs?
I am working on a new project and tried this:
./lib
./blah
./spec
./blah
./stories
But it breaks autotest, so I moved stories parallel to lib and spec.
Also what about suffixes?
I have adopted "xyz_story_spec.rb", and "xyz.story" for the time
being, with the line
runner =
2013 Aug 21
2
Information needed regarding the libvirt version libvirt-1.0.6-1
Hi,
We have upgraded the libvirt version from libvirt-1.0.5 to libvirt-1.0.6-1
on our linux machine. After this upgrade "virsh cpu-stats <domain>" command
is not working on our HardWare.
*virsh # cpu-stats test
error: Failed to retrieve CPU statistics for domain 'test'
error: internal error error accessing cgroup cpuacct for vcpu*
**
*# cat /proc/cgroups
#subsys_name
2007 Jun 03
6
mongrel cluster w/ apache
hi all,
i''m working on deploying my app w/ apache and a mongrel cluster. i''ve
started by copying the instructions and code from the agile rails book
and everything seems to be working fine but apache isn''t forwarding my
requests to mongrel the way i expect it should. there''s nothing in the
rewrite logs and nothing but 404 errors in the apache error logs.