Displaying 15 results from an estimated 15 matches for "action1".
Did you mean:
action
2006 Apr 03
3
render :partial + redirect_to :controller
...s, and what is the best workaround?
This UI does a scriptaculous drag-and-drop of items from a first div
(div1) over to a second div (div2), which triggers the contents of div2
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
sor...
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''...
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/.
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...
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_ta...
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 control...
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/.
2007 Apr 18
2
[Bridge] IPS HLBR 1.0 released (off-topic)
...s traffic in tcpdump
format and drops the packet. Below is an example of rule against a type
of buffer overflow attempt against DNS servers:
<rule>
ip dst(dns)
udp dst(53)
udp nocase(|41cd 80c7 062f 6269 6ec7 4604 2f73 6800 89f0 83c0 0889 4608|)
message=(dnsattacks-1) tsl bind attack
action=action1
</rule>
In this case, due to the use of pipe characters (|), HLBR will check
the traffic for the hexadecimal sequence given as an attack signature.
HLBR lets you use rules for blocking attacks against network servers.
In order to fully understand it please read our documentation at
http://h...
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
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 26
5
Restricting before_filter to certain actions?
Can you restric before_filter to specific actions?
--
Posted via http://www.ruby-forum.com/.
2006 Jun 23
0
ActiveRacord::Base find does not support HAVING ?!
...:select=>''t1.*, count(c2)'',
:joins=> ''AS t1 LEFT JOIN t2 ON t1.ID=t2.t1_id'',
:group=> ''t1.id'',
:having=> "count(c2) = #{my_var}"
}
T1.find(:all,options)
But I got the following error:
ArgumentError in T1Controller#action1
Unknown key(s): having
lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/hash/keys.rb:48:in
`assert_valid_keys''
lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1325:in
`validate_find_options''
lib/ruby/gems/1.8/gems/activerecord-1.14.2/l...
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 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 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