Commit Graph

128 Commits

Author SHA1 Message Date
Skud
89a5a777e6 Merge branch 'dev' into payments-new
Conflicts:
	.gitignore
	app/models/ability.rb
	app/models/member.rb
	db/schema.rb
2013-06-04 19:42:00 +10:00
Skud
6ecbf749eb Avoid duplicate photos on plantings (or vice versa)
Strictly speaking this doesn't prevent you adding them if you really
try, but the validation for that was beyond what I could figure out (the
docs don't help, and all SO/blog posts are outdated and didn't
work).

However, if you do somehow manage to add dups, you will never see them
again thanks to the :uniq => true in the model.  That's good enough for
me.
2013-06-01 12:07:17 +10:00
Skud
c63eb64565 photo and planting owners must match 2013-05-31 23:35:07 +10:00
Miles Gould
e072883bb9 Connect plantings to photos. 2013-05-31 13:10:54 +01:00
Miles Gould
b2916e28f3 Don't recreate photos, but update metadata. 2013-05-31 11:48:24 +01:00
Miles Gould
20eeec43ca Merge branch 'dev' into photos
Conflicts:
	db/schema.rb
2013-05-31 11:24:19 +01:00
Skud
08c3ec7dec Vendored the activemerchant gem to help with testing
We needed a bogus paypal gateway as per
http://infotrope.net/2013/05/31/testing-paypal-express-with-activemerchants-bogusgateway-and-how-to-make-it-work/

Tests now pass usefully.
2013-05-31 12:15:23 +10:00
Skud
cbca8c19a5 added admin controller and index view 2013-05-31 10:23:06 +10:00
Skud
7a1eaeffee added admin controller and index view 2013-05-29 14:37:42 +10:00
Skud
dd556d8638 Merge branch 'dev' into payments-new 2013-05-28 14:07:53 +10:00
Skud
e17dcf8671 Reordered comments: they are now DESC by default
Added scope "post_order" to order them ASC for display on post page.
Also tweaked post/comment views a bit.
2013-05-24 14:36:58 +10:00
Skud
425a2b03fd Added RSS feed for comments on a single post 2013-05-24 13:43:06 +10:00
Skud
0d3588535e Added RSS feed for all comments 2013-05-24 13:29:17 +10:00
Skud
57f8575ab9 removed unwanted @recent_comments, replaced w pagination 2013-05-24 12:54:57 +10:00
Craig Read
9437e65763 Replaced plantings RSS with HAML
Removed the redundant @recent_plantings variable and added pagination
2013-05-24 12:43:51 +10:00
Craig Read
d563f0ceae Converting crops RSS to HAML
Added spec for crops RSS

Removed redundant @new_crops instance variable (not needed as we now
have pagination).
2013-05-24 12:22:41 +10:00
Craig Read
9c2fed461d Removed redundant @recent_posts instance variable
Not required, as we have pagination by default
2013-05-24 12:05:47 +10:00
Skud
98beebd697 fixed bug with non-int prices
now if you choose to pay 33.33 it doesn't round to 33.00
also removed PUT and DELETE actions from order items
(we don't want them for now, can reinstate later if/when we do.)
2013-05-22 11:51:38 +10:00
Skud
257db239fd remove unneeded edit/new actions from order_item 2013-05-22 11:25:48 +10:00
Skud
89069b4bd2 don't allow multiple order items per order 2013-05-22 11:22:10 +10:00
Skud
3aaf344951 rename account details to just account 2013-05-18 10:50:36 +10:00
Skud
871229ed2b account details: there can only be one
Set up a validation to make sure there's only ever one account_detail
attached to a member.  This broke a bunch of tests, and means you
basically can't use a factory to generate account details.  Instead, to
test account details, create a member and then look at their account
details.
2013-05-18 09:33:26 +10:00
Skud
c595b2181d added account_types, fixed a bunch of tests 2013-05-17 16:07:46 +10:00
Skud
669b4234f9 Marked failing order_item test as pending
These are failing because we set CanCan to not allow these actions.  We
might want to delete them entirely, actually, but I'm not quite sure
yet, so for now I'm just marking as pending.
2013-05-17 15:36:02 +10:00
Skud
df5ee9cf4b give each member an account_detail entry 2013-05-17 15:28:22 +10:00
Skud
0157229936 added account_details table, set up abilities
also tweaked some order/order_item related abilities
2013-05-17 13:05:46 +10:00
Skud
7551b7b0d4 added order completion (very basic for now) 2013-05-17 11:28:04 +10:00
Skud
0e6e2b975d added ability to delete current order 2013-05-17 10:53:16 +10:00
Skud
4dca148cbf only let them order one thing (for now) 2013-05-16 20:58:43 +10:00
Skud
c13ae183ec order things direct from the /shop page 2013-05-16 00:24:51 +10:00
Skud
3e1202cd62 prettify display of orders 2013-05-15 15:52:10 +10:00
Skud
8a35f3401b removed unwanted methods from orders 2013-05-15 14:33:40 +10:00
Skud
7d74203735 rails g scaffold OrderItem... 2013-05-15 13:47:16 +10:00
Skud
1d54a63f5d Merge branch 'dev' into payments-new 2013-05-15 11:37:16 +10:00
Skud
c7efe512aa Merge pull request #193 from pozorvlak/replylink
Replylink
2013-05-13 17:45:39 -07:00
pozorvlak
42b5f387d2 Merge pull request #199 from Skud/cropwrangling
Make life easier for crop wranglers
2013-05-09 07:04:10 -07:00
Miles Gould
746386731a Add metadata to photos and display it on photos/show. 2013-05-09 14:51:38 +01:00
Miles Gould
6fa94e321a Save photos. 2013-05-09 13:12:54 +01:00
Lilly
14021a4fae Redirect to Garden after deleting planting 2013-05-09 13:39:31 +10:00
Skud
536cf21e3e make it easier to wrangle scientific names 2013-05-09 11:39:22 +10:00
Miles Gould
ae785c6f4b Move flickr code into Member model. 2013-05-08 16:44:21 +01:00
Miles Gould
ce3de63a46 Factor out flickr controller code, for easier stubbing. 2013-05-08 14:59:08 +01:00
Skud
acf164990d tell user to connect to flickr 2013-05-08 21:17:03 +10:00
Skud
ffb5d6e7f8 only members can manage photos 2013-05-08 20:54:48 +10:00
Skud
5ae5e0f959 rails g scaffold Photo... 2013-05-08 20:52:35 +10:00
Skud
5c96bf1541 added basic index page for shop 2013-05-08 15:05:38 +10:00
Skud
245115fd7f rails g scaffold Order... 2013-05-07 21:14:08 +10:00
Skud
af38f8574e rails g scaffold Product... 2013-05-07 21:13:23 +10:00
Miles Gould
6ab098c015 Move reply_link into a helper.
- keep @reply_link as an instance var, for testability
 - always use fully-qualified URLs, to reduce code duplication
2013-05-01 23:45:07 +01:00
Skud
45935c6e38 connect to flickr 2013-04-30 23:01:18 +10:00