I hereby claim:
- I am jeromegn on github.
- I am jerome (https://keybase.io/jerome) on keybase.
- I have a public key whose fingerprint is 0638 8CB6 C529 1977 7911 A36A FAF6 2F81 F60B 40B8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Then /^I should be logged in$/ do | |
session = UserSession.find | |
return true if session | |
end | |
Given /^I am not logged in$/ do | |
session = UserSession.find | |
return true if !session | |
end |
<%= form.label :name %><br /> | |
<%= form.text_field :name %><br /> | |
<br /> | |
<%= form.label :website %><br /> | |
<%= form.text_field :website %><br /> | |
<br /> | |
<%= form.label :bio %><br /> | |
<%= form.text_area :bio %><br /> | |
<br /> | |
<%= form.label :email %><br /> |
jgn@jgn ~/sites/investapp/investapp.com[master*]$ git status | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 3 commits. | |
# | |
# Changed but not updated: | |
# (use "git add/rm <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# | |
# modified: README.textile | |
# modified: app/controllers/application.rb |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe Participation::ArticlesController do | |
before(:each) do | |
activate_authlogic | |
@current_user = Factory.create(:user) | |
@article = Factory.build(:article) | |
@new_article = Factory.stub(:article) | |
end |
class Participation::ArticlesController < Participation::ApplicationController | |
def new | |
@article || @article = Article.new | |
end | |
def create | |
@article = Article.new(params[:article]) | |
respond_to do |format| | |
if @article.save |
<div id="login_fields"> | |
<h3> | |
Login | |
</h3> | |
<form action="/login" method="post" accept-charset="utf-8" id="login_form" name="login_form"> | |
<input type="hidden" name="site_id" value="58519132" id="site_id"> <input type="hidden" name="_method" value="PUT"> | |
<div class="formRow"> | |
<label>Login: <input type="text" name="login" value="" id="login"></label> | |
</div> | |
<div class="formRow"> |
Structure | |
========= | |
Form | |
Fields | |
Elements | |
Label (optional but most common) | |
Element | |
Label (optional in case of a a checkbox or radio) | |
Input Checkbox/Radio |
<%= form_for(@user, :action => "/users/#{@user.login}") %> | |
<%= hidden_field :value => "DELETE", :name => "_method" %> | |
<div class="actions"> | |
<input type="image" name="submit" src="/images/btn-delete_user.png" id="deleteUser" /> | |
or <%= link_to "cancel", resource(:users) %> | |
</div> | |
<% end =%> |