More robot parts

More parts have arrived from Robotshop.ca!!

I picked up some starter sets of resistors (2000 pcs) and capacitors (100 electrolytic and 100 ceramic) along with some tri-color LEDs, piezo (bump) sensors and light sensors.

I also got a DFRobot line sensor and a LiPO battery.

Now to find out how it all works!

Adding Remarkable

To add Remarkable to Rails 3 add

gem 'rspec'
gem 'rspec-rails'
gem 'remarkable_activerecord', "4.0.0.alpha4"

to your Gemfile and run 

bundle install

then

require 'rspec/rails'
require 'remarkable/active_record'

to your spec/spec_helper.rb file.

 

More testing with Paperclip, rspec, factory girl and associations

Testing associations with Rspec is not as difficult as it first appears, although when combining with Paperclip uploads it adds some challenges.

In this case we have an ingredient that belongs to a foodgroup and the ingredient has an attached paperclip image.

Controller Tests

Add foodgroup_id = 1 to the valid_attributes definition in the ingredients_controller_spec.rb

Drupal 7 Banner Ad block Hack

Ok, so how do you add a simple single banner style ad block in Drupal 7. Here's my version

Module Requirements (these are assumed to be already configured):

  • Views
  • Insert
  • Wysiwyg
  • Colorbox (optional)

Directions:

Choices

Life comes down to choices. We look at our needs and our wants and then weigh them against the potential outcomes of the choices we have to make. We weigh being responsible vs being risky and the potential for a better life. Then we choose, and either accept or regret the outcome.

Syndicate content