Displaying 7 results from an estimated 7 matches for "an_id".
Did you mean:
ad_id
2006 Apr 10
5
ActiveRecord: Behavior not doumented
Hello everbody, doing a
#find(:first,an_id)
with Rails 1.1.0 I expected that find returns the record which id mathches the
given parameter an_id or nil if it couldn''t be found.
This behaviour is documented on api.rubyonrails.org.
But the find returns the first available object and not nil if an_id is not in
the db. Is the doc on...
2007 Dec 04
7
REST bug with form_for
Hi all, I am running on Windows XP sp2 with ruby 1.8.6, and rails
1.2.3
I am using REST, and have this in my view
<% form_for(:project,
:url => project_path(:user_id => @project.my_user, :id =>
@project),
:html => {:method => :put}) do |f| %>
The browser correctly gives
<form method="post" action="/users/2/projects/1">
2007 Sep 10
2
syntax II
...ve to live with whatever we
settle on for 2.0 for a little while, so...
1) Setting up event handlers
In most real apps, I think the most normal way to set up event handlers
is for the event to be dealt with by a corresponding method. At the
moment this has to be done using a block:
evt_button(AN_ID) { on_button_click }
evt_button(my_button.get_id) do | event |
on_button_click(event)
end
evt_size { | event | on_size(event) }
This is a sensible way to organise classes but it seems to have
redundancy in it. The bigger one is having to create a block, with
param, just to call a method; the s...
2010 Aug 19
1
Composite primary keys and :joins=>
I have a legacy db with the following simplified structure:
Table-A:
type_key, code_key, name, ... # PKs are type_key and code_key,
there is no id col and I cannot alter this db
Table-B: # each row has only the code as a foreign_key, the type_key
is hard-coded to "FOOKEY"
an_id, code, ...
Models:
class TableB < AR::Base
set_table_name ''table_b''
set_primary_key :an_id # singular PK
belongs_to :code_name, :class_name=>''TableA'', :primary_key=>:pk_code_name, :foreign_key=>:code
SELECT = "*, table_a.nam...
2007 Sep 17
7
Re : syntax II
Alex Fenton wrote :
>1) Setting up event handlers
>
>In most real apps, I think the most normal way to set up event handlers
>is for the event to be dealt with by a corresponding method. At the
>moment this has to be done using a block:
>
>evt_button(AN_ID) { on_button_click }
>evt_button(my_button.get_id) do | event |
> on_button_click(event)
>end
>evt_size { | event | on_size(event) }
>
>So I''d like to suggest as alternatives:
>
>evt_button(AN_ID, :on_button_click)
>evt_button my_button, :on_button_click
>evt...
2006 Dec 23
0
[794] trunk/wxruby2: Fix get_ruby_object so it works with SWIG tracking, move find_window_xx
...n class="cx"> def paint
</span><span class="cx"> yield Wx::PaintDC.new(self)
</span><span class="cx"> end
</span><ins>+
+ # Recursively searches all windows below +self+ and returns the first
+ # window which has the id +an_id+. This corresponds to the find_window
+ # method method in WxWidgets when called with an integer.
+ def find_window_by_id(an_id)
+ Wx::Window.find_window_by_id(an_id, self)
+ end
+
+ # Searches all windows below +self+ and returns the first window which
+ # has the name +a_name+ This corres...
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
...Wx::AUI_DOCKART_BORDER_COLOUR
+ when ID_GripperColor
+ var = Wx::AUI_DOCKART_GRIPPER_COLOUR
+ else
+ return
+ end
+ @frame.get_dock_art.set_colour(var, dlg.get_colour_data.get_colour )
+ @frame.do_update
+ update_colours
+ end
+
+ private
+ def make_metric_spin_ctrl(an_id, caption, metric)
+ metric_val = @frame.get_dock_art.get_metric(metric)
+ sp = Wx::SpinCtrl.new( self, an_id, metric_val.to_s,
+ Wx::DEFAULT_POSITION,
+ Wx::Size.new(50, 20),
+ Wx::SP_ARROW_KEYS,
+...