Displaying 10 results from an estimated 10 matches for "start_at".
Did you mean:
start_ap
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 result?
The SQL...
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]" />
...
<%= link_to_remote(''check period'', :url => {:action => "checkPeriod",
:id => @booking }) %>
thanks for your help
kad
--
Posted via http://www.ruby-forum.com/.
--~--~-------...
2006 Oct 03
1
line too long in editor... (textmate)
my where :condition string line is too long in my editor, (Textmate...)
if I do a LR, I got a \n in my string, how can i get it displayed in
multilines without this garbage in the string :
here is the kind of string I am manipulating
cond_a.append ["(bookings.start_at == ? OR bookings.end_at == ? ) OR
(bookings.start_at <= ? AND bookings.end_at >= ? )",
@selected_booking_date, @selected_booking_date, @selected_booking_date,
@selected_booking_date]
thansk fyh
kad
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~---...
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 Nov 23
2
Conditional queries
...*:(#{params[:s]})
search_start_date:( <= #{Time.now.strftime("%Y%m%d")} )
search_end_date:( >= #{Time.now.strftime("%Y%m%d")} )",
[],
{:offset => @offset, :limit => @limit}
)
Page.rb
def search_start_date
self.start_at.strftime("%Y%m%d") if self.start_at
end
def search_end_date
self.end_at.strftime("%Y%m%d") if self.end_at
end
The problem being that I can''t figure out how to do the equivalent of:
search_end_date:( IS NULL OR >= #{Time.now.strftime("%Y%m%d...
2008 Feb 19
0
Issue with Observers and has_one association...
...tion with just a hand crafted
method, it does get called correctly. So the following does not work:
class Task
has_one :current_instance,
:class_name => ''TaskInstance'',
:foreign_key => ''task_id'',
:order => ''start_at DESC'',
:conditions => ''end_at IS NULL''
but when replaced with the follwoing, it does work.
def current_instance
TaskInstance.find(:first,
:conditions=>"task_id=#{self.id} AND end_at IS
NULL",...
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"
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 ''/availability_calendar/:year/:month'',
:controller => ''properties'',...
2006 Aug 01
2
making backgroundrb cron
...ere i would need such a facility)
and if so, how could the configuration be done? best would be something that
can be changed and added by runtime while being preserved over various
starts and stops... or something of rails magic:
class FooWorker < BackgrounDRb::Rails
repeat_every 24.hours
start_at tomorrow.midnight
def do_work
@logger.info ''i will appear on midnight every day from now!''
end
end
but since thats magic, i dont really know how that would work, but its more
the rails way than an entry in backgroundrb.yml i think
what do you think of it?
--
Michael S...
2008 Jan 08
1
Rails 2.x CalendarDateSelect
...plugin install http://super-inplace-controls.googlecode.com/svn/trunk/super_inplace_controls/
2. Confirmed that the plugin was installed to /vendor/plugins/
super_inplace_controls
3. Updated the edit view accordingly
<% form_for(@advert) do |f| %>
<%= f.calendar_date_select :start_at, :embedded => true
%>
<% end %>
OUTPUT
JavaScript Error: `CalendarDateSelect` is undefined
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send...