search for: flyingmachinestudios

Displaying 20 results from an estimated 27 matches for "flyingmachinestudios".

2006 May 25
16
yet another rails site - happycarpools.com
...out making this has been seeing how Rails does *so much* and hardly has any superfluous parts, if any. There are so many features that I initially didn''t think I''d ever need, but then the need arose and the feature was there to save time for me. Hooray for Rails! Daniel daniel at flyingmachinestudios dot com
2006 Apr 15
2
Can''t run MySQL queries
Hi everyone, I''m having trouble actually running mysql queries. I can connect to the database, I think, but when a query gets run the following shows up in my log: SQL (0.000000) Mysql::Error: Lost connection to MySQL server during query: SHOW TABLES Any suggestions? Thanks! Daniel Higginbotham
2006 May 18
4
time select with am/pm?
Hi everyone, Is there a time select helper which uses a 12 hour clock rather than a 24 hour one? Also, does anyone know if :discard_year actually works in datetime_select now, or how I could find this out? Thanks! Daniel
2006 May 23
6
OT: best books
Hopefully this isn''t completely inappropriate, but lately I''ve been curious about what books people have found most helpful in their development as programmers. If one of the icons like Dave Thomas, DHH, Mike Clark, Andy Hunt et al could weigh in that''d be awesome :) Here are some of my favorites: Refactoring, Martin Fowler Mastering Regular Expressions, Friedl
2006 May 18
6
Form actions with additional parameters
Hiall, I want to give the action of a form an additional parameters but can''t figure out how to do it. My code looks like this <%= start_form_tag :action => ''create'', next_step => true %> <%= render :partial => ''user_form'' %> <%= render :partial => ''community_form'' %> <%= submit_tag
2006 Apr 16
12
tired of using defined? all the time
Hi everyone, It seems like every time I want to evaluate a possibly undefined variable I have to use defined? to see that it exists first, so I can''t simply have -- if params[:range_start] > 3 or something like it. I need to have -- if defined? params[:range_start] && params[:range_start] > 3 I can''t even have -- if params[:range_start].nil? This is really
2006 Apr 13
2
acess local variables from helper?
if I call a helper method from inside a partial, it doesn''t appear to have access to the partials local variables. is there a way to make them avilable without passing them as parameters? here''s a simple example # in the view <%= render :partial => "my_partial", :locals => :value => 2%> # _my_partial.rhtml - raises "undefined local variable or
2006 Jun 12
2
dom id on form_remote_tag
I want to make use of a form_remote_tag to submit a form asynchronously. Easy done. However, we also want to add an observe_form tag to check for some value changes while the form is being entered. The observe_form tag needs a dom id to work on but I can''t see how to enter an html option for the dom id of the form on the form_remote_tag. Any ideas? Here is the form tag so far...
2006 Jun 07
3
Question on login generators, plugins
Not sure if I want to build my own or use something already built that''s out there. This is the first step in my project though and a major one, so some of my requirements would be: 1-The ability for a user to register themselves 2-Email / link activation 3-Access levels (or ACL control - I think they are basically the same). 4-The ability to track users either through session or cookies
2006 May 26
4
shouldn''t this work? - session[:array_of_objects].delete_if {|x| x.id == params[:id]}
I am saving an array of active record objects (college courses) in the session as session[:course_list]. This is the cart for a registration controller. If a student chooses to delete the course from the list I get the :id as params[:id]. However if I do session[:course_list].delete_if {|x| x.id ==params[:id]} does not work. session[:course_list].delete_at(idx) works. Ocourse to do this I have
2006 Jun 28
2
Assign CSS class to Link to Remote
I''m trying to get link_to_remote to assign a CSS class to the link it generates. My code is as follows: <%= link_to_remote "Show Full Info", :update => "fullcontact" + reparray.last.to_s, :url => "/cm/full_contact/" + reparray.last.to_s, :classname => "contactlink" %> Which produces this HTML: <a href="#"
2006 Aug 14
0
anyone else having trouble with assert_tag :content ?
Hi everyone, In an integration test I have assert_tag :content => /Quantity/ and this always fails, even though Quantity does exist in the html. Similarly, I have assert_no_tag :content => /Quantity/ , and this fails even when Quantity *doesn''t* exist in the html. Am I missing something here? Thanks Daniel
2006 Jun 09
0
options vs. html options in collection_select
I wanting to add an onchange event handler to collection_select but I''m not sure how. The api gives the signature as collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {}) I''m not sure, however, if I need to place the desired code in "options" or "html_options". I''m sure I could just figure it out
2006 Jun 20
3
return unique rows with finders
I''m looking through the api for something like find(:all, :distinct => true) so that multiple instances of a row won''t be returned - is this possible? Thanks!
2006 Jun 23
0
model level access control
Hi Everyone, Is there anything out there that allows model-level access control? Basically, records need be available if a)You created them and they''re associated with your user id b)You''re an admin, in which case you should be able to see very record. I imagine I could implement this functionality by creating separate actions, one which only pulls records based on user id, and
2006 Jun 26
0
How to limit access to model objects based on role?
Hi all, I want to limit access to model objects based on the role of the logged in user. It seemed the most blunt way of doing this would be make copies of each controller which accessed the models and use one of the access control systems out there to limit access to the controllers. However, with 9 different controllers this seems like a terrible choice. Here''s what I''ve
2006 May 20
0
12 hour time plugin
Hi Everyone, I''ve made a plugin that adds a 12 hour time helper. You can download it here: http://www.happyfreelancer.com/time_12hour_select.zip The method you want to use in your views is time_12hour_select(object, method, options = {}) This will only work with fields of type Time - it won''t work with Datetime. I haven''t thoroughly tested it but it seems to be
2006 Apr 20
0
paginate :includes not working as I thought it should
Hello everyone, I have the code below: paginator_options.merge!({:conditions => ''cities.id = 4'', :include => [:cities]}) @people_pages, @people = paginate :people, paginator_options There''s a many-to-many relationship between people and cities. It seemed like before this was working, but now in the sql that''s generated the join table isn''t
2006 Apr 24
2
sortable table rows?
I''ve been trying to make some table rows sortable using Scriptaculous. I''ve used: Sortable.create("secondlist", {tag:''tr'', treeTag:''table''}); and Sortable.create("secondlist", {tag:''tr''}); Neither of which works. Is it even possible to do this? Thanks, Daniel
2006 Nov 27
2
find_conditions in acts_as_ferret find_by_contents
Hi all, Every time I try to add options for the find_conditions argument of find_by_contents I get the following: a = AnnotatedLink.find_by_contents(''test'', {}, {:conditions => ''category_id IS NOT NULL''}) >> NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while