forked from Ada-C6/FarMarRails
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from BrandiPhillips/playing_with_dropdowns
Added dropdowns, DRYed forms, and modified login
- Loading branch information
Showing
15 changed files
with
5,234 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
class UsersController < ApplicationController | ||
def index | ||
@market = Market.new | ||
@markets = Market.all | ||
end | ||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<%= form_for @market, method: @method, url: @path do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.label :address %> | ||
<%= f.text_field :address %> | ||
<%= f.label :city %> | ||
<%= f.text_field :city %> | ||
<%= f.label :county %> | ||
<%= f.text_field :county %> | ||
<%= f.label :state %> | ||
<%= f.text_field :state %> | ||
<%= f.label :zip %> | ||
<%= f.text_field :zip %> | ||
<%= f.submit %> | ||
<% end %> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,9 @@ | ||
<h1>Edit your market profile!</h1> | ||
|
||
<p>Use the form below to edit your profile. When you are done, press submit!</p> | ||
|
||
<section> | ||
<%= form_for @market, method: 'put', url: markets_update_path(@market.id) do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.label :address %> | ||
<%= f.text_field :address %> | ||
<%= f.label :city %> | ||
<%= f.text_field :city %> | ||
<%= f.label :county %> | ||
<%= f.text_field :county %> | ||
<%= f.label :state %> | ||
<%= f.text_field :state %> | ||
<%= f.label :zip %> | ||
<%= f.text_field :zip %> | ||
|
||
<%= f.submit %> | ||
<% end %> | ||
<%= render partial: "marketform" %> | ||
|
||
</section> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%= form_for @product, method: @method, url: @path do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.submit %> | ||
<% end %> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<h1>Welcome to FarMar!</h1> | ||
<p>Please create a new session by entering your information:</p> | ||
<h1>Welcome, <%= @type.capitalize %>!</h1> | ||
<p>Please create a new session by identifying yourself using the dropdown:</p> | ||
|
||
<%= form_for(:session, url: sessions_create_path) do |f| %> | ||
<%= form_for(:session, url: sessions_create_path(:user_type => @type)) do |f| %> | ||
<%= f.label :type %> | ||
<%= f.text_field :type %> | ||
<%= f.label :id %> | ||
<%= f.text_field :id %> | ||
<% if @type == 'market' %> | ||
<%= f.collection_select :id, Market.all, :id, :name %> | ||
<% elsif @type == 'vendor' %> | ||
<%= f.collection_select :id, Vendor.all, :id, :name %> | ||
<% end %> | ||
<%= f.submit "Log in" %> | ||
<% end %> |
Binary file not shown.
Oops, something went wrong.