Displaying 20 results from an estimated 700 matches similar to: "Re: How do I identify the initiating View from within aHelper?"
2006 May 04
1
How do I identify the initiating View from within a Helper?
I would like to call a helper method from my View to construct a sidebar
menu. The menu is contextual, so ideally I would like to do something
like this:
View
----
<%= sidebar_menu %>
Helper
------
def sidebar_menu
case _calling_view_
when ''_view_identifier_''
... build menu...
end
end
where ''_calling_view_'' is the key that points to the
2007 Jun 12
3
rspec 1.0.x and liquid?
Is anyone else using liquid with the > 1 rspec? This seems to fail:
it ''should render show'' do
response.should render_template(''buyers/show'')
get :show, :id => 1
end
with an error like
1)
NoMethodError in ''/buyer GET should render show''
You have a nil object when you didn''t expect it!
The error occurred
2005 Dec 19
1
Preserving fallback with RJS
Hi guys,
I really like RJS. I think they''ll replace partials in alot of
instances. Unfortunately, because they''re automatically used like
.rhtml and .rxml and are hard to specifically specify it makes it
messy to preserve fallbacks when using them. For instance, using
partials instead of rjs, my create method might look like:
def create
post = Post.new(params[:post])
...
2007 May 23
2
rspec mocha and controller specs without integrated_views
The ability to choose a mocking framework is great as I prefer mocha, but I
am have problems.
On my controller specs, I am forced to ''integrate_views'' as the following
code below shows you, the mocking of views is rspec specific. See stub!
versus mocha''s stub
unless block_given?
unless integrate_views?
2007 Apr 20
1
getting controller specs to work on edge
I''m using edge spec, edge rspec_on_rails, edge rails. I just switched to
edge and ran the translator tool and I''m trying to get everything to pass
again. One of my issues is getting render back up and working for my
controller specs, here''s an example:
describe "Requesting /users using GET" do
controller_name :users
setup do
@user = mock_model(User)
2020 Jun 30
2
How to prevent llvm's default optimization
Hi, James,
Thanks for your reply.
I do not think it is always true, that "mul then add" is faster than "add then mul".
For example,
A small immediate can be directly encoded in the instruction, but it becomes a larger one after a multiplication, which has to be loaded from the constant pool (extra memory access).
So I wonder, is it possile to prevent it, via changes
2018 Mar 12
0
Re: [PATCH v4 0/3] v2v: Add -o rhv-upload output mode.
On Mon, Mar 12, 2018 at 07:13:52AM +0000, Nir Soffer wrote:
> On Fri, Mar 9, 2018 at 4:25 PM Richard W.M. Jones <rjones@redhat.com> wrote:
>
> > It has to be said it would be really convenient to have a 'zero'
> > and/or 'trim' method of some sort.
> >
>
> 'trim' means discard?
Yes. The 5 functions we could support are:
* pread -
2008 Jan 17
1
Samsung OfficeServ Manager for OfficeServ 500 does not working
Wine 0.9.53, FreeBSD 6.3-PRERELEASE. When I installed Samsung OfficeServ
Manager (OSM) for Samsung PBX, it works for OSM7200, but does not works for
OSM 500. When I try to run it appear small error window with 'Run-time error
3633' and program closes. OSM ver. 3.17 at 2007.10.04. These lines appear in
log file:
fixme:spoolsv:serv_main (0 0x0)
err:iphlpapi:getRouteTable Received
2020 Jun 30
2
How to prevent llvm's default optimization
Yes - this has been in InstCombine for a long time:
https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp#L268
We could say that the canonicalization should be reversed, but that
probably uncovers more missing optimizations.
The code size concern is legitimate. For example on x86, gcc asm is 2 bytes
smaller on this example:
2018 Mar 12
0
Re: [PATCH v4 0/3] v2v: Add -o rhv-upload output mode.
On 03/12/2018 07:13 AM, Nir Soffer wrote:
> On Mon, Mar 12, 2018 at 12:32 PM Richard W.M. Jones <rjones@redhat.com>
> wrote:
>
>> On Mon, Mar 12, 2018 at 07:13:52AM +0000, Nir Soffer wrote:
>>> On Fri, Mar 9, 2018 at 4:25 PM Richard W.M. Jones <rjones@redhat.com>
>> wrote:
>>>
>>>> It has to be said it would be really convenient to
2018 Mar 12
3
Re: [PATCH v4 0/3] v2v: Add -o rhv-upload output mode.
On Mon, Mar 12, 2018 at 12:32 PM Richard W.M. Jones <rjones@redhat.com>
wrote:
> On Mon, Mar 12, 2018 at 07:13:52AM +0000, Nir Soffer wrote:
> > On Fri, Mar 9, 2018 at 4:25 PM Richard W.M. Jones <rjones@redhat.com>
> wrote:
> >
> > > It has to be said it would be really convenient to have a 'zero'
> > > and/or 'trim' method of some
2020 Jul 01
2
How to prevent llvm's default optimization
Thanks. I have checked the hook DAGCombiner::isMulAddWithConstProfitable
And I think the above condition is too aggressive.
// If the add only has one use, this would be OK to do.
if (AddNode.getNode()->hasOneUse())
return true;
Shall we make it to
if (AddNode.getNode()->hasOneUse() && TargetLowering.isCheaperCommuteAddMul(......))
return true;
The virtual hook
2018 Mar 14
3
Re: [PATCH v4 0/3] v2v: Add -o rhv-upload output mode.
On Mon, Mar 12, 2018 at 2:57 PM Eric Blake <eblake@redhat.com> wrote:
> On 03/12/2018 07:13 AM, Nir Soffer wrote:
> > On Mon, Mar 12, 2018 at 12:32 PM Richard W.M. Jones <rjones@redhat.com>
> > wrote:
> >
> >> On Mon, Mar 12, 2018 at 07:13:52AM +0000, Nir Soffer wrote:
> >>> On Fri, Mar 9, 2018 at 4:25 PM Richard W.M. Jones
2006 Apr 06
5
Using helper method of another model
I have a template that belongs to a certain model (model A). I need to
call a helper method of a different model (model B). Then I need the
helper method of B to call a helper method of model C.
I tried using "include" and "require" and using namespaces, but I got
"undefined method". What is the way to do it?
--
Posted via http://www.ruby-forum.com/.
2012 Dec 26
1
Converting R script to Matlab
Hello,
I am very new to R. I have used Matlab in the past but not extensively. I
would like to be able to convert an R script to Matlab. I should be
grateful if you would point me towards ahelpful link to do so.
Uma
[[alternative HTML version deleted]]
2006 Apr 06
10
Advice needed on tracking down unusual error
Does anyone have advice on how to go about locating the cause of this
error message:
ActionView::TemplateError (wrong number of arguments (3 for 1)) on line
#4 of app/views/products/search.rhtml:
4: <%= start_form_tag :action => ''search'' %>
I don''t see anything wrong with line 4 above.
Some background: I''ve made a number of changes to Controllers,
2006 May 02
6
Is there a link_to ''external url''?
I''ve checked the Rails documentation but find no mention of link_to
''external url'' or equivalent. Does rails have a built in method to do
this?
thanks
-Lindsay
--
Posted via http://www.ruby-forum.com/.
2006 Apr 29
5
HABTM - how to insert join row when associated rows exist
I have successfully used HABTM to create a many-to-one-to-many set of
rows in one step. Now, if two objects I want to associate already exist,
how do I create the join row? The Agile book mentions the
''push_with_attributes'' method. The text says this method is useful for
adding additional attributes to the join row (in the example a ''read_at''
timestamp). I
2018 Jan 15
2
[Gluster-devel] Integration of GPU with glusterfs
It is disappointing to see the limitation being put by Nvidia on low cost GPU usage on data centers.
https://www.theregister.co.uk/2018/01/03/nvidia_server_gpus/
We thought of providing an option in glusterfs by which we can control if we want to use GPU or not.
So, the concern of gluster eating out GPU's which could be used by others can be addressed.
---
Ashish
----- Original
2018 Jan 12
3
Integration of GPU with glusterfs
On 12/01/2018 3:14 AM, Darrell Budic wrote:
> It would also add physical resource requirements to future client
> deploys, requiring more than 1U for the server (most likely), and I?m
> not likely to want to do this if I?m trying to optimize for client
> density, especially with the cost of GPUs today.
Nvidia has banned their GPU's being used in Data Centers now to, I
imagine