Displaying 20 results from an estimated 4000 matches similar to: "Optimistic Locking Enhancements: Gem or Core?"
2006 May 17
6
ActiveRecord#to_param
Hello,
to implement some some kind of optimistic locking, I want to build a
view, where an object is displayed together with a link containing the
data of the displayed object. My first try looked something like
<%= object.object_discription %>
<%= link_to "action", :action => "take_action", :data => object %>
this won''t work because object is of
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
2011 Jul 27
20
Rails, jquery and Ajax
How do I make an ajax call and then update a div with a partial? I''ve
tried this but it''s not working. Comment is created but the partial is
not loaded.
//view
<a href="#" id="testlink">Testlink</a>
<div id="commentlist">
</div>
//controller
def new
@comment = Comment.new
@comment.save
2008 Oct 16
4
Removing values from a select (drop-down) box
Hello,
I am working on a project, and on one form we have a select (drop-
down) box where the user needs to be able to select from a list of
clients. The box is currently being populated with:
<%= collection_select(:client, :id, @account.clients, :id, :name) %>
The problem is that some of these clients may have already been
selected, and we need to remove them from the list. Is this
2011 Oct 22
2
why my Ajax request is performed 3 times ?
I wrote in my view :
#showcases
- @category.showcases.each do |showcase|
%a{''data-remote'' => ''true'', :href => "#{showcase_url(showcase)}"}
.showcaseSelector{:style => "border-color: #{showcase ==
@selected_showcase ? ''black'' : ''transparent''}; background-color:
##{showcase[:color]};"}
which
2013 Jan 02
3
puppet-dashboard load balanced report processing issues.
I just upgraded the second half of a two node puppetmaster cluster and now
I am having issues with puppet-dashboard report processing. If I have
workers running on both servers, they try to process each others reports,
but since the report data file is not there, it fails. I would have
assumed this data was local, not in the database. Does anyone else have
this issue, or have a suggestion
2012 Oct 03
1
Is there planned support for permitting params one at a time vs. all at once in strong_parameters/Rails 4?
Was going to have a variety of request params sent in and use a
class_attribute that would define types of request parameters that are
allowed. strong_parameters wouldn''t be too much trouble in such a case if
it would allow me to manually permit some attributes (dynamically
determined) in the controller but allow strong_parameters to enforce
security of others.
Is this something
2006 Jul 06
4
update_all Not Incrementing lock_version
Shouldn''t update_all be updating lock_version? As you can see from my
console session below, it is upating the record (changed running
attribute to true and returned 1 to show 1 recored was updated). But it
did not increment lock_version. And optimistic locking is working
correctly otherwise. As you can see below, lock version = 562 before
and after the update_all call but it is
2010 Aug 13
11
Link to remote and the equivalent in Rails 3
Hi
WOW! Is Rails 3 another interesting learning curve. Just when I think
I have a general working knowledge of Rails 2 ... things change.
I''m trying to replicate the following in Rails 3:
<%= link_to_remote image_tag("creditcard.png", :border => 0), :url =>
{:action => :make_payment, :type => "Credit", :id =>
@appt.id },
2007 Nov 07
1
Wx::FileDialog and common dialogs
The documentation for Wx::FileDialog is incorrectly generated:
http://wxruby.rubyforge.org/doc/filedialog.html
Every time the ''*'' (for the wildcard character in file filters) appears,
the doc instead switches between boldface and normal.
Also, it seems like the links under "See also" are broken.
Feature request:
Regarding all modal common dialogs (ColourDialog,
2006 Feb 23
7
Session Based Record Locking - Solutions?
All,
I''ve written a simple job/opportunity tracking database app via RoR.
I have about 10 internal users.
Sometimes 2 people will want to update the same record at more or less
the same time and they collide.
In particular user 1 may edit a record, then get distracted, and
finally an hour later they click save.
During that hour user 2 may have pulled up the record, edited it, and
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",
2023 Sep 19
1
Subsystem sftp invoked even though forced command created
This is a new branch of an old thread, made necessary because the email system here purges sent messages after a period of time so I can't reply to the last message in the thread. The operative portion of that last message (retrieved from the archives and dated July 3, 2023) follows:
/*****/
So I set up a fresh key to use for this test, and gave it similar parameters.
I wasn't aware of
2008 Oct 21
1
How to force a lock_version increment
Hi everyone,
I have a order with order_lines use case. On changing the lines, I
want to be sure no one else changed the order. So I use lock_version
on the order. This works fine if something is changed on the order
record.
But now i have the situation that I delete, alter and add order lines
without changing the order record itself. I have to check and
increment the order#lock_version however
2006 May 09
7
When to use optimistic locking?
Hi All,
I''m having some trouble deciding when and how to implement optimistic
locking.
Let''s say I have a multiuser Rails app, and let''s say it stores,
among other things "vital" customer information.
The standard methods created by the Rails generate scaffold script
look like this:
def edit
@customer = Customer.find(params[:id])
end
2006 Jan 04
2
Rename lock_version field?
Hi,
Is there a way to tell Rails that the magic field name for optimistic
database locking is not lock_version? I have a legacy database where the
optimistic locking field is named "version".
Thanks,
Phil
--
Posted via http://www.ruby-forum.com/.
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
2023 Jul 06
1
Subsystem sftp invoked even though forced command created
On 05.07.23 18:01, MCMANUS, MICHAEL P wrote:
> It appears the forced command either does not run or runs to completion
> and exits immediately, as there is no process named "receive.ksh" in
> the process tree.
FWIW, two cents of mine:
-- The script *exiting* should *not* prompt sshd to execute the
requested subsystem "as a second thought", or else it'd happen
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all
I have a Model like this:
class Member < ActiveRecord::Base
attr_accessible :username, :email, :first_name, :last_name
end
I have created a scaffold using script/generate scaffold member members
Using the URL localhost:3000/members/edit/1 I can edit all attributes,
including created_at, lock_version etc.! But it should only show the
attributes I listed in attr_accessible!
What
2023 Jul 07
1
Subsystem sftp invoked even though forced command created
On 06.07.23 23:37, MCMANUS, MICHAEL P wrote:> So changing the forced
command as stated will break the application. I
> would need to create a test bed to simulate the listener rather than
> use the server as is, where is. That may produce false or misleading
> results.
Since the forced command is tied to the specific keypair in the
authorized_keys, you could
-- test with a different