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
github.com/norman/friendly_id | |
slug:string:uniq | |
model/post_controller | |
extend FriendlyId | |
friendly_id :name, use: :slugged | |
def should_generate_new_friendly_id? | |
title_changed? | |
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
app/views/layouts/application.html.erb ye | |
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script> | |
app/assets/javascripts/application.js | |
document.addEventListener("turbolinks:load", function() { | |
tinymce.remove(); | |
tinymce.init({ selector:'textarea' }); | |
}); |
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
gem 'inherited_resources', github: 'activeadmin/inherited_resources' | |
gem 'activeadmin', github: 'activeadmin' | |
rails g active_admin:install | |
rails g active_admin:resource Post |
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
rails g scaffold company name:string bio:text | |
rails g scaffold person name:string lastname:string phone:string facebook_url:string twitter_url:string | |
rails g scaffold season start_date:datetime end_date:datetime availablity:boolean | |
rails g model scope name:string description:text | |
rails g scaffold worker name:string lastname:string confirmation:boolean description:text company:references | |
rails g scaffold announcament city:string req_count:integer body:text company:references worker:references | |
rails g scaffold appointment body:text season:references member:references announcament:references | |
rails g model workerpool status:boolean company:references worker:references | |
rails g migration CreateJoinTableCompanyScope Company Scope | |
rails g migration CreateJoinTableAnnouncamentScope Announcament Scope |
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
class RegistrationsController < Devise::RegistrationsController | |
private | |
def sign_up_params | |
params.require(:user).permit(:name, :email, :password, :password_confirmation) | |
end | |
def account_update_params | |
params.require(:user).permit(:name, :email, :password, :password_confirmation, :current_password) |
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
created_at.strftime('%B %d, %Y %H:%M') == Agu 10, 2016 |
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
kullanma=> <%= yield( :okaassaas )%> | |
uretme=> <%= provide( :okaassaas, "naberladunya" ) %> |
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
rails g migration RemoveFieldNameFromSeason announcament:references | |
rails g migration RemoveFieldNameFromSeason name |
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
rails new app_name -d postgresql | |
sudo gem install pg | |
bundle install | |
sudo gem install heroku | |
bundle install | |
heroku version | |
git init , git add . , git commit -m "naber" | |
heroku login | |
heroku create | |
git push heroku master |
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
controller | |
1=> before_filter :getArtist | |
2=> private | |
def getArtist | |
@artists = Artist.all | |
end | |
end | |
html.erb |
OlderNewer