Displaying 20 results from an estimated 700 matches similar to: "Rail3: UJS submit after client-side validation"
2007 Dec 15
3
List Box Issue - Should be easy, but nor for me!
I have the following snippet in my app:
<% @anitem = Item.find(:all, :conditions => "id = " + params[:id]) %>
<% form_for :anitem, :url => { :action => :updateitem } do |thisform|
-%>
...
... (some code...removed)
...
<%= collection_select :thisform, :item_category,
ItemCategory.find(:all), :id, :name %><br>
<%= collection_select :thisform,
2005 Jun 10
1
Submitting an ajax form via a select
I''m trying to submit an ajax form via an onchange method in a select
menu, but I can''t seem to do it.
The problem holding me up, is that I can''t figure out how to set the
ID of the form when using a form_remote_tag (I need to use the ID of
the form as the forms on the page are variable, so I can''t reference
it in the form array). Setting :id =>
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to
4D database) in RoR/postgres and I''m doing okay - but keep running
into things that stump me. It seems like it takes me hours to figure
out something that I could have written in pure code in minutes.
The select_month and select_day helper has been my latest waste of
time. All I''m trying to do is add
2011 Jan 14
0
[Rail3] How to construct full-text search for habtm associations
hi all, i''m new to this group and currently using Rails 3.0.3 and meta_where
0.9.10.
i''m considering how to make a full-text searching feature to my project,
and my models, for example, should be defined like below:
class Group < ActiveRecord::Base
has_and_belongs_to_many :users
# :title (string)
end
class Comment < ActiveRecord::Base
has_and_belongs_to_many :users
2008 May 30
0
UJS for rails plugin Installation problems
Hello,
I downloaded and installed the latest UJS plugin.
I first got the error "uninitialized constant UJS" and this error wouldn''t
go away no matter where I place the "UJS::routes" line in the routes.rb
file. The only way I found to get rid of this error is to run "rake
tmp:sessions:clear" but then I get another error which is "can''t convert
2011 Sep 19
1
Rails and UJS guide - not having much luck
I refered to http://railsdog.com/blog/2011/02/28/callbacks-in-jquery-ujs-in-rails3/
in hope of getting json data from my controller and displaying it in
my view when an ajax request is made.
I followed the instructions on the http://railsdog.com/blog/2011/02/28/callbacks-in-jquery-ujs-in-rails3/
and even corresponded with the author and also implemented his ''fix''
in
2006 Dec 08
2
UJS plugin incompatible with RSpec?
Hi all,
Anyone using UJS with RSpec? I have the following view spec:
---- edit_spec.rb
context "accounts/edit" do
fixtures :users
setup do
assigns[:user] = users(:consumer)
end
specify "should display the user info to edit" do
render ''/accounts/edit''
end
end
---- end
that causes this exception:
---- exception
ActionView::TemplateError
2010 May 12
1
Rails 3: perform controller action upon selecting menu item (UJS?)
In Rails 3, I have a form that has a menu on it. I would like to
render an area containing text fields within the form differently
depending on what''s selected in the menu.
Prior to Rails 3, one way it appears I could do this is by using
observe_field on the menu and call an action in my controller that
renders the appropriate partial which could then be swapped into a div
in my form.
2006 Oct 17
0
UJS Rails Plugin Group
UJS has started to get a lot of attention recently and we''ve found
we''ve been getting tickets filed on trac that are more like support
requests/help rather than real bugs.
For that reason, we''ve set up a UJS4Rails Google Group. Feel free to
ask questions, suggest features and discuss how you are using the
plugin.
http://groups.google.com/group/ujs4rails
2007 Jul 08
0
UJS and make_observed
<p class="lastwinner">
<%= text_field_tag :user_search, params[ :user_search ] %>
</p>
<%= apply_behaviour "#user_search",
make_observed( :field,
:update => ''contresults'',
:with => "''user_search='' +
2006 Oct 04
0
UJS Plugin - apply_behaviour Question
Anyone using the Unobtrusive Javascript for Ruby On Rails Plugin?
I have some code that looks like this.
<% apply_behaviour ''select:click'' do |page, element, event|
page.insert_html :top, ''the_list'', "<li>hi</li>"
end %>
What I would like to do is list the element.value rather than the string
"hi" but I''m a
2011 Oct 03
0
rails ujs, multiple ajax requests
Is there a way if you have multiple say products(example) to comment with
ajax on each one inline? I cannot seem to pass anything other than the
id. products have may comments
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit
2010 May 31
0
Rails 3 UJS and delete action
Hi,
I ve got a question concerning delete actions in the new rails 3 world
with unobtrusive javascript.
How may I perform an "ajax" delete in a list of products.
if attribute data-method is specified rails.js handleMethod is
called,
which adds csrf params into a hidden form and form.submit is called.
Works great, but form.submit is nt performed as an ajax request.
Using data-remote
2006 Dec 27
13
Where did UJS go? UJS vs. RJS
I have not been able to access the UJS site, http://www.ujs4rails.com/
for two days. Does that mean there are problems or that it has been
incorporated into Rails core?
In general, what do you think of using UJS instead of RJS?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
I am trying to rewrite my website in Rails 3 and Ruby 1.9.2.
Can some one help me convert my observe_field which is working under
Rails 2.3.5 to Rails 3. I would like to avoid using JQuery as over the
last year everything I have tried in JQuery has failed, including this
one. Perhaps due to my lack of knowledge. I would not like to install
the legacy upgrade.
What I have in my website is several
2013 Oct 02
2
Rails 4 ujs button only works after second click
Here''s the code
https://gist.github.com/dasibre/6786245
*new.js.erb file has the following js code*
$(''a.pinbutton'').on(''click'', function() {
$(this).parent().append(''<%= escape_javascript(render("select")) %>'')
});
*here''s the player index with the new link*
<%= link_to "Pin",
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
2010 Jul 26
1
form date helper with text year
I have a date where the year range is more then I want to define in a
select_date scaffold generated year range.
My idea was to have the year entered as a text field and the month and
day using something like:
<%= select_month @person.born,:prefix => :person ,:field_name =>
"born(2i)" %>
<%= select_day @person.born,:prefix => :person , :field_name =>
2006 Jun 23
16
Help please-draggable
I asked the other day about this problem but haven''t received a response.
Trying again:
I just downloaded 1.6 and can''t get a simple draggable to work, which
is weird. I know it''s not my browser since the demos are working.
Here is my simple code. I''ve also had the "new Draggable" between
the select tags. Didn''t change anything.
2006 Nov 22
9
Way to interpolate a variable sent to $()
Hello all,
I''m new to prototype and javascript isn''t my strong point. I''m trying
to get a simple test script to work, which is turning out to be a
little harder than I thought. I have a bunch of fields that I need to
be able to switch on and off using one of a few hashes. In the example
below I''m trying to get one to work.
The problem occurs when I try to