ruby on rails - Why variable return nil -


i've got little problem. i've got 2 method, index , create. when try check what's in randomuserid see 'nill', in view correct.

  def index     @randomuserid = rand(1..30)   end    def create     puts "random: "     puts @randomuserid    end 

puts returns nil after outputs string, create methods returns nil.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -