Displaying 20 results from an estimated 20000 matches similar to: "too many components?"
2009 Apr 15
2
Getting Started with Rails - post_comment_url
Hi,
Thanks for a wonderful Getting Started with Rails. I am up to the last
section and just added the comments part.
So while testing and looking over comments_controller.rb;
I see the reference to post_comment_url calll where is this defined.
Below is the message I am getting.
Thanks
ActionController::RoutingError (post_comment_url failed to generate
from {:post_id=>#<Post id: 1, name:
2006 Dec 10
5
model-controller-paradigm: What about admin controllers?
Hi all
We all know the model-controller-paradigm: I have a model "News" which
has a corresponding CRUD-controller "NewsController".
But now I''m quite unsure about the following...
Guess we have normal visitors that visit our site www.??.com/news and we
have administrators that create and modify news items.
The admin should see an "Edit" link and a
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 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 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 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 Mar 15
5
acts_as_threaded - help ???
Hi, has anyone successfully used the acts_as_threaded plugin with
postgresql?
I''m using rails 1.0 and ruby 1.8.4 on linux.
Following the screencast on
http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin ,
I got to where we''re ready to create our first post, having made the
changes to controllers/posts_controller.rb, views/posts/_form.rhtml,
2009 Aug 16
5
any help with captcha in my comments ?
this is my error:
Processing ApplicationController#create (for 127.0.0.1 at 2009-08-17
00:57:56) [POST]
Parameters: {"comment"=>{"name"=>"asdasd", "body"=>"asdasd"},
"commit"=>"Add Comment", "post_id"=>"19",
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:
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 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 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 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 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 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/.
2005 Dec 15
6
Code from famous RoR video?
Does anyone know where I could get text file with the code from the
famous video where they create a Weblog in 15 minutes -- The one that''s
here: href="http://rubyonrails.com/screencasts?
(I can''t just watch it here at work, and I''d like to avoid having to
re-type everything in any case.)
Thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Apr 19
9
Initial load time when periodically_call_remote
When I do periodically_call_remote with e.g. :frequency => 30
after initial page load I have to wait 30 seconds until this partial
renders first time. Does anybody know how to make ROR to render partial
on web page load, and then start periodic calls every 30 seconds? I
tried to put
<div id=''mydiv''><%= render(:partial, :action=>''myaction'')
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 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