Displaying 20 results from an estimated 1000 matches similar to: "Custom default form builder in Rails 3"
2008 Oct 28
7
How to override one method of AssetTagHelper
I created a file ./lib/action_view/helpers/asset_tag_helper.rb
and put in it only the method I want to override. like this
module ActionView
module Helpers #:nodoc:
module AssetTagHelper
def image_path(source)
compute_public_path(source, ''images'')
end
end
end
end
But as soon I try this all the others methods from the overriden module
are not
2012 Sep 28
2
nested modules and autoloading
All-
I''m using puppet 2.7.14. I''ve reviewed
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
but it doesn''t seem to cover what I''m attempting.
Consider a module layout like this:
$ tree mymodule
mymodule
|-- Modulefile
|-- README
|-- manifests
| |-- init.pp
| |-- special_type
| | `-- prereqs.pp
| `-- special_type.pp
2013 Dec 02
1
Class parameter flexibility with ENC, hiera or both
Dear puppetteers,
I am having a philosophical question about parametrized classes.
When building modules, one wants to be as flexible as possible, to try
to target as many puppet flavors as possible. This is our target:
- Foreman users, using foreman as an ENC with smart variables (or
potentially any other ENC, but I would say this is the most widespread one).
- Pure Puppet''s site.pp
2003 Apr 28
1
code12 when using modules
Hi
I updated my rsync to 2.5.6. Since then, any modules actions don't work
anymore.
rsync -ravvvn --stats --progress rollis.ch::mymodule
ends up in
opening tcp connection to rollis.ch port 873
receiving file list ...
rsync: connection unexpectedly closed (28 bytes read so far)
_exit_cleanup(code=12, file=io.c, line=165): entered
rsync error: error in rsync protocol data stream (code 12) at
2011 Nov 11
2
[LLVMdev] Argument's types mismatch when creating CallInst.
Hello. I have an .bc, which defines @foo(%type* arg1, %type* arg2, %type*
arg3).
Firstly, i do this:
runtimeModule = getLazyIRFileModule("runtime.bc", smd, llctx);
then this:
fooFunction = runtimeModule->getFunction("foo");
myType = runtimeModule->getTypeByName("type");
After that, i'm creating another module:
myModule = new Module("My
2008 Feb 18
3
Calling a controller inside a module
I tryied everything:
:controller => ''MyModule::Core::Controller''
require ''MyModule/core/controller''
include MyModule::Core
But nothing works !!!
Question is very simple:
How to call a controller that belongs to a Module inside the router.rb file?
This cannot be that difficult!
Thanks!
-Sergio
-------------- next part --------------
An HTML attachment
2007 Aug 31
2
Can module spec "behave like" controller spec?
Hello everyone:
Right now I am writing spec on modules, which are provided by my
colleagues. Some of the modules actually contain action methods. I tried
very hard to spec those action methods in modules. But it seems that the
rspec does not allow module spec to ''get'' action like controller does. After
I saw the documentation, I then used :behaviour_type=>:controller.
2013 Nov 05
1
[LLVMdev] Thread-safe cloning
Sorry to resurrect an old thread, but I finally got around to testing
this approach (round tripping through bitcode in memory) and it works
beautifully - and isn't that much slower than cloning.
I have noticed however that the copy process isn't thread-safe. The
problem is that in Function, there is lazy initialization code for
arguments:
void CheckLazyArguments() const {
if
2013 Jun 11
2
hiera data bindings and template()
Hi,
I''m using Puppet 3.2.1 and heavily relying on hiera data bindings.
I have the following situation:
class software (
$my_content = undef,
) {
file { ''/path/to/file'':
content => $software::my_content,
}
}
in hieradata/software.yaml (hiera.yaml seems ok):
software::my_content: template(''mymodule/myfile.erb'')
With this configuration I
2011 Nov 11
0
[LLVMdev] Argument's types mismatch when creating CallInst.
On Fri, Nov 11, 2011 at 12:18 AM, arrowdodger <6yearold at gmail.com> wrote:
> Hello. I have an .bc, which defines @foo(%type* arg1, %type* arg2, %type*
> arg3).
> Firstly, i do this:
>
> runtimeModule = getLazyIRFileModule("runtime.bc", smd, llctx);
>
> then this:
>
> fooFunction = runtimeModule->getFunction("foo");
> myType =
2012 Jul 09
1
Custom ruby modules/classes, standard namespacing, pluginsync, etc.
still pretty new to Ruby, please bare with me :) Say I have a module
with a custom type, structured like so:
[modules]/mymodule/manifests/init.pp
[modules]/mymodule/lib/puppet/provider/mytype/foo.rb
[modules]/mymodule/lib/puppet/type/mytype.rb
In foo.rb, I''d like to call some custom ruby functions in a module and/
or class. These are generic functions that may be used in other
modules,
2006 Aug 08
2
Extending rails with plugins
I''ve been looking at bottling some functionality up into a plugin, but I''m
having some problems including it.
The structure I have is:
/app/controllers/admin/base_controller.rb:
class Admin::BaseController > ApplicationController
#snip#
end
/vendor/plugins/myplugin/lib/my_module.rb:
module MyModule
def new_func
"New Function"
end
end
2009 Jun 11
3
OT: rebuild kmod rpm package from src.rpm
Hi all,
I would like to rebuild a kmod.src.rpm package for a specific kernel.
When I try to do it, this message appears:
Building target platforms: i686
Building for target i686
error: Failed build dependencies:
kernel-xen-devel-i686 = 2.6.18-98.el5 is needed by
mymodule-kmod-0.1.5-2.i686
kernel-PAE-devel-i686 = 2.6.18-98.el5 is needed by
mymodule-kmod-0.1.5-2.i686.
Is
2013 Oct 29
1
[LLVMdev] Non-deterministic behavior when using LoopInfo pass in LLVM
Hello,
I'm having a little problem with passes that use LoopInfo. Their statistics
aren't the same when I execute the same pass multiple times in the same
program.
After some investigation, I've found out that LoopInfo is the root of the
problem.
I wrote a little pass that counts the loop headers (number of basic blocks
for which LoopInfo.isLoopHeader(BB) is true). I've picked
2012 Aug 17
8
Class Naming Convention
So, this has always puzzled me a bit. By convention, init.pp contains
one class, named the same as the module. However, what is the
convention when the module may have multiple external access points?
Say you have a module called ''syslog'' which provides both a client and
a server class. I typically have used syslog::server and
syslog::client. I''ve ended up using this
2006 Jul 27
2
accessing a variable inside a plugin
Hello,
I would like to load an Hash in my init.rb plugin file ... than I would
like to use this hash in my module ...
in my init.rb:
@anHash = load From file...
in mymodule:
module Amodule
def myFunction
#@anHash ....
end
end
How can I access to my hash in my plugin module function ?
thanks for this dummy question ;-)
Arnaud
2011 Nov 12
1
[LLVMdev] Argument's types mismatch when creating CallInst.
On Fri, Nov 11, 2011 at 11:00 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
> A CallInst in one module can't reference a Function in another module.
> Build a declaration of foo in the module where you're building the
> call, and call that.
>
> -Eli
>
Hmm, before emitting any code i've added this:
2003 Dec 09
3
[LLVMdev] Linking Errors?
Ok that works but why on earth would I get a runtime error of:
Type.cpp:132: const llvm::Type* llvm::Type::getForwardedTypeInternal()
const: Assertion `ForwardType && "This type is not being forwarded to
another type!"' failed.
Aborted
For the line of code:
MyModule = new Module( std::string("IDontWork"));
> -----Original Message-----
> From: llvmdev-admin
2013 Mar 15
3
advice on module organization
Hi Folks,
Like to get some advice on module organization. I have a system that has a
few different components. One or more components can be installed on a
host. The hosts also have a "type" dimension. This "type" dimension could
(should) ideally be used to configure the system (fill in a bunch of
variables). Problem is, I''m not sure how the best way to do
2008 Oct 31
0
[LLVMdev] No of Datastructures
Hi Nipun,
On Oct 30, 2008, at 9:31 PM, Nipun Arora wrote:
> Hi
>
> I am trying to count the no of datastructures and the type, say for
> example the number of arrays in a given code. Which pass would give
> me this info? And what do I need to use in it?
What are you trying to achieve here with this information ?
You can iterate over types to collect the info you need. For