Displaying 20 results from an estimated 1100 matches similar to: "I18n.with_options bloc executed TWICE"
2007 Aug 17
0
map.with_options :path_prefix => ''
Hello,
I am getting a ''No route matches'' error in rspec with routes that have a
path_prefix composed by map.with_options. Rails recognizes the routes just
fine and the site works, but I can''t get the specs to pass unless I put the
prefix in each individual route. Any help is appreciated.
My foo model has a polymorphic owner which is what I want the path_prefix to
2006 May 24
2
named routes confusion
Hi,
I''m trying generate a URL from a named route like: namedroute_url(params...)
but the generated route is always coming out as the first match from the routes table.
The named route is defined inside a map.with_options block, but that shouldn''t matter should it?
dorian
--
--
I do things for love or money
2007 Dec 14
2
Rails 2.0 map.namespace and path_prefix
Hi!
I''m trying set up new routing in rails 2.0 and have 1 problem
map.namespace :admin do |admin|
admin.resources :permissions, :path_prefix => ''/:lang''
end
i want have addres like this:
http://site.com/en/admin/permissions
also i tested:
map.with_options :path_prefix => ''/:lang'' do |lang|
lang.namespace :admin do |admin|
2006 Mar 23
10
Domain Requirements in Routes (Edge Rails)
I saw on the bottom of the following page that you can route requests to
different controllers based upon which subdomain is being requested.
http://wiki.rubyonrails.com/rails/pages/Routes
with_options :requirements=>{:subdomain=>''first.com''} do
map.connect '''', :controller => "first/catalog"
map.connect ''featured'',
2010 Mar 05
1
SIP / Echo Cancellation
----- "Chandrakant Solanki" <solanki.chandrakant at gmail.com> escreveu:
> Hello
>
> I have successfully compiled OSLEC for echo cancellation for DAHDI
> channel.
>
> Is there any way to do echo cancellation for SIP Channel.
>
> Is any, please suggest me.??
>
> Thanks in advance..
>
> --
> Regards,
>
> Chandrakant Solanki
Short
2006 Apr 04
1
subdomain routing
According to the wiki (http://wiki.rubyonrails.org/rails/pages/Routes)
you can handle subdomain routing in routes.rb. Like this:
with_options :requirements=>{:subdomain=>''first.com''} do
map.connect '''', :controller => "first/catalog"
map.connect ''featured'', :controller => "first/catalog",
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
hi all,
i would like insert a fucntion call at the end of each basic bloc
the fucntion i have defined and declared at the begining of the module
ie i have written a pass derived from a module pass
virtual bool runOnModule(Module & M){
// i declared the fucntion and defined it
for (Module::iterator a = M.begin(), b = M.end(); a != b;
for (Function::iterator i = a->begin(), e =
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> i would like insert a fucntion call at the end of each basic bloc
you can't, because only terminators are allowed at the end of a basic block.
However you can try to insert the call before the terminator.
...
> i tried to see an example with the demo, i saw that it instead of calling the
> function, it repeats all the instruction that are existing in the function
>
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> My problem is how to call a method
> suppose this fucntion
> void A(int x)
> {
> x=x+1;
>
> }
>
> should i define this function and declare it at the beginig of the module and
> create for it a basic bloc?
you can just declare the function (i.e. no need to give it a body), and call it.
You can then link with an object file that defines it. This is
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/25 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
> > i would like insert a fucntion call at the end of each basic bloc
>
> you can't, because only terminators are allowed at the end of a basic
> block.
> However you can try to insert the call before the terminator.
>
Yes, i mean before the termininator,
My problem is how to call a method
suppose
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
I have defined the fucntion in another object file and linked it to the
in fact the fucntion is :
void consume(int , int * );
std::vector<Value*> int32_16_params;
int32_16_params.push_back(inValue);//inValue is ConstantInt* inValue
int32_16_params.push_back(gvar_int32_y);
CallInst* int32_16 = CallInst::Create(func_consume, int32_16_params.begin(),
int32_16_params.end(), "",
2008 Feb 14
0
how to write a bloc in helper to check/uncheck box ?
Hi all
I have a check box in form, and I would like to enable/disable it
according to the value of the check box..
<% form_for(:query, @query,....
<%= f.check_box(:all_categories, :disabled => true, :onchange
=>''javascript:all_categories();'') -%><%=l :All_categories %>
I would like to have something like :disabled => {
@query.all_categories.to_i
2011 Apr 26
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> Now when i tried this pass an error says:
> Wrong type for attribute noalias
> tail call void @consume(i32 noalias 3, i32* @y) nounwind
noalias is only for arguments of pointer type. You probably meant it to
be on the second argument rather than the first. I suggest you correct
your code that adds the attribute.
Ciao, Duncan.
2011 Apr 26
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> Now when i tried this pass an error says:
> Wrong type for attribute noalias
> tail call void @consume(i32 noalias 3, i32* @y) nounwind
>
>
> noalias is only for arguments of pointer type. You probably meant it to
> be on the second argument rather than the first. I suggest you correct
> your code that adds the attribute.
2007 Feb 07
3
Upgrade to Rails 1.2.2 : RESTful routes not working anymore
Hello,
I just upgraded my app to Rails 1.2.2.
My routes are :
map.with_options :path_prefix => "/admin", :name_prefix => "admin_" do |m|
m.resources :requests, :controller => "admin/requests", :collection => {
:destroy => :delete, :search => :post } do |request|
request.resources :histories, :path_prefix =>
2011 Apr 26
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> where did the "noalias" attribute and "tail call" (rather than "call") come
> from? Are you setting these yourself or running some optimization pass after
> your pass?
>
>
> i have written a module pass and i have compiled it and then
you didn't answer my questions, you just repeated what you said before.
Ciao,
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/26 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
>
> Now when i tried this pass an error says:
>> Wrong type for attribute noalias
>> tail call void @consume(i32 noalias 3, i32* @y) nounwind
>>
>
> noalias is only for arguments of pointer type. You probably meant it to
> be on the second argument rather than the first. I suggest you
2011 Apr 26
1
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/26 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
>
> where did the "noalias" attribute and "tail call" (rather than "call")
>> come
>> from? Are you setting these yourself or running some optimization pass
>> after
>> your pass?
>>
>>
>> i have written a module pass and i have compiled
2009 Dec 06
9
Route error to Admin namespace
Hi.
I have some apps that i have "admin" areas to the clients manager the app.
This "admin" is a directory on my controllers path, like this:
my_site
--> app
-->-->controllers
-->-->-->admin
And my controllers in "admin", i use the correct namespace(example for
clients_controller):
class Admin::ClientsController < AdminController
Only doing
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/26 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
> Now when i tried this pass an error says:
>> Wrong type for attribute noalias
>> tail call void @consume(i32 noalias 3, i32* @y) nounwind
>>
>>
>> noalias is only for arguments of pointer type. You probably meant it
>> to
>> be on the second argument