search for: action2

Displaying 19 results from an estimated 19 matches for "action2".

Did you mean: action
2006 Apr 24
3
TimeStamp conversion
Hi, I''ve got a TimeStamp field in MySql and want to use the hour and minutes in the value. for example: StartTime = Schedule.find(action2.ScheduleID).DateTimeStart.to_s That returns "Mon Feb 20 08:00:00 Romance Standard Time 2006" How do I get 08:00 returned ?? Thanks ! Steven. -- Posted via http://www.ruby-forum.com/.
2006 Apr 29
11
Multiple actions from one form - possible?
Hello * Obviously the rhtml below does not work, but it should be apparent what I try to achieve - I would like to give the user the choice to submit a form either to action1 or action2 but I cannot figure out how?! It would be great if someone could give some assistance. Thanks a lot, Alex <%= start_form_tag :action1 => ''save'', :action2 => ''saveandsend'', :id => @letter %> <%= submit_tag ''Save'', action1...
2006 Mar 14
6
How to provide 2 actions to a form?
Hi, I have a form in rhtml. Now I have 2 buttons indside that form. Clicking on the first button action will be ''create'' & on second button action will be ''delete''. How to do this? Thanx Prash -- Posted via http://www.ruby-forum.com/.
2006 Feb 27
2
submit_tag
How can i use the submit_tag method (from: actionView::FormTagHelper) to create various submit buttons and chose the right action in accord to the button that i pushed? -- Posted via http://www.ruby-forum.com/.
2006 Apr 03
3
render :partial + redirect_to :controller
...iv2 to be updated to reflect the drop. No prob, thus far. But then the contents of div1 must be re-sorted via controller (action1) based on what has been dropped into div2. THe re-sort of div1 must be done server-side. I currently update div2 via render :partial on the tail-end of the action (action2) that is triggered by the drop, and then re-sort div1 via a submit (form_remote_tag) to trigger action1 which does the sort and refreshes div1. It would be nice to be able to either update both div1 and div2 from one of the actions, or allow action2 to update div2 via render :partial and then...
2009 Mar 05
4
before_filter :action_name OR :action_name
Hi there I am wondering if we can use before_filter in the form of :action OR :action what i want to do is to implement one of the actions, if the first failed, then go to the second when i use before_filter :action1 before_filter :action2 each method will run them, my case is that i want to check if one of them is true and not both any idea? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, se...
2006 Apr 10
3
form_remote_tag can only have one submit button?
I setup a form_remote_tag with several submit buttons, all of them share the same name ( ''do_action'' ) and their values differ. eg. button1 named do_action with value ACTION1 button2 named do_action with value ACTION2, etc No matter which button I press the value passed is always the one defined for the first of these buttons ( the correct value associated with the pressed button is not passed to the controller ). This behavior does not occur with a regular form_tag, which works as it should passing the va...
2004 Jan 21
2
[Fwd: Re: Comboot Menu]
Thanks for the comment. The next pass for a file format ... ------ FILE BEGINS ----- # Comment lines [menu] item="text to display" status="status line text" action= SUBMENU | INACTIVE | whatever submenu= <number> data="arbitrary string" item="text to display" status="status line text" action= SUBMENU | INACTIVE | RUN | EXIT submenu=
2006 Jul 11
1
Aggregate Controllers
Hi, I''m developing a dashboard like page and basically want to combine the result of multiple actions on a page. I''ve done this so far: def index r1 = render_to_string :action => "action1" r2 = render_to_string :action => "action2" render :text => r1+r2 end This works, but now I want to render from other controllers and this is where I''m stuck. So in my current controller lets call it "Dashboard", I want to render content from a controller called "HumanResources" and another controll...
2006 Apr 03
1
Best way to set custom Controller options
Hi All! I''m searching a good way to set some options in my Controllers; I tried defining a custom function, ie: class PeopleController < ApplicationController set_my_actions :action1, :action2 end class ApplicationController def self.set_my_actions(*args) @@my_actions = args end end But ''@@my_actions'' sets the class variable to _every_ Controllers classes! Any hints? Thanks, Marco -- Posted via http://www.ruby-forum.com/.
2006 Jul 02
3
2 before_filters, only want one to render something
I have two before_filters for a few of my controllers. They are running my own methods authorize and admin_authorize. authorize is called on just about every action to make sure that a user is logged in. admin_authorize is called on about 80% of the actions and is used to make sure that a user is an administrator. If a user tries to access an admin_authorize protected action without being
2006 Jul 26
5
Restricting before_filter to certain actions?
Can you restric before_filter to specific actions? -- Posted via http://www.ruby-forum.com/.
2005 Dec 20
3
Single controller to browse things in categories
First off, hi, I''m [obviously] new :O) Please excuse my question as I''m sure it''s been answered, but I can''t find it anywhere. I have a table of categories: id name 1 Foo 2 Bar I have things which belong_to categories: id category_id subject date 1 1 my subject 07/09/2004 and Further classifications which belong_to categories: id category_id name 1 1 More
2006 Aug 03
0
setting a session variable, :value and :session_path
...to be able to store a hash in an action: def action session[:details] = {:value => some_hash, :session_path => "/main"} end I''d like to be able to retrieve the hash in another action under the same "main" controller. I retrieve it by doing the following: def action2 hash = session[:details] v1 = hash[:name] # Problem is that this is null end I''m not able to get my values out as I expect. Any help would be appreciated. Also, when I set :session_path => ''/main'', does this mean that the session[:details] will get nulled if a...
2006 Aug 03
0
Setting session variables and expiration issue.
...be able to store a hash in an action: def action session[:details] = {:value => some_hash, :session_path => "/main"} end I''d like to be able to retrieve the hash in another action under the same "main" controller. I retrieve it by doing the following: def action2 hash = session[:details] v1 = hash[:name] # Problem is that this is null end I''m not able to get my values out as I expect. Any help would be appreciated. Also, when I set :session_path => ''/main'', does this mean that the session[:details] will get nulled if...
2006 Feb 09
2
Strategies for updating multiple parts of the page with AJAX
Hi all, I have a layout that''s evolving, but it looks like there will be several divs. I''m trying to keep everything AJAX-y and avoid full page reloads. My problem is, if I have the login box in a div, I''m going to want two other divs to effectively "refresh" themselves to get data from the server now that there is a user logged in. I''m trying to
2008 Feb 16
4
controller initializer function??
Hi, i''m a php developer and am used to developing using the zend framework, recently i have discovered the wonders of rails, and have a simple question: In zend in your controller you can make a function called init() which will always run for every action inside that controller, how can i make an initializer function in a rails controller? I''ve searched but havent found much
2006 Jul 07
5
Can a route require POST or GET? / REST problem with routing
Hi, A store front a customer wants to GET /product/5/show. But for the application this is really GET /cart_item/new/5 or even better /cart_item/new?cart_item[product_id]=5 When the customer clicks add_to_cart they POST /product/5/show so that the url doesn''t confuse the user when any validation errors occur. But for the applicaiton this should be POST
2008 Aug 25
11
pid-provider sees ld.so.1 only
I''m trying to do some userspace tracing on a server-process with the pid provider. My problem is, that the only probes the pid-provider lists for the server-process (to which I attach dtrace with "-p nnnn") are coming from "ld.so.1". There''s not a single one from my modules. If I''m specifying "a.out" (or any of our shared-objects) as the