2015-03-22から1日間の記事一覧

Sorceryを使って新規登録機能をつける(1)

<a href="https://github.com/NoamB/sorcery/wiki" data-mce-href="https://github.com/NoamB/sorcery/wiki">NoamB/sorcery</a>github.com 参考: Ruby on Rails実践講座 - Twitterの簡易クローンを開発するcyllabus.jp 1)bundle install gem 'spring' gem 'pry-rails' gem 'better_errors' gem 'haml-rails' gem 'bootstrap-sass' gem 'font-a…

Git, SourceTreeでpushする

git init git add . git commit -m "first commit" git remote add origin git@github.com:HOkn/ibhiroba.git git push -u origin master <branches> git branch develop git checkout develop(結果:Switched to branch 'develop') <pushする> git push origin master git pus</pushする></branches>…

When assigning attributes, you must pass a hash as an argument

などのエラーの時:edit, update 関数を分ける。 def edit @question = Question.find(params[:question_id]) @answer = @question.answers.find(params[:id]) end def update @question = Question.find(params[:question_id]) @answer = @question.answers…

デフォルトでhaml, sassファイルを作る方法

Application.rb: module HamlDemo class Application < Rails::Application config.generators do |g| g.template_engine :haml end config.sass.preferred_syntax = :sass