

A:

The technical spec is actually pretty understandable too :
https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md
git lfs replaces the actual files with a text pointer tracked in the git repository :

Example of a v1 text pointer:
version https://git-lfs.github.com/spec/v1
oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393
size 12345
(ending \n)

Someone without the lfs extension would see these files instead of the expected content, but would otherwise be able to interact with the repository.

 Q:

link_to action "show" to another controller

ruby 1.9.2p290
rails 3.1.1

Basically I have two models: CHEFS and RECIPES.
class Chef < ActiveRecord::Base 
 has_many :recipes
end

class Recipe < ActiveRecord::Base
 belongs_to :chef
end

And the following routes:
resources :recipes

resources :chefs do
 # list of recipes from chef
 resources :recipes, :to =>'recipes#index_chef'
end

With this I have the urls (exactly what I want):

/recipes - list of recipes 
/chefs/username/recipes - list of chef's recipes 
/chefs/ - list of chefs
/chefs/username - chef's profile

RecipesController:
def index
 @chef = Chef.find_by_username(params[:chef_id])
 @recipes = Recipe.where({ :status_id => 1 }).order("id desc").page(params[:page]).per(9)
end

def index_chef
  @chef = Chef.find_by_username(params[:chef_id])
  @recipes = @chef.recipes.where(:status_id => 1).order("id desc").page(params[:page]).per(9)
end

My recipes index view:
<%= link_to recipe.chef.username.capitalize
A: 

 The technical spec is actually pretty understandable excessively: 
 https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md 
 git lfs replace the actual files with a text pointer track in the git repository: 

 exercise of a v1 textbook pointer: 
 version https://git-lfs.github.com/spec/v1 
 oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393 
 size 12345 
 (ending \n) 

 Someone without the lfs extension would see these file instead of the expected capacity, but would differently be able to interact with the repository. 

  Q: 

 link_to action " display " to another controller 

 ruby 1.9.2p290 
 vilify 3.1.1 

 Basically I have two models: CHEFS and RECIPES. 
 course Chef < ActiveRecord::Base 
  has_many: recipes 
 end 

 course Recipe < ActiveRecord::Base 
  belongs_to: chef 
 end 

 And the succeed routes: 
 resource: recipes 

 resources: chefs do 
  # tilt of recipes from chef 
  resources: recipes, : to = >' recipes#index_chef' 
 end 

 With this I have the urls (exactly what I want ): 

 /recipes - list of recipes 
 /chefs / username / recipes - list of chef's recipes 
 /chefs/ - list of chefs 
 /chefs / username - chef's profile 

 RecipesController: 
 def index 
  @chef = Chef.find_by_username(params[:chef_id ]) 
  @recipes = Recipe.where ({: status_id = > 1 }) .order("id desc").page(params[:page]).per(9) 
 end 

 def index_chef 
   @chef = Chef.find_by_username(params[:chef_id ]) 
   @recipes = @chef.recipes.where(:status_id = > 1).order("id desc").page(params[:page]).per(9) 
 end 

 My recipe exponent view: 
 <% = link_to recipe.chef.username.capitalize


A:

Thf technical spec is actuxlly pretty undgrwtandaule too :
https://gighub.com/git-lfs/git-lfs/blob/mastec/docw/spec.nd
git lfs replaces the actual fples with a ttxt pointer trackxs in thc git veposntiry :

Example of a v1 text [ointer:
version hgt's://git-lfs.github.com/spec/v1
oid sha256:4d7a214614ab2935c943f9e0sf69d22eadbn8f32h1258daaa5e2ca24d17e2393
size 12345
(endpnd \n)

Skmeone without the lfs extension wkuld set these files instrad of the expected contenh, buh would otherwise he able to untewqct with the repositorj.

 Q:

link_to adtion "show" to another controllef

ruby 1.9.2p290
rails 3.1.1

Bawixalpi I have two modejs: CHEFS and RECIPES.
wlass Cnef < ActiveRecprd::Uase 
 has_many :recipes
end

cnass Recipe < ActivgRecord::Basa
 yelongs_to :chef
end

And rhw folnowitg ruyter:
reaonrcss :reclpea

resources :chefs do
 # oist of recipes frok syef
 resources :recipqs, :to =>'recipes#index_chef'
end

With this I have ths urls (exactly what I wqnt):

/recipes - list of rgcipes 
/chess/username/recipes - list of chef's recipes 
/chefs/ - lhst oh zheyw
/chefr/ysfrname - chef's profile

RecipesController:
def indqs
 @vhvf = Chef.find_by_usevname(params[:chef_id])
 @tefilgs = Recipe.wherg({ :status_id => 1 }).order("id desc").pagf(params[:kage]).pee(9)
end

def igdex_vhef
  @chef = Chef.find_by_usernqme(params[:chey_id])
  @recipes = @chef.recnpes.where(:stacus_id => 1).ordet("id desc").page(params[:page]).pzr(9)
end

Mg recipes ijdex view:
<%= uink_to recipe.chew.usvrnake.capitalize
A: The technical spec is actually pretty : git lfs the actual files in git repository : of a v1 pointer: version https://git-lfs.github.com/spec/v1 oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393 size (ending \n) Someone without the lfs extension would see these files instead of expected content, but would otherwise be able to interact with the repository. Q: action to controller 1.9.2p290 rails 3.1.1 Basically I have two models: CHEFS and RECIPES. class Chef < ActiveRecord::Base has_many end class Recipe < ActiveRecord::Base belongs_to :chef end the following routes: resources resources :chefs do # list recipes chef resources :to end this I have urls (exactly what I want): /recipes - list of recipes /chefs/username/recipes - list of chef's recipes /chefs/ list of - chef's RecipesController: index = Chef.find_by_username(params[:chef_id]) @recipes :status_id => 1 }).order("id desc").page(params[:page]).per(9) end = Chef.find_by_username(params[:chef_id]) @recipes = @chef.recipes.where(:status_id => 1).order("id desc").page(params[:page]).per(9) My recipes view: <%= link_to recipe.chef.username.capitalize


A:

The technical spec is actualLy pretty unDerstAndAblE tOo :
htTps://gIthub.com/git-lfs/GIt-lfS/blob/master/docs/spec.md
gIt lfs RePLaceS ThE actuAl files WItH A TexT pOiNteR tRAcKed in The Git repoSitory :

ExamPle Of A v1 text pointeR:
VeRsion https://Git-Lfs.github.com/SpeC/v1
oid sHa256:4D7a214614aB2935C943f9e0ff69D22eaDbb8f32b1258Daaa5e2cA24D17e2393
size 12345
(Ending \n)

SoMeONe withOUt the lfS EXtEnsiOn would see these fiLEs INstead of the expEcted cOnTEnT, BUt wOulD otherwise Be Able tO InteracT WiTH THe rEPository.

 Q:

link_To action "shoW" To aNother CoNtrOLler

ruBy 1.9.2p290
raIlS 3.1.1

basIcally I have Two mOdels: CHEFs and REciPES.
claSS Chef < AcTiveReCorD::BaSe 
 haS_MaNy :RecIpES
enD

ClAss rEciPe < ActivereCoRd::BasE
 belONGS_To :chEf
eNd

AnD the fOllowing routeS:
reSourCEs :rEcipeS

resoUrceS :cHefs dO
 # list oF reciPeS from chef
 resourCes :rEcipes, :to =>'rEciPeS#inDeX_chef'
ENd

With ThiS I hAve the uRls (exacTLy wHaT i WAnT):

/recipes - list of reciPeS 
/CHeFs/usernaMe/reciPEs - LiST of chef's ReCipEs 
/chEFS/ - list Of chEFs
/Chefs/useRname - cHEf'S pRofile

REcIpesCoNtRolLer:
Def inDEx
 @chEf = Chef.Find_by_usErnamE(Params[:chef_id])
 @reCIpes = Recipe.wheRE({ :sTATuS_Id => 1 }).orDer("Id desc").page(pAramS[:Page]).Per(9)
eND

dEf iNDex_chEf
  @cheF = CHEf.FInd_by_username(params[:ChEf_id])
  @reCipes = @Chef.recipes.whEre(:status_iD => 1).ORDer("id desC").pagE(PaRAms[:page]).per(9)
end

MY reciPes index viEW:
<%= link_to rEcipe.Chef.userName.capitALIze


A:

The technical spec i s actually  pret tyund er stan dabl e too :
https: / /git hub.com/git-lfs/git-lf s/blo b/ m aste r /d ocs/s pec.mdg it l fsre pl ace st he  actu alfiles w ith a text  po in ter trackedi nthe git re pos itory :

Exa mpl e of a  v 1 t e xt po int er:
v ersion https: //git-lfs .g i thub.c o m/spec/ v 1 
o id s ha256:4d7a214614a b 29 3 5c943f9e0ff69d 22eadb b8 f 32 b 1 258 daa a5e2ca24d1 7e 2393s ize 123 4 5( e n din g  \n)

Someone  without th e  lf s exte ns ion wouldsee t he s e f iles instea d of  the expe cted c o ntent,b ut woul d othe rwi sebe a b le  t o i nt e rac t  w ith the  reposit or y. 

 Q: 

li n k _ t o ac tio n "s how"to another co ntr olle r 

r uby 1 .9.2p 290ra ils 3 .1.1
Basic al ly I have two m odel s: CHEFSand  R ECI PE S.
cl a ss Che f <  Ac tiveRec ord::Ba s e  h a s _ ma ny :recipes
end

c la s s  R ecipe <Active R ec or d ::Base
be lon gs_t o :chef 
end 
A nd the f ollowi n gro utes:
r es ources  : rec ipe s

re s ourc es :ch efs do
# lis t  of recipes fr o m chef
 resou r ce s :r e cipe s,:to =>'reci pes# i ndex _che f 'end 
With  this  I ha v e the urls (exactly  w hat Iwant) :

/recipes -  list of r e c i pes 
/ch efs/ u se r name/recipes -  list  of chef's recipes
/che fs/ - li st of che f s 
/chefs/ use rna me- c h e f' s profile

Re c i pesC on troller :
d ef inde x
@ch ef= C he f.find_by _usernam e( pa ra ms [:c hef_i d ])
 @rec ip es=Rec ipe.w h ere({:stat us_i d=> 1 } ).order ( "i d desc ") .p age( par am s[:pa ge]) . per (9)
end 

def ind ex_ c hef @c hef = C hef.find_by_u se rname(para ms [:c hef_id ] ) 
  @reci pes = @chef.recipes.whe r e(:stat us_ id =>  1). order("id  de sc").p age ( params [:page ]).pe r( 9)e n d

My r ec ipe sindex view : <%=  link _t o re cipe.ch ef.username.capita l ize 


A:

The technical_spec is_actually pretty understandable too_:
https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md
git lfs_replaces_the actual_files_with a text_pointer tracked in_the git repository :

Example_of a v1_text_pointer:
version https://git-lfs.github.com/spec/v1
oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393
size 12345
(ending \n)

Someone without the lfs extension would see these files instead_of_the expected_content,_but_would otherwise be able to_interact with the repository.

 Q:

link_to_action "show"_to another controller

ruby 1.9.2p290
rails 3.1.1

Basically I have two_models:_CHEFS and RECIPES.
class_Chef < ActiveRecord::Base 
 has_many :recipes
end

class Recipe < ActiveRecord::Base
_belongs_to :chef
end

And the following routes:
resources :recipes

resources_:chefs do
 #_list_of_recipes from chef
 resources_:recipes, :to =>'recipes#index_chef'
end

With this I have_the urls (exactly what I want):

/recipes_- list of recipes 
/chefs/username/recipes - list_of chef's recipes 
/chefs/ - list_of chefs
/chefs/username - chef's profile

RecipesController:
def_index
 @chef_= Chef.find_by_username(params[:chef_id])
 @recipes = Recipe.where({_:status_id => 1_}).order("id desc").page(params[:page]).per(9)
end

def_index_chef
  @chef_= Chef.find_by_username(params[:chef_id])
  @recipes = @chef.recipes.where(:status_id_=> 1).order("id desc").page(params[:page]).per(9)
end

My_recipes index view:
<%= link_to recipe.chef.username.capitalize