Displaying 20 results from an estimated 2000 matches similar to: "Why does no one like render_component?"
2006 Aug 08
5
off topic: running non-ruby programs through command line
Hi all,
Slightly OT, but is there any way to run command-line programs through Ruby?
I have a rails web application that performs some database work. After a
certain action is performed, the rails app should then call a java program
that performs additional work to our mainframe. This is under Win 2003
Server.
Any ideas?
Thanks,
Jin Lee
-------------- next part --------------
An HTML attachment
2006 Aug 08
11
Newb question- method not working
I know this shouldn''t be in the view but to test the code it is.
Anyway if I do just session[user] I get back the user id (the id from
the user table)
which is good.
However this code does not work.
<% a = session[:user] %>
<% uname = User.find(:first, :conditions => id = a) %>
<%= @uname %>
TIA
Stuart
2006 Aug 09
3
select with country names
Hi,
I need to create a list of coutries in a driop down.
I''m aware of a function ''country_options_for_select'' however this jsut
seems to output a string of all countires.
How can I get this list in a drop down?
Thanks
scott
--
Posted via http://www.ruby-forum.com/.
2011 Feb 18
1
Rails plugins new official maintainers
Hey guys,
This is the final list of the new maintainers of each plugin.
We need two more things to do:
First please the owners of the repos add the rest of the maintainers.
Second I will add a note on each rails/plugin mentioning this repos updates.
So from now on, if someone else is interested in helping/contributing
please send a message to the appropriate repo owner.
verification
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 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates
has broken in some calls to render_component from views. I might be
missing something but as far as I remember Rails updates is the only
thing I''ve done in between. See the log:
*** START LOG SNIPPET
Start rendering component ({:params=>
{:center_id=>10, :id=>25},
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
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 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 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 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
2006 Jul 23
2
How would you do this without using render_component
Hello all.
Am relatively new to RoR and I am pondering how to do something without
using components since they appear to be "coda non grata".
I have a standard layout that is used by all controllers. In this layout
I want to list the next 5 events that are upcoming based on todays date.
These events are currently stored in the Event model (created using
scaffolding). Currently only
2006 Aug 17
3
How to save output "render :action=>:any_action" to a file?
I need to save the output of my rails app to a file. i.e. instead of
rendering a page when using "render :action=>:any_action" i want the
output to be saved to a file.
Anyone got any ideas?
Thanks
Chris
--
Posted via http://www.ruby-forum.com/.
2007 Mar 23
4
DRY - with modules, render_component or.. ?
I have an B2B application where a pretty complex order form needs to be
submitted and edited on the admin controller, buyer controller and
seller controller with some small differences.
How do I make available the edit order methods all controllers?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2005 Jun 27
9
FK constraints overrated?
Hello folks,
I use to think that a relational databases without foreign keys
constraints enforced strictly by the RDBMS were no good, piece of crap,
data junk.
However, I''ve also learned the hard way that FKs constraints imposes
serious difficulties when moving data around, specially between
different DBs, or for loading test data or for upgrading DBs schemas, or
for porting DBs
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 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 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/.