Displaying 20 results from an estimated 20000 matches similar to: "common header help"
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 Mar 18
16
fixrbconfig - does it work on intel macs?
I''m trying now to do "sudo fixrbconfig" in the terminal, and I get this:
/usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h does not exist. This
probably means you haven''t yet installed Xcode from the Tiger DVD. You
won''t be able to compile Ruby extensions without it. Please install it
then rerun this program.
I''m on an intel mac. Am I unable to use
2006 Feb 24
4
too many components?
okay.
on /posts/show/13
i have show.rhtml, which does
render_component(:controller=>''comments'', :action=>''display_comments'',
:id=>post.id)
on comments/display_comments
i iterate through the comments and then, display_comments.rhtml
render_component(:controller=>''comments'', :action=>''new'', :id=>@id)
2006 Jun 07
6
Links on the left hand side - are components necessary?
Hello,
Maybe this is super-trivial...
I need to have a list of links on the left hand side of my application,
for *every* single page.
So, I''ve created a layout called "main" (main.rhtml) under
view/layouts, and included >layout "main"< in pretty all of my
controllers.
main.rhtml has, amongst all the other HTML stuff:
<%= render_component
2006 Aug 08
8
executing external code
I''m trying to run some non-ruby code in my rails app and i''m not sure
how to do this. The code i have would take a really long time to port
to ruby and so i''d rather run it as is (its php). What i would like
to have happen is that the code can be invoked as an ajax call. And
just return some data in JSON.
I keep running into a routing failure by actioncontroller and
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 Feb 05
2
accessing the values in a view
trying to build an archive page
in the controller layout file, i render_component(:action => "archive"),
and that works fine. i turned render(:layout => false) within the
"archive" function.
trouble is, and here''s my confusion. as a test, i simply write
def archive
render(:layout => false)
@archives = ''test''
end
2006 Feb 18
5
Model methods and partial view templates
I have a method in a controller that invokes a
render :partial => ''some_partial_view''
In that view, I''m trying to access a method defined in a model, like
this;
<% for view in @an_array %>
<% local_var = view.some_method() %>
<% another_var = view.a_column_name %>
etc..
I am getting an undefined method error but the model is accessible
2006 Feb 04
22
What''s the best way to embed a form?
I would like to embed my login form on my app''s home page. What''s the best way to render the login action of member controller from another action?
Thanks
Frank
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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
2008 Apr 01
1
Navigation Problems
Hi,
I am having problems with my page. I have a banner and navigation bar in
controller_name.rhtml in app/views/layout. Can someone please help?
Thanks
In the navigation bar, I have the following links:
Category1
Sub-Category1
Sub-Category2
Sub-Category3
Sub-Category4
Sub-Category5
Sub-Category6
In the main content, I have the following links:
Sub-Category1 edit delete
2008 Apr 11
4
request.params causing errors
Hello,
I have a rhtml file that goes through the request.params. One of my test
generates that file, but rspec pops an error saying :
undefined method ''params'' for ...
I''m not sure what to do with this, since request.params actually works with
rails.
Any idea?
Thank you
Olivier Dupuis
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Feb 19
2
instance variables in components not read by component view?
Hi,
I''m trying to write a sidebar menu with dynamic menus, and to do so I
would like to define a list of menus to display within my sidebar
component controller code and pass that list to the component display
view, like so:
# menu_controller.rb
class Sidebar::MenuController < ActionController::Base
uses_component_template_root
@menus = %w{admin user help}
def display
2006 Feb 06
9
tests fine, but fail under rake
Hi there,
So I have an odd error at the moment that only occurs when I run tests
via rake. It''s happening with two tests now. Under a simple ruby run,
the tests are fine, e.g.:
D:\User\Code\ruby\prometheus>ruby
test\functional\story_comments_controller_test
.rb
Loaded suite test/functional/story_comments_controller_test
Started
.........
Finished in 2.37 seconds.
9 tests, 65
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 Apr 07
1
Help... Ajax scaffold problems
Hi all,
Any help is appreciated. I used the ajax scaffold generator to make 3
scaffoldings. Then I put them together as components in a combined layout
and created a master controller, which happens to be named "dataentry''.
That works fine.
Within each of the components, I was able to set up links that paginate and
update the div (for the component) with correctly paginated
2006 Mar 22
7
What is difference between render & redirect methods?
Hi,
Thest are two methods:-
1) redirect_to :action => ''list''
2) render :action => ''list''
what is difference between these two methods??????
Thanks.
Prash
--
Posted via http://www.ruby-forum.com/.
2006 Mar 13
5
What is the matter with content_for_layout?
Here is my layout file:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>My Demands</title>
<%= stylesheet_link_tag ''ajax_scaffold'', :media => ''all'' %>
<%=
2006 Feb 04
2
rendering subtemplates
hi,
i''ve got main site navigation in the application.rhtml file.
the links in this template correspond to the ''index''
page of various controllers. The controllers themselves
each have navigation of their own, which i would like to
appear in every view for a particular controller in *addition*
to the main site navigation.
The problem I am encountering is that
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