- ROR Lab.
- 운영진 : 김대권/최효성
- Michael Hartl의
Ruby on Rails Tutorial을 한국어로 공동번역한다.
| # Gemfile | |
| gem 'kramdown' |
| <%%= simple_form_for(@<%= singular_table_name %>) do |f| %> | |
| <%%= f.error_notification %> | |
| <%- attributes.each do |attribute| -%> | |
| <div class="form-group"> | |
| <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>, input_html: { class: 'form-control' } %> | |
| </div> | |
| <%- end -%> | |
| <div class="form-actions"> |
| module ApplicationHelper | |
| def flash_class(level) | |
| case level | |
| when :notice then "info" | |
| when :success then "success" | |
| when :error then "danger" | |
| when :alert then "warning" | |
| # else "info" | |
| end |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Blog</title> | |
| <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> | |
| <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> | |
| <%= csrf_meta_tags %> | |
| </head> | |
| <body> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Blog, ROR Lab. Lecture</title> | |
| <%= stylesheet_link_tag "application", :media => "all" %> | |
| <%= javascript_include_tag "application" %> | |
| <%= csrf_meta_tags %> | |
| </head> | |
| <body> |
| body { | |
| background:#336699 !important; | |
| } | |
| #header { | |
| margin:0 auto; | |
| width:80%; | |
| text-align: right; | |
| h1 { | |
| margin-bottom:5px; |
| function __git_dirty { | |
| git diff --quiet HEAD &>/dev/null | |
| [ $? == 1 ] && echo "!" | |
| } | |
| function __git_branch { | |
| __git_ps1 "%s" | |
| } | |
| function __my_rvm_ruby_version { |