similar to: How do I identify the initiating View from within a Helper?

Displaying 20 results from an estimated 1000 matches similar to: "How do I identify the initiating View from within a Helper?"

2006 May 04
1
Re: How do I identify the initiating View from within aHelper?
Lindsay, Wouldn''t you want to use a component for this? I know components seem to be out of favor, but they seem like a perfect fit for this very thing. You could then go like: <%= render_component :controller => ''sidebar'', :action => ''home_menu'' %> The :action parameter could even be more dynamic based on your own needs. Maybe someone
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
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
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:
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?
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
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)
2018 Mar 12
4
Re: [PATCH v4 0/3] v2v: Add -o rhv-upload output mode.
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? Currently we cannot support discard on block storage since ovirt may need to wipe lvs when deleting a disk, and discarding may leave unwiped user data.
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
2003 Feb 16
2
No domain server was available to validate your password.
Hi all, I have a strange problem with the Samba server as PDC. I periodically get the error message "No domain server was available to validate your password". But, at other times it would login fine and execute the login scripts to handle all the map drives. I don't have the slightest clue where the problem is. When the problem arise, I don't even need to do anything about it.
2011 Aug 16
7
left menu for Fedena Project
i wanna add left menu in the http://demo.projectfedena.org/ login:admin password:admin123 as there is no left menu in that i thought of adding a left menu. can any one tell how to do that with ROR. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
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
2007 Oct 06
1
Question about Distinguishable Permutation
Hi, How can I list all possilities of Distinguishable Permutation by R? For example, N=6, n1=n2=n3=2, the total possible answers are 6!/(2!2!2!)=90. Please help me. Thank you So much. ____________________________________________________________________________________¡A
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
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]) ...
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 Mar 28
1
Simple Sidebar Solutions: How does yours work?
I''m working on a simple photo gallery app for personal use and I want to generalize the sidebar such that in any page (controller or view, I''m not sure which) I can dynamically add either 1. links to a given sidebar 2. or an entire sidebar. I know that typo does this, and I''ve looked the code. I think it''s too complex a solution for my simple site.