Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

うーん jquery と helperの組み合わせはみんなどう書いてるんだろう、、、 #8

Closed
wants to merge 3 commits into from

Conversation

ukitazume
Copy link

  • いいね と イイねした人のiconをいじってみた
  • ajaxで両方共動くようにしたけれど、、、
  • unいいね も作ってみた

@ukitazume ukitazume changed the title うーん jquery と helperの組み合わせはしんどい。。 うーん jquery と helperの組み合わせはみんなどう書いてるんだろう、、、 May 20, 2014
@@ -0,0 +1,25 @@
class Like < ActiveRecord::Base
default_scope -> {where(:live => true)}
Copy link
Member

Choose a reason for hiding this comment

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

deletedの方が多いかも?

@masa-iwasaki
Copy link

http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions

Prefer class << self over self.method for class methods.
Use MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.

こんな風に出てます。

if (msg.action === 'like') {
$(ev.target).parent().parent().children().toggleClass("hidden-button");
$(ev.target).parent().addClass("hidden-button");
$(".current-user-icon.idea-"+msg.idea_id).toggleClass("hidden-icon");
Copy link
Author

Choose a reason for hiding this comment

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

id で指定しちゃったほうがよい

@ukitazume ukitazume closed this Jun 6, 2017
@ukitazume ukitazume reopened this Jun 6, 2017
@ukitazume ukitazume closed this Jun 6, 2017
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.

4 participants