Commit Graph

154 Commits

Author SHA1 Message Date
Miles Gould
4701bd1b2e Merge branch 'dev' into places2
Conflicts:
	Gemfile.lock
	config/application.rb
	credentials.example
2013-08-31 15:49:30 +01:00
Skud
b73c4db17a Merge branch 'newsletter' of https://github.com/Skud/growstuff into Skud-newsletter
Conflicts:
	db/schema.rb
	spec/models/member_spec.rb
2013-08-29 00:06:44 +10:00
Miles Gould
2c6e2ee2d7 Merge branch 'dev' into places2
Conflicts:
	app/views/members/_popover.html.haml
2013-08-28 13:02:25 +01:00
Skud
16f4e153f2 Made admin/newsletter page with list of subscribers 2013-08-27 21:49:54 +10:00
Skud
ff2a3cf8b2 Set planting owner automatically in controller 2013-08-26 12:23:41 +10:00
Skud
475a402133 Refactor ALL THE THINGS
Refactored tests to take into account that plantings now have owners
directly, not via gardens. Mostly this was just tweaking FactoryGirl
calls to do the right thing.
2013-08-26 12:17:23 +10:00
Miles Gould
7857bfd0df Merge branch 'dev' into places2
Fix up broken indentation on navbar.
Conflicts:
	app/views/layouts/_header.html.haml
2013-08-23 13:29:37 +01:00
Skud
8f7becfa78 added a basic crop wrangler homepage 2013-08-21 21:24:22 +10:00
Skud
57fe663675 Merge branch 'dev' of https://github.com/Growstuff/growstuff into places2
Conflicts:
	app/controllers/members_controller.rb
	app/models/member.rb
	app/views/members/_popover.html.haml
	spec/models/member_spec.rb
2013-08-21 17:35:31 +10:00
Skud
68cdb2b50c moved model access from controller to views to help caching 2013-08-19 20:35:00 +10:00
Skud
7d56cf57a1 got tests passing again, post homepage redesign 2013-08-09 10:18:21 +10:00
Skud
a3b7822268 Review and cleanup of JSON API
Removed JSON from classes that shouldn't have it.
(PT: https://www.pivotaltracker.com/story/show/54570954)

Also found a couple of controllers with broken authorization (i.e. not
checking CanCan). Incidentally, this also fixes the comment form bug at
https://www.pivotaltracker.com/story/show/54328716.
2013-08-05 13:29:07 +10:00
Joseph Caudle
a43d3a1ce7 Add places pages
This commit builds off of @Skud's spike on locations and largely takes
off from the `nearby_members` feature which previously existed on
members.

One thing to note is that we needed to add a search route and action to
`PlacesController` to account for requests of new places as they could
not be redirected to properly from within `PlacesController#show`.

[Story #53848631]
2013-08-02 00:15:51 -04:00
Skud
7c6d7ba3a9 rearranged routing to avoid ?owner_id=99 2013-07-26 15:29:30 +10:00
Skud
1ac5683557 display plantings in table form, like seeds 2013-07-26 14:22:49 +10:00
Skud
e17f5d6599 Merge pull request #255 from Skud/photo_set
Photo set
2013-07-23 03:47:36 -07:00
Miles Gould
96e66cd9bb New photo: show an h2 with the name of the current set
Also don't show a sets dropdown if the user has no sets.
2013-07-18 14:45:36 +01:00
Miles Gould
2b863cd62e Fix problem adding photos from photosets.
When we fetched photos from a photoset, the response object didn't
respond to to_a, breaking our controller code. This turned out to be due
to weirdness in FlickRaw's API:
https://github.com/hanklords/flickraw/issues/58
2013-07-18 14:16:22 +01:00
Miles Gould
c977709235 Stop controller tests from connecting to Flickr
... by stubbing out Member#flickr_sets in a photo_controller test. I
looked at the flickrmocks gem, but it doesn't seem very helpful - it
still requires you to connect to Flickr.
2013-07-18 13:18:01 +01:00
Skud
491e97c997 connected seeds into other parts of the site 2013-07-15 23:29:14 +10:00
Skud
91ea5146ac rails g scaffold seed... 2013-07-15 22:53:29 +10:00
Skud
923f01cd72 cleaned up boring controller tests 2013-07-08 13:24:26 +10:00
Skud
1ff2211c0f removed boring tests from controllers
the tests generated by 'rails g scaffold...' are boring and brittle.
they don't actually test anything other than the rails framework, and
they were causing us all kinds of trouble. we've started to blow them
away (and raised a PT chore to remove them from other controllers in due
course).
2013-07-08 13:09:37 +10:00
Skud
ec80b01c7a cleaning up tests on postgres
- still trying to make sure we explicitly use a real member, not just
assume there's one with id = 1

- also it looks like the tests for post activity are passing for obscure
reasons on sqlite when they shouldn't be. this is a known bug
(https://www.pivotaltracker.com/story/show/51280861) apparently
invisible to us under sqlite.
2013-07-08 12:18:51 +10:00
Skud
0508837303 Can't assume we have a member with id = 1
this works on sqlite but not on postgres (which we now test on, on
travis)
2013-07-08 12:00:45 +10:00
Miles Gould
0a8aaf0ee6 Create free account type if it doesn't exist; fix tests. 2013-06-26 10:55:19 +01:00
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