search for: viney

Displaying 20 results from an estimated 125 matches for "viney".

Did you mean: vines
2009 Mar 09
1
lme anova() and model simplification
...bit suspicious that the F-value for the deletion test is always 0.0099 independently of the factor that I remove. Any suggestions greatly appreciated. The actual data follow at the end of the R code. Thanks, Mel > library(nlme) > model<-lme(awsm~adh31+awpm+apsm+orien,random=~1|viney) > summary(model) Linear mixed-effects model fit by REML Data: NULL AIC BIC logLik 49.84102 51.22159 -17.92051 Random effects: Formula: ~1 | viney (Intercept) Residual StdDev: 1.59297 0.2689783 Fixed effects: awsm ~ adh31 + awpm + apsm + orien...
2006 Jun 11
7
testcase_setup_and_teardown_with_blocks (aka "The plugin with the very long name")
...ss PersonTest < Test::Unit::TestCase setup do end teardown do end def test_name end end It plays nicely with fixtures and should be completely backwards compatible with existing code that uses setup and teardown methods. Install with script/plugin install http://svn.viney.net.nz/things/rails/plugins/testcase_setup_and_teardown_with_blocks If anyone can come up with a better name for the plugin please do suggest it! -Jonathan.
2006 Mar 23
5
validates_dateness_of ?
Hello all. I don''t suppose some enterprising soul with much more skill than me has whipped up a "validates_dateness_of" (Complete with leap year calculations) method for use with all the other validation methods and wishes to spread much much joy? Cheers Jeff "I can barely code RoR and rely on others to do the hard work" Jones -- Posted via
2006 Mar 30
2
acts_as_ordered plugin
Hey all, I''ve just put together a little plugin to easily access the neighbours of a given model in a particular order. Read on if interested. Install: script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered Usage: class Person < ActiveRecord::Base acts_as_ordered :order => ''first_name'' end Say you have people with first names of Adam, Jonathan and Robert: p = Person.find_by_first_name(''Jonathan'') p.ne...
2006 May 25
5
Is there a way to abstract the updating of other parts of the page after an Ajax request without putting using the standard view file?
Hey all, I''d like to abstract the process of updating different portions of the page after an Ajax request has taken place. Rather than simply putting the extra view logic in the standard rjs template, it seems to give better separation if there is a split between the core view logic (ie, inserting a row in a table), and updating any associated portions of the page. Is this possible? I
2006 Jun 15
4
parse only seem to understand US date format
I''ve tried Time.parse() and DateTime.parse() but they interpret the date as US format. Is there any way to tell it to interpret as dd/mm/yyyy? -- Posted via http://www.ruby-forum.com/.
2006 Mar 10
19
validates_date plugin for ActiveRecord
...by" p.save # false In the final example, as I''m sure you are aware, the record failed to save not only because "java is better than ruby" is an invalid date, but more importantly, because the statement is blatantly false. ;) Install with: script/plugin install http://svn.viney.net.nz/things/rails/plugins/validates_date Check it''s all working with: rake test:plugins [or rake test_plugins if you are using Rails 1.0] Suggestions, comments, problems are all welcome. -Jonathan. -------------- next part -------------- An HTML attachment was scrubbed... URL: http:...
2006 Apr 27
3
Removing a default value for a foreign key with not null set
Hi all, For various reasons I need to have foreign keys with not null constraints. Eg: create_table :people do |t| t.column :name, :string t.column :household_id, :integer, :null => false end create_table :households do |t| t.column :name, :string end add_foreign_key_constraint :people, :household_id, :households, :id So the people table has a foreign key into
2006 Jul 02
1
acts_as_modified, acts_as_ordered and validates_date_time
A quick note about acts_as_modified, acts_as_ordered and validates_date_time. If you are using any of those plugins you should update them. They''ve all had improvements/bug fixes. Also, acts_as_modified is now being maintained by both Chris Hall and myself. http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered http://svn.viney.net.nz/things/rails/plugins/acts_as_modified http://svn.viney.net.nz/things/rails/plugins/validates_date_time -Jonathan.
2007 Feb 13
11
Routing problem (RTNETLINK answers: Invalid argument) on multiple internet link.
...nat -I PREROUTING -i eth1 -p udp -j MARK --set-mark 1 ip rule from all fwmark 0x1 lookup 4 ip route flush cache I''m using linux 2.6.19.2 + grsecurity patches, every option I could find compiled in, on an up to date gentoo system. Can anyone see what I''m missing? Thanks, Paul Viney ip route show 192.168.2.0/24 dev eth5 proto kernel scope link src 192.168.2.2 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.2 192.168.12.0/24 dev eth3 proto kernel scope link src 192.168.12.1 127.0.0.0/8 dev lo scope link default via 192.168.2.1 dev eth5 ip route show t...
2006 May 16
4
Date/Time Quick Add
I am building a small app that reuires some clever text pattern matching... In my controller, I''ll have a string that I will want to parse out to a datetime and a message, a la Google Calendar Quick Add. Examples: 10/30/2006 7pm message 10-30-96 7:00 pm message 10/30/2006 19:00pm message ... You see what I''m getting at. For a v1.0 release, I CAN publish some standards for
2006 Jul 06
6
Help with overriding / overwriting date values in ActiveRecord to accept Euro Style Date from a Textbox
Hi guys, I''m trying to make an AR model which accepts a string data (from a text input) in euro date format eg <input .... value = "23/01/2006"> ( 23 Jan 2006) Reading the example from RDoc... i tried to overwrite/overload/override the = function to write in the date.. Cant get it to work because .. i dont knoe what format should it accept.. i''ve tried
2006 Jul 05
10
rake migrate RAILS_ENV="production"
On the wiki it says to migrate your DB to production, you can run: rake migrate RAILS_ENV="production" This is taken from: http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations My database is set up with correct MySQL permissions granted and the database.yml is pointing at it. I get no errors when I run it, but equally my production database does not change at all.
2006 Feb 09
1
Alternative take on Selenium in Rails
Hey there, There''s been a bit of work going on with Selenium and Rails recently, so I thought I may as well share what I came up with. Check out my blog post at http://blog.viney.net.nz/articles/2006/02/09/selenium-testing, grab the plugin and give it a whirl (be sure to read the README!). Basically, my approach was to make it possible to write Selenium tests in the same way that unit and functional tests are written. So, you end up with test classes such as: class P...
2006 Jan 25
9
AJAX Search w/database results
Hey, I have a main page that lists a table of Devices, along with a Search box. I''d like to have the Search field pull up any related Devices, and then re-populate the table. I can do this without AJAX, just calling my List action over again, passing the params to search on, but with AJAX I get the error, "Cannot convert nil to string" on this line: @device_pages, @devices =
2006 Apr 24
4
[TIP] Ensure your test data is valid
Recently I wanted to check that my test data was valid. Seems like a reasonable thing to want to do so I thought I''d share the rake task. Add this code to a rake file in lib/tasks and run with rake db:fixtures:validate. It will print out the class, record id and error messages for any model objects that fail validation. Enjoy! -Jonathan. -- namespace :db do namespace :fixtures do
2006 May 23
4
''key not found'' problem with saving model object.
Hello, I have the following structure: model foo has_many :bars:, :dependent => true end model bar belongs_to :foo end In my action, when i try to save foo: def save begin f = foo.new f.a = 5 begin b = bar.new b.a = 10 f.bars << b rescue Exception => exc ... end f.save! <-- This does not happen
2006 Jun 27
4
Not Active Record Model Validation
I have a problem with ruby on rails validation total_book_toy.rhtml ================ <%= text_field ''book1'', ''title1'' %> <%= text_field ''book2'', ''title2'' %> I want to validate these text_field so user can''t insert same title. However, I was stuck how to do it. Or maybe you have another way how to do it.
2006 Jan 12
3
url_for in tests
Hi there, I''ve added an extra bunch of testing features for doing in-browser testing with Selenium, and am having quite a time figuring out how to use url_for with having a controller object present. I''ve tried using ActionController::Base.url_for and ActionView::Helpers::UrlHelper.url_for but haven''t been able to get something that works. What I want to be able
2006 Jul 29
2
Cannot save Date field
Hi, I have a table which has a column called due_date. Datatype of this column in mySQL is "Date". Here is what I extracted from schema.rb > t.column "due_date", :date My fixture tasks.yml file has the following line > due_date: 07/17/2006 My test_task.rb has the following line > assert_equal "07/17/2006", @task.due_date When I run