Displaying 6 results from an estimated 6 matches for "context_typ".
Did you mean:
context_type
2007 Feb 15
4
defining context(s) dynamically
...not in a ''require''d helper file?<br>
<br>
A. Because spec uses the filename to tell it what type of context
(:controller, :model) it is creating.<br>
<br>
Fix: use the (undocumented?) second parameter to <tt>#context(), </tt><b><tt>:context_type
=> :controller.<br>
<br>
</tt></b>Quite how this works, I do not know; the rdocs don''t mention
it and according to the source context doesn''t take a second argument
(except a block). My Ruby-fu isn''t up to explaining it; if anyone els...
2010 Sep 10
10
current_page? inside controller
Is there any easy way of using something like current_page? method
from ActionView::Helpers::UrlHelper inside controller ?
I have routing like:
resources :addresses
resources :mailing_addresses, :controller => ''addresses''
And I would like to do a check in my controller that would look like
this:
class AddressesController
def index
if current_page?(live_addresses_path)
2011 Jan 25
0
Rails 3 - Helping with a Commenting Module
...ment].merge(:user_id =>
current_user.id))
if @comment.save
respond_to do |format|
format.js
end
else
render :action => ''new''
end
end
private
def context_object
params[:constraint]
[:context_type].singularize.classify.constantize.find( context_id )
end
def context_id
params["#{ params[:constraint][:context_type].singularize }
_id"]
end
end
This commenting module has served me well but I ran into a hitch this
morning, possibly because of my use of...
2007 Mar 09
6
AssertSelect for strings?
Hi,
Is there a way to use the have_tag matcher on a string instead of the
response body from a view? I have a helper in a method rails project
that returns an html fragment which I would like to test.
Like this:
module SomeHelper
def some_helper_method
"<p>foo</p>"
end
end
context "The SomeHelper"
helper_name :some
specify do
2010 Sep 17
25
Trying to look up comment through an ID, but failing
I am trying to allow users to reply through comments by allowing users
to click a reply link next to the parent comment. It will send in a
parameter to the ''new'' comment view, like so:
| <%= link_to "Reply", new_comment_path(:in_reply_to => comment.id) %>
The form will use the :in_reply_to parameter in order to save that id as
the parent id, like so:
2013 Mar 15
0
Wine release 1.5.26
...winhttp: Make the first parameter of resolve_hostname const.
user32: Add a stub implementation of UserHandleGrantAccess.
dnsapi: Increase maximum packet size.
winhttp: Implement WINHTTP_OPTION_CONNECTION_INFO.
Huw Davies (1):
usp10: Don't read past the end of the context_type array.
Jacek Caban (38):
jscript: Added jsstr_substr helper and use it in String object implementation.
jscript: Use jsstr_substr in jsregexp.c where possible.
wininet: Use secure variable instead of ssl_s handle in a few more places.
jscript: Added jsstr_flush helper and...