Displaying 20 results from an estimated 20000 matches similar to: "render_component in application.rhtml"
2006 Mar 03
1
common header help
I''m trying to create a common header for my ruby on rails app. I have the
common layout setup in application.rhtml. In the layout i have a div
section "header" which is where i want to add information like logo image,
the current user logged in, navigation links, standard stuff. However, when
i try to add information in that "header" section, it does not display
2006 Jan 13
0
Layout not rendered when render_component used
Hi
I''ve got a login action that handles authenticating users, setting
cookies and, via its view, displaying an HTML snippet containing a form
with username and password fields. It''s called from the main
application.rhtml layout so I don''t need to have a seperate page (away
from the main site) with a login form.
My user model is more-or-less the same as in the Agile RoR
2011 Feb 28
1
Problem with render_component and rails 3
I have a application that it use view/layout/application.rhtml, in
this file I have:
<%= render_component :controller => ''car'', :action =>''index''%>
But there is one problem, it display this problem: undefined method
`render_component'' for #<#<Class:0xb67e6e48>:0xb67e5f34>
How can I resolve this problem?
--
You received this
2006 Mar 14
0
how to render_component in global layout
Hello,
i have one layout file for all controllers. I would like to have news
list on each page. So, i put <%= render_component :controller => "news",
:action => "list" %> , to my layout file. But this doesn''t work at all.
I get error "Application could not be started.. ".
If I put render_component to some view file say
2011 Dec 12
0
<%= render_component %> Tag cloud issue for rails version 2.3.11
hi all,
in my application there is tag''s cloud in old code which is load using
following code
<%= render_component :controller => "controller_name", :action =>
"tag_cloud_homepage"%>
now i upgrade the ruby,gem and rails version to
Ruby :1.8.7
Rails :2.3.11
gem :1.6.2
and i am using Windows XP as O.S
my question, now in Rails 2.3.11 "<%=
2006 Apr 19
3
include contents of one rhtml in another
Hi
I have a rhtml documment in views/account/login.rhtml
I want to include the contents of login.rhtml in
views/welcome/index.rhtml
any suggestions on how this can be done?
Thanks
Scott
--
Posted via http://www.ruby-forum.com/.
2006 Aug 12
2
Layouts: application.rhtml v. mycontroller.rhtml
I was trying to be all DRY and standardize my layouts to one file and
made an application.rhtml. There was no application.rhtml at all
before.
So I renamed all my controller layouts to .txt and then tested. I got
empty pages.
I found some issues with Login/UserEngine and application.rhtml, but
nothing that looked like this behavior. Is routing messing me up? It''s
as if
2006 Jan 24
1
render_component and private access...
I was wondering if rails had any means of restricting access to an
action in a controller (like they can''t type in url.com/cont/action,
that would throw an error). The thing is I would like to be able to
access this method/action through a call to render_component, so
therefore, I don''t think private methods will work.
So basically I am looking for something that cannot be
2006 Feb 08
1
render_component vs. render_component_as_string?
I''m calling render_component in a helper.
render_component :controller => target_controller, :action => "show", :id => target_id
This works fine, except that passing the id in :params didn''t work and
I had to pass in an explicit :id parameter to get the target
controller to override the id - is that documented anywhere?
That''s not my question. My
2006 May 26
1
flash.keep not working with render_component
Using Rails 1.1.2 and ruby 1.8.4
I''m having a weird issue with the flash when using render_component for
an action inside different controller than the one from which you
render. I''m passing an object via flash across a couple of actions (new
and create) behind the scenes using flash.keep(:object). It works fine
if the component I''m rendering is in the same
2006 May 07
0
caches_action and render_component
I''ve made some test:
------------------ CODE ------------------
class FooController < ActionController::Base
caches_action :foo
def foo
render_text ''Hello, foo<br />''
end
end
class BarController < ActionController::Base
def bar
render :inline => <<-EOS
Hello, bar <br />
<%= render_component(:controller =>
2006 Apr 15
0
Component using
Hello all, I have a simple task. I need to create a guestbook component, and
render it from the main application.
The guestbook have the following controller actions:
viewMessages - simply shows messages from model
addMessage - generates form that accept message text, username, password. The
form points to saveMessage action.
saveMessage - receives data from addMessage action.
On the main
2006 Aug 11
5
Why does no one like render_component?
Maybe I''m missing the point?
Lets take for example albums of pictures. If I have a scaffold for
each, and I''m showing an album, what if I want to list all of the
pictures that are in the album?
Surely, I''d want to call the List action in the picture controller.
render_component would do this perfectly. But we''re told not to use
render_component. So
2006 Jun 22
5
Problems with layouts
ruby script/generate controller Tools::Search - ok
in views/layouts/application.rhtml:
<%= render_component :controller => ''tools/search'',
:action => ''searchbox'',
:params => {:context =>
''header-section''}
%>
in
2006 May 21
2
Nooby partials / component problems
I''m stumped on what seems like should be a fairly easy thing, so I
hope someone can point out my error.
I wanted to show a few things on every page, so I added an
application level template in "layouts". I added my styles in there,
and put the controller name and action name into the TITLE tag for my
own reference. So far so good - works like expected. Then I wanted to
2006 Apr 13
1
Layouts in render_component?
Hi All,
Silly newb question. Is there a reason why :layout is unimplemented
in render_component() ? I''m looking at a situation where that would
*seem* to be the right answer.
Are there any patches available to add this?
JK
2006 Feb 01
1
detecting whether a request comes from render_component
Hi All,
Anyone know if there is a way to detect whether a request came from a
render_component call? There isn''t anything obvious from looking at the
source, but it would be useful as I have set up a logging filter in my
application.rb, and I''d prefer to exclude all component renders, since
they just add extra lines to my log (I guess I could exclude identical
rows at the db
2006 Feb 02
4
How switching global layout (application.rthml <or> custom.rhtml)
Dears,
My railsapp run using ''/layout/application.rhtml'' and under some
conditions ( Authenticated user, url parameter) I like to switch
globally to another layout, let''s say custom.rhtml
Like :
class AppController < ApplicationController
before_filter :context_layout
def index
end
end
# application.rb
def context_layout
if <context_condition>
2006 Apr 21
1
render_component includes layout
I have dynamically generated list of links that I wish to include in
different views, I''m using render_component to do this but it is also
including the layout.
How do I turn layout off on a per action basis?
Many thanks, K.
--
Posted via http://www.ruby-forum.com/.
2006 Sep 12
2
Cache sweeping and render_component (my mistake or Rails bug?)
Hi
I''m working on a program which relies on heavy cache sweeper usage.
I''ve just bumped onto an odd problem. When using render_component
method in layouts or templates with cache sweeping turned on, Rails
throws an exception with the following message:
NoMethodError in TestController#index
You have a nil object when you didn''t expect it!
The error occured while