Skip to content

Adding groups controller - #34

Open
foFox wants to merge 28 commits into
developmentfrom
adding_groups_controller
Open

foFox wants to merge 28 commits into
developmentfrom
adding_groups_controller

Conversation

@foFox

@foFox foFox commented Jul 5, 2013

Copy link
Copy Markdown
Member

I added basic REST methods do groups controller

Comment thread config/routes.rb Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here i would suggest nested resources

resources :groups do
  resources :members, :controller => 'group_members'
end

so the GroupMembersController will

  • show all the members of the group on action index
  • show one member based on GroupMember model id on action show
  • create a new GroupMember model on action create
  • delete a GroupMember model on action delete

Same with the pending members

What do you think?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this a bit of an overkill to have a separate controller ? I would just stick in in there.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I gave it a thought, and you might be right, i'll do it that way

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i think its the better way to do it. I think there is something on railscasts too

@tsov

tsov commented Jul 6, 2013

Copy link
Copy Markdown
Contributor

Sweet! Is this updated? Sorry for all those stupid comments of mine

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yo! I like this a lot !

The let method is definitely something we should use more often!

@tsov tsov closed this Jul 8, 2013
@foFox foFox reopened this Jul 8, 2013
Comment thread app/models/group.rb Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave the return statements out, remember last line will automatically be returned in ruby

foFox added 4 commits July 20, 2013 23:33
…-api into adding_groups_controller

Conflicts:
	Gemfile
	README.rdoc
	app/controllers/application_controller.rb

finished group controller tests, added spec files for pending & members

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is deprecated, we need to use: let(:token) { double :accessible? => true, :resource_owner_id => owner_id } instead

I think thats why jenkins is failing too

@tsov

tsov commented Jul 25, 2013

Copy link
Copy Markdown
Contributor

Yo, how far is this?

@foFox

foFox commented Jul 29, 2013

Copy link
Copy Markdown
Member Author

I think the test are bit shit, I think I got lost on how to test this, as there's so many possibilities, if you want we can remove then and start again.

@tsov

tsov commented Jul 29, 2013

Copy link
Copy Markdown
Contributor

There are not shit, but very extensive.. Thats what happens if you do everything at once :D 28 commits, >2000 lines added. The tests seems more like regression tests, and look nothing like the tests we have.
I guess one can get very into testing everything, but i am not sure what to do here

@tsov

tsov commented Jul 29, 2013

Copy link
Copy Markdown
Contributor

Otherwise, how far are you on this?

@foFox

foFox commented Jul 29, 2013

Copy link
Copy Markdown
Member Author

We can scrap them if you want :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants