similar to: render yield?!

Displaying 20 results from an estimated 2000 matches similar to: "render yield?!"

2006 Jun 27
5
Can''t call public application.rb method from ERb template
All, I have a left navigation partial that I want to dynamically generate CSS classes for based on the current controller action. In my ERb template, I have <DIV class="<%= get_menu_display_style(''login_form'') %>"> In application.rb, I have the method get_menu_display_style defined as: public def get_menu_display_style(action_requested)
2006 Mar 08
7
Function could determine the caller action ?
Is it possible to determine which action call the function ? In example, func_test in ApplicationController could determine which action from SiteController is calling her ? in class ApplicationController I have def func_test if ( calling from index ) return "1" end if ( calling from contact ) return "2" end end and in class SiteController def
2006 Jul 18
4
Multiple Layouts - Single Controller
How do I do multiple layouts for a single controller: I am aware I can do... render(:layout =>''mylayout'') for individual actions, however this becomes a multiple render problem. I tried this... layout "mylayout", :except => [:myaction, :myotheraction] layout "myotherlayout", :only => [:myaction, :myotheraction] However that doesn''t
2010 Sep 06
5
how to call rails method from javascript method.
hi I wanna call rails method from the javascript method. It should be ajax call for rails method. please help me. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe
2006 Apr 20
8
2 layouts per .rb page
Hi, Is this possible ive got layout "loggedout_layout", :only => [:login, :logout] but I also want to do somthing like layout "loggedin_layout", :except => [:login, :logout] When the second one is introduced it seems to cancel out the first request, any suggestions how to get around this? Scott -- Posted via http://www.ruby-forum.com/.
2007 Jan 25
4
How to change the menu depending on the controller/method?
Hello, I''m still dtarting with ruby on rails. And I''m trying to have a menu depending on the current controller/method. Here is what I was thinking of (please tell me if there''s a better way to do it): I have a database with menu_groups (corresponding to controllers) and menu_elements(corresponding to methods). Each menu_element belongs to one menu_group. I created a
2006 Mar 27
3
Specify a controller action via attribute in INPUT tag?
I have a pre-existing form with one existing "SUBMIT" tag generated by <%= submit_tag %> I would like to add another <INPUT type="submit" ...> to my form. How do I successfully associate that <INPUT> tag with a different controller action than the default one specified by my <%= start_form_tag %>? Or does this approach even make sense? In RoR, is
2009 Jun 07
6
Missing Template when testing with the Brain Buster Captcha partial
When I run my functional tests, they throw an error with the following message: ActionView::TemplateError: Missing template /_captcha.erb in view path app/views:test/vendor/plugins/brain_buster/views/brain_busters On line #23 of app/views/contacts/_form.html.erb 20: <%= f.label :message %><br /> 21: <%= f.text_area :message %> 22:
2006 Jun 30
5
If / Else Form layout question.
Hello all, I''m using the following _form.rhtml layout for a number of pages, including edit record and new record (which each has it''s own definition in the controller). I''d like to display a different author form field depending on which page they are using. I''d rather keep using _form.rhtml as a layout template, instead of customizing each separate page.
2009 Jul 27
3
render syntax has me stumped
Hi,From within an action called manager within a controller called storedorders, I want to render to the view for the manger action of controller orders. It really seems like the following syntax should work: (within the StoredordersController manager method...) respond_to do |format| format.html {render :controller => ''orders'', :action =>
2006 Aug 01
8
Decoupled observers for controllers?
In the Rails Recipes book the recipe "Keeping track of who did what" explains how to do decoupled observing of models. In my application I''d like to do a similar thing but watching the controllers. For example, when somebody hits the login method of the Security controller, I''d like to make a note of it. In this case I could observe the User model and watch for
2006 May 23
3
image_tag problem
Hiall, I want to make an image_tag from within a controller in order to be able to present a link (with a status image) in a view. Here is my controller method (in file webca_controller.rb, hence WebcaController) def untouched_status_image_tag image_tag("open", { :alt => "Offen", :title => "Offen", :size => "12x12", :class =>
2006 Jan 12
4
If statement based on a action
Question for you all is it possible to use an action in an if statement? I am using the same form for edit and new and I have a cancel button on the page. This cancel button is built with an if statement that looks right now to see if a parameter exists to define where to go back to if the user cancel. The problem occurs when the user submits the form and there are missing fields by
2011 Sep 06
8
Ajax and rails 3 UJS (jquery)
Hi, guys, I''m in the midst of moving an app from rails 2.3.8 to rails 3.0.9. Sadly, rails 3 no longer has javascript generators and I''m now forced to do more javascript. For my project, I have selected jQuery as the javascript framework for my rails 3.0.9 app. What I have done to have my app''s deletion link (for each item) trigger an alert box when the deletion
2006 Apr 27
3
Routing problem
Hi, I am having a routing problem and can''t figure out why its happing. I have added the following line in my routing.rb file. map.connect ''name/:id'', :controller => ''controller_name'', :action => ''action_name'' When I use http://domain.com/controller_name/action_name/id then it works fine on the local machine using webrick
2018 Nov 06
3
[PATCH v2 0/2] p2v: add Shutdown option
This small series for p2v refactors the Reboot menu of the conversion dialog into something slightly more general, and add the possibility to shut the machine down. Lots of work to deal with old GTK versions ... Changes from v1: - fix shutdown command Pino Toscano (2): p2v: turn Reboot button into a Shutdown popup menu button p2v: add a Shutdown action (RHBZ#1642044) p2v/gui.c |
2018 Nov 05
4
[PATCH 0/2] p2v: add Shutdown option
This small series for p2v refactors the Reboot menu of the conversion dialog into something slightly more general, and add the possibility to shut the machine down. Lots of work to deal with old GTK versions ... Pino Toscano (2): p2v: turn Reboot button into a Shutdown popup menu button p2v: add a Shutdown action (RHBZ#1642044) p2v/gui.c | 119
2006 Apr 11
4
wrong number of arguments (2 for 1)
Hi, Im having trouble figuring out how to query my database in ruby and i''m hoping someone can help me out. I''d like to find all my departments that match a permalink passed from the url. The department must also match a particular category, also passed through the url. I have written the following code. But unfortunatley I get an error "wrong number of arguments (2 for
2005 May 01
5
Example using Builder::XmlMarkup and .rxml files?
Greetings, I''m a newby to both "R"s in RoR. I would like to use Builder::XmlMarkup to generate my pages. If there is a working downloadable example somewhere, that would probably be enough. Otherwise, here''s what I want to do: With the following controller: class AccountsController < ApplicationController layout ''accounts'' model :account
2006 Apr 30
2
Rss feed items disappear using feedtools?
I have met a problem on Feedtools and felt very confused about it: The feed that I generated using feedtools can not be read correctedly by feedtools,while rss from other websites can be read. Still,the code for rss generating: def userrss @user = User.find_by_id(params[:id]) @articles = @user.articles(:all,:order => ''updated_at desc'',:limit => 15)