Displaying 6 results from an estimated 6 matches for "some_class".
Did you mean:
size_class
2006 Feb 14
1
Error handling
Hi,
I''m stuck right now with a problem concerning error handling. I''ll try to
explain the problem in short:
In a controller class I have a method edit:
def edit
@some_class = SomeClass.find(params[:id])
end
The record originates from a database table. What happens if the user enters
a field that fails validation and I return to my edit page? I get the idea
that th original value from the database gets reloaded all the time, but I
want to see the value the user enter...
2005 Aug 10
1
using modules with models?
...I''d like to put some of these in seperate modules. I''ve
been wrestling with this for 2 days and can''t figure out how to get it
to work. Rails seems to handle it fine for controllers, though.
I tried creating a class SomeModule::SomeClass. I have a file named
''some_class.rb'' in app/models/some_module. I keep getting this:
/usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in
`const_missing'': uninitialized constant SomeClass (NameError)
So, I tried creating a file called ''some_module.rb'' in a...
2006 Apr 10
3
autocomplete 2nd field based on 1st field''s input
I''m trying to populate a field named "file_name" based on the input of a
field named "title". So, for instance, based on the following input in
the "title" field:
My Title Is Awesome
I would want the following "file_name" to be autocompeted on the fly:
My_Title_Is_Awesome
I''ve been going over all the autocomplete examples out there,
2005 Nov 21
3
New code: proposed release?
...ok, this will produce:
<chapter label="1" id="Here is the title"><title>Here is the
title</title>
</chapter>
======
Another major features I have implemented is allowing for div''s
(multi-line chunks). Whereas before if you did:
p(some_class). here is a paragraph of text
Now you can also do:
div(some_class).
Here are many paragraphs of text.
All styled will some_class.
Yay.
div(some_class).
======
I also implemented a definition list that follows this standard:
in: |-
here is a definition list:
- yes := n...
2007 Nov 13
6
Groups
Hello,
Is it possible to group many nodes together? Suppose I have a large
number of machines that I all want to have the same config - rather
than specify them as individual nodes each inheriting the same config,
I''d like to say that a group inherits a config, and define the group
elsewhere.
Does this sort of construction already exist? Could it be cobbled
together from what we
2007 Feb 09
12
Module Organization
...Module naming in the language: should it be necessary to explicitly
set the module name (similar to Ruby) or should that always be implied
from the location in the filesystem (similar to Python), i.e.
''foo/manifests/bar.pp'' look something like
module foo {
class some_class {
...
}
}
class foo::other_class {
...
}
or should it just say
class bar {
...
}
I like having the namespace explicitly in the manifest (I am not too
hung up whether there should be a separate ''module'&...