Homebrew Formula patching old ImageMagick release 6.7.7-6
$ brew install https://gist.githubusercontent.com/eileencodes/281a8a9c7e0598fc9da9a7d4bf6d1a89/raw/8880be85b339c8206197e59b543c16f2ac1e4839/imagemagick.rb
testing | |
editing the gist? |
index do | |
column :title, :sortable => :title do |post| | |
link_to post.title, [:edit_admin, post] | |
end | |
column :categories do |post| | |
table_for post.categories.order('title ASC') do | |
column do |category| | |
link_to category.title, [ :admin, category ] | |
end |
if params[:sweet_honey].present? | |
format.html { render :partial => "emails/email_bot", :layout => false } | |
elsif @email.save | |
... | |
else | |
... | |
end |
<div class="field sweet_honey_for_bots"> | |
<%= label_tag :sweet_honey, "This is a honeypot, if you see this you're CSS is turned off or you're a bot. If you're not a bot don't fill it in." %> | |
<%= text_field_tag :sweet_honey %> | |
</div> |
ActiveAdmin.register AdminUser do | |
index do | |
column :id | |
column :email | |
column :full_name do |field| | |
"#{field.first_name} #{field.last_name}" | |
end | |
column :last_sign_in_at | |
default_actions |
append config/deploy.rb | |
create config/initializers/airbrake.rb | |
run rake airbrake:test --trace from "." | |
** Invoke airbrake:test (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Execute airbrake:test | |
Configuration: |
<%= | |
link_to_if(@current_user.nil?, "Login", { :controller => "sessions", :action => "new" }) do | |
link_to(@current_user.login, { :controller => "accounts", :action => "show", :id => @current_user }) | |
end | |
%> |
def edit | |
@user = User.find_by_reset_pass_token(params[:id]) | |
if @user.nil? | |
redirect_to '/login', :alert => 'Password reset does not exist.' | |
elsif @user.reset_pass_expiration < 2.hours.ago | |
redirect_to '/login ', :alert => "Password reset has expired." | |
end | |
end | |