Displaying 6 results from an estimated 6 matches for "railsish".
Did you mean:
railish
2006 Jul 07
7
Sequencing control with edit method in CRUD examples
I have been playing with the cookbook type of tutorials building a fish
tournament scoring piece and am having a bit of a problem with a DB
field called "points" in my "catch" table that is not input by the user
but is calulated based on a "size" field that is input by the user.
I have the following in my catch_controller.db
def new
@catch = Catch.new
@fish =
2006 Aug 18
2
How do I sort the drop-down list?
I''ve added a drop-down list of first and last names of borrowers to a
form. How do I sort them by LastName, FirstName in the drop-down?
I''m using code based on the cookbook example:
<select name="borrower[borrower_id]">
<% @borrowers.each do |borrower| %>
<option value="<%= borrower.id %>">
<%= borrower.FirstName <<
2006 Jul 09
9
undefined method stupidity
I put some code in a before_save callback in the model file to alter
some fields that have dependencies in the DB.
I''d like to call a method in the controller file but I continually get
undefined method errors. I have specified Controller::methodname as well
to no avail. What am I missing?
--
Posted via http://www.ruby-forum.com/.
2009 Oct 08
6
Eager Loading a Relationship That Has No PK/FK
I''m attempting to wrestle an old DB into Rails.
This relationship is giving me trouble:
class Show < AR::Base
has_many :segments
end
class Segment < AR::Base
belongs_to :show
has_one :media #this has no PK/FK relation
end
A Segment is "linked" to Media by Media.name, which is the result of
concatenating Segment.name and Segment.part. As I said there are is no
2006 Jan 10
7
Application Design Question
I am designing an application to run a fishing tournament I am
hosting. Each fish entered will be given a point total based on the
length of the fish and the species of fish. Each species has a point
multiplier. For Example Trout have a multiplier of 10 so a 20 inch
Trout would have a score of 200.
My conundrum is in where and when do I calculate the points. The
options I have come up
2006 Nov 14
11
RESTful mixin, mixin repo?
Hi,
I just put together a little mixin to provide pseudo-RESTful services
in camping apps. Basically, it looks for a hidden _verb field in form
posts, and sets the @method to the supplied value (e.g. put or delete
- which browsers don''t support). This lets you define put and delete
methods in your controllers. Groovy.
Code:
http://pastie.caboo.se/22613
Is there any permanent repo of