This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag 'topics/edit_all' do %> | |
<% @topics.each do |topic| %> | |
<%= fields_for "topics[]", topic do |f| %> | |
<%= f.check_box :enabled %> | |
<%= f.label topic["name"] %><br /> | |
<% end %> | |
<% end %> | |
<%= submit_tag %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Recommendation Engine in Ruby | |
# Visit: http://otobrglez.opalab.com | |
# Author: Oto Brglez <[email protected]> | |
class Book < Struct.new(:title) | |
def words | |
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort | |
end |