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
Routing Error | |
No route matches {:action=>"new", :controller=>"messages"} | |
Try running rake routes for more information on available routes. |
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
MyAppName::Application.routes.draw do | |
# ... | |
namespace :admin do | |
resources :sales do | |
resources :consignment_items do | |
collection { post :search_items, to: 'sales#search_consignment_items' } | |
end | |
end | |
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
= semantic_form_for [:admin, @sale], html: { :class => "filter_form" } do |f| | |
= select "sale_", "id", Sale.all.collect{ |s| [s.title + " " + s.start_date.to_s, s.id] }, {include_blank: true}, class: "sale_dropdown" | |
= f.inputs "Sale Information" do | |
= f.input :sales_merchandiser_id, :as => :hidden, :value => proc{current_user.id} | |
= f.input :category_id, as: :hidden | |
= f.input :title | |
= f.input :featured_image, as: :file, label: "Sale Image" | |
= content_tag :li, class: "field_toggle" do | |
%span.show_overwrite_fields Overwrite Versions | |
%span.hide_overwrite_fields Cancel Override |
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
<!DOCTYPE HTML> | |
<html lang="ru-RU"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
body, .nested { | |
background: blue; | |
} | |
.container, .nested { |
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
class User < ActiveRecord::Base | |
attr_accessible :email, :password, :password_confirmation, :first_name, :last_name, :zipcode | |
attr_accessor :password | |
before_save :encrypt_password | |
validates_confirmation_of :password | |
validates_presence_of :password, :on => :create | |
validates_presence_of :email | |
validates_uniqueness_of :email |
NewerOlder