Displaying 20 results from an estimated 200 matches similar to: "line too long in editor... (textmate)"
2006 Jul 16
4
Calculations across multiple tables
I have a time tracking app where (pseudo-code)
Client has_many Task has_many TimeRecord
TimeRecord
start_at, :datetime
end_at, :datetime
What I''m trying to do (and I have done using find_by_sql in the past) is get
a sum of the timespan given by ended_at - begun_at for each client.
Is it naive to imagine that AR''s calculations will span relations to provide
a grouped
2010 Nov 05
3
non event_calendar
What am I missing here, trying to get the event_calendar plugin working
with my existing app. Have installed the plugin, which I guess is a good
start, then this...
class Booking < ActiveRecord::Base
has_event_calendar :start_at_field => ''arrival_date'', :end_at_field =>
''departure_date''
Route...
map.availability_calendar
2006 Nov 23
2
Conditional queries
Hi. I''m attempting to return a result set which filters Pages by their
active state and their start/end date. Whilst the code I have at the
moment is doing this without problem, some of the Page items may not
have an end date set and I can''t see a way of conditionally doing the
query so these are not excluded.
Perhaps showing some code will help explain better;
2008 Feb 19
0
Issue with Observers and has_one association...
Hey Guys,
I''m getting a peculiar bug working with Observers and has_one
associations. When a has_one association is invoked by an Observer it
always returns null. I looked in the development.log file and the SQL
for the has_one association isn''t even being executed. On the other
hand, when I replace the has_one association with just a hand crafted
method, it does get called
2006 Oct 14
2
sending parameters with link_to_remote Ajax Request
In a panel, I have an hidden input field which is modified by a
javascript function (from calendar)
how can I sent the value of this input field in my link_to_remote call ?
presently I just send back one parameter (an id) but I need both...
<input type="hidden" name="booking[start_at]" id="f_date_s"
value="booking[start_at]" />
...
<%=
2007 Nov 29
4
collection.build or collection.create gives "ArgumentError: wrong number of arguments (1 for 0)"
I have a Project that has_many Tasks. Tasks belongs to a Project. When
I try the following:
project = Project.new
project.tasks.build
I get:
>> s = Project.new
=> #<Project:0x25f9e28 @attributes={"name"=>"", "end_at"=>nil,
"updated_at"=>nil, "published_at"=>nil, "user_id"=>nil,
2018 Jul 10
2
Giving up using implicit control flow in guards
Hello Everyone,
I want to raise a discussion about @llvm.experimental.guard intrinsic and reasons why we should give up using it. Here is an alternative approach to representation of guards that resolves some of fundamental flaws that the current guards have.
Basically, this intrinsic was introduced to model the following situation: we want to check that some condition is true, and if it's
2006 Aug 01
2
making backgroundrb cron
Hello,
i need to have some jobs scheduled in the background and executed at
specific times. I wanted to make a worker who does that - and it works a
little bit - but i had an enlightment... why not make bgdrb itself play that
role? i mean, the MiddleMan has already everything needed! a timer thread,
currently used only for deleting old workers and the workers itself. since
im not familiar with
2018 Jul 13
2
Giving up using implicit control flow in guards
Hi Sanjoy,
Thanks for feedback! As for memory effects, currently I use " inaccessiblememonly " for it. It allows to prove that it doesn't alias with any other load/store in the function, but doesn't allow CSE to eliminate it. It is not actually super-cool, because there is no way that we can safely hoist it out of loop (and sometimes we want to, for example to make unswitching).
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys,
1. Which is the difference between this two methods? (select_datetime,
datetime_select)
2. How I assign the selected date-time values, to an specific variable
or array using select_datetime
I know do it using datetime_select(''object'',''method'')
I aprecciate your attention.
Thanks
PD: Sorry about my english.
2006 May 27
7
How should I select rows from a join-model based on more than one association?
A concrete example:
We''re building a system to organize the information about workshops
being held in various conventions. A convention has more than one
workshop, and each workshop can be held in more than one convention.
Also each workshop has a host, who is specific to a workshop being
held in a specific convention.
For example, Matz may host an "Introduction to Ruby"
2009 Feb 09
2
dynamic constant assignment
I have a constant set up like that :
ALL_LOCALES
=> {"it"=>"Italian", "fr"=>"Français", "de"=>"Deutsch", "en-
GB"=>"English (UK)", "es"=>"Español (España)", "pt-PT"=>"Português",
"pl"=>"Polski", "en-US"=>"English
2008 Jan 29
2
rpart error when constructing a classification tree
I am trying to make a decision tree using rpart. The function runs very
quickly considering the size of the data (1742, 163). When I call the
summary command I get this:
> summary(bookings.cart)
Call:
rpart(formula = totalRev ~ ., data = bookings, method = "class")
n=1741 (1 observation deleted due to missingness)
CP nsplit rel error
1 0 0 1
Error in yval[, 1] :
2008 Jan 08
1
Rails 2.x CalendarDateSelect
Recently I have taken up learning rails 2.0
Unfortunately the SuperInplaceControls (the Rails 2 version of
CalendarDateSelect) plugin has been giving me some trouble. It seems
that rails does not realize the plugin has been installed.
Does anyone have any thoughts as to what is happening here.
STEPS
1. Installed the SuperInplaceControls (the rails 2 version of
CalendarDateSelect)
ruby
2005 May 03
2
How to put a form for one controller in another controlers view
Hello,
If anyone could help me out with this problem I''d appreciate it...
I''m making a database of event bookings, I have an events table and a
clients table. I''d like to include a form to create a new client in the
form for creating a new event.
This would update the parent form with the new client_id using AJAX
methods (see previous e-mail) so you''d
2007 Feb 19
1
hosts allow on smb.conf
Hi,
I have some query about the samba security, we are trying to setup
remote map drive for vpn client, since this kind of client connection
which using different IP address, the only way we can do is to set
'hosts allow' to nothing. We just want to know if this change is risky
or not, our samba was setup as a DC, and client computers already join
to Linux Domain. The VPN protocol
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
Hi all
I tried and tried and tried, but I still fail in creating a form with
proper validation and stuff for foreign keys... So I''d really like to
get some help here.
I''m creating a booking site for DJ''s, and for every booking one can
choose one of different countries:
class Booking < ActiveRecord::Base
validates_presence_of :country_id
2006 Jul 09
17
Has many / belongs to error with mysql
Hi,
I''ve got stuck with a problem on my rails app - I''ve created a database
for quotes and bookings, with a futher table "eventdetails" (details of
a quote or booking) linked one-one for both tables using a polymorphic
assciation. This all works, but I am now trying to link a quote to a
number of bookings with a has_many and belongs_to (the foreign key is in
the
2008 May 30
4
How to deal with observe_field in partials?
Hiyas
I''m having a little problem with a observe_field in a partial
"bokings/room_list":
<%= select_tag "room_#{room.id}_grownups", options_for_select([0, 1, 2],
room.grownups.length) %>
<%= observe_field "room_#{room.id}_grownups",
:url => set_number_of_grownups_booking_room_url(:id => room.id),
:with =>
2006 Apr 08
4
Stack level too deep error :(
Hi,
If anyone has some time to help with my problem that would be really good :)
I am getting a "stack level too deep" error when saving an object to the
database when it is has a has_one relationship to another object I wish
to save and associate after it.
If goes a little like this
class Quote < ActiveRecord::Base
belongs_to :eventdetail
has_many :bookings
# An