similar to: detecting whether a request comes from render_component

Displaying 20 results from an estimated 3000 matches similar to: "detecting whether a request comes from render_component"

2006 Feb 16
9
calling a controller/action from another controller
Hi, Is there a way to call a controller/action pair from another controller as well as render the view for that pair? I have tried using "render ''ctrl/action''" and that works, but the controller code isn''t called (only the view is rendered). A redirect_to isn''t desirable either as I want the resulting content to be rendered in the current
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 Jan 25
6
Displaying based on hostname/subdomain
Ive tried multiple ideas to get this to work, but keep hitting a dead end. Has anyone done this before? I want joe.domain.com to display www.domain.com/profile/joe Im using lighttpd. Routes dont have access to the URL string and therefore I cant code in a conditional. lighttpd rewrite seems to really screw it all up. Is there a feasible solution? Thank you, Joe Noon
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 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
2005 Aug 31
6
Software to code Rails
Hi! After searching the list''s history an the rails-wiki I come to the conclusion that the subject of "which software to use for rails-coding" isn''t disucssed and written down yet. So here is my question: Watching a video like http://rubyonrails.org/media/video/clips/components.mov five question come to my mind 1. Whats the name of the commendline-software? 2. What
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 Jan 31
4
A dumb question on extracting a value from a hash
Hi, I have the following code fragment; @comm_type = Communication.find_by_sql(''select id from communication_types where upper(description) = "EMAIL"'') Which results in >> @comm_type => [#<Communication:0x39a0f60 @attributes={"id"=>"4"}>] But when I try to test an ActiveREcord against this it doesn''t work;
2006 Jan 04
11
Query Mixin by Duane Johnson
Hello At the start of October, Duane Johnson announced the Query mixin plugin on this list. The code was attached to the announcement email. Unfortunately, I''ve not been able to locate the attached code. Goggle has not helped me this time. Could somebody forward it to me? Thanks in advance Harvey This e-mail has been scanned for all viruses by MessageLabs.
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core produced by the multiple delete on a HABTM relationship. I have confirmed that my plug-in is being included into the base during runtime however the code does not seem to be overridding the base class. module ActiveRecord module Associations module ClassMethods def has_and_belongs_to_many(association_id, options =
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 Feb 24
6
[JOB] at yakimaherald.com
Friends- I have taken a new job and will be moving at the end of March. The newspaper I currently work for is looking for someone to take my place. I have really enjoyed working here. It is a great environment with very nice people to work with. And the best part is you get to develop in Ruby and Rails, for everything! The paper is willing to accept applications from people who would
2006 Feb 15
10
STI Question
Hi everyone, I have 3 types of people (for now): Staff Faculty Students To break them up into classes, but keep them in the same People table, I''ve broken them up like so (code and ''ends'' snipped): class Person < ActiveRecord::Base class Employee < Person class Staff < Employee class Faculty < Employee class Student < Employee So, when I insert
2006 Feb 27
3
Send parameter along with method in before_filter
Hello list, I have an app that has a very simple authorization scheme. A person can have many roles and roles can have many people. In my app, I''d like to do before_filter :login_required (since no role name is provided, it accepts any users with credentials) before_filter :login_required ("administrator") (only accepts those with role administrator) before_filter